dlz_dlopen.h revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2011-2013, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/*! \file dns/dlz_open.h */
#ifndef DLZ_DLOPEN_H
#define DLZ_DLOPEN_H
/*
* This header provides a minimal set of defines and typedefs needed
* for the entry points of an external DLZ module for bind9.
*/
#define DLZ_DLOPEN_VERSION 3
#define DLZ_DLOPEN_AGE 0
/*
* dlz_dlopen_version() is required for all DLZ external drivers. It
* should return DLZ_DLOPEN_VERSION
*/
typedef int dlz_dlopen_version_t(unsigned int *flags);
/*
* dlz_dlopen_create() is required for all DLZ external drivers.
*/
unsigned int argc,
char *argv[],
void **dbdata,
...);
/*
* dlz_dlopen_destroy() is optional, and will be called when the
* driver is unloaded if supplied
*/
typedef void dlz_dlopen_destroy_t(void *dbdata);
/*
* dlz_dlopen_findzonedb() is required for all DLZ external drivers
*/
const char *name,
/*
* dlz_dlopen_lookup() is required for all DLZ external drivers
*/
const char *name,
void *dbdata,
/*
* dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
* supplies authority information for the dns record
*/
void *dbdata,
/*
* dlz_dlopen_allowzonexfr() is optional, and should be supplied if
* you want to support zone transfers
*/
const char *name,
const char *client);
/*
* dlz_dlopen_allnodes() is optional, but must be supplied if supply a
* dlz_dlopen_allowzonexfr() function
*/
void *dbdata,
/*
* dlz_dlopen_newversion() is optional. It should be supplied if you
* want to support dynamic updates.
*/
void *dbdata,
void **versionp);
/*
* dlz_closeversion() is optional, but must be supplied if you supply
* a dlz_newversion() function
*/
typedef void dlz_dlopen_closeversion_t(const char *zone,
void *dbdata,
void **versionp);
/*
* dlz_dlopen_configure() is optional, but must be supplied if you
* want to support dynamic updates
*/
void *dbdata);
/*
* dlz_dlopen_setclientcallback() is optional, but must be supplied if you
* want to retrieve information about the client (e.g., source address)
* before sending a replay.
*/
void *dbdata);
/*
* dlz_dlopen_ssumatch() is optional, but must be supplied if you want
* to support dynamic updates
*/
const char *name,
const char *tcpaddr,
const char *type,
const char *key,
unsigned char *keydata,
void *dbdata);
/*
* dlz_dlopen_addrdataset() is optional, but must be supplied if you
* want to support dynamic updates
*/
const char *rdatastr,
void *dbdata,
void *version);
/*
* dlz_dlopen_subrdataset() is optional, but must be supplied if you
* want to support dynamic updates
*/
const char *rdatastr,
void *dbdata,
void *version);
/*
* dlz_dlopen_delrdataset() is optional, but must be supplied if you
* want to support dynamic updates
*/
const char *type,
void *dbdata,
void *version);
#endif