}
}
-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;
find = ISC_LIST_HEAD(name->finds);
while (find != NULL) {
- dns_adb_dumpfind(find, f);
+ dumpfind(find, f);
find = ISC_LIST_NEXT(find, plink);
}
}
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,
* 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);
/*%<
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;