Add BIND 9.2.4rc7.
[dragonfly.git] / contrib / bind-9.2.4rc7 / bin / named / include / named / query.h
blob4de0af36dc56c3230295f58b02a28d8d476e4d36
1 /*
2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2002 Internet Software Consortium.
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: query.h,v 1.28.2.4 2004/03/09 06:09:23 marka Exp $ */
20 #ifndef NAMED_QUERY_H
21 #define NAMED_QUERY_H 1
23 #include <isc/types.h>
24 #include <isc/buffer.h>
25 #include <isc/netaddr.h>
27 #include <dns/types.h>
28 #include <dns/a6.h>
30 #include <named/types.h>
32 typedef struct ns_dbversion {
33 dns_db_t *db;
34 dns_dbversion_t *version;
35 isc_boolean_t queryok;
36 ISC_LINK(struct ns_dbversion) link;
37 } ns_dbversion_t;
39 struct ns_query {
40 unsigned int attributes;
41 unsigned int restarts;
42 isc_boolean_t timerset;
43 dns_name_t * qname;
44 dns_name_t * origqname;
45 unsigned int dboptions;
46 unsigned int fetchoptions;
47 dns_db_t * gluedb;
48 dns_db_t * authdb;
49 dns_zone_t * authzone;
50 isc_boolean_t authdbset;
51 isc_boolean_t isreferral;
52 dns_fetch_t * fetch;
53 dns_a6context_t a6ctx;
54 isc_bufferlist_t namebufs;
55 ISC_LIST(ns_dbversion_t) activeversions;
56 ISC_LIST(ns_dbversion_t) freeversions;
58 * Additional state used during IPv6 response synthesis only.
60 struct {
61 isc_netaddr_t na;
62 } synth;
65 #define NS_QUERYATTR_RECURSIONOK 0x0001
66 #define NS_QUERYATTR_CACHEOK 0x0002
67 #define NS_QUERYATTR_PARTIALANSWER 0x0004
68 #define NS_QUERYATTR_NAMEBUFUSED 0x0008
69 #define NS_QUERYATTR_RECURSING 0x0010
70 #define NS_QUERYATTR_CACHEGLUEOK 0x0020
71 #define NS_QUERYATTR_QUERYOKVALID 0x0040
72 #define NS_QUERYATTR_QUERYOK 0x0080
73 #define NS_QUERYATTR_WANTRECURSION 0x0100
74 #define NS_QUERYATTR_WANTDNSSEC 0x0200
75 #define NS_QUERYATTR_NOAUTHORITY 0x0400
76 #define NS_QUERYATTR_NOADDITIONAL 0x0800
78 isc_result_t
79 ns_query_init(ns_client_t *client);
81 void
82 ns_query_free(ns_client_t *client);
84 void
85 ns_query_start(ns_client_t *client);
87 #endif /* NAMED_QUERY_H */