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 1
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);
71 * dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
72 * supplies authority information for the dns record
74 typedef isc_result_t dlz_dlopen_authority_t (const char *zone,
76 dns_sdlzlookup_t *lookup);
79 * dlz_dlopen_allowzonexfr() is optional, and should be supplied if
80 * you want to support zone transfers
82 typedef isc_result_t dlz_dlopen_allowzonexfr_t (void *dbdata,
87 * dlz_dlopen_allnodes() is optional, but must be supplied if supply a
88 * dlz_dlopen_allowzonexfr() function
90 typedef isc_result_t dlz_dlopen_allnodes_t (const char *zone,
92 dns_sdlzallnodes_t *allnodes);
95 * dlz_dlopen_newversion() is optional. It should be supplied if you
96 * want to support dynamic updates.
98 typedef isc_result_t dlz_dlopen_newversion_t (const char *zone,
103 * dlz_closeversion() is optional, but must be supplied if you supply
104 * a dlz_newversion() function
106 typedef void dlz_dlopen_closeversion_t (const char *zone,
107 isc_boolean_t commit,
112 * dlz_dlopen_configure() is optional, but must be supplied if you
113 * want to support dynamic updates
115 typedef isc_result_t dlz_dlopen_configure_t (dns_view_t *view,
119 * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
120 * to support dynamic updates
122 typedef isc_boolean_t dlz_dlopen_ssumatch_t (const char *signer,
127 isc_uint32_t keydatalen,
128 unsigned char *keydata,
132 * dlz_dlopen_addrdataset() is optional, but must be supplied if you
133 * want to support dynamic updates
135 typedef isc_result_t dlz_dlopen_addrdataset_t (const char *name,
136 const char *rdatastr,
141 * dlz_dlopen_subrdataset() is optional, but must be supplied if you
142 * want to support dynamic updates
144 typedef isc_result_t dlz_dlopen_subrdataset_t (const char *name,
145 const char *rdatastr,
150 * dlz_dlopen_delrdataset() is optional, but must be supplied if you
151 * want to support dynamic updates
153 typedef isc_result_t dlz_dlopen_delrdataset_t (const char *name,