4 * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
20 * @(#)res.h 5.10 (Berkeley) 6/1/90
21 * Id: res.h,v 1.3 2009/03/03 23:49:07 tbox Exp
25 *******************************************************************************
29 * Definitions used by modules of the name server lookup program.
36 *******************************************************************************
49 * Define return statuses in addtion to the ones defined in namserv.h
50 * let SUCCESS be a synonym for NOERROR
52 * TIME_OUT - a socket connection timed out.
53 * NO_INFO - the server didn't find any info about the host.
54 * ERROR - one of the following types of errors:
55 * dn_expand, res_mkquery failed
56 * bad command line, socket operation failed, etc.
57 * NONAUTH - the server didn't have the desired info but
58 * returned the name(s) of some servers who should.
59 * NO_RESPONSE - the server didn't respond.
72 #define NO_RESPONSE -5
75 * Define additional options for the resolver state structure.
77 * RES_DEBUG2 more verbose debug level
80 #define RES_DEBUG2 0x00400000
83 * Maximum length of server, host and file names.
90 * Modified struct hostent from <netdb.h>
92 * "Structures returned by network data base library. All addresses
93 * are supplied in host order, and returned in network order (suitable
94 * for use in system calls)."
104 char *name
; /* official name of host */
105 char **domains
; /* domains it serves */
106 AddrInfo
**addrList
; /* list of addresses from name server */
110 char *name
; /* official name of host */
111 char **aliases
; /* alias list */
112 AddrInfo
**addrList
; /* list of addresses from name server */
113 ServerInfo
**servers
;
120 extern int pickString(const char *, char *, size_t);
121 extern int matchString(const char *, const char *);
122 extern int StringToType(char *, int, FILE *);
123 extern int StringToClass(char *, int, FILE *);