" },"
" {"
" \"name\": \"log-servers\","
- " \"data\": \"10.0.0.200,10.0.0.201\""
+ " \"data\": \"10.0.0.204,10.0.0.205\""
" },"
" {"
" \"name\": \"cookie-servers\","
- " \"data\": \"10.0.0.202,10.0.0.203\""
+ " \"data\": \"10.0.0.206,10.0.0.207\""
" } ],"
" \"reservations\": [ "
" {"
" },"
" {"
" \"name\": \"log-servers\","
- " \"data\": \"10.0.0.200,10.0.0.201\""
+ " \"data\": \"10.0.0.204,10.0.0.205\""
" },"
" {"
" \"name\": \"cookie-servers\","
- " \"data\": \"10.0.0.202,10.0.0.203\""
+ " \"data\": \"10.0.0.206,10.0.0.207\""
" } ],"
" \"reservations\": [ "
" {"
" },"
" {"
" \"name\": \"cookie-servers\","
- " \"data\": \"10.1.1.202,10.1.1.203\""
+ " \"data\": \"10.1.1.206,10.1.1.207\""
" } ]"
" } ]"
" } ]"
: Dhcpv4SrvTest(),
iface_mgr_test_config_(true) {
IfaceMgr::instance().openSockets4();
-
- // Let's wipe all existing statistics.
- isc::stats::StatsMgr::instance().removeAll();
- }
-
- /// @brief Destructor.
- ///
- /// Cleans up statistics after the test.
- virtual ~HostOptionsTest() {
- // Let's wipe all existing statistics.
- isc::stats::StatsMgr::instance().removeAll();
}
/// @brief Verifies that host specific options override subnet specific
EXPECT_EQ("10.1.1.203", client.config_.dns_servers_[1].toText());
// Make sure that the Quotes Servers option has been received.
ASSERT_EQ(2, client.config_.quotes_servers_.size());
- EXPECT_EQ("10.0.0.202", client.config_.quotes_servers_[0].toText());
- EXPECT_EQ("10.0.0.203", client.config_.quotes_servers_[1].toText());
+ EXPECT_EQ("10.0.0.206", client.config_.quotes_servers_[0].toText());
+ EXPECT_EQ("10.0.0.207", client.config_.quotes_servers_[1].toText());
// Make sure that the Log Servers option has been received.
ASSERT_EQ(2, client.config_.log_servers_.size());
- EXPECT_EQ("10.0.0.200", client.config_.log_servers_[0].toText());
- EXPECT_EQ("10.0.0.201", client.config_.log_servers_[1].toText());
+ EXPECT_EQ("10.0.0.204", client.config_.log_servers_[0].toText());
+ EXPECT_EQ("10.0.0.205", client.config_.log_servers_[1].toText());
}
void
EXPECT_EQ("10.1.1.201", client.config_.routers_[1].toText());
// Make sure that the Quotes Servers option has been received.
ASSERT_EQ(2, client.config_.quotes_servers_.size());
- EXPECT_EQ("10.1.1.202", client.config_.quotes_servers_[0].toText());
- EXPECT_EQ("10.1.1.203", client.config_.quotes_servers_[1].toText());
+ EXPECT_EQ("10.1.1.206", client.config_.quotes_servers_[0].toText());
+ EXPECT_EQ("10.1.1.207", client.config_.quotes_servers_[1].toText());
// Other options are not configured and should not be delivered.
EXPECT_EQ(0, client.config_.dns_servers_.size());
// Assume this suboption is a TFTP servers suboption.
std::multimap<unsigned int, OptionPtr>::const_iterator opt =
client.config_.vendor_suboptions_.find(DOCSIS3_V4_TFTP_SERVERS);
+ ASSERT_TRUE(opt->second);
Option4AddrLstPtr opt_tftp = boost::dynamic_pointer_cast<
Option4AddrLst>(opt->second);
ASSERT_TRUE(opt_tftp);
{ "domain-search", DHO_DOMAIN_SEARCH, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
{ "vivco-suboptions", DHO_VIVCO_SUBOPTIONS, OPT_RECORD_TYPE,
false, RECORD_DEF(VIVCO_RECORDS), "" },
+ // Vendor-Identifying Vendor Specific Information option payload begins with a
+ // 32-bit log enterprise number, followed by a tuple of data-len/option-data.
+ // The format defined here includes 32-bit field holding enterprise number.
+ // This allows for specifying option-data information where the enterprise-id
+ // is represented by a uint32_t value. Previously we represented this option
+ // as a binary, but that would imply that enterprise number would have to be
+ // represented in binary format in the server configuration. That would be
+ // inconvenient and non-intuitive.
+ /// @todo We need to extend support for vendor options with ability to specify
+ /// multiple enterprise numbers for a single option. Perhaps it would be
+ /// ok to specify multiple instances of the "vivso-suboptions" which will be
+ /// combined in a single option by the server before responding to a client.
{ "vivso-suboptions", DHO_VIVSO_SUBOPTIONS, OPT_UINT32_TYPE,
false, NO_RECORD_DEF, "" }