/
usr
/
include
/
bind9
/
dns
/
/usr/include/bind9/dns
mkdir
upload
Name
Size
Mode
Actions
acache.h
14232
0644
edit
dl
rm
acl.h
7242
0644
edit
dl
rm
adb.h
22595
0644
edit
dl
rm
badcache.h
3369
0644
edit
dl
rm
bit.h
807
0644
edit
dl
rm
byaddr.h
4002
0644
edit
dl
rm
cache.h
8643
0644
edit
dl
rm
callbacks.h
2271
0644
edit
dl
rm
catz.h
11833
0644
edit
dl
rm
cert.h
1466
0644
edit
dl
rm
client.h
22042
0644
edit
dl
rm
clientinfo.h
2006
0644
edit
dl
rm
compress.h
6646
0644
edit
dl
rm
db.h
47061
0644
edit
dl
rm
dbiterator.h
7422
0644
edit
dl
rm
dbtable.h
3165
0644
edit
dl
rm
diff.h
6980
0644
edit
dl
rm
dispatch.h
16427
0644
edit
dl
rm
dlz.h
10618
0644
edit
dl
rm
dlz_dlopen.h
4677
0644
edit
dl
rm
dns64.h
5635
0644
edit
dl
rm
dnssec.h
12371
0644
edit
dl
rm
dnstap.h
9364
0644
edit
dl
rm
ds.h
1225
0644
edit
dl
rm
dsdigest.h
1722
0644
edit
dl
rm
dyndb.h
4835
0644
edit
dl
rm
ecdb.h
809
0644
edit
dl
rm
edns.h
722
0644
edit
dl
rm
enumclass.h
1220
0644
edit
dl
rm
enumtype.h
8300
0644
edit
dl
rm
events.h
4059
0644
edit
dl
rm
fixedname.h
1663
0644
edit
dl
rm
forward.h
3452
0644
edit
dl
rm
geoip.h
2792
0644
edit
dl
rm
ipkeylist.h
2186
0644
edit
dl
rm
iptable.h
1621
0644
edit
dl
rm
journal.h
8227
0644
edit
dl
rm
keydata.h
1059
0644
edit
dl
rm
keyflags.h
1278
0644
edit
dl
rm
keytable.h
9462
0644
edit
dl
rm
keyvalues.h
4159
0644
edit
dl
rm
lib.h
1192
0644
edit
dl
rm
log.h
3964
0644
edit
dl
rm
lookup.h
2924
0644
edit
dl
rm
master.h
11289
0644
edit
dl
rm
masterdump.h
12647
0644
edit
dl
rm
message.h
39023
0644
edit
dl
rm
name.h
37115
0644
edit
dl
rm
ncache.h
4929
0644
edit
dl
rm
nsec.h
3397
0644
edit
dl
rm
nsec3.h
8032
0644
edit
dl
rm
nta.h
4548
0644
edit
dl
rm
opcode.h
1007
0644
edit
dl
rm
order.h
1999
0644
edit
dl
rm
peer.h
5966
0644
edit
dl
rm
portlist.h
2101
0644
edit
dl
rm
private.h
1935
0644
edit
dl
rm
rbt.h
40618
0644
edit
dl
rm
rcode.h
2481
0644
edit
dl
rm
rdata.h
21613
0644
edit
dl
rm
rdataclass.h
2257
0644
edit
dl
rm
rdatalist.h
2569
0644
edit
dl
rm
rdataset.h
21536
0644
edit
dl
rm
rdatasetiter.h
3926
0644
edit
dl
rm
rdataslab.h
4528
0644
edit
dl
rm
rdatastruct.h
61584
0644
edit
dl
rm
rdatatype.h
2298
0644
edit
dl
rm
request.h
11156
0644
edit
dl
rm
resolver.h
20227
0644
edit
dl
rm
result.h
9284
0644
edit
dl
rm
rootns.h
892
0644
edit
dl
rm
rpz.h
10335
0644
edit
dl
rm
rriterator.h
4230
0644
edit
dl
rm
rrl.h
6640
0644
edit
dl
rm
sdb.h
7224
0644
edit
dl
rm
sdlz.h
14214
0644
edit
dl
rm
secalg.h
1706
0644
edit
dl
rm
secproto.h
1557
0644
edit
dl
rm
soa.h
2186
0644
edit
dl
rm
ssu.h
8308
0644
edit
dl
rm
stats.h
13451
0644
edit
dl
rm
tcpmsg.h
3145
0644
edit
dl
rm
time.h
1695
0644
edit
dl
rm
timer.h
1051
0644
edit
dl
rm
tkey.h
7631
0644
edit
dl
rm
tsec.h
2949
0644
edit
dl
rm
tsig.h
8384
0644
edit
dl
rm
ttl.h
1945
0644
edit
dl
rm
types.h
14212
0644
edit
dl
rm
update.h
1653
0644
edit
dl
rm
validator.h
7161
0644
edit
dl
rm
version.h
868
0644
edit
dl
rm
view.h
35274
0644
edit
dl
rm
xfrin.h
2924
0644
edit
dl
rm
zone.h
60864
0644
edit
dl
rm
zonekey.h
777
0644
edit
dl
rm
zt.h
5562
0644
edit
dl
rm
Edit:
/usr/include/bind9/dns/sdlz.h
(14214B)
/* * Portions Copyright (C) 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 https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ /* * Copyright (C) 2002 Stichting NLnet, Netherlands, stichting@nlnet.nl. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND STICHTING NLNET * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL * STICHTING NLNET BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE * USE OR PERFORMANCE OF THIS SOFTWARE. * * The development of Dynamically Loadable Zones (DLZ) for Bind 9 was * conceived and contributed by Rob Butler. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND ROB BUTLER * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL * ROB BUTLER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE * USE OR PERFORMANCE OF THIS SOFTWARE. */ /*! \file dns/sdlz.h */ #ifndef SDLZ_H #define SDLZ_H 1 #include <inttypes.h> #include <stdbool.h> #include <dns/clientinfo.h> #include <dns/dlz.h> ISC_LANG_BEGINDECLS #define DNS_SDLZFLAG_THREADSAFE 0x00000001U #define DNS_SDLZFLAG_RELATIVEOWNER 0x00000002U #define DNS_SDLZFLAG_RELATIVERDATA 0x00000004U /* A simple DLZ database. */ typedef struct dns_sdlz_db dns_sdlz_db_t; /* A simple DLZ database lookup in progress. */ typedef struct dns_sdlzlookup dns_sdlzlookup_t; /* A simple DLZ database traversal in progress. */ typedef struct dns_sdlzallnodes dns_sdlzallnodes_t; typedef isc_result_t (*dns_sdlzallnodesfunc_t)(const char *zone, void *driverarg, void *dbdata, dns_sdlzallnodes_t *allnodes); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply an all nodes method. This method is called when the DNS * server is performing a zone transfer query, after the allow zone * transfer method has been called. This method is only called if the * allow zone transfer method returned ISC_R_SUCCESS. This method and * the allow zone transfer method are both required for zone transfers * to be supported. If the driver generates data dynamically (instead * of searching in a database for it) it should not implement this * function as a zone transfer would be meaningless. A SDLZ driver * does not have to implement an all nodes method. */ typedef isc_result_t (*dns_sdlzallowzonexfr_t)(void *driverarg, void *dbdata, const char *name, const char *client); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply an allow zone transfer method. This method is called when * the DNS server is performing a zone transfer query, before the all * nodes method can be called. This method and the all node method * are both required for zone transfers to be supported. If the * driver generates data dynamically (instead of searching in a * database for it) it should not implement this function as a zone * transfer would be meaningless. A SDLZ driver does not have to * implement an allow zone transfer method. * * This method should return ISC_R_SUCCESS if the zone is supported by * the database and a zone transfer is allowed for the specified * client. If the zone is supported by the database, but zone * transfers are not allowed for the specified client this method * should return ISC_R_NOPERM.. Lastly the method should return * ISC_R_NOTFOUND if the zone is not supported by the database. If an * error occurs it should return a result code indicating the type of * error. */ typedef isc_result_t (*dns_sdlzauthorityfunc_t)(const char *zone, void *driverarg, void *dbdata, dns_sdlzlookup_t *lookup); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply an authority method. This method is called when the DNS * server is performing a query, after both the find zone and lookup * methods have been called. This method is required if the lookup * function does not supply authority information for the dns * record. A SDLZ driver does not have to implement an authority * method. */ typedef isc_result_t (*dns_sdlzcreate_t)(const char *dlzname, unsigned int argc, char *argv[], void *driverarg, void **dbdata); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply a create method. This method is called when the DNS server * is starting up and creating drivers for use later. A SDLZ driver * does not have to implement a create method. */ typedef void (*dns_sdlzdestroy_t)(void *driverarg, void *dbdata); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply a destroy method. This method is called when the DNS server * is shutting down and no longer needs the driver. A SDLZ driver does * not have to implement a destroy method. */ typedef isc_result_t (*dns_sdlzfindzone_t)(void *driverarg, void *dbdata, const char *name, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo); /*%< * Method prototype. Drivers implementing the SDLZ interface MUST * supply a find zone method. This method is called when the DNS * server is performing a query to to determine if 'name' is a * supported dns zone. The find zone method will be called with the * longest possible name first, and continue to be called with * successively shorter domain names, until any of the following * occur: * * \li 1) the function returns (ISC_R_SUCCESS) indicating a zone name * match. * * \li 2) a problem occurs, and the functions returns anything other than * (ISC_R_NOTFOUND) * * \li 3) we run out of domain name labels. I.E. we have tried the * shortest domain name * * \li 4) the number of labels in the domain name is less than min_labels * for dns_dlzfindzone * * The driver's find zone method should return ISC_R_SUCCESS if the * zone is supported by the database. Otherwise it should return * ISC_R_NOTFOUND, if the zone is not supported. If an error occurs * it should return a result code indicating the type of error. */ typedef isc_result_t (*dns_sdlzlookupfunc_t)(const char *zone, const char *name, void *driverarg, void *dbdata, dns_sdlzlookup_t *lookup, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo); /*%< * Method prototype. Drivers implementing the SDLZ interface MUST * supply a lookup method. This method is called when the * DNS server is performing a query, after the find zone and before any * other methods have been called. This function returns DNS record * information using the dns_sdlz_putrr and dns_sdlz_putsoa functions. * If this function supplies authority information for the DNS record * the authority method is not required. If it does not, the * authority function is required. * * The 'methods' and 'clientinfo' args allow an SDLZ driver to retrieve * information about the querying client (such as source IP address) * from the caller. */ typedef isc_result_t (*dns_sdlznewversion_t)(const char *zone, void *driverarg, void *dbdata, void **versionp); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply a newversion method. This method is called to start a * write transaction on a zone and should only be implemented by * writeable backends. * When implemented, the driver should create a new transaction, and * fill *versionp with a pointer to the transaction state. The * closeversion function will be called to close the transaction. */ typedef void (*dns_sdlzcloseversion_t)(const char *zone, bool commit, void *driverarg, void *dbdata, void **versionp); /*%< * Method prototype. Drivers implementing the SDLZ interface must * supply a closeversion method if they supply a newversion method. * When implemented, the driver should close the given transaction, * committing changes if 'commit' is true. If 'commit' is not true * then all changes should be discarded and the database rolled back. * If the call is successful then *versionp should be set to NULL */ typedef isc_result_t (*dns_sdlzconfigure_t)(dns_view_t *view, dns_dlzdb_t *dlzdb, void *driverarg, void *dbdata); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply a configure method. When supplied, it will be called * immediately after the create method to give the driver a chance * to configure writeable zones */ typedef bool (*dns_sdlzssumatch_t)(const char *signer, const char *name, const char *tcpaddr, const char *type, const char *key, uint32_t keydatalen, unsigned char *keydata, void *driverarg, void *dbdata); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply a ssumatch method. If supplied, then ssumatch will be * called to authorize any zone updates. The driver should return * true to allow the update, and false to deny it. For a DLZ * controlled zone, this is the only access control on updates. */ typedef isc_result_t (*dns_sdlzmodrdataset_t)(const char *name, const char *rdatastr, void *driverarg, void *dbdata, void *version); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply addrdataset and subtractrdataset methods. If supplied, then these * will be called when rdatasets are added/subtracted during * updates. The version parameter comes from a call to the sdlz * newversion() method from the driver. The rdataset parameter is a * linearise string representation of the rdataset change. The format * is the same as used by dig when displaying records. The fields are * tab delimited. */ typedef isc_result_t (*dns_sdlzdelrdataset_t)(const char *name, const char *type, void *driverarg, void *dbdata, void *version); /*%< * Method prototype. Drivers implementing the SDLZ interface may * supply a delrdataset method. If supplied, then this * function will be called when rdatasets are deleted during * updates. The call should remove all rdatasets of the given type for * the specified name. */ typedef struct dns_sdlzmethods { dns_sdlzcreate_t create; dns_sdlzdestroy_t destroy; dns_sdlzfindzone_t findzone; dns_sdlzlookupfunc_t lookup; dns_sdlzauthorityfunc_t authority; dns_sdlzallnodesfunc_t allnodes; dns_sdlzallowzonexfr_t allowzonexfr; dns_sdlznewversion_t newversion; dns_sdlzcloseversion_t closeversion; dns_sdlzconfigure_t configure; dns_sdlzssumatch_t ssumatch; dns_sdlzmodrdataset_t addrdataset; dns_sdlzmodrdataset_t subtractrdataset; dns_sdlzdelrdataset_t delrdataset; } dns_sdlzmethods_t; isc_result_t dns_sdlzregister(const char *drivername, const dns_sdlzmethods_t *methods, void *driverarg, unsigned int flags, isc_mem_t *mctx, dns_sdlzimplementation_t **sdlzimp); /*%< * Register a dynamically loadable zones (dlz) driver for the database * type 'drivername', implemented by the functions in '*methods'. * * sdlzimp must point to a NULL dns_sdlzimplementation_t pointer. * That is, sdlzimp != NULL && *sdlzimp == NULL. It will be assigned * a value that will later be used to identify the driver when * deregistering it. */ void dns_sdlzunregister(dns_sdlzimplementation_t **sdlzimp); /*%< * Removes the sdlz driver from the list of registered sdlz drivers. * There must be no active sdlz drivers of this type when this * function is called. */ typedef isc_result_t dns_sdlz_putnamedrr_t(dns_sdlzallnodes_t *allnodes, const char *name, const char *type, dns_ttl_t ttl, const char *data); dns_sdlz_putnamedrr_t dns_sdlz_putnamedrr; /*%< * Add a single resource record to the allnodes structure to be later * parsed into a zone transfer response. */ typedef isc_result_t dns_sdlz_putrr_t(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl, const char *data); dns_sdlz_putrr_t dns_sdlz_putrr; /*%< * Add a single resource record to the lookup structure to be later * parsed into a query response. */ typedef isc_result_t dns_sdlz_putsoa_t(dns_sdlzlookup_t *lookup, const char *mname, const char *rname, uint32_t serial); dns_sdlz_putsoa_t dns_sdlz_putsoa; /*%< * This function may optionally be called from the 'authority' * callback to simplify construction of the SOA record for 'zone'. It * will provide a SOA listing 'mname' as as the master server and * 'rname' as the responsible person mailbox. It is the * responsibility of the driver to increment the serial number between * responses if necessary. All other SOA fields will have reasonable * default values. */ typedef isc_result_t dns_sdlz_setdb_t(dns_dlzdb_t *dlzdatabase, dns_rdataclass_t rdclass, dns_name_t *name, dns_db_t **dbp); dns_sdlz_setdb_t dns_sdlz_setdb; /*%< * Create the database pointers for a writeable SDLZ zone */ ISC_LANG_ENDDECLS #endif /* SDLZ_H */
Save
cmd:
run