Merge from vendor branch ZLIB:
[dragonfly.git] / contrib / bind-9.2.4rc7 / lib / dns / include / dns / a6.h
1 /*
2  * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 1999-2001  Internet Software Consortium.
4  *
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.
8  *
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.
16  */
17
18 /* $Id: a6.h,v 1.11.2.1 2004/03/09 06:11:12 marka Exp $ */
19
20 #ifndef DNS_A6_H
21 #define DNS_A6_H 1
22
23 #include <isc/lang.h>
24 #include <isc/stdtime.h>
25 #include <isc/bitstring.h>
26 #include <isc/net.h>
27
28 #include <dns/types.h>
29
30 typedef isc_result_t (*dns_findfunc_t)(void *arg, dns_name_t *name,
31                                        dns_rdatatype_t type,
32                                        isc_stdtime_t now,
33                                        dns_rdataset_t *rdataset,
34                                        dns_rdataset_t *sigrdataset);
35
36 typedef void (*dns_rrsetfunc_t)(void *arg, dns_name_t *name,
37                                 dns_rdataset_t *rdataset,
38                                 dns_rdataset_t *sigrdataset);
39
40 typedef void (*dns_in6addrfunc_t)(dns_a6context_t *a6ctx);
41
42 typedef void (*dns_a6missingfunc_t)(dns_a6context_t *a6ctx, dns_name_t *name);
43
44 struct dns_a6context {
45         unsigned int                    magic;
46         /* Public. */
47         dns_findfunc_t                  find;
48         dns_rrsetfunc_t                 rrset;
49         dns_in6addrfunc_t               address;
50         dns_a6missingfunc_t             missing;
51         void *                          arg;
52         unsigned int                    chains;
53         unsigned int                    depth;
54         isc_stdtime_t                   now;
55         isc_stdtime_t                   expiration;
56         unsigned int                    prefixlen;
57         struct in6_addr                 in6addr;
58         isc_bitstring_t                 bitstring;
59 };
60
61 ISC_LANG_BEGINDECLS
62
63 void
64 dns_a6_init(dns_a6context_t *a6ctx, dns_findfunc_t find, dns_rrsetfunc_t rrset,
65             dns_in6addrfunc_t address, dns_a6missingfunc_t missing, void *arg);
66
67 void
68 dns_a6_reset(dns_a6context_t *a6ctx);
69
70 void
71 dns_a6_invalidate(dns_a6context_t *a6ctx);
72
73 void
74 dns_a6_copy(dns_a6context_t *source, dns_a6context_t *target);
75
76 isc_result_t
77 dns_a6_foreach(dns_a6context_t *a6ctx, dns_rdataset_t *rdataset,
78                isc_stdtime_t now);
79
80 ISC_LANG_ENDDECLS
81
82 #endif /* DNS_A6_H */