/*
* Copyright (C) 2004-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
#ifndef DNS_STATS_H
/*%
* Statistics counters. Used as isc_statscounter_t values.
*/
enum {
/*%
* Resolver statistics counters.
*/
/*
* DNSSEC stats.
*/
dns_dnssecstats_asis = 0,
/*%
* Zone statistics counters.
*/
/*%
* Query statistics counters (obsolete).
*/
};
#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.
*/
#endif
/*%<
* (Obsoleted)
*/
LIBDNS_EXTERNAL_DATA extern const char *dns_statscounter_names[];
/*%
* Attributes for statistics counters of RRset and Rdatatype types.
*
* _OTHERTYPE
* The rdata type is not explicitly supported and the corresponding counter
* is counted for other such types, too. When this attribute is set,
* the base type is of no use.
*
* _NXRRSET
* RRset type counters only. Indicates the RRset is non existent.
*
* _NXDOMAIN
* RRset type counters only. Indicates a non existent name. When this
* attribute is set, the base type is of no use.
*/
/*%<
* Conversion macros among dns_rdatatype_t, attributes and isc_statscounter_t.
*/
/*%<
* Types of dump callbacks.
*/
void *);
void *);
/*%<
* Create a statistics counter structure of general type. It counts a general
* set of counters indexed by an ID between 0 and ncounters -1.
* This function is obsolete. A more general function, isc_stats_create(),
* should be used.
*
* Requires:
*\li 'mctx' must be a valid memory context.
*
*\li 'statsp' != NULL && '*statsp' == NULL.
*
* Returns:
*\li ISC_R_SUCCESS -- all ok
*
*\li anything else -- failure
*/
/*%<
* Create a statistics counter structure per rdatatype.
*
* Requires:
*\li 'mctx' must be a valid memory context.
*
*\li 'statsp' != NULL && '*statsp' == NULL.
*
* Returns:
*\li ISC_R_SUCCESS -- all ok
*
*\li anything else -- failure
*/
/*%<
* Create a statistics counter structure per RRset.
*
* Requires:
*\li 'mctx' must be a valid memory context.
*
*\li 'statsp' != NULL && '*statsp' == NULL.
*
* Returns:
*\li ISC_R_SUCCESS -- all ok
*
*\li anything else -- failure
*/
/*%<
* Create a statistics counter structure per opcode.
*
* Requires:
*\li 'mctx' must be a valid memory context.
*
*\li 'statsp' != NULL && '*statsp' == NULL.
*
* Returns:
*\li ISC_R_SUCCESS -- all ok
*
*\li anything else -- failure
*/
void
/*%<
* Attach to a statistics set.
*
* Requires:
*\li 'stats' is a valid dns_stats_t.
*
*\li 'statsp' != NULL && '*statsp' == NULL
*/
void
/*%<
* Detaches from the statistics set.
*
* Requires:
*\li 'statsp' != NULL and '*statsp' is a valid dns_stats_t.
*/
void
/*%<
* Increment the counter-th counter of stats. This function is obsolete.
* A more general function, isc_stats_increment(), should be used.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_generalstats_create().
*
*\li counter is less than the maximum available ID for the stats specified
* on creation.
*/
void
/*%<
* Increment the statistics counter for 'type'.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_rdatatypestats_create().
*/
void
/*%<
* Increment the statistics counter for 'rrsettype'.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_rdatasetstats_create().
*/
void
/*%<
* Decrement the statistics counter for 'rrsettype'.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_rdatasetstats_create().
*/
void
/*%<
* Increment the statistics counter for 'code'.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_opcodestats_create().
*/
void
/*%<
* Dump the current statistics counters in a specified way. For each counter
* in stats, dump_fn is called with its current value and the given argument
* arg. By default counters that have a value of 0 is skipped; if options has
* the ISC_STATSDUMP_VERBOSE flag, even such counters are dumped.
*
* This function is obsolete. A more general function, isc_stats_dump(),
* should be used.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_generalstats_create().
*/
void
/*%<
* Dump the current statistics counters in a specified way. For each counter
* in stats, dump_fn is called with the corresponding type in the form of
* dns_rdatastatstype_t, the current counter value and the given argument
* arg. By default counters that have a value of 0 is skipped; if options has
* the ISC_STATSDUMP_VERBOSE flag, even such counters are dumped.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_generalstats_create().
*/
void
/*%<
* Dump the current statistics counters in a specified way. For each counter
* in stats, dump_fn is called with the corresponding type in the form of
* dns_rdatastatstype_t, the current counter value and the given argument
* arg. By default counters that have a value of 0 is skipped; if options has
* the ISC_STATSDUMP_VERBOSE flag, even such counters are dumped.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_generalstats_create().
*/
void
/*%<
* Dump the current statistics counters in a specified way. For each counter
* in stats, dump_fn is called with the corresponding opcode, the current
* counter value and the given argument arg. By default counters that have a
* value of 0 is skipped; if options has the ISC_STATSDUMP_VERBOSE flag, even
* such counters are dumped.
*
* Requires:
*\li 'stats' is a valid dns_stats_t created by dns_generalstats_create().
*/
/*%<
* Allocate an array of query statistics counters from the memory
* context 'mctx'.
*
* This function is obsoleted. Use dns_xxxstats_create() instead.
*/
void
/*%<
* Free an array of query statistics counters allocated from the memory
* context 'mctx'.
*
* This function is obsoleted. Use dns_stats_destroy() instead.
*/
#endif /* DNS_STATS_H */