Deleted Added
full compact
resolv.h (28982) resolv.h (36888)
1/*-
2 * Copyright (c) 1983, 1987, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
1/*-
2 * Copyright (c) 1983, 1987, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34/*
35 * Portions Copyright (c) 1996 by Internet Software Consortium.
32 *
36 *
33 * -
34 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
35 *
36 * Permission to use, copy, modify, and distribute this software for any
37 * purpose with or without fee is hereby granted, provided that the above
37 * Permission to use, copy, modify, and distribute this software for any
38 * purpose with or without fee is hereby granted, provided that the above
38 * copyright notice and this permission notice appear in all copies, and that
39 * the name of Digital Equipment Corporation not be used in advertising or
40 * publicity pertaining to distribution of the document or software without
41 * specific, written prior permission.
39 * copyright notice and this permission notice appear in all copies.
42 *
40 *
43 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
44 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
45 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
46 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
41 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
42 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
43 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
44 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
47 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
48 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
49 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
50 * SOFTWARE.
45 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
46 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
47 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48 * SOFTWARE.
51 * -
52 * --Copyright--
53 *
49 */
50
51/*
54 * @(#)resolv.h 8.1 (Berkeley) 6/2/93
52 * @(#)resolv.h 8.1 (Berkeley) 6/2/93
55 * From Id: resolv.h,v 8.18 1997/06/01 20:34:32 vixie Exp
56 * $Id: resolv.h,v 1.13 1997/06/27 08:32:38 peter Exp $
53 * From Id: resolv.h,v 8.12 1998/04/28 19:36:46 halley Exp $
54 * $Id: resolv.h,v 1.14 1997/09/01 01:19:10 brian Exp $
57 */
58
59#ifndef _RESOLV_H_
60#define _RESOLV_H_
61
62#include <sys/param.h>
63#include <sys/types.h>
64#include <sys/cdefs.h>

--- 5 unchanged lines hidden (view full) ---

70 * in preprocessor commands such as "#if (__RES > 19931104)". Do not
71 * compare for equality; rather, use it to determine whether your resolver
72 * is new enough to contain a certain feature.
73 */
74
75#define __RES 19960801
76
77/*
55 */
56
57#ifndef _RESOLV_H_
58#define _RESOLV_H_
59
60#include <sys/param.h>
61#include <sys/types.h>
62#include <sys/cdefs.h>

--- 5 unchanged lines hidden (view full) ---

68 * in preprocessor commands such as "#if (__RES > 19931104)". Do not
69 * compare for equality; rather, use it to determine whether your resolver
70 * is new enough to contain a certain feature.
71 */
72
73#define __RES 19960801
74
75/*
76 * This used to be defined in res_query.c, now it's in herror.c. It was
77 * never extern'd by any *.h file before it was placed here. herror.c is
78 * part of libresolv.a even though it might make more sense in libnetdb.a
79 * or even libnet.a.
80 */
81
82extern int h_errno;
83
84/*
78 * Resolver configuration file.
79 * Normally not present, but may contain the address of the
80 * inital name server(s) to query and the domain search list.
81 */
82
83#ifndef _PATH_RESCONF
84#define _PATH_RESCONF "/etc/resolv.conf"
85#endif

--- 52 unchanged lines hidden (view full) ---

138#define RES_NOTLDQUERY 0x00004000 /* Don't query TLD names */
139
140#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
141
142/*
143 * Resolver "pfcode" values. Used by dig.
144 */
145#define RES_PRF_STATS 0x00000001
85 * Resolver configuration file.
86 * Normally not present, but may contain the address of the
87 * inital name server(s) to query and the domain search list.
88 */
89
90#ifndef _PATH_RESCONF
91#define _PATH_RESCONF "/etc/resolv.conf"
92#endif

--- 52 unchanged lines hidden (view full) ---

145#define RES_NOTLDQUERY 0x00004000 /* Don't query TLD names */
146
147#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
148
149/*
150 * Resolver "pfcode" values. Used by dig.
151 */
152#define RES_PRF_STATS 0x00000001
146/* 0x00000002 */
153#define RES_PRF_UPDATE 0x00000002
147#define RES_PRF_CLASS 0x00000004
148#define RES_PRF_CMD 0x00000008
149#define RES_PRF_QUES 0x00000010
150#define RES_PRF_ANS 0x00000020
151#define RES_PRF_AUTH 0x00000040
152#define RES_PRF_ADD 0x00000080
153#define RES_PRF_HEAD1 0x00000100
154#define RES_PRF_HEAD2 0x00000200
155#define RES_PRF_TTLID 0x00000400
156#define RES_PRF_HEADX 0x00000800
157#define RES_PRF_QUERY 0x00001000
158#define RES_PRF_REPLY 0x00002000
159#define RES_PRF_INIT 0x00004000
160/* 0x00008000 */
161
154#define RES_PRF_CLASS 0x00000004
155#define RES_PRF_CMD 0x00000008
156#define RES_PRF_QUES 0x00000010
157#define RES_PRF_ANS 0x00000020
158#define RES_PRF_AUTH 0x00000040
159#define RES_PRF_ADD 0x00000080
160#define RES_PRF_HEAD1 0x00000100
161#define RES_PRF_HEAD2 0x00000200
162#define RES_PRF_TTLID 0x00000400
163#define RES_PRF_HEADX 0x00000800
164#define RES_PRF_QUERY 0x00001000
165#define RES_PRF_REPLY 0x00002000
166#define RES_PRF_INIT 0x00004000
167/* 0x00008000 */
168
162/* hooks are still experimental as of 4.9.2 */
163typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
164 res_sendhookact;
165
166typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
167 const u_char **query,
168 int *querylen,
169 u_char *ans,
170 int anssiz,

--- 23 unchanged lines hidden (view full) ---

194#define res_dnok __res_dnok
195#define sym_ston __sym_ston
196#define sym_ntos __sym_ntos
197#define sym_ntop __sym_ntop
198#define b64_ntop __b64_ntop
199#define b64_pton __b64_pton
200#define loc_ntoa __loc_ntoa
201#define loc_aton __loc_aton
169typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
170 res_sendhookact;
171
172typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
173 const u_char **query,
174 int *querylen,
175 u_char *ans,
176 int anssiz,

--- 23 unchanged lines hidden (view full) ---

200#define res_dnok __res_dnok
201#define sym_ston __sym_ston
202#define sym_ntos __sym_ntos
203#define sym_ntop __sym_ntop
204#define b64_ntop __b64_ntop
205#define b64_pton __b64_pton
206#define loc_ntoa __loc_ntoa
207#define loc_aton __loc_aton
208#define fp_resstat __fp_resstat /* XXX new divert */
209#define p_query __p_query /* XXX new divert */
202#define dn_skipname __dn_skipname
203#define fp_resstat __fp_resstat
204#define fp_query __fp_query
205#define fp_nquery __fp_nquery
206#define hostalias __hostalias
207#define putlong __putlong
208#define putshort __putshort
209#define p_class __p_class
210#define p_time __p_time
211#define p_type __p_type
212#define p_query __p_query
213#define p_cdnname __p_cdnname
210#define dn_skipname __dn_skipname
211#define fp_resstat __fp_resstat
212#define fp_query __fp_query
213#define fp_nquery __fp_nquery
214#define hostalias __hostalias
215#define putlong __putlong
216#define putshort __putshort
217#define p_class __p_class
218#define p_time __p_time
219#define p_type __p_type
220#define p_query __p_query
221#define p_cdnname __p_cdnname
222#define p_section __p_section /* XXX new func in 8.1 */
214#define p_cdname __p_cdname
215#define p_fqnname __p_fqnname
216#define p_fqname __p_fqname
223#define p_cdname __p_cdname
224#define p_fqnname __p_fqnname
225#define p_fqname __p_fqname
217#define p_rr __p_rr
226/* XXX p_rr gone */
218#define p_option __p_option
219#define p_secstodate __p_secstodate
220#define dn_count_labels __dn_count_labels
221#define dn_comp __dn_comp
227#define p_option __p_option
228#define p_secstodate __p_secstodate
229#define dn_count_labels __dn_count_labels
230#define dn_comp __dn_comp
231#define dn_expand __dn_expand /* XXX unmasked */
232#define res_init __res_init /* XXX unmasked */
222#define res_randomid __res_randomid
233#define res_randomid __res_randomid
234#define res_query __res_query /* XXX unmasked */
235#define res_search __res_search /* XXX unmasked */
236#define res_querydomain __res_querydomain /* XXX unmasked */
237#define res_mkquery __res_mkquery /* XXX unmasked */
238#define res_send __res_send /* XXX unmasked */
223#define res_isourserver __res_isourserver
224#define res_nameinquery __res_nameinquery
225#define res_queriesmatch __res_queriesmatch
226#define res_close __res_close
239#define res_isourserver __res_isourserver
240#define res_nameinquery __res_nameinquery
241#define res_queriesmatch __res_queriesmatch
242#define res_close __res_close
243#define res_mkupdate __res_mkupdate /* XXX new func in 8.1 */
244#define res_mkupdrec __res_mkupdrec /* XXX new func in 8.1 */
245#define res_freeupdrec __res_freeupdrec /* XXX new func in 8.1 */
227
246
228#ifdef BIND_RES_POSIX3
229#define dn_expand __dn_expand
230#define res_init __res_init
231#define res_query __res_query
232#define res_search __res_search
233#define res_querydomain __res_querydomain
234#define res_mkquery __res_mkquery
235#define res_send __res_send
236#endif
237
238__BEGIN_DECLS
239int res_hnok __P((const char *));
240int res_ownok __P((const char *));
241int res_mailok __P((const char *));
242int res_dnok __P((const char *));
247__BEGIN_DECLS
248int res_hnok __P((const char *));
249int res_ownok __P((const char *));
250int res_mailok __P((const char *));
251int res_dnok __P((const char *));
243int sym_ston __P((const struct res_sym *, char *, int *));
252int sym_ston __P((const struct res_sym *, const char *, int *));
244const char * sym_ntos __P((const struct res_sym *, int, int *));
245const char * sym_ntop __P((const struct res_sym *, int, int *));
246int b64_ntop __P((u_char const *, size_t, char *, size_t));
247int b64_pton __P((char const *, u_char *, size_t));
248int loc_aton __P((const char *, u_char *));
249const char * loc_ntoa __P((const u_char *, char *));
250int dn_skipname __P((const u_char *, const u_char *));
251void fp_resstat __P((struct __res_state *, FILE *));

--- 6 unchanged lines hidden (view full) ---

258const char * p_time __P((u_int32_t));
259const char * p_type __P((int));
260void p_query __P((const u_char *));
261const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
262const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
263const u_char * p_fqnname __P((const u_char *, const u_char *,
264 int, char *, int));
265const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
253const char * sym_ntos __P((const struct res_sym *, int, int *));
254const char * sym_ntop __P((const struct res_sym *, int, int *));
255int b64_ntop __P((u_char const *, size_t, char *, size_t));
256int b64_pton __P((char const *, u_char *, size_t));
257int loc_aton __P((const char *, u_char *));
258const char * loc_ntoa __P((const u_char *, char *));
259int dn_skipname __P((const u_char *, const u_char *));
260void fp_resstat __P((struct __res_state *, FILE *));

--- 6 unchanged lines hidden (view full) ---

267const char * p_time __P((u_int32_t));
268const char * p_type __P((int));
269void p_query __P((const u_char *));
270const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
271const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
272const u_char * p_fqnname __P((const u_char *, const u_char *,
273 int, char *, int));
274const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
266const u_char * p_rr __P((const u_char *, const u_char *, FILE *));
267const char * p_option __P((u_long));
268char * p_secstodate __P((u_long));
275const char * p_option __P((u_long));
276char * p_secstodate __P((u_long));
269int dn_count_labels __P((char *));
277int dn_count_labels __P((const char *));
270int dn_comp __P((const char *, u_char *, int,
271 u_char **, u_char **));
272int dn_expand __P((const u_char *, const u_char *, const u_char *,
273 char *, int));
274int res_init __P((void));
275u_int res_randomid __P((void));
276int res_query __P((const char *, int, int, u_char *, int));
277int res_search __P((const char *, int, int, u_char *, int));
278int res_querydomain __P((const char *, const char *, int, int,
279 u_char *, int));
280int res_mkquery __P((int, const char *, int, int, const u_char *,
281 int, const u_char *, u_char *, int));
282int res_send __P((const u_char *, int, u_char *, int));
283int res_isourserver __P((const struct sockaddr_in *));
284int res_nameinquery __P((const char *, int, int,
285 const u_char *, const u_char *));
286int res_queriesmatch __P((const u_char *, const u_char *,
287 const u_char *, const u_char *));
288void res_close __P((void));
278int dn_comp __P((const char *, u_char *, int,
279 u_char **, u_char **));
280int dn_expand __P((const u_char *, const u_char *, const u_char *,
281 char *, int));
282int res_init __P((void));
283u_int res_randomid __P((void));
284int res_query __P((const char *, int, int, u_char *, int));
285int res_search __P((const char *, int, int, u_char *, int));
286int res_querydomain __P((const char *, const char *, int, int,
287 u_char *, int));
288int res_mkquery __P((int, const char *, int, int, const u_char *,
289 int, const u_char *, u_char *, int));
290int res_send __P((const u_char *, int, u_char *, int));
291int res_isourserver __P((const struct sockaddr_in *));
292int res_nameinquery __P((const char *, int, int,
293 const u_char *, const u_char *));
294int res_queriesmatch __P((const u_char *, const u_char *,
295 const u_char *, const u_char *));
296void res_close __P((void));
297const char * p_section __P((int, int));
298int res_update __P((ns_updrec *));
299int res_mkupdate __P((ns_updrec *, u_char *, int));
300ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long));
301void res_freeupdrec __P((ns_updrec *));
289__END_DECLS
290
291#endif /* !_RESOLV_H_ */
302__END_DECLS
303
304#endif /* !_RESOLV_H_ */