2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 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: a6.h,v 1.11.2.1 2004/03/09 06:11:12 marka Exp $ */
24 #include <isc/stdtime.h>
25 #include <isc/bitstring.h>
28 #include <dns/types.h>
30 typedef isc_result_t (*dns_findfunc_t)(void *arg, dns_name_t *name,
33 dns_rdataset_t *rdataset,
34 dns_rdataset_t *sigrdataset);
36 typedef void (*dns_rrsetfunc_t)(void *arg, dns_name_t *name,
37 dns_rdataset_t *rdataset,
38 dns_rdataset_t *sigrdataset);
40 typedef void (*dns_in6addrfunc_t)(dns_a6context_t *a6ctx);
42 typedef void (*dns_a6missingfunc_t)(dns_a6context_t *a6ctx, dns_name_t *name);
44 struct dns_a6context {
48 dns_rrsetfunc_t rrset;
49 dns_in6addrfunc_t address;
50 dns_a6missingfunc_t missing;
55 isc_stdtime_t expiration;
56 unsigned int prefixlen;
57 struct in6_addr in6addr;
58 isc_bitstring_t bitstring;
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);
68 dns_a6_reset(dns_a6context_t *a6ctx);
71 dns_a6_invalidate(dns_a6context_t *a6ctx);
74 dns_a6_copy(dns_a6context_t *source, dns_a6context_t *target);
77 dns_a6_foreach(dns_a6context_t *a6ctx, dns_rdataset_t *rdataset,