1/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by David Mosberger (davidm@azstarnet.com).
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
18
19#ifndef _RES_HCONF_H_
20#define _RES_HCONF_H_
21
22#include <netdb.h>
23
24#define TRIMDOMAINS_MAX 4
25
26struct hconf
27{
28 int initialized;
29 int unused1;
30 int unused2[4];
31 int num_trimdomains;
32 const char *trimdomain[TRIMDOMAINS_MAX];
33 unsigned int flags;
34# define HCONF_FLAG_INITED (1 << 0) /* initialized? */
35# define HCONF_FLAG_SPOOF (1 << 1) /* refuse spoofed addresses */
36# define HCONF_FLAG_SPOOFALERT (1 << 2) /* syslog warning of spoofed */
37# define HCONF_FLAG_REORDER (1 << 3) /* list best address first */
38# define HCONF_FLAG_MULTI (1 << 4) /* see comments for gethtbyname() */
39};
40extern struct hconf _res_hconf;
41
42extern void _res_hconf_init (void);
43extern void _res_hconf_trim_domain (char *domain);
44extern void _res_hconf_trim_domains (struct hostent *hp);
45extern void _res_hconf_reorder_addrs (struct hostent *hp);
46
47#endif /* _RES_HCONF_H_ */
48