2 * Copyright (C) 2011, 2012 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.
19 /*! \file dns/dlz_open.h */
29 * This header provides a minimal set of defines and typedefs needed
30 * for the entry points of an external DLZ module for bind9.
33 #define DLZ_DLOPEN_VERSION 2
36 * dlz_dlopen_version() is required for all DLZ external drivers. It
37 * should return DLZ_DLOPEN_VERSION
39 typedef int dlz_dlopen_version_t (unsigned int *flags);
42 * dlz_dlopen_create() is required for all DLZ external drivers.
44 typedef isc_result_t dlz_dlopen_create_t (const char *dlzname,
51 * dlz_dlopen_destroy() is optional, and will be called when the
52 * driver is unloaded if supplied
54 typedef void dlz_dlopen_destroy_t (void *dbdata);
57 * dlz_dlopen_findzonedb() is required for all DLZ external drivers
59 typedef isc_result_t dlz_dlopen_findzonedb_t (void *dbdata,
63 * dlz_dlopen_lookup() is required for all DLZ external drivers
65 typedef isc_result_t dlz_dlopen_lookup_t (const char *zone,
68 dns_sdlzlookup_t *lookup,
69 dns_clientinfomethods_t *methods,
70 dns_clientinfo_t *clientinfo);
73 * dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
74 * supplies authority information for the dns record
76 typedef isc_result_t dlz_dlopen_authority_t (const char *zone,
78 dns_sdlzlookup_t *lookup);
81 * dlz_dlopen_allowzonexfr() is optional, and should be supplied if
82 * you want to support zone transfers
84 typedef isc_result_t dlz_dlopen_allowzonexfr_t (void *dbdata,
89 * dlz_dlopen_allnodes() is optional, but must be supplied if supply a
90 * dlz_dlopen_allowzonexfr() function
92 typedef isc_result_t dlz_dlopen_allnodes_t (const char *zone,
94 dns_sdlzallnodes_t *allnodes);
97 * dlz_dlopen_newversion() is optional. It should be supplied if you
98 * want to support dynamic updates.
100 typedef isc_result_t dlz_dlopen_newversion_t (const char *zone,
105 * dlz_closeversion() is optional, but must be supplied if you supply
106 * a dlz_newversion() function
108 typedef void dlz_dlopen_closeversion_t (const char *zone,
109 isc_boolean_t commit,
114 * dlz_dlopen_configure() is optional, but must be supplied if you
115 * want to support dynamic updates
117 typedef isc_result_t dlz_dlopen_configure_t (dns_view_t *view,
121 * dlz_dlopen_setclientcallback() is optional, but must be supplied if you
122 * want to retrieve information about the client (e.g., source address)
123 * before sending a replay.
125 typedef isc_result_t dlz_dlopen_setclientcallback_t (dns_view_t *view,
130 * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
131 * to support dynamic updates
133 typedef isc_boolean_t dlz_dlopen_ssumatch_t (const char *signer,
138 isc_uint32_t keydatalen,
139 unsigned char *keydata,
143 * dlz_dlopen_addrdataset() is optional, but must be supplied if you
144 * want to support dynamic updates
146 typedef isc_result_t dlz_dlopen_addrdataset_t (const char *name,
147 const char *rdatastr,
152 * dlz_dlopen_subrdataset() is optional, but must be supplied if you
153 * want to support dynamic updates
155 typedef isc_result_t dlz_dlopen_subrdataset_t (const char *name,
156 const char *rdatastr,
161 * dlz_dlopen_delrdataset() is optional, but must be supplied if you
162 * want to support dynamic updates
164 typedef isc_result_t dlz_dlopen_delrdataset_t (const char *name,