]> sourceware.org Git - glibc.git/blame - resolv/res_hconf.h
update from main archive 970214
[glibc.git] / resolv / res_hconf.h
CommitLineData
fa0bc87c
RM
1/* Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
2 Contributed by David Mosberger (davidm@azstarnet.com).
3
4The GNU C Library is free software; you can redistribute it and/or
5modify it under the terms of the GNU Library General Public License as
6published by the Free Software Foundation; either version 2 of the
7License, or (at your option) any later version.
8
9The GNU C Library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12Library General Public License for more details.
13
14You should have received a copy of the GNU Library General Public
15License along with the GNU C Library; see the file COPYING.LIB. If
16not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17Cambridge, 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
26enum Name_Service {
27 SERVICE_NONE = 0,
28 SERVICE_BIND, SERVICE_HOSTS, SERVICE_NIS,
29 SERVICE_MAX
30};
31
32struct 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
45extern void _res_hconf_init (void);
46extern void _res_hconf_trim_domain (char * domain);
47extern void _res_hconf_trim_domains (struct hostent * hp);
48extern void _res_hconf_reorder_addrs (struct hostent * hp);
49
50#endif /* _RES_HCONF_H_ */
This page took 0.046974 seconds and 5 git commands to generate.