]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove obsolete code from dns_stats
authorTony Finch <fanf@isc.org>
Thu, 16 Mar 2023 10:51:22 +0000 (10:51 +0000)
committerTony Finch <dot@dotat.at>
Mon, 3 Apr 2023 11:08:05 +0000 (12:08 +0100)
It became obsolete in 2008

lib/dns/include/dns/stats.h
lib/dns/stats.c

index e6e39775ad349b3c9115b2bb58a9a8b6b5f8d59c..5728f54ff0b2c47fe49813f67e44fc9a243db646 100644 (file)
@@ -444,22 +444,6 @@ enum {
        dns_sizecounter_out_max = 257
 };
 
-#define DNS_STATS_NCOUNTERS 8
-
-#if 0
-/*%<
- * Flag(s) for dns_xxxstats_dump().  DNS_STATSDUMP_VERBOSE is obsolete.
- * ISC_STATSDUMP_VERBOSE should be used instead.  These two values are
- * intentionally defined to be the same value to ensure binary compatibility.
- */
-#define DNS_STATSDUMP_VERBOSE 0x00000001 /*%< dump 0-value counters */
-#endif                                  /* if 0 */
-
-/*%<
- * (Obsoleted)
- */
-extern const char *dns_statscounter_names[];
-
 /*%
  * Attributes for statistics counters of RRset and Rdatatype types.
  *
@@ -803,22 +787,4 @@ dns_rcodestats_dump(dns_stats_t *stats, dns_rcodestats_dumper_t dump_fn,
  *\li  'stats' is a valid dns_stats_t created by dns_generalstats_create().
  */
 
-isc_result_t
-dns_stats_alloccounters(isc_mem_t *mctx, uint64_t **ctrp);
-/*%<
- * Allocate an array of query statistics counters from the memory
- * context 'mctx'.
- *
- * This function is obsoleted.  Use dns_xxxstats_create() instead.
- */
-
-void
-dns_stats_freecounters(isc_mem_t *mctx, uint64_t **ctrp);
-/*%<
- * Free an array of query statistics counters allocated from the memory
- * context 'mctx'.
- *
- * This function is obsoleted.  Use dns_stats_destroy() instead.
- */
-
 ISC_LANG_ENDDECLS
index c84f830f815ef11290416893806074f9a811898b..4a8eb32f2463dca67e89fb33529ea2a9f3949ecf 100644 (file)
@@ -618,31 +618,3 @@ dns_rcodestats_dump(dns_stats_t *stats, dns_rcodestats_dumper_t dump_fn,
        arg.arg = arg0;
        isc_stats_dump(stats->counters, rcode_dumpcb, &arg, options);
 }
-
-/***
- *** Obsolete variables and functions follow:
- ***/
-const char *dns_statscounter_names[DNS_STATS_NCOUNTERS] = {
-       "success",   "referral", "nxrrset",   "nxdomain",
-       "recursion", "failure",  "duplicate", "dropped"
-};
-
-isc_result_t
-dns_stats_alloccounters(isc_mem_t *mctx, uint64_t **ctrp) {
-       int i;
-       uint64_t *p = isc_mem_get(mctx, DNS_STATS_NCOUNTERS * sizeof(uint64_t));
-       if (p == NULL) {
-               return (ISC_R_NOMEMORY);
-       }
-       for (i = 0; i < DNS_STATS_NCOUNTERS; i++) {
-               p[i] = 0;
-       }
-       *ctrp = p;
-       return (ISC_R_SUCCESS);
-}
-
-void
-dns_stats_freecounters(isc_mem_t *mctx, uint64_t **ctrp) {
-       isc_mem_put(mctx, *ctrp, DNS_STATS_NCOUNTERS * sizeof(uint64_t));
-       *ctrp = NULL;
-}