Watt-32 tcp/ip  2.2 dev-rel.10
resolver.h
Go to the documentation of this file.
1 
5 /* ++Copyright++
6  * -
7  * Copyright (c)
8  * The Regents of the University of California. All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the distribution.
18  * 3. All advertising materials mentioning features or use of this software
19  * must display the following acknowledgement:
20  * This product includes software developed by the University of
21  * California, Berkeley and its contributors.
22  * 4. Neither the name of the University nor the names of its contributors
23  * may be used to endorse or promote products derived from this software
24  * without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29  * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36  * SUCH DAMAGE.
37  * -
38  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
39  *
40  * Permission to use, copy, modify, and distribute this software for any
41  * purpose with or without fee is hereby granted, provided that the above
42  * copyright notice and this permission notice appear in all copies, and that
43  * the name of Digital Equipment Corporation not be used in advertising or
44  * publicity pertaining to distribution of the document or software without
45  * specific, written prior permission.
46  *
47  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
48  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
49  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
50  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
51  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
52  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
53  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
54  * SOFTWARE.
55  * -
56  * --Copyright--
57  */
58 
59 /* Key:
60  * ucb = U C Berkeley 4.8.3 release
61  * vix = Paul Vixie of Digital
62  * del = Don Lewis of Harris
63  * mcsun = Piet Beertema of EUNet
64  * asp = Andrew Partan of UUNet
65  * pma = Paul Albitz of Hewlett Packard
66  * bb = Bryan Beecher of UMich
67  * mpa = Mark Andrews of CSIRO - DMS
68  * rossc = Ross Cartlidge of The Univeritsy of Sydney
69  * mtr = Marshall Rose of TPC.INT
70  * bg = Benoit Grange of INRIA
71  * ckd = Christopher Davis of Kapor Enterprises
72  * gns = Greg Shapiro of WPI
73  */
74 
75 /*
76  * 10.Dec-97 Adapted for Waterloo TCP/IP - G. Vanem (gvanem@yahoo.no)
77  *
78  */
79 
80 #ifndef _w32_RESOLVER_H_
81 #define _w32_RESOLVER_H_
82 
83 #if defined(__TURBOC__) && (__TURBOC__ <= 0x301)
84  /*
85  * Prevent tcc <= 2.01 from ever looking at this.
86  */
87 #else
88 
89 #include <stdio.h>
90 #include <stdlib.h>
91 #include <string.h>
92 #include <errno.h>
93 #include <ctype.h>
94 #include <sys/socket.h>
95 #include <arpa/nameser.h>
96 #include <arpa/inet.h>
97 #include <netdb.h>
98 #include <resolv.h>
99 
100 #include "wattcp.h"
101 #include "misc.h"
102 #include "run.h"
103 #include "timer.h"
104 #include "strings.h"
105 #include "bsdname.h"
106 #include "sock_ini.h"
107 #include "netaddr.h"
108 #include "pcdns.h"
109 #include "netaddr.h"
110 #include "pcbuf.h"
111 #include "pcdbug.h"
112 #include "pctcp.h"
113 #include "pcconfig.h"
114 
115 /* We export these since they are needed in e.g.e nslookup
116  */
117 W32_DATA const char *_res_opcodes[];
118 W32_DATA const char *_res_resultcodes[];
119 
120 W32_DATA char *res_cfg_options, *res_cfg_aliases;
121 
122 W32_FUNC void W32_CALL res_init0 (void);
123 
124 #define CHECK_SRVR_ADDR 1 /* check nameserver address in responses */
125 #define RESOLVSORT 1 /* allow sorting of addresses in gethostbyname (mpa) */
126 #define RFC1535 1 /* use RFC 1535 default for "search" list (vix) */
127 #define ALLOW_T_UNSPEC 0 /* enable the "unspec" RR type for old athena (ucb) */
128 #define ALLOW_UPDATES 0 /* 1: enable updating resource records */
129 
130 #endif /* old __TURBOC__ */
131 #endif /* _w32_RESOLVER_H_ */
Core definitions.