1 /*
2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  *
8  * See the COPYRIGHT file distributed with this work for additional
9  * information regarding copyright ownership.
10  */
11 
12 #include <stdbool.h>
13 
14 #include <isc/lang.h>
15 #include <isc/types.h>
16 
17 #include <dns/db.h>
18 #include <dns/types.h>
19 
20 #ifndef DNS_PRIVATE_H
21 #define DNS_PRIVATE_H
22 
23 ISC_LANG_BEGINDECLS
24 
25 isc_result_t
26 dns_private_chains(dns_db_t *db, dns_dbversion_t *ver,
27 		   dns_rdatatype_t privatetype, bool *build_nsec,
28 		   bool *build_nsec3);
29 /*%<
30  * Examine the NSEC, NSEC3PARAM and privatetype RRsets at the apex of the
31  * database to determine which of NSEC or NSEC3 chains we are currently
32  * maintaining.  In normal operations only one of NSEC or NSEC3 is being
33  * maintained but when we are transitiong between NSEC and NSEC3 we need
34  * to update both sets of chains.  If 'privatetype' is zero then the
35  * privatetype RRset will not be examined.
36  *
37  * Requires:
38  * \li	'db' is valid.
39  * \li	'version' is valid or NULL.
40  * \li	'build_nsec' is a pointer to a bool or NULL.
41  * \li	'build_nsec3' is a pointer to a bool or NULL.
42  *
43  * Returns:
44  * \li 	ISC_R_SUCCESS, 'build_nsec' and 'build_nsec3' will be valid.
45  * \li	other on error
46  */
47 
48 isc_result_t
49 dns_private_totext(dns_rdata_t *privaterdata, isc_buffer_t *buffer);
50 /*%<
51  * Convert a private-type RR 'privaterdata' to human-readable form,
52  * and place the result in 'buffer'.  The text should indicate
53  * which action the private-type record specifies and whether the
54  * action has been completed.
55  *
56  * Requires:
57  * \li	'privaterdata' is a valid rdata containing at least five bytes
58  * \li	'buffer' is a valid buffer
59  *
60  * Returns:
61  * \li 	ISC_R_SUCCESS
62  * \li	other on error
63  */
64 
65 ISC_LANG_ENDDECLS
66 
67 #endif /* ifndef DNS_PRIVATE_H */
68