mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
clean up unused API
the dns_adb_dumpfind() function was only used inside adb.c and can be static. dns_view_dumpdbtostream() was not used anywhere.
This commit is contained in:
@@ -2880,8 +2880,8 @@ dump_entry(FILE *f, dns_adb_t *adb, dns_adbentry_t *entry, bool debug,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
dns_adb_dumpfind(dns_adbfind_t *find, FILE *f) {
|
dumpfind(dns_adbfind_t *find, FILE *f) {
|
||||||
char tmp[512];
|
char tmp[512];
|
||||||
const char *tmpp = NULL;
|
const char *tmpp = NULL;
|
||||||
dns_adbaddrinfo_t *ai = NULL;
|
dns_adbaddrinfo_t *ai = NULL;
|
||||||
@@ -2971,7 +2971,7 @@ print_find_list(FILE *f, dns_adbname_t *name) {
|
|||||||
|
|
||||||
find = ISC_LIST_HEAD(name->finds);
|
find = ISC_LIST_HEAD(name->finds);
|
||||||
while (find != NULL) {
|
while (find != NULL) {
|
||||||
dns_adb_dumpfind(find, f);
|
dumpfind(find, f);
|
||||||
find = ISC_LIST_NEXT(find, plink);
|
find = ISC_LIST_NEXT(find, plink);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -454,29 +454,15 @@ dns_adb_destroyfind(dns_adbfind_t **find);
|
|||||||
void
|
void
|
||||||
dns_adb_dump(dns_adb_t *adb, FILE *f);
|
dns_adb_dump(dns_adb_t *adb, FILE *f);
|
||||||
/*%<
|
/*%<
|
||||||
* This function is only used for debugging. It will dump as much of the
|
* Used by "rndc dumpdb": Dump the state of the running ADB.
|
||||||
* state of the running system as possible.
|
|
||||||
*
|
*
|
||||||
* Requires:
|
* Requires:
|
||||||
*
|
*
|
||||||
*\li adb be valid.
|
*\li adb is valid.
|
||||||
*
|
*
|
||||||
*\li f != NULL, and is a file open for writing.
|
*\li f != NULL, and is a file open for writing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
|
||||||
dns_adb_dumpfind(dns_adbfind_t *find, FILE *f);
|
|
||||||
/*%<
|
|
||||||
* This function is only used for debugging. Dump the data associated
|
|
||||||
* with a find.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
*
|
|
||||||
*\li find is valid.
|
|
||||||
*
|
|
||||||
* \li f != NULL, and is a file open for writing.
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
|
dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr,
|
||||||
const dns_name_t *qname, dns_rdatatype_t type,
|
const dns_name_t *qname, dns_rdatatype_t type,
|
||||||
|
@@ -868,28 +868,6 @@ dns_view_dialup(dns_view_t *view);
|
|||||||
* Perform dialup-time maintenance on the zones of 'view'.
|
* Perform dialup-time maintenance on the zones of 'view'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
dns_view_dumpdbtostream(dns_view_t *view, FILE *fp);
|
|
||||||
/*%<
|
|
||||||
* Dump the current state of the view 'view' to the stream 'fp'
|
|
||||||
* for purposes of analysis or debugging.
|
|
||||||
*
|
|
||||||
* Currently the dumped state includes the view's cache; in the future
|
|
||||||
* it may also include other state such as the address database.
|
|
||||||
* It will not not include authoritative data since it is voluminous and
|
|
||||||
* easily obtainable by other means.
|
|
||||||
*
|
|
||||||
* Requires:
|
|
||||||
*
|
|
||||||
*\li 'view' is valid.
|
|
||||||
*
|
|
||||||
*\li 'fp' refers to a file open for writing.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* \li ISC_R_SUCCESS The cache was successfully dumped.
|
|
||||||
* \li others An error occurred (see dns_master_dump)
|
|
||||||
*/
|
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_view_flushcache(dns_view_t *view, bool fixuponly);
|
dns_view_flushcache(dns_view_t *view, bool fixuponly);
|
||||||
/*%<
|
/*%<
|
||||||
|
@@ -1472,25 +1472,6 @@ dns_view_checksig(dns_view_t *view, isc_buffer_t *source, dns_message_t *msg) {
|
|||||||
view->dynamickeys));
|
view->dynamickeys));
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
|
||||||
dns_view_dumpdbtostream(dns_view_t *view, FILE *fp) {
|
|
||||||
isc_result_t result;
|
|
||||||
|
|
||||||
REQUIRE(DNS_VIEW_VALID(view));
|
|
||||||
|
|
||||||
(void)fprintf(fp, ";\n; Cache dump of view '%s'\n;\n", view->name);
|
|
||||||
result = dns_master_dumptostream(view->mctx, view->cachedb, NULL,
|
|
||||||
&dns_master_style_cache,
|
|
||||||
dns_masterformat_text, NULL, fp);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
dns_adb_dump(view->adb, fp);
|
|
||||||
dns_resolver_printbadcache(view->resolver, fp);
|
|
||||||
dns_badcache_print(view->failcache, "SERVFAIL cache", fp);
|
|
||||||
return (ISC_R_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
dns_view_flushcache(dns_view_t *view, bool fixuponly) {
|
dns_view_flushcache(dns_view_t *view, bool fixuponly) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
Reference in New Issue
Block a user