Commit 92cf23f1 authored by Yoshitaka Aharen's avatar Yoshitaka Aharen
Browse files

[2157] rename following the naming policy

parent 7a821cf7
......@@ -39,11 +39,11 @@ $(man_MANS):
endif
auth.spec: auth.spec.pre statistics_qr_items.def
b10-auth.xml: b10-auth.xml.pre statistics_qr_items.def
statistics_items.h: statistics_items.h.pre statistics_qr_items.def
statistics.cc: statistics.cc.pre statistics_qr_items.def
tests/statistics_unittest.cc: tests/statistics_unittest.cc.pre statistics_qr_items.def
auth.spec: auth.spec.pre statistics_msg_items.def
b10-auth.xml: b10-auth.xml.pre statistics_msg_items.def
statistics_items.h: statistics_items.h.pre statistics_msg_items.def
statistics.cc: statistics.cc.pre statistics_msg_items.def
tests/statistics_unittest.cc: tests/statistics_unittest.cc.pre statistics_msg_items.def
gen-statistics_items.py: gen-statistics_items.py.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" gen-statistics_items.py.pre >$@
......@@ -76,7 +76,7 @@ b10_auth_SOURCES += main.cc
nodist_b10_auth_SOURCES = auth_messages.h auth_messages.cc
nodist_b10_auth_SOURCES += statistics.cc statistics_items.h
EXTRA_DIST += auth_messages.mes
EXTRA_DIST += statistics_qr_items.def
EXTRA_DIST += statistics_msg_items.def
EXTRA_DIST += b10-auth.xml.pre
EXTRA_DIST += statistics_items.h.pre statistics.cc.pre
EXTRA_DIST += tests/statistics_unittest.cc.pre
......
......@@ -83,7 +83,7 @@ using namespace isc::asiolink;
using namespace isc::asiodns;
using namespace isc::server_common::portconfig;
using isc::auth::statistics::Counters;
using isc::auth::statistics::QRAttributes;
using isc::auth::statistics::MessageAttributes;
namespace {
// A helper class for cleaning up message renderer.
......@@ -272,8 +272,8 @@ public:
std::map<RRClass, boost::shared_ptr<ConfigurableClientList> >
client_lists_;
/// Query / Response attributes
QRAttributes stats_attrs_;
/// Message attributes
MessageAttributes stats_attrs_;
boost::shared_ptr<ConfigurableClientList> getClientList(const RRClass&
rrclass)
......@@ -494,9 +494,9 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
{
InputBuffer request_buffer(io_message.getData(), io_message.getDataSize());
impl_->stats_attrs_.setQueryIPVersion(
impl_->stats_attrs_.setRequestIPVersion(
io_message.getRemoteEndpoint().getFamily());
impl_->stats_attrs_.setQueryTransportProtocol(
impl_->stats_attrs_.setRequestTransportProtocol(
io_message.getRemoteEndpoint().getProtocol());
// First, check the header part. If we fail even for the base header,
......@@ -553,8 +553,8 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
**impl_->keyring_));
tsig_error = tsig_context->verify(tsig_record, io_message.getData(),
io_message.getDataSize());
impl_->stats_attrs_.setQuerySig(true, false,
tsig_error != TSIGError::NOERROR());
impl_->stats_attrs_.setRequestSig(true, false,
tsig_error != TSIGError::NOERROR());
}
if (tsig_error != TSIGError::NOERROR()) {
......@@ -570,13 +570,13 @@ AuthSrv::processMessage(const IOMessage& io_message, Message& message,
// note: This can only be reliable after TSIG check succeeds.
ConstEDNSPtr edns = message.getEDNS();
if (edns) {
impl_->stats_attrs_.setQueryEDNS(edns->getVersion() == 0,
edns->getVersion() != 0);
impl_->stats_attrs_.setQueryDO(edns->getDNSSECAwareness());
impl_->stats_attrs_.setRequestEDNS(edns->getVersion() == 0,
edns->getVersion() != 0);
impl_->stats_attrs_.setRequestDO(edns->getDNSSECAwareness());
}
// note: This can only be reliable after TSIG check succeeds.
impl_->stats_attrs_.setQueryOpCode(opcode.getCode());
impl_->stats_attrs_.setRequestOpCode(opcode.getCode());
if (opcode == Opcode::NOTIFY()) {
send_answer = impl_->processNotify(io_message, message, buffer,
......
......@@ -43,7 +43,7 @@ def need_generate(filepath, mtime):
def import_definitions():
global item_list
items_definition_file = srcdir + os.sep + 'statistics_qr_items.def'
items_definition_file = srcdir + os.sep + 'statistics_msg_items.def'
item_definition = open(items_definition_file, 'r')
re_splitter = re.compile('\t+')
......@@ -187,13 +187,13 @@ def generate_docfile(docfile, def_mtime):
def generate_cxx(itemsfile, ccfile, utfile, def_mtime):
global item_list
qr_counter_types = 'enum QRCounterType {\n'
msg_counter_types = 'enum MSGCounterType {\n'
item_names = []
def convert_list(items, qr_counter_types, item_names_current, item_names):
def convert_list(items, msg_counter_types, item_names_current, item_names):
for item in items:
if item['child'] is None:
qr_counter_types += ' ' + item['index'] + ', ' +\
msg_counter_types += ' ' + item['index'] + ', ' +\
'///< ' + item['description'] + '\n'
item_names_current.append(' { "' + item['name'] +
'", NULL, ' + item['index'] + ' },\n'
......@@ -201,29 +201,29 @@ def generate_cxx(itemsfile, ccfile, utfile, def_mtime):
else:
item_names_current_ = ['const struct CounterTypeTree ' +
item['index'] + '[] = {\n']
qr_counter_types, item_names_current_, item_names = \
convert_list(item['child'], qr_counter_types,
msg_counter_types, item_names_current_, item_names = \
convert_list(item['child'], msg_counter_types,
item_names_current_, item_names)
item_names_current_.append(' { NULL, NULL, -1 }\n' +
'};\n')
item_names.extend(item_names_current_)
item_names_current.append(' { "' + item['name'] + '", ' +
item['index'] + ', -1 },\n')
return qr_counter_types, item_names_current, item_names
return msg_counter_types, item_names_current, item_names
qr_counter_types, item_names_current, item_names = \
convert_list(item_list, qr_counter_types, [], item_names)
item_names.append('const struct CounterTypeTree QRCounterTree[] = {\n')
msg_counter_types, item_names_current, item_names = \
convert_list(item_list, msg_counter_types, [], item_names)
item_names.append('const struct CounterTypeTree MSGCounterTree[] = {\n')
item_names.extend(item_names_current)
item_names.append(' { NULL, NULL, -1 }\n' +
'};\n')
qr_counter_types += \
msg_counter_types += \
' // End of counter types\n' +\
' QR_COUNTER_TYPES ///< The number of defined counters\n' +\
' MSG_COUNTER_TYPES ///< The number of defined counters\n' +\
'};\n'
item_defs = qr_counter_types
item_defs = msg_counter_types
item_decls = ''.join(item_names)
if need_generate(builddir+os.sep+itemsfile, def_mtime):
......
......@@ -72,121 +72,123 @@ namespace statistics {
// ### STATISTICS ITEMS DEFINITION ###
// Note: opcode in this array must be start with 0 and be sequential
const int opcode_to_qrcounter[] = {
QR_OPCODE_QUERY, // Opcode = 0: Query
QR_OPCODE_IQUERY, // Opcode = 1: Iquery
QR_OPCODE_STATUS, // Opcode = 2: STATUS
QR_OPCODE_OTHER, // Opcode = 3: (Unassigned)
QR_OPCODE_NOTIFY, // Opcode = 4: Notify
QR_OPCODE_UPDATE, // Opcode = 5: Update
QR_OPCODE_OTHER, // Opcode = 6: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 7: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 8: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 9: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 10: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 11: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 12: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 13: (Unassigned)
QR_OPCODE_OTHER, // Opcode = 14: (Unassigned)
QR_OPCODE_OTHER // Opcode = 15: (Unassigned)
const int opcode_to_msgcounter[] = {
MSG_OPCODE_QUERY, // Opcode = 0: Query
MSG_OPCODE_IQUERY, // Opcode = 1: Iquery
MSG_OPCODE_STATUS, // Opcode = 2: STATUS
MSG_OPCODE_OTHER, // Opcode = 3: (Unassigned)
MSG_OPCODE_NOTIFY, // Opcode = 4: Notify
MSG_OPCODE_UPDATE, // Opcode = 5: Update
MSG_OPCODE_OTHER, // Opcode = 6: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 7: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 8: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 9: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 10: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 11: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 12: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 13: (Unassigned)
MSG_OPCODE_OTHER, // Opcode = 14: (Unassigned)
MSG_OPCODE_OTHER // Opcode = 15: (Unassigned)
};
const size_t num_opcode_to_qrcounter =
sizeof(opcode_to_qrcounter) / sizeof(opcode_to_qrcounter[0]);
const size_t num_opcode_to_msgcounter =
sizeof(opcode_to_msgcounter) / sizeof(opcode_to_msgcounter[0]);
// Note: rcode in this array must be start with 0 and be sequential
const int rcode_to_qrcounter[] = {
QR_RCODE_NOERROR, // Rcode = 0: NoError
QR_RCODE_FORMERR, // Rcode = 1: FormErr
QR_RCODE_SERVFAIL, // Rcode = 2: ServFail
QR_RCODE_NXDOMAIN, // Rcode = 3: NXDomain
QR_RCODE_NOTIMP, // Rcode = 4: NotImp
QR_RCODE_REFUSED, // Rcode = 5: Refused
QR_RCODE_YXDOMAIN, // Rcode = 6: YXDomain
QR_RCODE_YXRRSET, // Rcode = 7: YXRRSet
QR_RCODE_NXRRSET, // Rcode = 8: NXRRSet
QR_RCODE_NOTAUTH, // Rcode = 9: NotAuth
QR_RCODE_NOTZONE, // Rcode = 10: NotZone
QR_RCODE_OTHER, // Rcode = 11: (Unassigned)
QR_RCODE_OTHER, // Rcode = 12: (Unassigned)
QR_RCODE_OTHER, // Rcode = 13: (Unassigned)
QR_RCODE_OTHER, // Rcode = 14: (Unassigned)
QR_RCODE_OTHER, // Rcode = 15: (Unassigned)
QR_RCODE_BADVERS // Rcode = 16: (BADVERS)
const int rcode_to_msgcounter[] = {
MSG_RCODE_NOERROR, // Rcode = 0: NoError
MSG_RCODE_FORMERR, // Rcode = 1: FormErr
MSG_RCODE_SERVFAIL, // Rcode = 2: ServFail
MSG_RCODE_NXDOMAIN, // Rcode = 3: NXDomain
MSG_RCODE_NOTIMP, // Rcode = 4: NotImp
MSG_RCODE_REFUSED, // Rcode = 5: Refused
MSG_RCODE_YXDOMAIN, // Rcode = 6: YXDomain
MSG_RCODE_YXRRSET, // Rcode = 7: YXRRSet
MSG_RCODE_NXRRSET, // Rcode = 8: NXRRSet
MSG_RCODE_NOTAUTH, // Rcode = 9: NotAuth
MSG_RCODE_NOTZONE, // Rcode = 10: NotZone
MSG_RCODE_OTHER, // Rcode = 11: (Unassigned)
MSG_RCODE_OTHER, // Rcode = 12: (Unassigned)
MSG_RCODE_OTHER, // Rcode = 13: (Unassigned)
MSG_RCODE_OTHER, // Rcode = 14: (Unassigned)
MSG_RCODE_OTHER, // Rcode = 15: (Unassigned)
MSG_RCODE_BADVERS // Rcode = 16: BADVERS
};
const size_t num_rcode_to_qrcounter =
sizeof(rcode_to_qrcounter) / sizeof(rcode_to_qrcounter[0]);
const size_t num_rcode_to_msgcounter =
sizeof(rcode_to_msgcounter) / sizeof(rcode_to_msgcounter[0]);
Counters::Counters() :
// size of server_qr_counter_, zone_qr_counters_: QR_COUNTER_TYPES
server_qr_counter_(QR_COUNTER_TYPES),
zone_qr_counters_(QR_COUNTER_TYPES)
// size of server_msg_counter_, zone_msg_counters_: MSG_COUNTER_TYPES
server_msg_counter_(MSG_COUNTER_TYPES),
zone_msg_counters_(MSG_COUNTER_TYPES)
{}
void
Counters::incRequest(const QRAttributes& qrattrs) {
Counters::incRequest(const MessageAttributes& msgattrs) {
// protocols carrying request
if (qrattrs.req_ip_version_ == AF_INET) {
server_qr_counter_.inc(QR_REQUEST_IPV4);
} else if (qrattrs.req_ip_version_ == AF_INET6) {
server_qr_counter_.inc(QR_REQUEST_IPV6);
if (msgattrs.req_ip_version_ == AF_INET) {
server_msg_counter_.inc(MSG_REQUEST_IPV4);
} else if (msgattrs.req_ip_version_ == AF_INET6) {
server_msg_counter_.inc(MSG_REQUEST_IPV6);
}
if (qrattrs.req_transport_protocol_ == IPPROTO_UDP) {
server_qr_counter_.inc(QR_REQUEST_UDP);
} else if (qrattrs.req_transport_protocol_ == IPPROTO_TCP) {
server_qr_counter_.inc(QR_REQUEST_TCP);
if (msgattrs.req_transport_protocol_ == IPPROTO_UDP) {
server_msg_counter_.inc(MSG_REQUEST_UDP);
} else if (msgattrs.req_transport_protocol_ == IPPROTO_TCP) {
server_msg_counter_.inc(MSG_REQUEST_TCP);
}
// query TSIG
if (qrattrs.req_is_tsig_) {
server_qr_counter_.inc(QR_REQUEST_TSIG);
// request TSIG
if (msgattrs.req_is_tsig_) {
server_msg_counter_.inc(MSG_REQUEST_TSIG);
}
if (qrattrs.req_is_sig0_) {
server_qr_counter_.inc(QR_REQUEST_SIG0);
if (msgattrs.req_is_sig0_) {
server_msg_counter_.inc(MSG_REQUEST_SIG0);
}
if (qrattrs.req_is_badsig_) {
server_qr_counter_.inc(QR_REQUEST_BADSIG);
if (msgattrs.req_is_badsig_) {
server_msg_counter_.inc(MSG_REQUEST_BADSIG);
// If signature validation is failed, no other query attributes are
// reliable. Skip processing of the rest of query counters.
return;
}
// query EDNS
if (qrattrs.req_is_edns_0_) {
server_qr_counter_.inc(QR_REQUEST_EDNS0);
// request EDNS
if (msgattrs.req_is_edns_0_) {
server_msg_counter_.inc(MSG_REQUEST_EDNS0);
}
if (qrattrs.req_is_edns_badver_) {
server_qr_counter_.inc(QR_REQUEST_BADEDNSVER);
if (msgattrs.req_is_edns_badver_) {
server_msg_counter_.inc(MSG_REQUEST_BADEDNSVER);
}
// query DNSSEC
if (qrattrs.req_is_dnssec_ok_) {
server_qr_counter_.inc(QR_REQUEST_DNSSEC_OK);
// request DNSSEC
if (msgattrs.req_is_dnssec_ok_) {
server_msg_counter_.inc(MSG_REQUEST_DNSSEC_OK);
}
// OPCODE
server_qr_counter_.inc(opcode_to_qrcounter[qrattrs.req_opcode_]);
server_msg_counter_.inc(opcode_to_msgcounter[msgattrs.req_opcode_]);
}
void
Counters::incResponse(const QRAttributes& qrattrs, const Message& response) {
Counters::incResponse(const MessageAttributes& msgattrs,
const Message& response)
{
// responded
server_qr_counter_.inc(QR_RESPONSE);
server_msg_counter_.inc(MSG_RESPONSE);
// response truncated
if (qrattrs.res_is_truncated_) {
server_qr_counter_.inc(QR_RESPONSE_TRUNCATED);
if (msgattrs.res_is_truncated_) {
server_msg_counter_.inc(MSG_RESPONSE_TRUNCATED);
}
// response EDNS
ConstEDNSPtr response_edns = response.getEDNS();
if (response_edns && response_edns->getVersion() == 0) {
server_qr_counter_.inc(QR_RESPONSE_EDNS0);
server_msg_counter_.inc(MSG_RESPONSE_EDNS0);
}
// response TSIG
if (qrattrs.req_is_tsig_) {
if (msgattrs.req_is_tsig_) {
// assume response is TSIG signed if request is TSIG signed
server_qr_counter_.inc(QR_RESPONSE_TSIG);
server_msg_counter_.inc(MSG_RESPONSE_TSIG);
}
// response SIG(0) is currently not implemented
......@@ -194,9 +196,9 @@ Counters::incResponse(const QRAttributes& qrattrs, const Message& response) {
// RCODE
const unsigned int rcode = response.getRcode().getCode();
const unsigned int rcode_type =
rcode < num_rcode_to_qrcounter ?
rcode_to_qrcounter[rcode] : QR_RCODE_OTHER;
server_qr_counter_.inc(rcode_type);
rcode < num_rcode_to_msgcounter ?
rcode_to_msgcounter[rcode] : MSG_RCODE_OTHER;
server_msg_counter_.inc(rcode_type);
// compound attributes
const unsigned int answer_rrs =
......@@ -205,41 +207,41 @@ Counters::incResponse(const QRAttributes& qrattrs, const Message& response) {
if (is_aa_set) {
// QryAuthAns
server_qr_counter_.inc(QR_QRYAUTHANS);
server_msg_counter_.inc(MSG_QRYAUTHANS);
} else {
// QryNoAuthAns
server_qr_counter_.inc(QR_QRYNOAUTHANS);
server_msg_counter_.inc(MSG_QRYNOAUTHANS);
}
if (rcode == Rcode::NOERROR_CODE) {
if (answer_rrs > 0) {
// QrySuccess
server_qr_counter_.inc(QR_QRYSUCCESS);
server_msg_counter_.inc(MSG_QRYSUCCESS);
} else {
if (is_aa_set) {
// QryNxrrset
server_qr_counter_.inc(QR_QRYNXRRSET);
server_msg_counter_.inc(MSG_QRYNXRRSET);
} else {
// QryReferral
server_qr_counter_.inc(QR_QRYREFERRAL);
server_msg_counter_.inc(MSG_QRYREFERRAL);
}
}
} else if (rcode == Rcode::REFUSED_CODE) {
// AuthRej
server_qr_counter_.inc(QR_QRYREJECT);
server_msg_counter_.inc(MSG_QRYREJECT);
}
}
void
Counters::inc(const QRAttributes& qrattrs, const Message& response,
Counters::inc(const MessageAttributes& msgattrs, const Message& response,
const bool done)
{
// increment request counters
incRequest(qrattrs);
incRequest(msgattrs);
if (done) {
// increment response counters if answer was sent
incResponse(qrattrs, response);
incResponse(msgattrs, response);
}
}
......@@ -253,7 +255,7 @@ Counters::get() const {
item_tree->set("zones", zones);
Counters::ItemTreePtr server = Element::createMap();
fillNodes(server_qr_counter_, QRCounterTree, server);
fillNodes(server_msg_counter_, MSGCounterTree, server);
zones->set("_SERVER_", server);
return (item_tree);
......
......@@ -33,14 +33,14 @@ namespace isc {
namespace auth {
namespace statistics {
/// \brief Query/Response attributes for statistics.
/// \brief DNS Message attributes for statistics.
///
/// This class holds some attributes related to a query/response
/// This class holds some attributes related to a DNS message
/// for statistics data collection.
///
/// This class does not have getter methods since it exposes private members
/// to \c Counters directly.
class QRAttributes {
class MessageAttributes {
friend class Counters;
private:
// request attributes
......@@ -61,45 +61,45 @@ public:
/// This constructor is mostly exception free. But it may still throw
/// a standard exception if memory allocation fails inside the method.
///
QRAttributes() {
MessageAttributes() {
reset();
};
/// \brief Set query opcode.
/// \brief Set request opcode.
/// \throw None
void setQueryOpCode(const int opcode) {
void setRequestOpCode(const int opcode) {
req_opcode_ = opcode;
};
/// \brief Set IP version carrying a query.
/// \brief Set IP version carrying a request.
/// \throw None
void setQueryIPVersion(const int ip_version) {
void setRequestIPVersion(const int ip_version) {
req_ip_version_ = ip_version;
};
/// \brief Set transport protocol carrying a query.
/// \brief Set transport protocol carrying a request.
/// \throw None
void setQueryTransportProtocol(const int transport_protocol) {
void setRequestTransportProtocol(const int transport_protocol) {
req_transport_protocol_ = transport_protocol;
};
/// \brief Set query EDNS attributes.
/// \brief Set request EDNS attributes.
/// \throw None
void setQueryEDNS(const bool is_edns_0, const bool is_edns_badver) {
void setRequestEDNS(const bool is_edns_0, const bool is_edns_badver) {
req_is_edns_0_ = is_edns_0;
req_is_edns_badver_ = is_edns_badver;
};
/// \brief Set query DO bit.
/// \brief Set request DO bit.
/// \throw None
void setQueryDO(const bool is_dnssec_ok) {
void setRequestDO(const bool is_dnssec_ok) {
req_is_dnssec_ok_ = is_dnssec_ok;
};
/// \brief Set query TSIG attributes.
/// \brief Set request TSIG attributes.
/// \throw None
void setQuerySig(const bool is_tsig, const bool is_sig0,
const bool is_badsig)
void setRequestSig(const bool is_tsig, const bool is_sig0,
const bool is_badsig)
{
req_is_tsig_ = is_tsig;
req_is_sig0_ = is_sig0;
......@@ -128,17 +128,17 @@ public:
};
};
/// \brief Set of query counters.
/// \brief Set of DNS message counters.
///
/// \c Counters is set of query counters class. It holds query counters
/// and provides an interface to increment the counter of specified type
/// (e.g. UDP query, TCP query).
/// \c Counters is set of DNS message counters class. It holds DNS message
/// counters and provides an interface to increment the counter of specified
/// type (e.g. UDP message, TCP message).
///
/// This class also provides a function to send statistics information to
/// statistics module.
///
/// This class is designed to be a part of \c AuthSrv.
/// Call \c inc() to increment a counter for the query.
/// Call \c inc() to increment a counter for the message.
/// Call \c getStatistics() to answer statistics information to statistics
/// module with statistics_session, when the command \c getstats is received.
///
......@@ -150,16 +150,16 @@ public:
/// This class is constructed on startup of the server, so
/// construction overhead of this approach should be acceptable.
///
/// \todo Hold counters for each query types (Notify, Axfr, Ixfr, Normal)
/// \todo Hold counters for each message types (Notify, Axfr, Ixfr, Normal)
/// \todo Consider overhead of \c Counters::inc()
class Counters : boost::noncopyable {
private:
// counter for query/response
isc::statistics::Counter server_qr_counter_;
// counter for DNS message attributes
isc::statistics::Counter server_msg_counter_;
// set of counters for zones
isc::statistics::CounterDictionary zone_qr_counters_;
void incRequest(const QRAttributes& qrattrs);
void incResponse(const QRAttributes& qrattrs,
isc::statistics::CounterDictionary zone_msg_counters_;
void incRequest(const MessageAttributes& msgattrs);
void incResponse(const MessageAttributes& msgattrs,
const isc::dns::Message& response);
public:
/// \brief A type of statistics item tree in isc::data::MapElement.
......@@ -189,14 +189,14 @@ public:
/// This constructor is mostly exception free. But it may still throw
/// a standard exception if memory allocation fails inside the method.
///
/// \param qrattrs Query/Response attributes.
/// \param msgattrs DNS message attributes.
/// \param response DNS response message.
/// \param done DNS response was sent to the client.
///
/// \throw std::bad_alloc Internal resource allocation fails
///
void inc(const QRAttributes& qrattrs, const isc::dns::Message& response,
const bool done);
void inc(const MessageAttributes& msgattrs,
const isc::dns::Message& response, const bool done);
/// \brief Get statistics counters.
///
......
......@@ -30,8 +30,8 @@ struct CounterTypeTree {
// ### STATISTICS ITEMS DECLARATION ###
extern const int opcode_to_qrcounter[];
extern const int rcode_to_qrcounter[];
extern const int opcode_to_msgcounter[];
extern const int rcode_to_msgcounter[];
} // namespace statistics
} // namespace auth
......
request MSGCounterRequest Request statistics =
v4 MSG_REQUEST_IPV4 Number of IPv4 requests received by the b10-auth server.
v6 MSG_REQUEST_IPV6 Number of IPv6 requests received by the b10-auth server.
edns0 MSG_REQUEST_EDNS0 Number of requests with EDNS0 received by the b10-auth server.
badednsver MSG_REQUEST_BADEDNSVER Number of requests with unsupported EDNS version received by the b10-auth server.
tsig MSG_REQUEST_TSIG Number of requests with TSIG received by the b10-auth server.
sig0 MSG_REQUEST_SIG0 Number of requests with SIG(0) received by the b10-auth server; currently not implemented in BIND 10.
badsig MSG_REQUEST_BADSIG Number of requests with invalid TSIG or SIG(0) signature received by the b10-auth server.
udp MSG_REQUEST_UDP Number of UDP requests received by the b10-auth server.
tcp MSG_REQUEST_TCP Number of UDP requests received by the b10-auth server.
dnssec_ok MSG_REQUEST_DNSSEC_OK Number of requests with "DNSSEC OK" (DO) bit was set received by the b10-auth server.
;
opcode MSGCounterOpcode Opcode statistics =
query MSG_OPCODE_QUERY Number of Opcode=QUERY requests received by the b10-auth server.
iquery MSG_OPCODE_IQUERY Number of Opcode=IQUERY requests received by the b10-auth server.
status MSG_OPCODE_STATUS Number of Opcode=STATUS requests received by the b10-auth server.
notify MSG_OPCODE_NOTIFY Number of Opcode=NOTIFY requests received by the b10-auth server.
update MSG_OPCODE_UPDATE Number of Opcode=UPDATE requests received by the b10-auth server.
other MSG_OPCODE_OTHER Number of requests in other OpCode received by the b10-auth server.
;
responses MSG_RESPONSE Number of responses sent by the b10-auth server.
response MSGCounterResponse Response statistics =
truncated MSG_RESPONSE_TRUNCATED Number of truncated responses sent by the b10-auth server.
edns0 MSG_RESPONSE_EDNS0 Number of responses with EDNS0 sent by the b10-auth server.
tsig MSG_RESPONSE_TSIG Number of responses with TSIG sent by the b10-auth server.
sig0 MSG_RESPONSE_SIG0 Number of responses with SIG(0) sent by the b10-auth server; currently not implemented in BIND 10.
;
qrysuccess MSG_QRYSUCCESS Number of queries received by the b10-auth server resulted in rcode = NOERROR and the number of answer RR >= 1.
qryauthans MSG_QRYAUTHANS Number of queries received by the b10-auth server resulted in authoritative answer.
qrynoauthans MSG_QRYNOAUTHANS Number of queries received by the b10-auth server resulted in non-authoritative answer.
qryreferral MSG_QRYREFERRAL Number of queries received by the b10-auth server resulted in referral answer.
qrynxrrset MSG_QRYNXRRSET Number of queries received by the b10-auth server resulted in NOERROR but the number of answer RR == 0.
authqryrej MSG_QRYREJECT Number of authoritative queries rejected by the b10-auth server.
rcode MSGCounterRcode Rcode statistics =
noerror MSG_RCODE_NOERROR Number of requests received by the b10-auth server resulted in RCODE = 0 (NoError).
formerr MSG_RCODE_FORMERR Number of requests received by the b10-auth server resulted in RCODE = 1 (FormErr).
servfail MSG_RCODE_SERVFAIL Number of requests received by the b10-auth server resulted in RCODE = 2 (ServFail).
nxdomain MSG_RCODE_NXDOMAIN Number of requests received by the b10-auth server resulted in RCODE = 3 (NXDomain).
notimp MSG_RCODE_NOTIMP Number of requests received by the b10-auth server resulted in RCODE = 4 (NotImp).
refused MSG_RCODE_REFUSED Number of requests received by the b10-auth server resulted in RCODE = 5 (Refused).
yxdomain MSG_RCODE_YXDOMAIN Number of requests received by the b10-auth server resulted in RCODE = 6 (YXDomain).
yxrrset MSG_RCODE_YXRRSET Number of requests received by the b10-auth server resulted in RCODE = 7 (YXRRSet).
nxrrset MSG_RCODE_NXRRSET Number of requests received by the b10-auth server resulted in RCODE = 8 (NXRRSet).
notauth MSG_RCODE_NOTAUTH Number of requests received by the b10-auth server resulted in RCODE = 9 (NotAuth).
notzone MSG_RCODE_NOTZONE Number of requests received by the b10-auth server resulted in RCODE = 10 (NotZone).
badvers MSG_RCODE_BADVERS Number of requests received by the b10-auth server resulted in RCODE = 16 (BADVERS).
other MSG_RCODE_OTHER Number of requests received by the b10-auth server resulted in other RCODEs.
;
request QRCounterRequest Request statistics =
v4 QR_REQUEST_IPV4 Number of IPv4 requests received by the b10-auth server.
v6 QR_REQUEST_IPV6 Number of IPv6 requests received by the b10-auth server.
edns0 QR_REQUEST_EDNS0 Number of requests with EDNS0 received by the b10-auth server.
badednsver QR_REQUEST_BADEDNSVER Number of requests with unsupported EDNS version received by the b10-auth server.
tsig QR_REQUEST_TSIG Number of requests with TSIG received by the b10-auth server.