BIND 10 trac2827, updated. 492b1ef54094f220280d58b42ee0749ef829a045 [2827] 2 methods in Pkt6 are now const.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Apr 3 11:46:33 UTC 2013


The branch, trac2827 has been updated
       via  492b1ef54094f220280d58b42ee0749ef829a045 (commit)
      from  7c0534d4b3dcd4b318dca8ebdcb1f1424c14931b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 492b1ef54094f220280d58b42ee0749ef829a045
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Wed Apr 3 13:46:25 2013 +0200

    [2827] 2 methods in Pkt6 are now const.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcp/pkt6.cc |    6 +++---
 src/lib/dhcp/pkt6.h  |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/pkt6.cc b/src/lib/dhcp/pkt6.cc
index 944b0d4..c97281e 100644
--- a/src/lib/dhcp/pkt6.cc
+++ b/src/lib/dhcp/pkt6.cc
@@ -88,7 +88,7 @@ OptionPtr Pkt6::getRelayOption(uint16_t opt_type, uint8_t relay_level) {
     return (OptionPtr());
 }
 
-uint16_t Pkt6::getRelayOverhead(const RelayInfo& relay) {
+uint16_t Pkt6::getRelayOverhead(const RelayInfo& relay) const {
     uint16_t len = DHCPV6_RELAY_HDR_LEN // fixed header
         + Option::OPTION6_HDR_LEN; // header of the relay-msg option
 
@@ -112,10 +112,10 @@ uint16_t Pkt6::calculateRelaySizes() {
     return (len);
 }
 
-uint16_t Pkt6::directLen() {
+uint16_t Pkt6::directLen() const {
     uint16_t length = DHCPV6_PKT_HDR_LEN; // DHCPv6 header
 
-    for (Option::OptionCollection::iterator it = options_.begin();
+    for (Option::OptionCollection::const_iterator it = options_.begin();
          it != options_.end();
          ++it) {
         length += (*it).second->len();
diff --git a/src/lib/dhcp/pkt6.h b/src/lib/dhcp/pkt6.h
index d24dc03..7a58ae3 100644
--- a/src/lib/dhcp/pkt6.h
+++ b/src/lib/dhcp/pkt6.h
@@ -426,7 +426,7 @@ protected:
     /// It is used when calculating message size and packing message
     /// @param relay RelayInfo structure that holds information about relay
     /// @return number of bytes needed to store relay information
-    uint16_t getRelayOverhead(const RelayInfo& relay);
+    uint16_t getRelayOverhead(const RelayInfo& relay) const;
 
     /// @brief calculates overhead for all relays defined for this message
     /// @return number of bytes needed to store all relay information
@@ -436,7 +436,7 @@ protected:
     ///
     /// This is equal to len() if the message was not relayed.
     /// @return number of bytes required to store the message
-    uint16_t directLen();
+    uint16_t directLen() const;
 
     /// UDP (usually) or TCP (bulk leasequery or failover)
     DHCPv6Proto proto_;



More information about the bind10-changes mailing list