Commit 50f64cf0 authored by Francis Dupont's avatar Francis Dupont
Browse files

silent compiler warnings for DLZ exernal driver support and example

parent dfb3e77e
......@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dlz_dlopen_driver.h,v 1.3 2011/03/10 23:47:49 tbox Exp $ */
/* $Id: dlz_dlopen_driver.h,v 1.4 2011/03/17 09:25:53 fdupont Exp $ */
#ifndef DLZ_DLOPEN_DRIVER_H
#define DLZ_DLOPEN_DRIVER_H
......@@ -24,7 +24,4 @@ dlz_dlopen_init(isc_mem_t *mctx);
void
dlz_dlopen_clear(void);
#define DLZ_DLOPEN_VERSION 1
#endif
......@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dlz_dlopen_driver.c,v 1.3 2011/03/10 23:47:49 tbox Exp $ */
/* $Id: dlz_dlopen_driver.c,v 1.4 2011/03/17 09:25:53 fdupont Exp $ */
#include <config.h>
......@@ -24,8 +24,8 @@
#include <dlfcn.h>
#include <dns/log.h>
#include <dns/sdlz.h>
#include <dns/result.h>
#include <dns/dlz_dlopen.h>
#include <isc/mem.h>
#include <isc/print.h>
......@@ -51,35 +51,21 @@ typedef struct dlopen_data {
int version;
isc_boolean_t in_configure;
int (*dlz_version)(unsigned int *flags);
isc_result_t (*dlz_create)(const char *dlzname,
unsigned int argc, char *argv[],
void **dbdata, ...);
isc_result_t (*dlz_findzonedb)(void *dbdata, const char *name);
isc_result_t (*dlz_lookup)(const char *zone, const char *name,
void *dbdata, dns_sdlzlookup_t *lookup);
isc_result_t (*dlz_authority)(const char *zone, void *dbdata,
dns_sdlzlookup_t *lookup);
isc_result_t (*dlz_allnodes)(const char *zone, void *dbdata,
dns_sdlzallnodes_t *allnodes);
isc_result_t (*dlz_allowzonexfr)(void *dbdata, const char *name,
const char *client);
isc_result_t (*dlz_newversion)(const char *zone, void *dbdata,
void **versionp);
void (*dlz_closeversion)(const char *zone, isc_boolean_t commit,
void *dbdata, void **versionp);
isc_result_t (*dlz_configure)(dns_view_t *view, void *dbdata);
isc_boolean_t (*dlz_ssumatch)(const char *signer, const char *name,
const char *tcpaddr, const char *type,
const char *key, isc_uint32_t keydatalen,
unsigned char *keydata, void *dbdata);
isc_result_t (*dlz_addrdataset)(const char *name, const char *rdatastr,
void *dbdata, void *version);
isc_result_t (*dlz_subrdataset)(const char *name, const char *rdatastr,
void *dbdata, void *version);
isc_result_t (*dlz_delrdataset)(const char *name, const char *type,
void *dbdata, void *version);
void (*dlz_destroy)(void *dbdata);
dlz_dlopen_version_t *dlz_version;
dlz_dlopen_create_t *dlz_create;
dlz_dlopen_findzonedb_t *dlz_findzonedb;
dlz_dlopen_lookup_t *dlz_lookup;
dlz_dlopen_authority_t *dlz_authority;
dlz_dlopen_allnodes_t *dlz_allnodes;
dlz_dlopen_allowzonexfr_t *dlz_allowzonexfr;
dlz_dlopen_newversion_t *dlz_newversion;
dlz_dlopen_closeversion_t *dlz_closeversion;
dlz_dlopen_configure_t *dlz_configure;
dlz_dlopen_ssumatch_t *dlz_ssumatch;
dlz_dlopen_addrdataset_t *dlz_addrdataset;
dlz_dlopen_subrdataset_t *dlz_subrdataset;
dlz_dlopen_delrdataset_t *dlz_delrdataset;
dlz_dlopen_destroy_t *dlz_destroy;
} dlopen_data_t;
/* Modules can choose whether they are lock-safe or not. */
......@@ -288,10 +274,14 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
}
/* Find the symbols */
cd->dlz_version = dl_load_symbol(cd, "dlz_version", ISC_TRUE);
cd->dlz_create = dl_load_symbol(cd, "dlz_create", ISC_TRUE);
cd->dlz_lookup = dl_load_symbol(cd, "dlz_lookup", ISC_TRUE);
cd->dlz_findzonedb = dl_load_symbol(cd, "dlz_findzonedb", ISC_TRUE);
cd->dlz_version = (dlz_dlopen_version_t *)
dl_load_symbol(cd, "dlz_version", ISC_TRUE);
cd->dlz_create = (dlz_dlopen_create_t *)
dl_load_symbol(cd, "dlz_create", ISC_TRUE);
cd->dlz_lookup = (dlz_dlopen_lookup_t *)
dl_load_symbol(cd, "dlz_lookup", ISC_TRUE);
cd->dlz_findzonedb = (dlz_dlopen_findzonedb_t *)
dl_load_symbol(cd, "dlz_findzonedb", ISC_TRUE);
if (cd->dlz_create == NULL ||
cd->dlz_lookup == NULL ||
......@@ -301,19 +291,28 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
goto failed;
}
cd->dlz_allowzonexfr = dl_load_symbol(cd, "dlz_allowzonexfr",
ISC_FALSE);
cd->dlz_allnodes = dl_load_symbol(cd, "dlz_allnodes",
ISC_TF(cd->dlz_allowzonexfr != NULL));
cd->dlz_authority = dl_load_symbol(cd, "dlz_authority", ISC_FALSE);
cd->dlz_newversion = dl_load_symbol(cd, "dlz_newversion", ISC_FALSE);
cd->dlz_closeversion = dl_load_symbol(cd, "dlz_closeversion",
ISC_TF(cd->dlz_newversion != NULL));
cd->dlz_configure = dl_load_symbol(cd, "dlz_configure", ISC_FALSE);
cd->dlz_ssumatch = dl_load_symbol(cd, "dlz_ssumatch", ISC_FALSE);
cd->dlz_addrdataset = dl_load_symbol(cd, "dlz_addrdataset", ISC_FALSE);
cd->dlz_subrdataset = dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
cd->dlz_delrdataset = dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
cd->dlz_allowzonexfr = (dlz_dlopen_allowzonexfr_t *)
dl_load_symbol(cd, "dlz_allowzonexfr", ISC_FALSE);
cd->dlz_allnodes = (dlz_dlopen_allnodes_t *)
dl_load_symbol(cd, "dlz_allnodes",
ISC_TF(cd->dlz_allowzonexfr != NULL));
cd->dlz_authority = (dlz_dlopen_authority_t *)
dl_load_symbol(cd, "dlz_authority", ISC_FALSE);
cd->dlz_newversion = (dlz_dlopen_newversion_t *)
dl_load_symbol(cd, "dlz_newversion", ISC_FALSE);
cd->dlz_closeversion = (dlz_dlopen_closeversion_t *)
dl_load_symbol(cd, "dlz_closeversion",
ISC_TF(cd->dlz_newversion != NULL));
cd->dlz_configure = (dlz_dlopen_configure_t *)
dl_load_symbol(cd, "dlz_configure", ISC_FALSE);
cd->dlz_ssumatch = (dlz_dlopen_ssumatch_t *)
dl_load_symbol(cd, "dlz_ssumatch", ISC_FALSE);
cd->dlz_addrdataset = (dlz_dlopen_addrdataset_t *)
dl_load_symbol(cd, "dlz_addrdataset", ISC_FALSE);
cd->dlz_subrdataset = (dlz_dlopen_subrdataset_t *)
dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
cd->dlz_delrdataset = (dlz_dlopen_delrdataset_t *)
dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
/* Check the version of the API is the same */
cd->version = cd->dlz_version(&cd->flags);
......@@ -355,7 +354,7 @@ failed:
if (cd->dlzname)
isc_mem_free(mctx, cd->dlzname);
if (dlopen_flags)
isc_mutex_destroy(&cd->lock);
(void) isc_mutex_destroy(&cd->lock);
#ifdef HAVE_DLCLOSE
if (cd->dl_handle)
dlclose(cd->dl_handle);
......@@ -392,7 +391,7 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
dlclose(cd->dl_handle);
#endif
isc_mutex_destroy(&cd->lock);
(void) isc_mutex_destroy(&cd->lock);
mctx = cd->mctx;
isc_mem_put(mctx, cd, sizeof(*cd));
......
......@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dlz_dlopen_driver.c,v 1.3 2011/03/10 23:47:49 tbox Exp $ */
/* $Id: dlz_dlopen_driver.c,v 1.4 2011/03/17 09:25:53 fdupont Exp $ */
#include <config.h>
......@@ -25,8 +25,8 @@
#include <stdlib.h>
#include <dns/log.h>
#include <dns/sdlz.h>
#include <dns/result.h>
#include <dns/dlz_dlopen.h>
#include <isc/mem.h>
#include <isc/print.h>
......@@ -52,35 +52,21 @@ typedef struct dlopen_data {
int version;
isc_boolean_t in_configure;
int (*dlz_version)(unsigned int *flags);
isc_result_t (*dlz_create)(const char *dlzname,
unsigned int argc, char *argv[],
void **dbdata, ...);
isc_result_t (*dlz_findzonedb)(void *dbdata, const char *name);
isc_result_t (*dlz_lookup)(const char *zone, const char *name,
void *dbdata, dns_sdlzlookup_t *lookup);
isc_result_t (*dlz_authority)(const char *zone, void *dbdata,
dns_sdlzlookup_t *lookup);
isc_result_t (*dlz_allnodes)(const char *zone, void *dbdata,
dns_sdlzallnodes_t *allnodes);
isc_result_t (*dlz_allowzonexfr)(void *dbdata, const char *name,
const char *client);
isc_result_t (*dlz_newversion)(const char *zone, void *dbdata,
void **versionp);
void (*dlz_closeversion)(const char *zone, isc_boolean_t commit,
void *dbdata, void **versionp);
isc_result_t (*dlz_configure)(dns_view_t *view, void *dbdata);
isc_boolean_t (*dlz_ssumatch)(const char *signer, const char *name,
const char *tcpaddr, const char *type,
const char *key, isc_uint32_t keydatalen,
unsigned char *keydata, void *dbdata);
isc_result_t (*dlz_addrdataset)(const char *name, const char *rdatastr,
void *dbdata, void *version);
isc_result_t (*dlz_subrdataset)(const char *name, const char *rdatastr,
void *dbdata, void *version);
isc_result_t (*dlz_delrdataset)(const char *name, const char *type,
void *dbdata, void *version);
void (*dlz_destroy)(void *dbdata);
dlz_dlopen_version_t *dlz_version;
dlz_dlopen_create_t *dlz_create;
dlz_dlopen_findzonedb_t *dlz_findzonedb;
dlz_dlopen_lookup_t *dlz_lookup;
dlz_dlopen_authority_t *dlz_authority;
dlz_dlopen_allnodes_t *dlz_allnodes;
dlz_dlopen_allowzonexfr_t *dlz_allowzonexfr;
dlz_dlopen_newversion_t *dlz_newversion;
dlz_dlopen_closeversion_t *dlz_closeversion;
dlz_dlopen_configure_t *dlz_configure;
dlz_dlopen_ssumatch_t *dlz_ssumatch;
dlz_dlopen_addrdataset_t *dlz_addrdataset;
dlz_dlopen_subrdataset_t *dlz_subrdataset;
dlz_dlopen_delrdataset_t *dlz_delrdataset;
dlz_dlopen_destroy_t *dlz_destroy;
} dlopen_data_t;
/* Modules can choose whether they are lock-safe or not. */
......@@ -278,10 +264,14 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
}
/* Find the symbols */
cd->dlz_version = dl_load_symbol(cd, "dlz_version", ISC_TRUE);
cd->dlz_create = dl_load_symbol(cd, "dlz_create", ISC_TRUE);
cd->dlz_lookup = dl_load_symbol(cd, "dlz_lookup", ISC_TRUE);
cd->dlz_findzonedb = dl_load_symbol(cd, "dlz_findzonedb", ISC_TRUE);
cd->dlz_version = (dlz_dlopen_version_t *)
dl_load_symbol(cd, "dlz_version", ISC_TRUE);
cd->dlz_create = (dlz_dlopen_create_t *)
dl_load_symbol(cd, "dlz_create", ISC_TRUE);
cd->dlz_lookup = (dlz_dlopen_lookup_t *)
dl_load_symbol(cd, "dlz_lookup", ISC_TRUE);
cd->dlz_findzonedb = (dlz_dlopen_findzonedb_t *)
dl_load_symbol(cd, "dlz_findzonedb", ISC_TRUE);
if (cd->dlz_create == NULL ||
cd->dlz_lookup == NULL ||
......@@ -291,19 +281,28 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
goto failed;
}
cd->dlz_allowzonexfr = dl_load_symbol(cd, "dlz_allowzonexfr",
ISC_FALSE);
cd->dlz_allnodes = dl_load_symbol(cd, "dlz_allnodes",
ISC_TF(cd->dlz_allowzonexfr != NULL));
cd->dlz_authority = dl_load_symbol(cd, "dlz_authority", ISC_FALSE);
cd->dlz_newversion = dl_load_symbol(cd, "dlz_newversion", ISC_FALSE);
cd->dlz_closeversion = dl_load_symbol(cd, "dlz_closeversion",
ISC_TF(cd->dlz_newversion != NULL));
cd->dlz_configure = dl_load_symbol(cd, "dlz_configure", ISC_FALSE);
cd->dlz_ssumatch = dl_load_symbol(cd, "dlz_ssumatch", ISC_FALSE);
cd->dlz_addrdataset = dl_load_symbol(cd, "dlz_addrdataset", ISC_FALSE);
cd->dlz_subrdataset = dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
cd->dlz_delrdataset = dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
cd->dlz_allowzonexfr = (dlz_dlopen_allowzonexfr_t *)
dl_load_symbol(cd, "dlz_allowzonexfr", ISC_FALSE);
cd->dlz_allnodes = (dlz_dlopen_allnodes_t *)
dl_load_symbol(cd, "dlz_allnodes",
ISC_TF(cd->dlz_allowzonexfr != NULL));
cd->dlz_authority = (dlz_dlopen_authority_t *)
dl_load_symbol(cd, "dlz_authority", ISC_FALSE);
cd->dlz_newversion = (dlz_dlopen_newversion_t *)
dl_load_symbol(cd, "dlz_newversion", ISC_FALSE);
cd->dlz_closeversion = (dlz_dlopen_closeversion_t *)
dl_load_symbol(cd, "dlz_closeversion",
ISC_TF(cd->dlz_newversion != NULL));
cd->dlz_configure = (dlz_dlopen_configure_t *)
dl_load_symbol(cd, "dlz_configure", ISC_FALSE);
cd->dlz_ssumatch = (dlz_dlopen_ssumatch_t *)
dl_load_symbol(cd, "dlz_ssumatch", ISC_FALSE);
cd->dlz_addrdataset = (dlz_dlopen_addrdataset_t *)
dl_load_symbol(cd, "dlz_addrdataset", ISC_FALSE);
cd->dlz_subrdataset = (dlz_dlopen_subrdataset_t *)
dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
cd->dlz_delrdataset = (dlz_dlopen_delrdataset_t *)
dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
/* Check the version of the API is the same */
cd->version = cd->dlz_version(&cd->flags);
......@@ -320,7 +319,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
* extended version of dlz create, with the addition of
* named function pointers for helper functions that the
* driver will need. This avoids the need for the backend to
* link the bind9 libraries
* link the BIND9 libraries
*/
MAYBE_LOCK(cd);
result = cd->dlz_create(dlzname, argc-1, argv+1,
......@@ -345,7 +344,7 @@ failed:
if (cd->dlzname)
isc_mem_free(mctx, cd->dlzname);
if (triedload)
isc_mutex_destroy(&cd->lock);
(void) isc_mutex_destroy(&cd->lock);
if (cd->dl_handle)
FreeLibrary(cd->dl_handle);
isc_mem_put(mctx, cd, sizeof(*cd));
......@@ -378,7 +377,7 @@ dlopen_dlz_destroy(void *driverarg, void *dbdata) {
if (cd->dl_handle)
FreeLibrary(cd->dl_handle);
isc_mutex_destroy(&cd->lock);
(void) isc_mutex_destroy(&cd->lock);
mctx = cd->mctx;
isc_mem_put(mctx, cd, sizeof(*cd));
......
......@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: driver.c,v 1.3 2011/03/10 23:47:49 tbox Exp $ */
/* $Id: driver.c,v 1.4 2011/03/17 09:25:54 fdupont Exp $ */
/*
* This provides a very simple example of an external loadable DLZ
......@@ -34,6 +34,7 @@
#include <isc/util.h>
#include <dns/types.h>
#include <dns/dlz_dlopen.h>
#include "driver.h"
......@@ -51,6 +52,8 @@ struct record {
#define MAX_RECORDS 100
typedef void log_t(int level, const char *fmt, ...);
struct dlz_example_data {
char *zone_name;
......@@ -62,13 +65,10 @@ struct dlz_example_data {
isc_boolean_t transaction_started;
/* Helper functions from the dlz_dlopen driver */
void (*log)(int level, const char *fmt, ...);
isc_result_t (*putrr)(dns_sdlzlookup_t *handle, const char *type,
dns_ttl_t ttl, const char *data);
isc_result_t (*putnamedrr)(dns_sdlzlookup_t *handle, const char *name,
const char *type, dns_ttl_t ttl,
const char *data);
isc_result_t (*writeable_zone)(dns_view_t *view, const char *zone_name);
log_t *log;
dns_sdlz_putrr_t *putrr;
dns_sdlz_putnamedrr_t *putnamedrr;
dns_dlz_writeablezone_t *writeable_zone;
};
static isc_boolean_t
......@@ -96,7 +96,7 @@ add_name(struct dlz_example_data *state, struct record *list,
int first_empty = -1;
for (i = 0; i < MAX_RECORDS; i++) {
if (first_empty == -1 && strlen(list[i].name) == 0) {
if (first_empty == -1 && strlen(list[i].name) == 0U) {
first_empty = i;
}
if (strcasecmp(list[i].name, name) != 0)
......@@ -167,13 +167,13 @@ b9_add_helper(struct dlz_example_data *state,
const char *helper_name, void *ptr)
{
if (strcmp(helper_name, "log") == 0)
state->log = ptr;
state->log = (log_t *)ptr;
if (strcmp(helper_name, "putrr") == 0)
state->putrr = ptr;
state->putrr = (dns_sdlz_putrr_t *)ptr;
if (strcmp(helper_name, "putnamedrr") == 0)
state->putnamedrr = ptr;
state->putnamedrr = (dns_sdlz_putnamedrr_t *)ptr;
if (strcmp(helper_name, "writeable_zone") == 0)
state->writeable_zone = ptr;
state->writeable_zone = (dns_dlz_writeablezone_t *)ptr;
}
......@@ -319,7 +319,7 @@ dlz_allnodes(const char *zone, void *dbdata, dns_sdlzallnodes_t *allnodes) {
for (i = 0; i < MAX_RECORDS; i++) {
isc_result_t result;
if (strlen(state->current[i].name) == 0) {
if (strlen(state->current[i].name) == 0U) {
continue;
}
result = state->putnamedrr(allnodes, state->current[i].name,
......@@ -381,7 +381,7 @@ dlz_closeversion(const char *zone, isc_boolean_t commit,
"dlz_example: committing transaction on zone %s",
zone);
for (i = 0; i < MAX_RECORDS; i++) {
if (strlen(state->adds[i].name) > 0) {
if (strlen(state->adds[i].name) > 0U) {
add_name(state, &state->current[0],
state->adds[i].name,
state->adds[i].type,
......@@ -390,7 +390,7 @@ dlz_closeversion(const char *zone, isc_boolean_t commit,
}
}
for (i = 0; i < MAX_RECORDS; i++) {
if (strlen(state->deletes[i].name) > 0) {
if (strlen(state->deletes[i].name) > 0U) {
del_name(state, &state->current[0],
state->deletes[i].name,
state->deletes[i].type,
......
......@@ -14,138 +14,23 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: driver.h,v 1.3 2011/03/10 23:47:50 tbox Exp $ */
/*
* This header provides a minimal set of defines and typedefs needed
* for building an external DLZ module for bind9. When creating a new
* external DLZ driver, please copy this header into your own source
* tree.
*/
#define DLZ_DLOPEN_VERSION 1
/* Return this in flags to dlz_version() if thread safe */
#define DNS_SDLZFLAG_THREADSAFE 0x00000001U
#if 0
/* Result codes */
#define ISC_R_SUCCESS 0
#define ISC_R_NOMEMORY 1
#define ISC_R_NOTFOUND 23
#define ISC_R_FAILURE 25
/* Log levels */
#define ISC_LOG_INFO (-1)
#define ISC_LOG_NOTICE (-2)
#define ISC_LOG_WARNING (-3)
#define ISC_LOG_ERROR (-4)
#define ISC_LOG_CRITICAL (-5)
#endif
/* Some opaque structures */
typedef void *dns_sdlzlookup_t;
typedef void *dns_sdlzallnodes_t;
/*
* dlz_version() is required for all DLZ external drivers. It should
* return DLZ_DLOPEN_VERSION
*/
int
dlz_version(unsigned int *flags);
/*
* dlz_create() is required for all DLZ external drivers.
*/
isc_result_t
dlz_create(const char *dlzname, unsigned int argc,
char *argv[], void **dbdata, ...);
/*
* dlz_destroy() is optional, and will be called when the driver is
* unloaded if supplied
*/
void
dlz_destroy(void *dbdata);
/*
* dlz_findzonedb is required for all DLZ external drivers
*/
isc_result_t
dlz_findzonedb(void *dbdata, const char *name);
/*
* dlz_lookup is required for all DLZ external drivers
*/
isc_result_t
dlz_lookup(const char *zone, const char *name,
void *dbdata, dns_sdlzlookup_t *lookup);
/*
* dlz_allowzonexfr() is optional, and should be supplied if you want
* to support zone transfers
*/
isc_result_t
dlz_allowzonexfr(void *dbdata, const char *name, const char *client);
/*
* dlz_allnodes() is optional, but must be supplied if supply a
* dlz_allowzonexfr() function
*/
isc_result_t
dlz_allnodes(const char *zone, void *dbdata, dns_sdlzallnodes_t *allnodes);
/*
* dlz_newversion() is optional. It should be supplied if you want to
* support dynamic updates.
*/
isc_result_t
dlz_newversion(const char *zone, void *dbdata, void **versionp);
/*
* dlz_closeversion() is optional, but must be supplied if you supply
* a dlz_newversion() function
*/
void
dlz_closeversion(const char *zone, isc_boolean_t commit,
void *dbdata, void **versionp);
/*
* dlz_configure() is optional, but must be supplied if you want to
* support dynamic updates
*/
isc_result_t
dlz_configure(dns_view_t *view, void *dbdata);
/*
* dlz_ssumatch() is optional, but must be supplied if you want to
* support dynamic updates
*/
isc_boolean_t
dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
const char *type, const char *key, isc_uint32_t keydatalen,
unsigned char *keydata, void *dbdata);
/*
* dlz_addrdataset() is optional, but must be supplied if you want to
* support dynamic updates
*/
isc_result_t
dlz_addrdataset(const char *name, const char *rdatastr,
void *dbdata, void *version);
/*
* dlz_subrdataset() is optional, but must be supplied if you want to
* support dynamic updates
*/
isc_result_t
dlz_subrdataset(const char *name, const char *rdatastr,
void *dbdata, void *version);
/*
* dlz_delrdataset() is optional, but must be supplied if you want to
* support dynamic updates
*/
isc_result_t
dlz_delrdataset(const char *name, const char *type,
void *dbdata, void *version);
/* $Id: driver.h,v 1.4 2011/03/17 09:25:54 fdupont Exp $ */
/*
* This header includes the declarations of entry points.
*/
dlz_dlopen_version_t dlz_version;
dlz_dlopen_create_t dlz_create;
dlz_dlopen_destroy_t dlz_destroy;
dlz_dlopen_findzonedb_t dlz_findzonedb;
dlz_dlopen_lookup_t dlz_lookup;
dlz_dlopen_allowzonexfr_t dlz_allowzonexfr;
dlz_dlopen_allnodes_t dlz_allnodes;
dlz_dlopen_newversion_t dlz_newversion;
dlz_dlopen_closeversion_t dlz_closeversion;
dlz_dlopen_configure_t dlz_configure;
dlz_dlopen_ssumatch_t dlz_ssumatch;
dlz_dlopen_addrdataset_t dlz_addrdataset;
dlz_dlopen_subrdataset_t dlz_subrdataset;
dlz_dlopen_delrdataset_t dlz_delrdataset;
......@@ -50,7 +50,7 @@
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dlz.h,v 1.12 2010/12/20 23:47:21 tbox Exp $ */
/* $Id: dlz.h,v 1.13 2011/03/17 09:25:54 fdupont Exp $ */
/*! \file dns/dlz.h */
......@@ -318,9 +318,9 @@ dns_dlzunregister(dns_dlzimplementation_t **dlzimp);
*/
isc_result_t
dns_dlz_writeablezone(dns_view_t *view, const char *zone_name);
typedef isc_result_t dns_dlz_writeablezone_t(dns_view_t *view,
const char *zone_name);
dns_dlz_writeablezone_t dns_dlz_writeablezone;
/*%<
* creates a writeable DLZ zone. Must be called from within the
* configure() method of a DLZ driver.
......
/*
* Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE