From: Yoshitaka Aharen Date: Sat, 2 Feb 2013 01:55:56 +0000 (+0900) Subject: [2157] correct method naming of MessageAttributes X-Git-Tag: bind10-1.1.0beta1-release~85^2~5^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba2d4df266cd44d44175260cf16bf2d22a4e1f12;p=thirdparty%2Fkea.git [2157] correct method naming of MessageAttributes --- diff --git a/src/bin/auth/statistics.cc.pre b/src/bin/auth/statistics.cc.pre index 7df39de07d..85081c60a8 100644 --- a/src/bin/auth/statistics.cc.pre +++ b/src/bin/auth/statistics.cc.pre @@ -132,10 +132,10 @@ Counters::incRequest(const MessageAttributes& msgattrs) { } // request TSIG - if (msgattrs.getRequestSigTSIG()) { + if (msgattrs.requestHasTSIG()) { server_msg_counter_.inc(MSG_REQUEST_TSIG); } - if (msgattrs.getRequestSigBadSig()) { + if (msgattrs.requestHasBadSig()) { 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. @@ -143,12 +143,12 @@ Counters::incRequest(const MessageAttributes& msgattrs) { } // request EDNS - if (msgattrs.getRequestEDNS0()) { + if (msgattrs.requestHasEDNS0()) { server_msg_counter_.inc(MSG_REQUEST_EDNS0); } // request DNSSEC - if (msgattrs.getRequestDO()) { + if (msgattrs.requestHasDO()) { server_msg_counter_.inc(MSG_REQUEST_DNSSEC_OK); } @@ -170,7 +170,7 @@ Counters::incResponse(const MessageAttributes& msgattrs, server_msg_counter_.inc(MSG_RESPONSE); // response truncated - if (msgattrs.getResponseTruncated()) { + if (msgattrs.responseIsTruncated()) { server_msg_counter_.inc(MSG_RESPONSE_TRUNCATED); } @@ -181,7 +181,7 @@ Counters::incResponse(const MessageAttributes& msgattrs, } // response TSIG - if (msgattrs.getResponseTSIG()) { + if (msgattrs.responseHasTSIG()) { server_msg_counter_.inc(MSG_RESPONSE_TSIG); } @@ -204,7 +204,7 @@ Counters::incResponse(const MessageAttributes& msgattrs, isc_throw(isc::Unexpected, "Opcode of the request is empty while it is" " responded"); } - if (!msgattrs.getRequestSigBadSig() && + if (!msgattrs.requestHasBadSig() && opcode.get() == Opcode::QUERY()) { // compound attributes diff --git a/src/bin/auth/statistics.h b/src/bin/auth/statistics.h index c845a6eee2..10974168fc 100644 --- a/src/bin/auth/statistics.h +++ b/src/bin/auth/statistics.h @@ -60,7 +60,7 @@ public: }; private: // request attributes - int req_address_family_; // IP version + int req_address_family_; // IP version int req_transport_protocol_; // Transport layer protocol boost::optional req_opcode_; // OpCode enum BitAttributes { @@ -142,7 +142,7 @@ public: /// /// \return true if EDNS version of the request is 0 /// \throw None - bool getRequestEDNS0() const { + bool requestHasEDNS0() const { return (bit_attributes_[REQ_WITH_EDNS_0]); } @@ -158,7 +158,7 @@ public: /// /// \return true if DNSSEC OK (DO) bit of the request is set /// \throw None - bool getRequestDO() const { + bool requestHasDO() const { return (bit_attributes_[REQ_WITH_DNSSEC_OK]); } @@ -174,7 +174,7 @@ public: /// /// \return true if the request is TSIG signed /// \throw None - bool getRequestSigTSIG() const { + bool requestHasTSIG() const { return (bit_attributes_[REQ_TSIG_SIGNED]); } @@ -182,7 +182,7 @@ public: /// /// \return true if the signature of the request is bad /// \throw None - bool getRequestSigBadSig() const { + bool requestHasBadSig() const { return (bit_attributes_[REQ_BADSIG]); } @@ -206,7 +206,7 @@ public: /// /// \return true if the response is truncated /// \throw None - bool getResponseTruncated() const { + bool responseIsTruncated() const { return (bit_attributes_[RES_IS_TRUNCATED]); } @@ -222,7 +222,7 @@ public: /// /// \return true if the response is signed with TSIG /// \throw None - bool getResponseTSIG() const { + bool responseHasTSIG() const { return (bit_attributes_[RES_TSIG_SIGNED]); }