silent compiler warnings for DLZ exernal driver support and example
This commit is contained in:
@@ -14,138 +14,23 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: driver.h,v 1.1.4.3 2011/03/10 23:47:29 tbox Exp $ */
|
||||
/* $Id: driver.h,v 1.1.4.4 2011/03/17 09:41:07 fdupont 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.
|
||||
* This header includes the declarations of entry points.
|
||||
*/
|
||||
|
||||
#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);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user