"Fossies" - the Fresh Open Source Software Archive

Member "bind-9.16.7/lib/dns/include/dns/dlz_dlopen.h" (4 Sep 2020, 4394 Bytes) of package /linux/misc/dns/bind9/9.16.7/bind-9.16.7.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dlz_dlopen.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
    3  *
    4  * This Source Code Form is subject to the terms of the Mozilla Public
    5  * License, v. 2.0. If a copy of the MPL was not distributed with this
    6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    7  *
    8  * See the COPYRIGHT file distributed with this work for additional
    9  * information regarding copyright ownership.
   10  */
   11 
   12 /*! \file dns/dlz_dlopen.h */
   13 
   14 #ifndef DLZ_DLOPEN_H
   15 #define DLZ_DLOPEN_H
   16 
   17 #include <inttypes.h>
   18 #include <stdbool.h>
   19 
   20 #include <dns/sdlz.h>
   21 
   22 ISC_LANG_BEGINDECLS
   23 
   24 /*
   25  * This header provides a minimal set of defines and typedefs needed
   26  * for the entry points of an external DLZ module for bind9.
   27  */
   28 
   29 #define DLZ_DLOPEN_VERSION 3
   30 #define DLZ_DLOPEN_AGE     0
   31 
   32 /*
   33  * dlz_dlopen_version() is required for all DLZ external drivers. It
   34  * should return DLZ_DLOPEN_VERSION
   35  */
   36 typedef int
   37 dlz_dlopen_version_t(unsigned int *flags);
   38 
   39 /*
   40  * dlz_dlopen_create() is required for all DLZ external drivers.
   41  */
   42 typedef isc_result_t
   43 dlz_dlopen_create_t(const char *dlzname, unsigned int argc, char *argv[],
   44             void **dbdata, ...);
   45 
   46 /*
   47  * dlz_dlopen_destroy() is optional, and will be called when the
   48  * driver is unloaded if supplied
   49  */
   50 typedef void
   51 dlz_dlopen_destroy_t(void *dbdata);
   52 
   53 /*
   54  * dlz_dlopen_findzonedb() is required for all DLZ external drivers
   55  */
   56 typedef isc_result_t
   57 dlz_dlopen_findzonedb_t(void *dbdata, const char *name,
   58             dns_clientinfomethods_t *methods,
   59             dns_clientinfo_t *   clientinfo);
   60 
   61 /*
   62  * dlz_dlopen_lookup() is required for all DLZ external drivers
   63  */
   64 typedef isc_result_t
   65 dlz_dlopen_lookup_t(const char *zone, const char *name, void *dbdata,
   66             dns_sdlzlookup_t *lookup, dns_clientinfomethods_t *methods,
   67             dns_clientinfo_t *clientinfo);
   68 
   69 /*
   70  * dlz_dlopen_authority is optional() if dlz_dlopen_lookup()
   71  * supplies authority information for the dns record
   72  */
   73 typedef isc_result_t
   74 dlz_dlopen_authority_t(const char *zone, void *dbdata,
   75                dns_sdlzlookup_t *lookup);
   76 
   77 /*
   78  * dlz_dlopen_allowzonexfr() is optional, and should be supplied if
   79  * you want to support zone transfers
   80  */
   81 typedef isc_result_t
   82 dlz_dlopen_allowzonexfr_t(void *dbdata, const char *name, const char *client);
   83 
   84 /*
   85  * dlz_dlopen_allnodes() is optional, but must be supplied if supply a
   86  * dlz_dlopen_allowzonexfr() function
   87  */
   88 typedef isc_result_t
   89 dlz_dlopen_allnodes_t(const char *zone, void *dbdata,
   90               dns_sdlzallnodes_t *allnodes);
   91 
   92 /*
   93  * dlz_dlopen_newversion() is optional. It should be supplied if you
   94  * want to support dynamic updates.
   95  */
   96 typedef isc_result_t
   97 dlz_dlopen_newversion_t(const char *zone, void *dbdata, void **versionp);
   98 
   99 /*
  100  * dlz_closeversion() is optional, but must be supplied if you supply
  101  * a dlz_newversion() function
  102  */
  103 typedef void
  104 dlz_dlopen_closeversion_t(const char *zone, bool commit, void *dbdata,
  105               void **versionp);
  106 
  107 /*
  108  * dlz_dlopen_configure() is optional, but must be supplied if you
  109  * want to support dynamic updates
  110  */
  111 typedef isc_result_t
  112 dlz_dlopen_configure_t(dns_view_t *view, dns_dlzdb_t *dlzdb, void *dbdata);
  113 
  114 /*
  115  * dlz_dlopen_setclientcallback() is optional, but must be supplied if you
  116  * want to retrieve information about the client (e.g., source address)
  117  * before sending a replay.
  118  */
  119 typedef isc_result_t
  120 dlz_dlopen_setclientcallback_t(dns_view_t *view, void *dbdata);
  121 
  122 /*
  123  * dlz_dlopen_ssumatch() is optional, but must be supplied if you want
  124  * to support dynamic updates
  125  */
  126 typedef bool
  127 dlz_dlopen_ssumatch_t(const char *signer, const char *name, const char *tcpaddr,
  128               const char *type, const char *key, uint32_t keydatalen,
  129               unsigned char *keydata, void *dbdata);
  130 
  131 /*
  132  * dlz_dlopen_addrdataset() is optional, but must be supplied if you
  133  * want to support dynamic updates
  134  */
  135 typedef isc_result_t
  136 dlz_dlopen_addrdataset_t(const char *name, const char *rdatastr, void *dbdata,
  137              void *version);
  138 
  139 /*
  140  * dlz_dlopen_subrdataset() is optional, but must be supplied if you
  141  * want to support dynamic updates
  142  */
  143 typedef isc_result_t
  144 dlz_dlopen_subrdataset_t(const char *name, const char *rdatastr, void *dbdata,
  145              void *version);
  146 
  147 /*
  148  * dlz_dlopen_delrdataset() is optional, but must be supplied if you
  149  * want to support dynamic updates
  150  */
  151 typedef isc_result_t
  152 dlz_dlopen_delrdataset_t(const char *name, const char *type, void *dbdata,
  153              void *version);
  154 
  155 ISC_LANG_ENDDECLS
  156 
  157 #endif /* ifndef DLZ_DLOPEN_H */