Add BIND 9.2.4rc7.
[dragonfly.git] / contrib / bind-9.2.4rc7 / lib / dns / include / dns / nxt.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: nxt.h,v 1.12.2.1 2004/03/09 06:11:19 marka Exp $ */
19
20 #ifndef DNS_NXT_H
21 #define DNS_NXT_H 1
22
23 #include <isc/lang.h>
24
25 #include <dns/types.h>
26
27 #define DNS_NXT_BUFFERSIZE (256 + 16)
28
29 ISC_LANG_BEGINDECLS
30
31 isc_result_t
32 dns_nxt_buildrdata(dns_db_t *db, dns_dbversion_t *version,
33                    dns_dbnode_t *node, dns_name_t *target,
34                    unsigned char *buffer, dns_rdata_t *rdata);
35 /*
36  * Build the rdata of a NXT record.
37  *
38  * Requires:
39  *      buffer  Points to a temporary buffer of at least
40  *              DNS_NXT_BUFFERSIZE bytes.
41  *      rdata   Points to an initialized dns_rdata_t.
42  *
43  * Ensures:
44  *      *rdata  Contains a valid NXT rdata.  The 'data' member refers
45  *              to 'buffer'.
46  */
47
48 isc_result_t
49 dns_nxt_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
50               dns_name_t *target, dns_ttl_t ttl);
51 /*
52  * Build a NXT record and add it to a database.
53  */
54
55 isc_boolean_t
56 dns_nxt_typepresent(dns_rdata_t *nxt, dns_rdatatype_t type);
57 /*
58  * Determine if a type is marked as present in an NXT record.
59  *
60  * Requires:
61  *      'nxt' points to a valid rdataset of type NXT
62  *      'type' < 128
63  *
64  */
65
66 ISC_LANG_ENDDECLS
67
68 #endif /* DNS_NXT_H */