BIND 10 trac2414, updated. f9e9ca679889cd4b177c72c588931d4e79300989 [2414] Changes after review
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Nov 9 15:43:07 UTC 2012
The branch, trac2414 has been updated
via f9e9ca679889cd4b177c72c588931d4e79300989 (commit)
from 4067c8bb2f66712c4d442fe07d39dbab84afbf27 (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 f9e9ca679889cd4b177c72c588931d4e79300989
Author: Stephen Morris <stephen at isc.org>
Date: Fri Nov 9 15:42:45 2012 +0000
[2414] Changes after review
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp6/dhcp6_srv.h | 6 +++++-
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc | 11 ++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp6/dhcp6_srv.h b/src/bin/dhcp6/dhcp6_srv.h
index c703de4..6574226 100644
--- a/src/bin/dhcp6/dhcp6_srv.h
+++ b/src/bin/dhcp6/dhcp6_srv.h
@@ -32,12 +32,16 @@ namespace isc {
namespace dhcp {
/// @brief DHCPv6 server service.
///
-/// This singleton class represents DHCPv6 server. It contains all
+/// This class represents DHCPv6 server. It contains all
/// top-level methods and routines necessary for server operation.
/// In particular, it instantiates IfaceMgr, loads or generates DUID
/// that is going to be used as server-identifier, receives incoming
/// packets, processes them, manages leases assignment and generates
/// appropriate responses.
+///
+/// @note Only one instance of this class is instantated as it encompasses
+/// the whole operation of the server. Nothing, however, enforces the
+/// singleton status of the object.
class Dhcpv6Srv : public boost::noncopyable {
public:
diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
index ea8dbf3..f1cf7de 100644
--- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
+++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc
@@ -139,9 +139,14 @@ public:
}
// Check that generated IAADDR option contains expected address.
- void checkIAAddr(boost::shared_ptr<Option6IAAddr> addr, const IOAddress& expected_addr,
+ void checkIAAddr(const boost::shared_ptr<Option6IAAddr>& addr,
+ const IOAddress& expected_addr,
uint32_t expected_preferred, uint32_t expected_valid) {
- // Check that the assigned address is indeed from the configured pool
+
+ // Check that the assigned address is indeed from the configured pool.
+ // Note that when comparing addresses, we compare the textual
+ // representation. IOAddress does not support being streamed to
+ // an ostream, which means it can't be used in EXPECT_EQ.
EXPECT_TRUE(subnet_->inPool(addr->getAddress()));
EXPECT_EQ(expected_addr.toText(), addr->getAddress().toText());
EXPECT_EQ(addr->getPreferred(), subnet_->getPreferred());
@@ -326,7 +331,7 @@ TEST_F(Dhcpv6SrvTest, advertiseOptions) {
ASSERT_EQ(0, rcode_);
- Pkt6Ptr sol = Pkt6Ptr(new Pkt6(DHCPV6_SOLICIT, 1234));
+ Pkt6Ptr sol = Pkt6Ptr(new Pkt6(DHCPV6_SOLICIT, 1234));
sol->setRemoteAddr(IOAddress("fe80::abcd"));
sol->addOption(generateIA(234, 1500, 3000));
OptionPtr clientid = generateClientId();
More information about the bind10-changes
mailing list