mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +00:00
Remove obsolete code from dns_stats
It became obsolete in 2008
This commit is contained in:
parent
cd0e7f853a
commit
2354e56ebb
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user