Back to index

glibc  2.9
res_hconf.h
Go to the documentation of this file.
00001 /* Copyright (C) 1993, 1995-1998, 2006 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by David Mosberger (davidm@azstarnet.com).
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _RES_HCONF_H_
00021 #define _RES_HCONF_H_
00022 
00023 #include <netdb.h>
00024 
00025 #define TRIMDOMAINS_MAX     4
00026 
00027 struct hconf
00028 {
00029   int initialized;
00030   int unused1;
00031   int unused2[4];
00032   int num_trimdomains;
00033   const char *trimdomain[TRIMDOMAINS_MAX];
00034   unsigned int flags;
00035 #  define HCONF_FLAG_INITED (1 << 0) /* initialized? */
00036 #  define HCONF_FLAG_SPOOF  (1 << 1) /* refuse spoofed addresses */
00037 #  define HCONF_FLAG_SPOOFALERT    (1 << 2) /* syslog warning of spoofed */
00038 #  define HCONF_FLAG_REORDER       (1 << 3) /* list best address first */
00039 #  define HCONF_FLAG_MULTI  (1 << 4) /* see comments for gethtbyname() */
00040 };
00041 extern struct hconf _res_hconf;
00042 
00043 extern void _res_hconf_init (void);
00044 extern void _res_hconf_trim_domain (char *domain);
00045 extern void _res_hconf_trim_domains (struct hostent *hp);
00046 extern void _res_hconf_reorder_addrs (struct hostent *hp);
00047 
00048 #endif /* _RES_HCONF_H_ */