dlz_dlopen.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2011-2013  Internet Systems Consortium, Inc. ("ISC")
00003  *
00004  * Permission to use, copy, modify, and/or distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00009  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00010  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00011  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00012  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00013  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00014  * PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 
00017 /* $Id$ */
00018 
00019 /*! \file dns/dlz_open.h */
00020 
00021 #ifndef DLZ_DLOPEN_H
00022 #define DLZ_DLOPEN_H
00023 
00024 #include <dns/sdlz.h>
00025 
00026 ISC_LANG_BEGINDECLS
00027 
00028 /*
00029  * This header provides a minimal set of defines and typedefs needed
00030  * for the entry points of an external DLZ module for bind9.
00031  */
00032 
00033 #define DLZ_DLOPEN_VERSION 3
00034 #define DLZ_DLOPEN_AGE 0
00035 
00036 /*
00037  * dlz_dlopen_version() is required for all DLZ external drivers. It
00038  * should return DLZ_DLOPEN_VERSION
00039  */
00040 typedef int dlz_dlopen_version_t(unsigned int *flags);
00041 
00042 /*
00043  * dlz_dlopen_create() is required for all DLZ external drivers.
00044  */
00045 typedef isc_result_t dlz_dlopen_create_t(const char *dlzname,
00046                                          unsigned int argc,
00047                                          char *argv[],
00048                                          void **dbdata,
00049                                          ...);
00050 
00051 /*
00052  * dlz_dlopen_destroy() is optional, and will be called when the
00053  * driver is unloaded if supplied
00054  */
00055 typedef void dlz_dlopen_destroy_t(void *dbdata);
00056 
00057 /*
00058  * dlz_dlopen_findzonedb() is required for all DLZ external drivers
00059  */
00060 typedef isc_result_t dlz_dlopen_findzonedb_t(void *dbdata,
00061                                              const char *name,
00062                                              dns_clientinfomethods_t *methods,
00063                                              dns_clientinfo_t *clientinfo);
00064 
00065 /*
00066  * dlz_dlopen_lookup() is required for all DLZ external drivers
00067  */
00068 typedef isc_result_t dlz_dlopen_lookup_t(const char *zone,
00069                                          const char *name,
00070                                          void *dbdata,
00071                                          dns_sdlzlookup_t *lookup,
00072                                          dns_clientinfomethods_t *methods,
00073                                          dns_clientinfo_t *clientinfo);
00074 
00075 /*
00076  * dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
00077  * supplies authority information for the dns record
00078  */
00079 typedef isc_result_t dlz_dlopen_authority_t(const char *zone,
00080                                             void *dbdata,
00081                                             dns_sdlzlookup_t *lookup);
00082 
00083 /*
00084  * dlz_dlopen_allowzonexfr() is optional, and should be supplied if
00085  * you want to support zone transfers
00086  */
00087 typedef isc_result_t dlz_dlopen_allowzonexfr_t(void *dbdata,
00088                                                const char *name,
00089                                                const char *client);
00090 
00091 /*
00092  * dlz_dlopen_allnodes() is optional, but must be supplied if supply a
00093  * dlz_dlopen_allowzonexfr() function
00094  */
00095 typedef isc_result_t dlz_dlopen_allnodes_t(const char *zone,
00096                                            void *dbdata,
00097                                            dns_sdlzallnodes_t *allnodes);
00098 
00099 /*
00100  * dlz_dlopen_newversion() is optional. It should be supplied if you
00101  * want to support dynamic updates.
00102  */
00103 typedef isc_result_t dlz_dlopen_newversion_t(const char *zone,
00104                                              void *dbdata,
00105                                              void **versionp);
00106 
00107 /*
00108  * dlz_closeversion() is optional, but must be supplied if you supply
00109  * a dlz_newversion() function
00110  */
00111 typedef void dlz_dlopen_closeversion_t(const char *zone,
00112                                        isc_boolean_t commit,
00113                                        void *dbdata,
00114                                        void **versionp);
00115 
00116 /*
00117  * dlz_dlopen_configure() is optional, but must be supplied if you
00118  * want to support dynamic updates
00119  */
00120 typedef isc_result_t dlz_dlopen_configure_t(dns_view_t *view,
00121                                             dns_dlzdb_t *dlzdb,
00122                                             void *dbdata);
00123 
00124 /*
00125  * dlz_dlopen_setclientcallback() is optional, but must be supplied if you
00126  * want to retrieve information about the client (e.g., source address)
00127  * before sending a replay.
00128  */
00129 typedef isc_result_t dlz_dlopen_setclientcallback_t(dns_view_t *view,
00130                                                     void *dbdata);
00131 
00132 
00133 /*
00134  * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
00135  * to support dynamic updates
00136  */
00137 typedef isc_boolean_t dlz_dlopen_ssumatch_t(const char *signer,
00138                                             const char *name,
00139                                             const char *tcpaddr,
00140                                             const char *type,
00141                                             const char *key,
00142                                             isc_uint32_t keydatalen,
00143                                             unsigned char *keydata,
00144                                             void *dbdata);
00145 
00146 /*
00147  * dlz_dlopen_addrdataset() is optional, but must be supplied if you
00148  * want to support dynamic updates
00149  */
00150 typedef isc_result_t dlz_dlopen_addrdataset_t(const char *name,
00151                                               const char *rdatastr,
00152                                               void *dbdata,
00153                                               void *version);
00154 
00155 /*
00156  * dlz_dlopen_subrdataset() is optional, but must be supplied if you
00157  * want to support dynamic updates
00158  */
00159 typedef isc_result_t dlz_dlopen_subrdataset_t(const char *name,
00160                                               const char *rdatastr,
00161                                               void *dbdata,
00162                                               void *version);
00163 
00164 /*
00165  * dlz_dlopen_delrdataset() is optional, but must be supplied if you
00166  * want to support dynamic updates
00167  */
00168 typedef isc_result_t dlz_dlopen_delrdataset_t(const char *name,
00169                                               const char *type,
00170                                               void *dbdata,
00171                                               void *version);
00172 
00173 ISC_LANG_ENDDECLS
00174 
00175 #endif

Generated on Tue Apr 28 17:40:57 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha