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