[BACK]Return to dlz_dlopen.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / external / mpl / bind / dist / lib / dns / include / dns

Annotation of src/external/mpl/bind/dist/lib/dns/include/dns/dlz_dlopen.h, Revision 1.5

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

CVSweb <webmaster@jp.NetBSD.org>