diff --git a/lib/dns/adb.c b/lib/dns/adb.c index 92fd72418f..7d549aa5ee 100644 --- a/lib/dns/adb.c +++ b/lib/dns/adb.c @@ -2880,8 +2880,8 @@ dump_entry(FILE *f, dns_adb_t *adb, dns_adbentry_t *entry, bool debug, } } -void -dns_adb_dumpfind(dns_adbfind_t *find, FILE *f) { +static void +dumpfind(dns_adbfind_t *find, FILE *f) { char tmp[512]; const char *tmpp = 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); while (find != NULL) { - dns_adb_dumpfind(find, f); + dumpfind(find, f); find = ISC_LIST_NEXT(find, plink); } } diff --git a/lib/dns/include/dns/adb.h b/lib/dns/include/dns/adb.h index 05b9c91b29..4bfe6d0a42 100644 --- a/lib/dns/include/dns/adb.h +++ b/lib/dns/include/dns/adb.h @@ -454,29 +454,15 @@ dns_adb_destroyfind(dns_adbfind_t **find); void dns_adb_dump(dns_adb_t *adb, FILE *f); /*%< - * This function is only used for debugging. It will dump as much of the - * state of the running system as possible. + * Used by "rndc dumpdb": Dump the state of the running ADB. * * Requires: * - *\li adb be valid. + *\li adb is valid. * *\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 dns_adb_marklame(dns_adb_t *adb, dns_adbaddrinfo_t *addr, const dns_name_t *qname, dns_rdatatype_t type, diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index 5d78999941..7a9a48c269 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -868,28 +868,6 @@ dns_view_dialup(dns_view_t *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 dns_view_flushcache(dns_view_t *view, bool fixuponly); /*%< diff --git a/lib/dns/view.c b/lib/dns/view.c index 4200eeb8c5..3a00a0a46c 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -1472,25 +1472,6 @@ dns_view_checksig(dns_view_t *view, isc_buffer_t *source, dns_message_t *msg) { 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 dns_view_flushcache(dns_view_t *view, bool fixuponly) { isc_result_t result;