mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Add dns_db_ispersistent. This call determines whether a database is
persistent - that is, whether it maintains itself and doesn't require loading, dumping, and other related things.
This commit is contained in:
14
lib/dns/db.c
14
lib/dns/db.c
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: db.c,v 1.52 2000/08/10 18:38:10 gson Exp $ */
|
||||
/* $Id: db.c,v 1.53 2000/08/18 18:25:25 bwelling Exp $ */
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
@@ -192,6 +192,18 @@ dns_db_issecure(dns_db_t *db) {
|
||||
return ((db->methods->issecure)(db));
|
||||
}
|
||||
|
||||
isc_boolean_t
|
||||
dns_db_ispersistent(dns_db_t *db) {
|
||||
|
||||
/*
|
||||
* Is 'db' persistent?
|
||||
*/
|
||||
|
||||
REQUIRE(DNS_DB_VALID(db));
|
||||
|
||||
return ((db->methods->ispersistent)(db));
|
||||
}
|
||||
|
||||
dns_name_t *
|
||||
dns_db_origin(dns_db_t *db) {
|
||||
/*
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: db.h,v 1.54 2000/08/03 19:46:36 bwelling Exp $ */
|
||||
/* $Id: db.h,v 1.55 2000/08/18 18:25:28 bwelling Exp $ */
|
||||
|
||||
#ifndef DNS_DB_H
|
||||
#define DNS_DB_H 1
|
||||
@@ -141,6 +141,7 @@ typedef struct dns_dbmethods {
|
||||
dns_rdatatype_t covers);
|
||||
isc_boolean_t (*issecure)(dns_db_t *db);
|
||||
unsigned int (*nodecount)(dns_db_t *db);
|
||||
isc_boolean_t (*ispersistent)(dns_db_t *db);
|
||||
} dns_dbmethods_t;
|
||||
|
||||
#define DNS_DB_MAGIC 0x444E5344U /* DNSD. */
|
||||
@@ -1143,6 +1144,21 @@ dns_db_nodecount(dns_db_t *db);
|
||||
* The number of nodes in the database
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
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:
|
||||
*
|
||||
* 'db' is a valid database.
|
||||
*
|
||||
* Returns:
|
||||
* ISC_TRUE 'db' is persistent.
|
||||
* ISC_FALSE 'db' is not persistent.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_DB_H */
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbtdb.c,v 1.119 2000/08/14 02:49:32 gson Exp $ */
|
||||
/* $Id: rbtdb.c,v 1.120 2000/08/18 18:25:26 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: Bob Halley
|
||||
@@ -3795,6 +3795,12 @@ nodecount(dns_db_t *db) {
|
||||
return (count);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
ispersistent(dns_db_t *db) {
|
||||
UNUSED(db);
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
static dns_dbmethods_t zone_methods = {
|
||||
attach,
|
||||
detach,
|
||||
@@ -3819,7 +3825,8 @@ static dns_dbmethods_t zone_methods = {
|
||||
subtractrdataset,
|
||||
deleterdataset,
|
||||
issecure,
|
||||
nodecount
|
||||
nodecount,
|
||||
ispersistent
|
||||
};
|
||||
|
||||
static dns_dbmethods_t cache_methods = {
|
||||
@@ -3846,7 +3853,8 @@ static dns_dbmethods_t cache_methods = {
|
||||
subtractrdataset,
|
||||
deleterdataset,
|
||||
issecure,
|
||||
nodecount
|
||||
nodecount,
|
||||
ispersistent
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
|
Reference in New Issue
Block a user