#include <isc/lang.h>
#include <isc/magic.h>
#include <isc/ondestroy.h>
#include <isc/stats.h>
#include <isc/stdtime.h>
#include <dns/clientinfo.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/rpz.h>
#include <dns/types.h>
Go to the source code of this file.
Data Structures | |
struct | dns_dbmethods |
struct | dns_db |
This structure is actually just the common prefix of a DNS db implementation's version of a dns_db_t. More... | |
Defines | |
#define | DNS_DB_H 1 |
#define | DNS_DB_MAGIC ISC_MAGIC('D','N','S','D') |
#define | DNS_DB_VALID(db) ISC_MAGIC_VALID(db, DNS_DB_MAGIC) |
#define | DNS_DBATTR_CACHE 0x01 |
#define | DNS_DBATTR_STUB 0x02 |
#define | DNS_DBSUB_EXACT 0x01 |
Options that can be specified for dns_db_subtractrdataset(). | |
#define | DNS_DBSUB_WANTOLD 0x02 |
#define | DNS_DBFIND_GLUEOK 0x0001 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_VALIDATEGLUE 0x0002 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_NOWILD 0x0004 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_PENDINGOK 0x0008 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_NOEXACT 0x0010 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_FORCENSEC 0x0020 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_COVERINGNSEC 0x0040 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_FORCENSEC3 0x0080 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_ADDITIONALOK 0x0100 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBFIND_NOZONECUT 0x0200 |
Options that can be specified for dns_db_find(). | |
#define | DNS_DBADD_MERGE 0x01 |
Options that can be specified for dns_db_addrdataset(). | |
#define | DNS_DBADD_FORCE 0x02 |
Options that can be specified for dns_db_addrdataset(). | |
#define | DNS_DBADD_EXACT 0x04 |
Options that can be specified for dns_db_addrdataset(). | |
#define | DNS_DBADD_EXACTTTL 0x08 |
Options that can be specified for dns_db_addrdataset(). | |
#define | DNS_DBADD_PREFETCH 0x10 |
Options that can be specified for dns_db_addrdataset(). | |
#define | DNS_DB_RELATIVENAMES 0x1 |
Iterator options. | |
#define | DNS_DB_NSEC3ONLY 0x2 |
Iterator options. | |
#define | DNS_DB_NONSEC3 0x4 |
Iterator options. | |
Typedefs | |
typedef ISC_LANG_BEGINDECLS struct dns_dbmethods | dns_dbmethods_t |
typedef isc_result_t(* | dns_dbcreatefunc_t )(isc_mem_t *mctx, dns_name_t *name, dns_dbtype_t type, dns_rdataclass_t rdclass, unsigned int argc, char *argv[], void *driverarg, dns_db_t **dbp) |
Functions | |
isc_result_t | dns_db_create (isc_mem_t *mctx, const char *db_type, dns_name_t *origin, dns_dbtype_t type, dns_rdataclass_t rdclass, unsigned int argc, char *argv[], dns_db_t **dbp) |
Create a new database using implementation 'db_type'. | |
void | dns_db_attach (dns_db_t *source, dns_db_t **targetp) |
Attach *targetp to source. | |
void | dns_db_detach (dns_db_t **dbp) |
Detach *dbp from its database. | |
isc_result_t | dns_db_ondestroy (dns_db_t *db, isc_task_t *task, isc_event_t **eventp) |
Causes 'eventp' to be sent to be sent to 'task' when the database is destroyed. | |
isc_boolean_t | dns_db_iscache (dns_db_t *db) |
Does 'db' have cache semantics? | |
isc_boolean_t | dns_db_iszone (dns_db_t *db) |
Does 'db' have zone semantics? | |
isc_boolean_t | dns_db_isstub (dns_db_t *db) |
Does 'db' have stub semantics? | |
isc_boolean_t | dns_db_issecure (dns_db_t *db) |
Is 'db' secure? | |
isc_boolean_t | dns_db_isdnssec (dns_db_t *db) |
Is 'db' secure or partially secure? | |
dns_name_t * | dns_db_origin (dns_db_t *db) |
The origin of the database. | |
dns_rdataclass_t | dns_db_class (dns_db_t *db) |
The class of the database. | |
isc_result_t | dns_db_beginload (dns_db_t *db, dns_rdatacallbacks_t *callbacks) |
Begin loading 'db'. | |
isc_result_t | dns_db_endload (dns_db_t *db, dns_rdatacallbacks_t *callbacks) |
Finish loading 'db'. | |
isc_result_t | dns_db_load (dns_db_t *db, const char *filename) |
isc_result_t | dns_db_load2 (dns_db_t *db, const char *filename, dns_masterformat_t format) |
isc_result_t | dns_db_load3 (dns_db_t *db, const char *filename, dns_masterformat_t format, unsigned int options) |
Load master file 'filename' into 'db'. | |
isc_result_t | dns_db_serialize (dns_db_t *db, dns_dbversion_t *version, FILE *rbtfile) |
Dump version 'version' of 'db' to map-format file 'filename'. | |
isc_result_t | dns_db_dump (dns_db_t *db, dns_dbversion_t *version, const char *filename) |
isc_result_t | dns_db_dump2 (dns_db_t *db, dns_dbversion_t *version, const char *filename, dns_masterformat_t masterformat) |
Dump version 'version' of 'db' to master file 'filename'. | |
void | dns_db_currentversion (dns_db_t *db, dns_dbversion_t **versionp) |
Open the current version for reading. | |
isc_result_t | dns_db_newversion (dns_db_t *db, dns_dbversion_t **versionp) |
Open a new version for reading and writing. | |
void | dns_db_attachversion (dns_db_t *db, dns_dbversion_t *source, dns_dbversion_t **targetp) |
Attach '*targetp' to 'source'. | |
void | dns_db_closeversion (dns_db_t *db, dns_dbversion_t **versionp, isc_boolean_t commit) |
Close version '*versionp'. | |
isc_result_t | dns_db_findnode (dns_db_t *db, dns_name_t *name, isc_boolean_t create, dns_dbnode_t **nodep) |
isc_result_t | dns_db_findnodeext (dns_db_t *db, dns_name_t *name, isc_boolean_t create, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo, dns_dbnode_t **nodep) |
Find the node with name 'name'. | |
isc_result_t | dns_db_find (dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, dns_dbnode_t **nodep, dns_name_t *foundname, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) |
isc_result_t | dns_db_findext (dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, dns_rdatatype_t type, unsigned int options, isc_stdtime_t now, dns_dbnode_t **nodep, dns_name_t *foundname, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) |
Find the best match for 'name' and 'type' in version 'version' of 'db'. | |
isc_result_t | dns_db_findzonecut (dns_db_t *db, dns_name_t *name, unsigned int options, isc_stdtime_t now, dns_dbnode_t **nodep, dns_name_t *foundname, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) |
Find the deepest known zonecut which encloses 'name' in 'db'. | |
void | dns_db_attachnode (dns_db_t *db, dns_dbnode_t *source, dns_dbnode_t **targetp) |
Attach *targetp to source. | |
void | dns_db_detachnode (dns_db_t *db, dns_dbnode_t **nodep) |
Detach *nodep from its node. | |
void | dns_db_transfernode (dns_db_t *db, dns_dbnode_t **sourcep, dns_dbnode_t **targetp) |
Transfer a node between pointer. | |
isc_result_t | dns_db_expirenode (dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) |
Mark as stale all records at 'node' which expire at or before 'now'. | |
void | dns_db_printnode (dns_db_t *db, dns_dbnode_t *node, FILE *out) |
Print a textual representation of the contents of the node to 'out'. | |
isc_result_t | dns_db_createiterator (dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp) |
Create an iterator for version 'version' of 'db'. | |
isc_result_t | dns_db_findrdataset (dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, dns_rdatatype_t type, dns_rdatatype_t covers, isc_stdtime_t now, dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset) |
Search for an rdataset of type 'type' at 'node' that are in version 'version' of 'db'. If found, make 'rdataset' refer to it. | |
isc_result_t | dns_db_allrdatasets (dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, isc_stdtime_t now, dns_rdatasetiter_t **iteratorp) |
Make '*iteratorp' an rdataset iterator for all rdatasets at 'node' in version 'version' of 'db'. | |
isc_result_t | dns_db_addrdataset (dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, isc_stdtime_t now, dns_rdataset_t *rdataset, unsigned int options, dns_rdataset_t *addedrdataset) |
Add 'rdataset' to 'node' in version 'version' of 'db'. | |
isc_result_t | dns_db_subtractrdataset (dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, dns_rdataset_t *rdataset, unsigned int options, dns_rdataset_t *newrdataset) |
Remove any rdata in 'rdataset' from 'node' in version 'version' of 'db'. | |
isc_result_t | dns_db_deleterdataset (dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version, dns_rdatatype_t type, dns_rdatatype_t covers) |
Make it so that no rdataset of type 'type' exists at 'node' in version version 'version' of 'db'. | |
isc_result_t | dns_db_getsoaserial (dns_db_t *db, dns_dbversion_t *ver, isc_uint32_t *serialp) |
Get the current SOA serial number from a zone database. | |
void | dns_db_overmem (dns_db_t *db, isc_boolean_t overmem) |
Enable / disable aggressive cache cleaning. | |
unsigned int | dns_db_nodecount (dns_db_t *db) |
Count the number of nodes in 'db'. | |
unsigned int | dns_db_hashsize (dns_db_t *db) |
For database implementations using a hash table, report the current number of buckets. | |
void | dns_db_settask (dns_db_t *db, isc_task_t *task) |
If task is set then the final detach maybe performed asynchronously. | |
isc_boolean_t | dns_db_ispersistent (dns_db_t *db) |
Is 'db' persistent? A persistent database does not need to be loaded from disk or written to disk. | |
isc_result_t | dns_db_register (const char *name, dns_dbcreatefunc_t create, void *driverarg, isc_mem_t *mctx, dns_dbimplementation_t **dbimp) |
Register a new database implementation and add it to the list of supported implementations. | |
void | dns_db_unregister (dns_dbimplementation_t **dbimp) |
Remove a database implementation from the list of supported implementations. No databases of this type can be active when this is called. | |
isc_result_t | dns_db_getoriginnode (dns_db_t *db, dns_dbnode_t **nodep) |
Get the origin DB node corresponding to the DB's zone. This function should typically succeed unless the underlying DB implementation doesn't support the feature. | |
isc_result_t | dns_db_getnsec3parameters (dns_db_t *db, dns_dbversion_t *version, dns_hash_t *hash, isc_uint8_t *flags, isc_uint16_t *interations, unsigned char *salt, size_t *salt_length) |
Get the NSEC3 parameters that are associated with this zone. | |
isc_result_t | dns_db_findnsec3node (dns_db_t *db, dns_name_t *name, isc_boolean_t create, dns_dbnode_t **nodep) |
Find the NSEC3 node with name 'name'. | |
isc_result_t | dns_db_setsigningtime (dns_db_t *db, dns_rdataset_t *rdataset, isc_stdtime_t resign) |
Sets the re-signing time associated with 'rdataset' to 'resign'. | |
isc_result_t | dns_db_getsigningtime (dns_db_t *db, dns_rdataset_t *rdataset, dns_name_t *name) |
Return the rdataset with the earliest signing time in the zone. Note: the rdataset is version agnostic. | |
void | dns_db_resigned (dns_db_t *db, dns_rdataset_t *rdataset, dns_dbversion_t *version) |
Mark 'rdataset' as not being available to be returned by dns_db_getsigningtime(). If the changes associated with 'version' are committed this will be permanent. If the version is not committed this change will be rolled back when the version is closed. Until 'version' is either committed or rolled back, 'rdataset' can no longer be acted upon by dns_db_setsigningtime(). | |
dns_stats_t * | dns_db_getrrsetstats (dns_db_t *db) |
Get statistics information counting RRsets stored in the DB, when available. The statistics may not be available depending on the DB implementation. | |
isc_result_t | dns_db_setcachestats (dns_db_t *db, isc_stats_t *stats) |
Set the location in which to collect cache statistics. This option may not exist depending on the DB implementation. | |
void | dns_db_rpz_attach (dns_db_t *db, dns_rpz_zones_t *rpzs, dns_rpz_num_t rpz_num) |
Attach the response policy information for a view to a database for a zone for the view. | |
isc_result_t | dns_db_rpz_ready (dns_db_t *db) |
Finish loading a response policy zone. |
The dns_db_t type is like a "virtual class". To actually use DBs, an implementation of the class is required.
XXX more XXX
MP:
Definition in file db.h.
#define DNS_DB_MAGIC ISC_MAGIC('D','N','S','D') |
Definition at line 206 of file db.h.
Referenced by dns_ecdb_create(), dns_rbtdb_create(), dns_sdb_create(), and dns_sdlzcreateDBP().
#define DNS_DB_VALID | ( | db | ) | ISC_MAGIC_VALID(db, DNS_DB_MAGIC) |
Definition at line 207 of file db.h.
Referenced by diff_apply(), dns_db_addrdataset(), dns_db_allrdatasets(), dns_db_attach(), dns_db_attachnode(), dns_db_attachversion(), dns_db_beginload(), dns_db_class(), dns_db_closeversion(), dns_db_createiterator(), dns_db_currentversion(), dns_db_deleterdataset(), dns_db_detach(), dns_db_detachnode(), dns_db_dump2(), dns_db_endload(), dns_db_expirenode(), dns_db_find(), dns_db_findext(), dns_db_findnode(), dns_db_findnodeext(), dns_db_findnsec3node(), dns_db_findrdataset(), dns_db_findzonecut(), dns_db_getnsec3parameters(), dns_db_getoriginnode(), dns_db_getrrsetstats(), dns_db_hashsize(), dns_db_iscache(), dns_db_isdnssec(), dns_db_ispersistent(), dns_db_issecure(), dns_db_isstub(), dns_db_iszone(), dns_db_load3(), dns_db_newversion(), dns_db_nodecount(), dns_db_ondestroy(), dns_db_origin(), dns_db_overmem(), dns_db_printnode(), dns_db_serialize(), dns_db_setcachestats(), dns_db_settask(), dns_db_subtractrdataset(), dns_db_transfernode(), dns_journal_rollforward(), dns_view_setcache2(), and roll_forward().
#define DNS_DBATTR_CACHE 0x01 |
Definition at line 229 of file db.h.
Referenced by allrdatasets(), dns_db_addrdataset(), dns_db_attachversion(), dns_db_closeversion(), dns_db_currentversion(), dns_db_deleterdataset(), dns_db_expirenode(), dns_db_findzonecut(), dns_db_iscache(), dns_db_isdnssec(), dns_db_issecure(), dns_db_iszone(), dns_db_load3(), dns_db_newversion(), dns_db_subtractrdataset(), dns_ecdb_create(), and dns_rbtdb_create().
#define DNS_DBATTR_STUB 0x02 |
Definition at line 230 of file db.h.
Referenced by dns_db_isstub(), dns_db_iszone(), and dns_rbtdb_create().
#define DNS_DBFIND_GLUEOK 0x0001 |
Options that can be specified for dns_db_find().
Definition at line 236 of file db.h.
Referenced by cache_find(), check_address_records(), dbfind_name(), deleteit(), findext(), is_active(), query_addadditional(), query_addadditional2(), rpz_rrset_find(), zone_check_glue(), zone_find(), and zone_zonecut_callback().
#define DNS_DBFIND_VALIDATEGLUE 0x0002 |
Options that can be specified for dns_db_find().
Definition at line 237 of file db.h.
Referenced by zone_find().
#define DNS_DBFIND_NOWILD 0x0004 |
Options that can be specified for dns_db_find().
Definition at line 238 of file db.h.
Referenced by deleteit(), expecttofindkey(), getnodedata(), is_active(), next_active(), query_addwildcardproof(), rrset_visible(), sync_keyzone(), zone_nsec3chain(), zone_sign(), and zone_zonecut_callback().
#define DNS_DBFIND_PENDINGOK 0x0008 |
Options that can be specified for dns_db_find().
Definition at line 239 of file db.h.
Referenced by cache_find(), cache_zonecut_callback(), ns_query_start(), and view_find().
#define DNS_DBFIND_NOEXACT 0x0010 |
Options that can be specified for dns_db_find().
Definition at line 240 of file db.h.
Referenced by cache_findzonecut(), dns_view_findzonecut2(), fctx_create(), and resquery_response().
#define DNS_DBFIND_FORCENSEC 0x0020 |
Options that can be specified for dns_db_find().
Definition at line 241 of file db.h.
Referenced by zone_find().
#define DNS_DBFIND_COVERINGNSEC 0x0040 |
Options that can be specified for dns_db_find().
Definition at line 242 of file db.h.
Referenced by cache_find(), and view_find().
#define DNS_DBFIND_FORCENSEC3 0x0080 |
Options that can be specified for dns_db_find().
Definition at line 243 of file db.h.
Referenced by query_findclosestnsec3(), and zone_find().
#define DNS_DBFIND_ADDITIONALOK 0x0100 |
Options that can be specified for dns_db_find().
Definition at line 244 of file db.h.
Referenced by cache_find(), query_addadditional(), and query_addadditional2().
#define DNS_DBFIND_NOZONECUT 0x0200 |
Options that can be specified for dns_db_find().
Definition at line 245 of file db.h.
Referenced by findext(), and redirect().
#define DNS_DBADD_MERGE 0x01 |
Options that can be specified for dns_db_addrdataset().
Definition at line 252 of file db.h.
Referenced by add32(), addnsec3param(), diff_apply(), dns_db_addrdataset(), and loading_addrdataset().
#define DNS_DBADD_FORCE 0x02 |
Options that can be specified for dns_db_addrdataset().
Definition at line 253 of file db.h.
Referenced by add32(), cache_name(), and deleterdataset().
#define DNS_DBADD_EXACT 0x04 |
Options that can be specified for dns_db_addrdataset().
Definition at line 254 of file db.h.
Referenced by add32(), diff_apply(), and dns_db_addrdataset().
#define DNS_DBADD_EXACTTTL 0x08 |
Options that can be specified for dns_db_addrdataset().
Definition at line 255 of file db.h.
Referenced by add32(), and diff_apply().
#define DNS_DBADD_PREFETCH 0x10 |
Options that can be specified for dns_db_addrdataset().
Definition at line 256 of file db.h.
Referenced by add32(), and cache_name().
#define DNS_DBSUB_EXACT 0x01 |
Options that can be specified for dns_db_subtractrdataset().
Definition at line 262 of file db.h.
Referenced by diff_apply(), and subtractrdataset().
#define DNS_DBSUB_WANTOLD 0x02 |
#define DNS_DB_RELATIVENAMES 0x1 |
Iterator options.
Definition at line 269 of file db.h.
Referenced by createiterator(), and dumpctx_create().
#define DNS_DB_NSEC3ONLY 0x2 |
Iterator options.
Definition at line 270 of file db.h.
Referenced by createiterator(), dns_db_diffx(), dns_nsec3_addnsec3(), dns_nsec3_delnsec3(), nsec3ify(), nsecify(), and verifyzone().
#define DNS_DB_NONSEC3 0x4 |
Iterator options.
Definition at line 271 of file db.h.
Referenced by createiterator(), dns_db_diffx(), namelist_append_subdomain(), next_active(), nsec3ify(), nsecify(), verifyzone(), and zone_addnsec3chain().
typedef ISC_LANG_BEGINDECLS struct dns_dbmethods dns_dbmethods_t |
typedef isc_result_t(* dns_dbcreatefunc_t)(isc_mem_t *mctx, dns_name_t *name, dns_dbtype_t type, dns_rdataclass_t rdclass, unsigned int argc, char *argv[], void *driverarg, dns_db_t **dbp) |
isc_result_t dns_db_create | ( | isc_mem_t * | mctx, | |
const char * | db_type, | |||
dns_name_t * | origin, | |||
dns_dbtype_t | type, | |||
dns_rdataclass_t | rdclass, | |||
unsigned int | argc, | |||
char * | argv[], | |||
dns_db_t ** | dbp | |||
) |
Create a new database using implementation 'db_type'.
Notes:
Definition at line 115 of file db.c.
References dns_dbimplementation::create, dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DB, dns_name_isabsolute(), dns_dbimplementation::driverarg, impfind(), initialize(), ISC_LOG_ERROR, isc_log_write(), isc_once_do, ISC_R_NOTFOUND, ISC_R_SUCCESS, isc_rwlocktype_read, once, REQUIRE, RUNTIME_CHECK, RWLOCK, and RWUNLOCK.
Referenced by ATF_TC_BODY(), axfr_makedb(), cache_create_db(), configure_staticstub(), create_empty_zone(), createview(), dns_rootns_create(), dns_test_loaddb(), loadset(), loadzone(), ns_query(), opendb(), receive_secure_db(), setup_db(), writeset(), and zone_load().
Attach *targetp to source.
Requires:
Definition at line 151 of file db.c.
References DNS_DB_VALID, ENSURE, dns_db::methods, and REQUIRE.
Referenced by cache_name(), clone_results(), createiterator(), dbiterator_destroy(), dns_acache_createentry(), dns_acache_getentry(), dns_acache_setdb(), dns_acache_setentry(), dns_cache_attachdb(), dns_cache_flushnode(), dns_dbtable_add(), dns_dbtable_adddefault(), dns_dbtable_find(), dns_dbtable_getdefault(), dns_view_find2(), dns_view_findzonecut2(), dns_view_searchdlz(), dns_view_sethints(), dns_zone_getdb(), dns_zone_setdb(), dumpctx_create(), dumpdone(), dumptostream(), fctx_create(), keydone(), lookup_find(), ncache_message(), notify_createmessage(), ns_query(), query_addadditional(), query_addadditional2(), query_addbestns(), query_find(), query_findversion(), query_getcachedb(), rdataset_setadditional(), receive_secure_serial(), redirect(), redirect2(), resume_addnsec3chain(), resume_signingwithkey(), rpz_rrset_find(), save_nsec3param(), set_resigntime(), sync_secure_db(), xfrin_create(), xfrout_ctx_create(), zone_addnsec3chain(), zone_attachdb(), zone_dump(), zone_notify(), zone_nsec3chain(), zone_refreshkeys(), zone_resigninc(), zone_send_securedb(), zone_sign(), and zone_startload().
void dns_db_detach | ( | dns_db_t ** | dbp | ) |
Detach *dbp from its database.
Requires:
Definition at line 166 of file db.c.
References DNS_DB_VALID, ENSURE, and REQUIRE.
Referenced by acache_callback(), acache_cancelentry(), ATF_TC_BODY(), axfr_init(), cache_free(), check_ttls(), clear_entry(), client_resfind(), close_db(), configure_hint(), configure_hints(), configure_staticstub(), create_empty_zone(), dbdetach(), dbiterator_destroy(), dbtable_free(), destroy(), dlvfetched(), dns_acache_getentry(), dns_acache_putdb(), dns_cache_create3(), dns_cache_flush(), dns_cache_flushnode(), dns_dbtable_removedefault(), dns_rootns_create(), dns_view_find2(), dns_view_findzonecut2(), dns_view_flushcache2(), dns_view_searchdlz(), dns_view_setcache2(), dns_xfrin_create3(), dns_zone_synckeyzone(), do_addzone(), do_modzone(), dsfetched(), dsfetched2(), dumpcontext_destroy(), dumpctx_create(), dumpctx_destroy(), dumpdone(), dumptostream(), fctx_destroy(), fetch_callback(), fetch_callback_validator(), fetch_done(), keydone(), keyfetch_done(), levent_destroy(), loadds(), loadset(), lookup_find(), main(), maybe_free(), mkey_dumpzone(), notify_createmessage(), ns_query(), ns_server_delzone(), ns_server_signing(), ns_server_zonestatus(), ns_xfr_start(), ns_zone_configure_writeable_dlz(), opendb(), prefetch_done(), prime_done(), query_addadditional(), query_addadditional2(), query_addbestns(), query_discardcache(), query_find(), query_getcachedb(), query_getdb(), query_getzonedb(), query_iscachevalid(), query_reset(), query_resume(), rdataset_setadditional(), receive_secure_db(), receive_secure_serial(), redirect(), redirect2(), resume_addnsec3chain(), resume_dslookup(), resume_signingwithkey(), rpz_clean(), rpz_rewrite(), rpz_rewrite_ip_rrsets(), save_nsec3param(), set_resigntime(), shutdown_buckets(), shutdown_server(), stub_callback(), sync_secure_db(), test_create(), test_reverse(), test_seek(), test_seek_empty(), test_seek_nx(), test_walk(), update_action(), writeset(), xfrin_create(), xfrout_ctx_destroy(), zone_addnsec3chain(), zone_detachdb(), zone_dump(), zone_free(), zone_load(), zone_loaddone(), zone_notify(), zone_nsec3chain(), zone_refreshkeys(), zone_resigninc(), zone_sign(), and zone_startload().
isc_result_t dns_db_ondestroy | ( | dns_db_t * | db, | |
isc_task_t * | task, | |||
isc_event_t ** | eventp | |||
) |
Causes 'eventp' to be sent to be sent to 'task' when the database is destroyed.
Note; ownership of the eventp is taken from the caller (and *eventp is set to NULL). The sender field of the event is set to 'db' before it is sent to the task.
Definition at line 181 of file db.c.
References DNS_DB_VALID, isc_ondestroy_register(), dns_db::ondest, and REQUIRE.
Referenced by zone_postload().
isc_boolean_t dns_db_iscache | ( | dns_db_t * | db | ) |
Does 'db' have cache semantics?
Requires:
Definition at line 190 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, ISC_FALSE, ISC_TRUE, and REQUIRE.
Referenced by dns_view_find2(), dns_view_findzonecut2(), and dumpctx_create().
isc_boolean_t dns_db_iszone | ( | dns_db_t * | db | ) |
Does 'db' have zone semantics?
Requires:
Definition at line 205 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, DNS_DBATTR_STUB, ISC_FALSE, ISC_TRUE, and REQUIRE.
Referenced by dns_db_getnsec3parameters(), dns_db_getoriginnode(), dns_db_getsoaserial(), dns_view_sethints(), query_addds(), redirect(), and redirect2().
isc_boolean_t dns_db_isstub | ( | dns_db_t * | db | ) |
Does 'db' have stub semantics?
Requires:
Definition at line 220 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_STUB, ISC_FALSE, ISC_TRUE, and REQUIRE.
Referenced by dns_db_getsoaserial().
isc_boolean_t dns_db_issecure | ( | dns_db_t * | db | ) |
Is 'db' secure?
Requires:
Definition at line 250 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_db::methods, and REQUIRE.
Referenced by isdnssec(), next_active(), ns_server_zonestatus(), query_addadditional(), query_addns(), query_addsoa(), query_find(), redirect(), redirect2(), and zone_postload().
isc_boolean_t dns_db_isdnssec | ( | dns_db_t * | db | ) |
Is 'db' secure or partially secure?
Requires:
Definition at line 235 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_db::methods, and REQUIRE.
dns_name_t* dns_db_origin | ( | dns_db_t * | db | ) |
The origin of the database.
Note: caller must not try to change this name.
Requires:
Definition at line 275 of file db.c.
References DNS_DB_VALID, dns_db::origin, and REQUIRE.
Referenced by add_signing_records(), diff_apply(), dns_db_createsoatuple(), dns_db_getsoaserial(), dns_dbtable_add(), dns_dbtable_adddefault(), dns_dbtable_remove(), dns_nsec3_addnsec3(), dns_nsec3_delnsec3(), dns_nsec3_maxiterations(), dns_update_signaturesinc(), find_zone_keys(), fixup_nsec3param(), main(), query_addadditional(), query_addadditional2(), query_addns(), query_addsoa(), query_find(), query_findclosestnsec3(), remove_orphaned_ds(), rollback_private(), sign_a_node(), update_action(), updatesignwithkey(), zone_gotreadhandle(), and zone_nsec3chain().
dns_rdataclass_t dns_db_class | ( | dns_db_t * | db | ) |
The class of the database.
Requires:
Definition at line 286 of file db.c.
References DNS_DB_VALID, dns_db::rdclass, and REQUIRE.
Referenced by add_ns(), add_placeholder_nsec(), add_soa(), addoptout(), diff_apply(), dns_dbtable_add(), dns_nsec3_buildrdata(), dns_nsec_build(), dns_nsec_buildrdata(), fixup_nsec3param(), main(), update_action(), and updatesignwithkey().
isc_result_t dns_db_beginload | ( | dns_db_t * | db, | |
dns_rdatacallbacks_t * | callbacks | |||
) |
Begin loading 'db'.
Requires:
Definition at line 297 of file db.c.
References DNS_CALLBACK_VALID, DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by axfr_init(), db_load_from_stream(), dns_db_load3(), dns_rootns_create(), and zone_startload().
isc_result_t dns_db_endload | ( | dns_db_t * | db, | |
dns_rdatacallbacks_t * | callbacks | |||
) |
Finish loading 'db'.
Requires:
Definition at line 309 of file db.c.
References dns_rdatacallbacks::add_private, DNS_CALLBACK_VALID, DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by axfr_commit(), db_load_from_stream(), dns_db_load3(), dns_rootns_create(), maybe_free(), xfrin_reset(), zone_loaddone(), and zone_startload().
isc_result_t dns_db_load | ( | dns_db_t * | db, | |
const char * | filename | |||
) |
Definition at line 322 of file db.c.
References dns_db_load3(), and dns_masterformat_text.
Referenced by ATF_TC_BODY(), dns_cache_load(), dns_test_loaddb(), and loadset().
isc_result_t dns_db_load2 | ( | dns_db_t * | db, | |
const char * | filename, | |||
dns_masterformat_t | format | |||
) |
isc_result_t dns_db_load3 | ( | dns_db_t * | db, | |
const char * | filename, | |||
dns_masterformat_t | format, | |||
unsigned int | options | |||
) |
Load master file 'filename' into 'db'.
Notes:
dns_db_beginload(); dns_master_loadfile(); dns_db_endload(); *
Requires:
Definition at line 332 of file db.c.
References dns_db::attributes, callbacks, dns_db_beginload(), dns_db_endload(), DNS_DB_VALID, DNS_DBATTR_CACHE, DNS_MASTER_AGETTL, dns_master_loadfile2(), DNS_R_SEENINCLUDE, dns_rdatacallbacks_init(), ISC_R_SUCCESS, dns_db::mctx, dns_db::origin, dns_db::rdclass, and REQUIRE.
Referenced by dns_db_load(), dns_db_load2(), loadset(), and opendb().
isc_result_t dns_db_serialize | ( | dns_db_t * | db, | |
dns_dbversion_t * | version, | |||
FILE * | rbtfile | |||
) |
Dump version 'version' of 'db' to map-format file 'filename'.
Requires:
Definition at line 367 of file db.c.
References DNS_DB_VALID, ISC_R_NOTIMPLEMENTED, dns_db::methods, and REQUIRE.
Referenced by dumptostreaminc().
isc_result_t dns_db_dump | ( | dns_db_t * | db, | |
dns_dbversion_t * | version, | |||
const char * | filename | |||
) |
Definition at line 375 of file db.c.
References dns_masterformat_text, and dns_db::methods.
Referenced by dump().
isc_result_t dns_db_dump2 | ( | dns_db_t * | db, | |
dns_dbversion_t * | version, | |||
const char * | filename, | |||
dns_masterformat_t | masterformat | |||
) |
Dump version 'version' of 'db' to master file 'filename'.
Requires:
Definition at line 381 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
void dns_db_currentversion | ( | dns_db_t * | db, | |
dns_dbversion_t ** | versionp | |||
) |
Open the current version for reading.
Requires:
Definition at line 399 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_db::methods, and REQUIRE.
Referenced by ATF_TC_BODY(), check_nsec3param(), dns_acache_setentry(), dumpctx_create(), dumpdone(), dumptostream(), foreach_rr(), foreach_rrset(), keydone(), loadzonekeys(), mkey_dumpzone(), notify_createmessage(), ns_server_signing(), ns_xfr_start(), query_findversion(), query_getdb(), query_iscachevalid(), receive_secure_serial(), resume_addnsec3chain(), resume_signingwithkey(), save_nsec3param(), set_nsec3params(), sync_secure_db(), update_action(), warnifallksk(), xfrin_send_request(), zone_addnsec3chain(), zone_check_dnskeys(), zone_dump(), zone_get_from_db(), zone_gotwritehandle(), zone_notify(), and zone_replacedb().
isc_result_t dns_db_newversion | ( | dns_db_t * | db, | |
dns_dbversion_t ** | versionp | |||
) |
Open a new version for reading and writing.
Requires:
Definition at line 413 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_db::methods, and REQUIRE.
Referenced by add_soa(), build_final_keylist(), check_ttls(), configure_staticstub(), create_empty_zone(), ixfr_apply(), keydone(), keyfetch_done(), loadds(), main(), ns_query(), receive_secure_db(), receive_secure_serial(), roll_forward(), setup_db(), sync_keyzone(), update_action(), writeset(), zone_nsec3chain(), zone_refreshkeys(), zone_resigninc(), and zone_sign().
void dns_db_attachversion | ( | dns_db_t * | db, | |
dns_dbversion_t * | source, | |||
dns_dbversion_t ** | targetp | |||
) |
Attach '*targetp' to 'source'.
Requires:
Definition at line 427 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, ENSURE, dns_db::methods, and REQUIRE.
Referenced by attachversion(), dns_acache_getentry(), dns_acache_setentry(), dumpctx_create(), and xfrout_ctx_create().
void dns_db_closeversion | ( | dns_db_t * | db, | |
dns_dbversion_t ** | versionp, | |||
isc_boolean_t | commit | |||
) |
Close version '*versionp'.
Note: if '*versionp' is a read-write version and 'commit' is ISC_TRUE, then all changes made in the version will take effect, otherwise they will be rolled back. The value of 'commit' is ignored for read-only versions.
Requires:
Definition at line 445 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, ENSURE, dns_db::methods, and REQUIRE.
Referenced by add_soa(), ATF_TC_BODY(), attachversion(), build_final_keylist(), check_nsec3param(), check_ttls(), clear_entry(), close_db(), closeversion(), configure_staticstub(), create_empty_zone(), dns_acache_getentry(), dns_acache_setentry(), dumpcontext_destroy(), dumpctx_destroy(), dumpdone(), dumptostream(), foreach_rr(), foreach_rrset(), ixfr_commit(), keydone(), keyfetch_done(), loadds(), loadzonekeys(), main(), maybe_free(), mkey_dumpzone(), notify_createmessage(), ns_query(), ns_server_signing(), ns_xfr_start(), query_addadditional2(), query_discardcache(), query_iscachevalid(), query_reset(), receive_secure_db(), receive_secure_serial(), resume_addnsec3chain(), resume_signingwithkey(), roll_forward(), save_nsec3param(), set_nsec3params(), stub_callback(), sync_keyzone(), sync_secure_db(), update_action(), warnifallksk(), writeset(), xfrin_reset(), xfrin_send_request(), xfrout_ctx_destroy(), zone_addnsec3chain(), zone_check_dnskeys(), zone_dump(), zone_get_from_db(), zone_gotwritehandle(), zone_notify(), zone_nsec3chain(), zone_refreshkeys(), zone_replacedb(), zone_resigninc(), and zone_sign().
isc_result_t dns_db_findnode | ( | dns_db_t * | db, | |
dns_name_t * | name, | |||
isc_boolean_t | create, | |||
dns_dbnode_t ** | nodep | |||
) |
Definition at line 467 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by add_exposed_sigs(), add_ns(), add_nsec(), add_sigs(), add_soa(), addnowildcardhash(), addnsec3param(), addrdataset(), allrdatasets(), cache_name(), check_nsec3param(), configure_staticstub(), del_keysigs(), del_sigs(), deleterdataset(), diff_apply(), dns_cache_flushnode(), dns_db_createsoatuple(), dns_db_getsoaserial(), dns_nsec3_addnsec3(), dns_update_signaturesinc(), find_zone_keys(), findrdataset(), foreach_rr(), foreach_rrset(), loadds(), loadset(), loadzonekeys(), name_exists(), ncache_message(), notify_createmessage(), ns_query(), ns_server_signing(), receive_secure_db(), resigned(), resume_addnsec3chain(), resume_signingwithkey(), rr_exists(), save_nsrrset(), subtract(), temp_check(), verifyzone(), warnifallksk(), zone_check_dnskeys(), zone_get_from_db(), and zone_notify().
isc_result_t dns_db_findnodeext | ( | dns_db_t * | db, | |
dns_name_t * | name, | |||
isc_boolean_t | create, | |||
dns_clientinfomethods_t * | methods, | |||
dns_clientinfo_t * | clientinfo, | |||
dns_dbnode_t ** | nodep | |||
) |
Find the node with name 'name'.
dns_db_findnodeext() (findnode extended) also accepts parameters 'methods' and 'clientinfo', which, when provided, enable the database to retreive information about the client from the caller, and modify its response on the basis of that information.
Notes:
Definition at line 486 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by foreach_rr(), foreach_rrset(), get_key(), and mark_secure().
isc_result_t dns_db_find | ( | dns_db_t * | db, | |
dns_name_t * | name, | |||
dns_dbversion_t * | version, | |||
dns_rdatatype_t | type, | |||
unsigned int | options, | |||
isc_stdtime_t | now, | |||
dns_dbnode_t ** | nodep, | |||
dns_name_t * | foundname, | |||
dns_rdataset_t * | rdataset, | |||
dns_rdataset_t * | sigrdataset | |||
) |
Definition at line 521 of file db.c.
References DNS_DB_VALID, dns_name_hasbuffer(), dns_rdataset_isassociated(), DNS_RDATASET_VALID, dns_db::methods, and REQUIRE.
Referenced by check_address_records(), check_hints(), check_mx(), deleteit(), dns_root_checkhints(), dns_view_find2(), dns_view_findzonecut2(), expecttofindkey(), find(), get_soa_ttls(), is_active(), next_active(), rrset_visible(), sync_keyzone(), zone_check_glue(), zone_check_mx(), zone_check_ns(), zone_check_srv(), zone_nsec3chain(), and zone_sign().
isc_result_t dns_db_findext | ( | dns_db_t * | db, | |
dns_name_t * | name, | |||
dns_dbversion_t * | version, | |||
dns_rdatatype_t | type, | |||
unsigned int | options, | |||
isc_stdtime_t | now, | |||
dns_dbnode_t ** | nodep, | |||
dns_name_t * | foundname, | |||
dns_clientinfomethods_t * | methods, | |||
dns_clientinfo_t * | clientinfo, | |||
dns_rdataset_t * | rdataset, | |||
dns_rdataset_t * | sigrdataset | |||
) |
Find the best match for 'name' and 'type' in version 'version' of 'db'.
dns_db_findext() (find extended) also accepts parameters 'methods' and 'clientinfo', which when provided enable the database to retreive information about the client from the caller, and modify its response on the basis of this information.
Notes:
Definition at line 554 of file db.c.
References DNS_DB_VALID, dns_name_hasbuffer(), dns_rdataset_isassociated(), DNS_RDATASET_VALID, dns_db::methods, and REQUIRE.
Referenced by query_addadditional(), query_addadditional2(), query_addbestns(), query_addns(), query_addsoa(), query_addwildcardproof(), query_find(), query_findclosestnsec3(), redirect(), redirect2(), rpz_find_p(), and rpz_rrset_find().
isc_result_t dns_db_findzonecut | ( | dns_db_t * | db, | |
dns_name_t * | name, | |||
unsigned int | options, | |||
isc_stdtime_t | now, | |||
dns_dbnode_t ** | nodep, | |||
dns_name_t * | foundname, | |||
dns_rdataset_t * | rdataset, | |||
dns_rdataset_t * | sigrdataset | |||
) |
Find the deepest known zonecut which encloses 'name' in 'db'.
Notes:
Definition at line 589 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_name_hasbuffer(), dns_rdataset_isassociated(), DNS_RDATASET_VALID, dns_db::methods, and REQUIRE.
Referenced by dns_view_findzonecut2(), and query_addbestns().
void dns_db_attachnode | ( | dns_db_t * | db, | |
dns_dbnode_t * | source, | |||
dns_dbnode_t ** | targetp | |||
) |
Attach *targetp to source.
Requires:
Definition at line 611 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by clone_results(), dns_acache_getentry(), dns_acache_setentry(), dns_view_find2(), list_tordataset(), lookup_find(), rdataset_setadditional(), redirect(), and redirect2().
void dns_db_detachnode | ( | dns_db_t * | db, | |
dns_dbnode_t ** | nodep | |||
) |
Detach *nodep from its node.
Requires:
Definition at line 625 of file db.c.
References DNS_DB_VALID, ENSURE, dns_db::methods, and REQUIRE.
Referenced by acache_callback(), acache_cancelentry(), add_exposed_sigs(), add_ns(), add_nsec(), add_sigs(), add_soa(), addnowildcardhash(), addnsec3(), addnsec3param(), addrdataset(), allrdatasets(), assignwork(), ATF_TC_BODY(), cache_name(), check_hints(), check_nsec3param(), check_ttls(), cleanup_zone(), clear_entry(), cleartree(), client_resfind(), configure_staticstub(), del_keysigs(), del_sigs(), delete(), deleterdataset(), diff_apply(), dlvfetched(), dns64_ttl(), dns_acache_getentry(), dns_cache_clean(), dns_cache_flushnode(), dns_db_createsoatuple(), dns_db_getsoaserial(), dns_nsec3_activex(), dns_nsec3_addnsec3(), dns_nsec3_addnsec3s(), dns_nsec3_addnsec3sx(), dns_nsec3_delnsec3(), dns_nsec3_delnsec3sx(), dns_nsec3_maxiterations(), dns_nsec3param_deletechains(), dns_nsec_nseconly(), dns_private_chains(), dns_rriterator_destroy(), dns_rriterator_first(), dns_rriterator_nextrrset(), dns_update_signaturesinc(), dns_view_find2(), dsfetched(), dsfetched2(), dumptostreaminc(), fetch_callback(), fetch_callback_validator(), fetch_done(), find_zone_keys(), findrdataset(), fixup_nsec3param(), foreach_rr(), foreach_rrset(), get_iterations(), get_key(), get_name_diff(), incremental_cleaning_action(), integrity_checks(), isoptout(), keydone(), keyfetch_done(), levent_destroy(), loadds(), loadset(), loadzonekeys(), lookup_find(), mark_secure(), maybe_free_rbtdb(), name_exists(), namelist_append_subdomain(), ncache_message(), need_nsec_chain(), next_active(), notify_createmessage(), ns_query(), ns_server_signing(), nsec3ify(), nsecify(), prefetch_done(), prime_done(), query_addadditional(), query_addadditional2(), query_addbestns(), query_addns(), query_addsoa(), query_addwildcardproof(), query_discardcache(), query_find(), query_reset(), query_resume(), rdataset_disassociate(), rdataset_setadditional(), rdatasetiter_destroy(), receive_secure_db(), redirect(), redirect2(), resigned(), resume_addnsec3chain(), resume_dslookup(), resume_signingwithkey(), rpz_clean(), rpz_find_p(), rr_exists(), save_nsec3param(), save_nsrrset(), set_nsec3params(), setsoaserial(), signapex(), subtract(), temp_check(), test_reverse(), test_seek(), test_walk(), updatesecure(), updatesignwithkey(), verifynsec3(), verifyzone(), warnifallksk(), writenode(), zone_check_dnskeys(), zone_check_dup(), zone_get_from_db(), zone_notify(), zone_nsec3chain(), and zone_sign().
void dns_db_transfernode | ( | dns_db_t * | db, | |
dns_dbnode_t ** | sourcep, | |||
dns_dbnode_t ** | targetp | |||
) |
Transfer a node between pointer.
This is equivalent to calling dns_db_attachnode() then dns_db_detachnode().
Requires:
Definition at line 640 of file db.c.
References DNS_DB_VALID, ENSURE, dns_db::methods, REQUIRE, and UNUSED.
Referenced by cache_name(), and ncache_message().
isc_result_t dns_db_expirenode | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
isc_stdtime_t | now | |||
) |
Mark as stale all records at 'node' which expire at or before 'now'.
Note: if 'now' is zero, then the current time will be used.
Requires:
Definition at line 664 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_db::methods, and REQUIRE.
Referenced by dns_cache_clean().
void dns_db_printnode | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
FILE * | out | |||
) |
Print a textual representation of the contents of the node to 'out'.
Note: this function is intended for debugging, not general use.
Requires:
Definition at line 678 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
isc_result_t dns_db_createiterator | ( | dns_db_t * | db, | |
unsigned int | options, | |||
dns_dbiterator_t ** | iteratorp | |||
) |
Create an iterator for version 'version' of 'db'.
Notes:
Definition at line 695 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by begin_cleaning(), cache_cleaner_init(), check_hints(), check_ttls(), cleanup_zone(), cleartree(), diff_namespace(), dns_cache_clean(), dns_cache_flush(), dns_nsec3_addnsec3(), dns_nsec3_delnsec3(), dns_rriterator_init(), dumpctx_create(), incremental_cleaning_action(), integrity_checks(), namelist_append_subdomain(), next_active(), nsec3ify(), nsecify(), presign(), receive_secure_db(), test_create(), test_reverse(), test_seek(), test_seek_empty(), test_seek_nx(), test_walk(), verifyzone(), zone_addnsec3chain(), and zone_check_dup().
isc_result_t dns_db_findrdataset | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
dns_dbversion_t * | version, | |||
dns_rdatatype_t | type, | |||
dns_rdatatype_t | covers, | |||
isc_stdtime_t | now, | |||
dns_rdataset_t * | rdataset, | |||
dns_rdataset_t * | sigrdataset | |||
) |
Search for an rdataset of type 'type' at 'node' that are in version 'version' of 'db'. If found, make 'rdataset' refer to it.
Notes:
Definition at line 713 of file db.c.
References DNS_DB_VALID, dns_rdataset_isassociated(), DNS_RDATASET_VALID, dns_db::methods, and REQUIRE.
Referenced by add_ds(), add_sigs(), assignwork(), check_no_nsec(), check_nsec3param(), del_keysigs(), del_sigs(), delete(), delete_nsec(), deletematchingnsec3(), dns64_ttl(), dns_db_createsoatuple(), dns_db_getsoaserial(), dns_dnssec_findzonekeys2(), dns_nsec3_activex(), dns_nsec3_addnsec3(), dns_nsec3_addnsec3s(), dns_nsec3_addnsec3sx(), dns_nsec3_delnsec3(), dns_nsec3_delnsec3sx(), dns_nsec3_maxiterations(), dns_nsec3param_deletechains(), dns_nsec_nseconly(), dns_private_chains(), dns_update_signaturesinc(), findrdataset(), fixup_nsec3param(), foreach_rr(), get_iterations(), get_key(), integrity_checks(), is_delegation(), isoptout(), iszonesecure(), keydone(), loadds(), loadset(), loadzonekeys(), need_nsec_chain(), notify_createmessage(), ns_server_signing(), nsec3clean(), query_addadditional(), query_addadditional2(), query_addds(), query_addns(), query_addsoa(), query_find(), record_found(), resume_addnsec3chain(), resume_signingwithkey(), rr_exists(), save_nsec3param(), secure(), set_nsec3params(), setsoaserial(), signed_with_key(), signset(), temp_check(), updatesecure(), updatesignwithkey(), verifynsec(), verifynsec3(), verifyzone(), warnifallksk(), zone_check_dnskeys(), zone_count_ns_rr(), zone_load_soa_rr(), and zone_notify().
isc_result_t dns_db_allrdatasets | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
dns_dbversion_t * | version, | |||
isc_stdtime_t | now, | |||
dns_rdatasetiter_t ** | iteratorp | |||
) |
Make '*iteratorp' an rdataset iterator for all rdatasets at 'node' in version 'version' of 'db'.
Notes:
Definition at line 734 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by active_node(), add_exposed_sigs(), allrdatasets(), check_hints(), check_no_rrsig(), check_ttls(), cleannode(), cleanup_zone(), clearnode(), client_resfind(), del_sig(), dns_master_dumpnodetostream(), dns_nsec3_buildrdata(), dns_nsec_buildrdata(), dns_rriterator_first(), dns_rriterator_nextrrset(), dumpnode(), dumptostreaminc(), foreach_rrset(), get_name_diff(), is_empty(), iterate_node(), name_exists(), next_active(), nsecify(), query_find(), receive_secure_db(), remove_records(), remove_sigs(), rpz_find_p(), sign_a_node(), signname(), verifynode(), verifyset(), zone_check_dup(), and zone_nsec3chain().
isc_result_t dns_db_addrdataset | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
dns_dbversion_t * | version, | |||
isc_stdtime_t | now, | |||
dns_rdataset_t * | rdataset, | |||
unsigned int | options, | |||
dns_rdataset_t * | addedrdataset | |||
) |
Add 'rdataset' to 'node' in version 'version' of 'db'.
Notes:
Definition at line 750 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBADD_EXACT, DNS_DBADD_MERGE, DNS_DBATTR_CACHE, dns_rdataset_isassociated(), DNS_RDATASET_VALID, dns_db::methods, dns_db::rdclass, dns_rdataset::rdclass, and REQUIRE.
Referenced by add_ds(), add_ns(), add_soa(), addnsec3(), addnsec3param(), addoptout(), addrdataset(), cache_name(), checkandaddsoa(), configure_staticstub(), diff_apply(), dns_nsec_build(), mark_secure(), ns_query(), receive_secure_db(), resigned(), save_nsrrset(), and setsoaserial().
isc_result_t dns_db_subtractrdataset | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
dns_dbversion_t * | version, | |||
dns_rdataset_t * | rdataset, | |||
unsigned int | options, | |||
dns_rdataset_t * | newrdataset | |||
) |
Remove any rdata in 'rdataset' from 'node' in version 'version' of 'db'.
Notes:
Definition at line 777 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_rdataset_isassociated(), DNS_RDATASET_VALID, dns_db::methods, dns_db::rdclass, dns_rdataset::rdclass, and REQUIRE.
Referenced by diff_apply(), nsec3clean(), and subtract().
isc_result_t dns_db_deleterdataset | ( | dns_db_t * | db, | |
dns_dbnode_t * | node, | |||
dns_dbversion_t * | version, | |||
dns_rdatatype_t | type, | |||
dns_rdatatype_t | covers | |||
) |
Make it so that no rdataset of type 'type' exists at 'node' in version version 'version' of 'db'.
Notes:
Definition at line 801 of file db.c.
References dns_db::attributes, DNS_DB_VALID, DNS_DBATTR_CACHE, dns_db::methods, and REQUIRE.
Referenced by active_node(), add_ds(), addnsec3param(), cleannode(), clearnode(), deleterdataset(), nsec3clean(), nsecify(), remove_records(), remove_sigs(), and setsoaserial().
isc_result_t dns_db_getsoaserial | ( | dns_db_t * | db, | |
dns_dbversion_t * | ver, | |||
isc_uint32_t * | serialp | |||
) |
Get the current SOA serial number from a zone database.
Requires:
Definition at line 828 of file db.c.
References buffer, dns_rdata::data, dns_db_detachnode(), dns_db_findnode(), dns_db_findrdataset(), dns_db_isstub(), dns_db_iszone(), dns_db_origin(), DNS_RDATA_INIT, dns_rdataset_current(), dns_rdataset_disassociate(), dns_rdataset_first(), dns_rdataset_init(), dns_rdataset_next(), freenode(), INSIST, isc_buffer_add, isc_buffer_forward, isc_buffer_getuint32(), isc_buffer_init, ISC_FALSE, ISC_R_NOMORE, ISC_R_SUCCESS, dns_rdata::length, and REQUIRE.
Referenced by check_soa_increment(), dump_done(), receive_secure_db(), roll_forward(), xfrin_send_request(), and zone_replacedb().
void dns_db_overmem | ( | dns_db_t * | db, | |
isc_boolean_t | overmem | |||
) |
Enable / disable aggressive cache cleaning.
Definition at line 820 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by water().
unsigned int dns_db_nodecount | ( | dns_db_t * | db | ) |
Count the number of nodes in 'db'.
Requires:
Definition at line 872 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by dns_cache_dumpstats(), main(), ns_server_zonestatus(), and zone_postload().
unsigned int dns_db_hashsize | ( | dns_db_t * | db | ) |
For database implementations using a hash table, report the current number of buckets.
Requires:
Definition at line 879 of file db.c.
References DNS_DB_VALID, ISC_R_NOTIMPLEMENTED, dns_db::methods, and REQUIRE.
Referenced by dns_cache_dumpstats().
void dns_db_settask | ( | dns_db_t * | db, | |
isc_task_t * | task | |||
) |
If task is set then the final detach maybe performed asynchronously.
Requires:
Definition at line 889 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by dns_cache_create3(), dns_zone_settask(), ns_query(), zone_load(), and zone_replacedb().
isc_boolean_t dns_db_ispersistent | ( | dns_db_t * | db | ) |
Is 'db' persistent? A persistent database does not need to be loaded from disk or written to disk.
Requires:
Definition at line 263 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by zone_load(), and zone_postload().
isc_result_t dns_db_register | ( | const char * | name, | |
dns_dbcreatefunc_t | create, | |||
void * | driverarg, | |||
isc_mem_t * | mctx, | |||
dns_dbimplementation_t ** | dbimp | |||
) |
Register a new database implementation and add it to the list of supported implementations.
Requires:
Definition at line 896 of file db.c.
References dns_dbimplementation::create, dns_dbimplementation::driverarg, impfind(), initialize(), ISC_LINK_INIT, ISC_LIST_APPEND, isc_mem_attach(), isc_mem_get, isc_once_do, ISC_R_EXISTS, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_rwlocktype_write, dns_dbimplementation::mctx, dns_dbimplementation::name, once, REQUIRE, RUNTIME_CHECK, RWLOCK, and RWUNLOCK.
Referenced by dns_ecdb_register(), and dns_sdb_register().
void dns_db_unregister | ( | dns_dbimplementation_t ** | dbimp | ) |
Remove a database implementation from the list of supported implementations. No databases of this type can be active when this is called.
Requires:
Definition at line 933 of file db.c.
References ENSURE, initialize(), ISC_LIST_UNLINK, isc_mem_detach(), isc_mem_put, isc_once_do, ISC_R_SUCCESS, isc_rwlocktype_write, dns_dbimplementation::mctx, once, REQUIRE, RUNTIME_CHECK, RWLOCK, and RWUNLOCK.
Referenced by dns_ecdb_unregister(), and dns_sdb_unregister().
isc_result_t dns_db_getoriginnode | ( | dns_db_t * | db, | |
dns_dbnode_t ** | nodep | |||
) |
Get the origin DB node corresponding to the DB's zone. This function should typically succeed unless the underlying DB implementation doesn't support the feature.
Requires:
Definition at line 953 of file db.c.
References dns_db_iszone(), DNS_DB_VALID, ISC_R_NOTFOUND, ISC_TRUE, dns_db::methods, and REQUIRE.
Referenced by ATF_TC_BODY(), dns64_ttl(), dns_nsec3_activex(), dns_nsec3_addnsec3s(), dns_nsec3_addnsec3sx(), dns_nsec3_delnsec3sx(), dns_nsec3_maxiterations(), dns_nsec3param_deletechains(), dns_nsec_nseconly(), dns_private_chains(), fixup_nsec3param(), get_iterations(), keydone(), need_nsec_chain(), query_addns(), query_addsoa(), save_nsec3param(), setsoaserial(), updatesecure(), updatesignwithkey(), and zone_nsec3chain().
isc_result_t dns_db_getnsec3parameters | ( | dns_db_t * | db, | |
dns_dbversion_t * | version, | |||
dns_hash_t * | hash, | |||
isc_uint8_t * | flags, | |||
isc_uint16_t * | interations, | |||
unsigned char * | salt, | |||
size_t * | salt_length | |||
) |
Get the NSEC3 parameters that are associated with this zone.
Requires:
Definition at line 985 of file db.c.
References dns_db_iszone(), DNS_DB_VALID, ISC_R_NOTFOUND, ISC_TRUE, dns_db::methods, and REQUIRE.
Referenced by getnsec3parameters(), query_findclosestnsec3(), and set_nsec3params().
isc_result_t dns_db_findnsec3node | ( | dns_db_t * | db, | |
dns_name_t * | name, | |||
isc_boolean_t | create, | |||
dns_dbnode_t ** | nodep | |||
) |
Find the NSEC3 node with name 'name'.
Notes:
Definition at line 506 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by add_sigs(), addnsec3(), del_sigs(), delete(), diff_apply(), dns_nsec3_addnsec3(), foreach_rr(), isoptout(), rr_exists(), set_nsec3params(), and verifynsec3().
isc_result_t dns_db_setsigningtime | ( | dns_db_t * | db, | |
dns_rdataset_t * | rdataset, | |||
isc_stdtime_t | resign | |||
) |
Sets the re-signing time associated with 'rdataset' to 'resign'.
Requires:
Definition at line 1002 of file db.c.
References ISC_R_NOTIMPLEMENTED, and dns_db::methods.
Referenced by diff_apply().
isc_result_t dns_db_getsigningtime | ( | dns_db_t * | db, | |
dns_rdataset_t * | rdataset, | |||
dns_name_t * | name | |||
) |
Return the rdataset with the earliest signing time in the zone. Note: the rdataset is version agnostic.
Requires:
Definition at line 1011 of file db.c.
References ISC_R_NOTFOUND, and dns_db::methods.
Referenced by ns_server_zonestatus(), set_resigntime(), zone_postload(), and zone_resigninc().
void dns_db_resigned | ( | dns_db_t * | db, | |
dns_rdataset_t * | rdataset, | |||
dns_dbversion_t * | version | |||
) |
Mark 'rdataset' as not being available to be returned by dns_db_getsigningtime(). If the changes associated with 'version' are committed this will be permanent. If the version is not committed this change will be rolled back when the version is closed. Until 'version' is either committed or rolled back, 'rdataset' can no longer be acted upon by dns_db_setsigningtime().
Requires:
Definition at line 1019 of file db.c.
References dns_db::methods.
Referenced by resigned().
dns_stats_t* dns_db_getrrsetstats | ( | dns_db_t * | db | ) |
Get statistics information counting RRsets stored in the DB, when available. The statistics may not be available depending on the DB implementation.
Requires:
Definition at line 965 of file db.c.
References DNS_DB_VALID, dns_db::methods, and REQUIRE.
Referenced by ns_stats_dump().
isc_result_t dns_db_setcachestats | ( | dns_db_t * | db, | |
isc_stats_t * | stats | |||
) |
Set the location in which to collect cache statistics. This option may not exist depending on the DB implementation.
Requires:
Definition at line 975 of file db.c.
References DNS_DB_VALID, ISC_R_NOTIMPLEMENTED, dns_db::methods, and REQUIRE.
Referenced by dns_cache_create3(), and dns_cache_flush().
void dns_db_rpz_attach | ( | dns_db_t * | db, | |
dns_rpz_zones_t * | rpzs, | |||
dns_rpz_num_t | rpz_num | |||
) |
Attach the response policy information for a view to a database for a zone for the view.
Definition at line 1032 of file db.c.
References dns_db::methods, and REQUIRE.
Referenced by dns_zone_rpz_enable_db().
isc_result_t dns_db_rpz_ready | ( | dns_db_t * | db | ) |
Finish loading a response policy zone.
Definition at line 1041 of file db.c.
References ISC_R_SUCCESS, and dns_db::methods.
Referenced by zone_postload(), and zone_replacedb().