Browse Source

[2157] correct method naming of MessageAttributes

Yoshitaka Aharen 12 years ago
parent
commit
ba2d4df266
2 changed files with 14 additions and 14 deletions
  1. 7 7
      src/bin/auth/statistics.cc.pre
  2. 7 7
      src/bin/auth/statistics.h

+ 7 - 7
src/bin/auth/statistics.cc.pre

@@ -132,10 +132,10 @@ Counters::incRequest(const MessageAttributes& msgattrs) {
     }
     }
 
 
     // request TSIG
     // request TSIG
-    if (msgattrs.getRequestSigTSIG()) {
+    if (msgattrs.requestHasTSIG()) {
         server_msg_counter_.inc(MSG_REQUEST_TSIG);
         server_msg_counter_.inc(MSG_REQUEST_TSIG);
     }
     }
-    if (msgattrs.getRequestSigBadSig()) {
+    if (msgattrs.requestHasBadSig()) {
         server_msg_counter_.inc(MSG_REQUEST_BADSIG);
         server_msg_counter_.inc(MSG_REQUEST_BADSIG);
         // If signature validation is failed, no other query attributes are
         // If signature validation is failed, no other query attributes are
         // reliable. Skip processing of the rest of query counters.
         // reliable. Skip processing of the rest of query counters.
@@ -143,12 +143,12 @@ Counters::incRequest(const MessageAttributes& msgattrs) {
     }
     }
 
 
     // request EDNS
     // request EDNS
-    if (msgattrs.getRequestEDNS0()) {
+    if (msgattrs.requestHasEDNS0()) {
         server_msg_counter_.inc(MSG_REQUEST_EDNS0);
         server_msg_counter_.inc(MSG_REQUEST_EDNS0);
     }
     }
 
 
     // request DNSSEC
     // request DNSSEC
-    if (msgattrs.getRequestDO()) {
+    if (msgattrs.requestHasDO()) {
         server_msg_counter_.inc(MSG_REQUEST_DNSSEC_OK);
         server_msg_counter_.inc(MSG_REQUEST_DNSSEC_OK);
     }
     }
 
 
@@ -170,7 +170,7 @@ Counters::incResponse(const MessageAttributes& msgattrs,
     server_msg_counter_.inc(MSG_RESPONSE);
     server_msg_counter_.inc(MSG_RESPONSE);
 
 
     // response truncated
     // response truncated
-    if (msgattrs.getResponseTruncated()) {
+    if (msgattrs.responseIsTruncated()) {
         server_msg_counter_.inc(MSG_RESPONSE_TRUNCATED);
         server_msg_counter_.inc(MSG_RESPONSE_TRUNCATED);
     }
     }
 
 
@@ -181,7 +181,7 @@ Counters::incResponse(const MessageAttributes& msgattrs,
     }
     }
 
 
     // response TSIG
     // response TSIG
-    if (msgattrs.getResponseTSIG()) {
+    if (msgattrs.responseHasTSIG()) {
         server_msg_counter_.inc(MSG_RESPONSE_TSIG);
         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"
         isc_throw(isc::Unexpected, "Opcode of the request is empty while it is"
                                    " responded");
                                    " responded");
     }
     }
-    if (!msgattrs.getRequestSigBadSig() &&
+    if (!msgattrs.requestHasBadSig() &&
                opcode.get() == Opcode::QUERY())
                opcode.get() == Opcode::QUERY())
     {
     {
         // compound attributes
         // compound attributes

+ 7 - 7
src/bin/auth/statistics.h

@@ -60,7 +60,7 @@ public:
     };
     };
 private:
 private:
     // request attributes
     // request attributes
-    int req_address_family_;            // IP version
+    int req_address_family_;        // IP version
     int req_transport_protocol_;    // Transport layer protocol
     int req_transport_protocol_;    // Transport layer protocol
     boost::optional<isc::dns::Opcode> req_opcode_;  // OpCode
     boost::optional<isc::dns::Opcode> req_opcode_;  // OpCode
     enum BitAttributes {
     enum BitAttributes {
@@ -142,7 +142,7 @@ public:
     ///
     ///
     /// \return true if EDNS version of the request is 0
     /// \return true if EDNS version of the request is 0
     /// \throw None
     /// \throw None
-    bool getRequestEDNS0() const {
+    bool requestHasEDNS0() const {
         return (bit_attributes_[REQ_WITH_EDNS_0]);
         return (bit_attributes_[REQ_WITH_EDNS_0]);
     }
     }
 
 
@@ -158,7 +158,7 @@ public:
     ///
     ///
     /// \return true if DNSSEC OK (DO) bit of the request is set
     /// \return true if DNSSEC OK (DO) bit of the request is set
     /// \throw None
     /// \throw None
-    bool getRequestDO() const {
+    bool requestHasDO() const {
         return (bit_attributes_[REQ_WITH_DNSSEC_OK]);
         return (bit_attributes_[REQ_WITH_DNSSEC_OK]);
     }
     }
 
 
@@ -174,7 +174,7 @@ public:
     ///
     ///
     /// \return true if the request is TSIG signed
     /// \return true if the request is TSIG signed
     /// \throw None
     /// \throw None
-    bool getRequestSigTSIG() const {
+    bool requestHasTSIG() const {
         return (bit_attributes_[REQ_TSIG_SIGNED]);
         return (bit_attributes_[REQ_TSIG_SIGNED]);
     }
     }
 
 
@@ -182,7 +182,7 @@ public:
     ///
     ///
     /// \return true if the signature of the request is bad
     /// \return true if the signature of the request is bad
     /// \throw None
     /// \throw None
-    bool getRequestSigBadSig() const {
+    bool requestHasBadSig() const {
         return (bit_attributes_[REQ_BADSIG]);
         return (bit_attributes_[REQ_BADSIG]);
     }
     }
 
 
@@ -206,7 +206,7 @@ public:
     ///
     ///
     /// \return true if the response is truncated
     /// \return true if the response is truncated
     /// \throw None
     /// \throw None
-    bool getResponseTruncated() const {
+    bool responseIsTruncated() const {
         return (bit_attributes_[RES_IS_TRUNCATED]);
         return (bit_attributes_[RES_IS_TRUNCATED]);
     }
     }
 
 
@@ -222,7 +222,7 @@ public:
     ///
     ///
     /// \return true if the response is signed with TSIG
     /// \return true if the response is signed with TSIG
     /// \throw None
     /// \throw None
-    bool getResponseTSIG() const {
+    bool responseHasTSIG() const {
         return (bit_attributes_[RES_TSIG_SIGNED]);
         return (bit_attributes_[RES_TSIG_SIGNED]);
     }
     }