2 * Copyright (C) 2009 Internet Systems Consortium, Inc. ("ISC")
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
17 /* $Id: dnsconf.h,v 1.3 2009/09/02 23:48:02 tbox Exp $ */
20 #define IRS_DNSCONF_H 1
25 * The IRS dnsconf module parses an "advanced" configuration file related to
26 * the DNS library, such as trusted keys for DNSSEC validation, and creates
27 * the corresponding configuration objects for the DNS library modules.
30 * This module is very experimental and the configuration syntax or library
31 * interfaces may change in future versions. Currently, only the
32 * 'trusted-keys' statement is supported, whose syntax is the same as the
33 * same name of statement for named.conf.
36 #include <irs/types.h>
39 * A compound structure storing DNS key information mainly for DNSSEC
40 * validation. A dns_key_t object will be created using the 'keyname' and
41 * 'keydatabuf' members with the dst_key_fromdns() function.
43 typedef struct irs_dnsconf_dnskey {
45 isc_buffer_t *keydatabuf;
46 ISC_LINK(struct irs_dnsconf_dnskey) link;
47 } irs_dnsconf_dnskey_t;
49 typedef ISC_LIST(irs_dnsconf_dnskey_t) irs_dnsconf_dnskeylist_t;
54 irs_dnsconf_load(isc_mem_t *mctx, const char *filename, irs_dnsconf_t **confp);
56 * Load the "advanced" DNS configuration file 'filename' in the "dns.conf"
57 * format, and create a new irs_dnsconf_t object from the configuration.
61 *\li 'mctx' is a valid memory context.
63 *\li 'filename' != NULL
65 *\li 'confp' != NULL && '*confp' == NULL
69 irs_dnsconf_destroy(irs_dnsconf_t **confp);
71 * Destroy the dnsconf object.
75 *\li '*confp' is a valid dnsconf object.
82 irs_dnsconf_dnskeylist_t *
83 irs_dnsconf_gettrustedkeys(irs_dnsconf_t *conf);
85 * Return a list of key information stored in 'conf'.
89 *\li 'conf' is a valid dnsconf object.
94 #endif /* IRS_DNSCONF_H */