xref: /titanic_50/usr/src/lib/libresolv2/common/irs/dns_p.h (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
1 /*
2  * Copyright (c) 1997-2000 by Sun Microsystems, Inc.
3  * All rights reserved.
4  */
5 
6 /*
7  * Copyright (c) 1996-1999 by Internet Software Consortium.
8  *
9  * Permission to use, copy, modify, and distribute this software for any
10  * purpose with or without fee is hereby granted, provided that the above
11  * copyright notice and this permission notice appear in all copies.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
14  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
15  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
16  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
17  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
18  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
19  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20  * SOFTWARE.
21  */
22 
23 
24 #pragma ident	"%Z%%M%	%I%	%E% SMI"
25 
26 /*
27  * $Id: dns_p.h,v 1.11 1999/06/03 20:50:36 vixie Exp $
28  */
29 
30 #ifndef _DNS_P_H_INCLUDED
31 #define	_DNS_P_H_INCLUDED
32 
33 #define	maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0 || \
34 			       (ok)(nm) != 0)
35 #define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
36 #define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
37 
38 /*
39  * Object state.
40  */
41 struct dns_p {
42 	void			*hes_ctx;
43 	struct __res_state	*res;
44 	void                    (*free_res) __P((void *));
45 };
46 
47 /*
48  * Methods.
49  */
50 
51 extern struct irs_gr *	irs_dns_gr __P((struct irs_acc *));
52 extern struct irs_pw *	irs_dns_pw __P((struct irs_acc *));
53 extern struct irs_sv *	irs_dns_sv __P((struct irs_acc *));
54 extern struct irs_pr *	irs_dns_pr __P((struct irs_acc *));
55 extern struct irs_ho *	irs_dns_ho __P((struct irs_acc *));
56 extern struct irs_nw *	irs_dns_nw __P((struct irs_acc *));
57 
58 #endif /*_DNS_P_H_INCLUDED*/
59