Commit e0003025 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[2526] Added definitions for most of the DHCPv4 std options.

parent 0a4faa07
......@@ -33,6 +33,22 @@ using namespace std;
using namespace isc::dhcp;
using namespace isc::util;
namespace {
/// @brief A structure comprising values that are passed to
/// OptionDefinition constructor.
///
/// This structure is used by functions that initialize
/// option definitions for standard options (V4 and V6).
struct OptionParams {
std::string name;
uint16_t code;
OptionDataType type;
bool array;
};
}
// static array with factories for options
std::map<unsigned short, Option::Factory*> LibDHCP::v4factories_;
......@@ -259,7 +275,32 @@ void LibDHCP::OptionFactoryRegister(Option::Universe u,
void
LibDHCP::initStdOptionDefs4() {
isc_throw(isc::NotImplemented, "initStdOptionDefs4 is not implemented");
v4option_defs_.clear();
// Now let's add all option definitions.
for (int i = 0; i < OPTION_DEF_PARAMS_SIZE4; ++i) {
OptionDefinitionPtr definition(new OptionDefinition(OPTION_DEF_PARAMS4[i].name,
OPTION_DEF_PARAMS4[i].code,
OPTION_DEF_PARAMS4[i].type,
OPTION_DEF_PARAMS4[i].array));
for (int rec = 0; rec < OPTION_DEF_PARAMS4[i].records_size; ++rec) {
definition->addRecordField(OPTION_DEF_PARAMS4[i].records[rec]);
}
// Sanity check if the option is valid.
try {
definition->validate();
} catch (const Exception& ex) {
// This is unlikely event that validation fails and may
// be only caused by programming error. To guarantee the
// data consistency we clear all option definitions that
// have been added so far and pass the exception forward.
v4option_defs_.clear();
throw;
}
v4option_defs_.push_back(definition);
}
}
void
......
......@@ -25,7 +25,7 @@ namespace {
/// @param name name of the array being declared.
/// @param types data types of fields that belong to the record.
#ifndef RECORD_DECL
#define RECORD_DECL(name, types...) static OptionDataType name[] = { types }
#define RECORD_DECL(name, types...) static const OptionDataType name[] = { types }
#endif
/// @brief A pair of values: one pointing to the array holding types of
......@@ -48,6 +48,151 @@ struct OptionDefParams {
size_t records_size; // number of fields in a record
};
// fqdn option record fields.
//
// Note that the flags field indicates the type of domain
// name encoding. There is a choice between deprecated
// ASCII encoding and compressed encoding described in
// RFC 1035, section 3.1. The latter could be handled
// by OPT_FQDN_TYPE but we can't use it here because
// clients may request ASCII encoding.
RECORD_DECL(FQDN_RECORDS, OPT_UINT8_TYPE, OPT_UINT8_TYPE, OPT_STRING_TYPE)
/// @brief Definitions of standard DHCPv4 options.
static const OptionDefParams OPTION_DEF_PARAMS4[] = {
{ "subnet-mask", DHO_SUBNET_MASK, OPT_IPV4_ADDRESS_TYPE, false },
{ "time-offset", DHO_TIME_OFFSET, OPT_UINT32_TYPE, false },
{ "routers", DHO_ROUTERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "time-servers", DHO_TIME_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "name-servers", DHO_NAME_SERVERS, OPT_IPV4_ADDRESS_TYPE,
false },
{ "domain-name-servers", DHO_DOMAIN_NAME_SERVERS,
OPT_IPV4_ADDRESS_TYPE, true },
{ "log-servers", DHO_LOG_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "cookie-servers", DHO_COOKIE_SERVERS, OPT_IPV4_ADDRESS_TYPE,
true },
{ "lpr-servers", DHO_LPR_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "impress-servers", DHO_IMPRESS_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "resource-location-servers", DHO_RESOURCE_LOCATION_SERVERS,
OPT_IPV4_ADDRESS_TYPE, true },
{ "host-name", DHO_HOST_NAME, OPT_STRING_TYPE, false },
{ "boot-size", DHO_BOOT_SIZE, OPT_UINT16_TYPE, false },
{ "merit-dump", DHO_MERIT_DUMP, OPT_STRING_TYPE, false },
{ "domain-name", DHO_DOMAIN_NAME, OPT_FQDN_TYPE, false },
{ "swap-server", DHO_SWAP_SERVER, OPT_IPV4_ADDRESS_TYPE, false },
{ "root-path", DHO_ROOT_PATH, OPT_STRING_TYPE, false },
{ "extensions-path", DHO_EXTENSIONS_PATH, OPT_STRING_TYPE,
false },
{ "ip-forwarding", DHO_IP_FORWARDING, OPT_BOOLEAN_TYPE, false },
{ "non-local-source-routing", DHO_NON_LOCAL_SOURCE_ROUTING,
OPT_BOOLEAN_TYPE, false },
{ "policy-filter", DHO_POLICY_FILTER, OPT_IPV4_ADDRESS_TYPE, true },
{ "max-dgram-reassembly", DHO_MAX_DGRAM_REASSEMBLY,
OPT_UINT16_TYPE, false },
{ "default-ip-ttl", DHO_DEFAULT_IP_TTL, OPT_UINT8_TYPE, false },
{ "path-mtu-aging-timeout", DHO_PATH_MTU_AGING_TIMEOUT,
OPT_UINT32_TYPE, false },
{ "path-mtu-plateau-table", DHO_PATH_MTU_PLATEAU_TABLE,
OPT_UINT16_TYPE, true },
{ "interface-mtu", DHO_INTERFACE_MTU, OPT_UINT16_TYPE, false },
{ "all-subnets-local", DHO_ALL_SUBNETS_LOCAL,
OPT_BOOLEAN_TYPE, false },
{ "broadcast-address", DHO_BROADCAST_ADDRESS,
OPT_IPV4_ADDRESS_TYPE, false },
{ "perform-mask-discovery", DHO_PERFORM_MASK_DISCOVERY,
OPT_BOOLEAN_TYPE, false },
{ "mask-supplier", DHO_MASK_SUPPLIER, OPT_BOOLEAN_TYPE, false },
{ "router-discovery", DHO_ROUTER_DISCOVERY,
OPT_BOOLEAN_TYPE, false },
{ "router-solicitation-address", DHO_ROUTER_SOLICITATION_ADDRESS,
OPT_IPV4_ADDRESS_TYPE, false },
{ "static-routes", DHO_STATIC_ROUTES,
OPT_IPV4_ADDRESS_TYPE, true },
{ "trailer-encapsulation", DHO_TRAILER_ENCAPSULATION,
OPT_BOOLEAN_TYPE, false },
{ "arp-cache-timeout", DHO_ARP_CACHE_TIMEOUT,
OPT_UINT32_TYPE, false },
{ "ieee802-3-encapsulation", DHO_IEEE802_3_ENCAPSULATION,
OPT_BOOLEAN_TYPE, false },
{ "default-tcp-ttl", DHO_DEFAULT_TCP_TTL, OPT_UINT8_TYPE, false },
{ "tcp-keepalive-internal", DHO_TCP_KEEPALIVE_INTERVAL,
OPT_UINT32_TYPE, false },
{ "tcp-keepalive-garbage", DHO_TCP_KEEPALIVE_GARBAGE,
OPT_BOOLEAN_TYPE, false },
{ "nis-domain", DHO_NIS_DOMAIN, OPT_STRING_TYPE, false },
{ "nis-servers", DHO_NIS_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "ntp-servers", DHO_NTP_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "vendor-encapsulated-options", DHO_VENDOR_ENCAPSULATED_OPTIONS,
OPT_BINARY_TYPE, false },
{ "netbios-name-servers", DHO_NETBIOS_NAME_SERVERS,
OPT_IPV4_ADDRESS_TYPE, true },
{ "netbios-dd-server", DHO_NETBIOS_DD_SERVER,
OPT_IPV4_ADDRESS_TYPE, true },
{ "netbios-node-type", DHO_NETBIOS_NODE_TYPE,
OPT_UINT8_TYPE, false },
{ "netbios-scope", DHO_NETBIOS_SCOPE, OPT_STRING_TYPE, false },
{ "font-servers", DHO_FONT_SERVERS, OPT_IPV4_ADDRESS_TYPE, true },
{ "x-display-manager", DHO_X_DISPLAY_MANAGER,
OPT_IPV4_ADDRESS_TYPE, true },
{ "dhcp-requested-address", DHO_DHCP_REQUESTED_ADDRESS,
OPT_IPV4_ADDRESS_TYPE, false },
{ "dhcp-lease-time", DHO_DHCP_LEASE_TIME, OPT_UINT32_TYPE, false },
{ "dhcp-option-overload", DHO_DHCP_OPTION_OVERLOAD,
OPT_UINT8_TYPE, false },
{ "dhcp-message-type", DHO_DHCP_MESSAGE_TYPE, OPT_UINT8_TYPE, false },
{ "dhcp-server-identifier", DHO_DHCP_SERVER_IDENTIFIER,
OPT_IPV4_ADDRESS_TYPE, false },
{ "dhcp-parameter-request-list", DHO_DHCP_PARAMETER_REQUEST_LIST,
OPT_UINT8_TYPE, true },
{ "dhcp-message", DHO_DHCP_MESSAGE, OPT_STRING_TYPE, false },
{ "dhcp-max-message-size", DHO_DHCP_MAX_MESSAGE_SIZE,
OPT_UINT16_TYPE, false },
{ "dhcp-renewal-time", DHO_DHCP_RENEWAL_TIME, OPT_UINT32_TYPE, false },
{ "dhcp-rebinding-time", DHO_DHCP_REBINDING_TIME,
OPT_UINT32_TYPE, false },
{ "vendor-class-identifier", DHO_VENDOR_CLASS_IDENTIFIER,
OPT_BINARY_TYPE, false },
{ "dhcp-client-identifier", DHO_DHCP_CLIENT_IDENTIFIER,
OPT_BINARY_TYPE, false },
{ "nwip-domain-name", DHO_NWIP_DOMAIN_NAME, OPT_STRING_TYPE, false },
{ "nwip-suboptions", DHO_NWIP_SUBOPTIONS, OPT_BINARY_TYPE, false },
{ "user-class", DHO_USER_CLASS, OPT_BINARY_TYPE, false },
{ "fqdn", DHO_FQDN, OPT_RECORD_TYPE, false, RECORD_DEF(FQDN_RECORDS) },
{ "dhcp-agent-options", DHO_DHCP_AGENT_OPTIONS,
OPT_BINARY_TYPE, false },
// Unfortunatelly the AUTHENTICATE option contains a 64-bit
// data field called 'replay-detection' that can't be added
// as a record field to a custom option. Also, there is no
// dedicated option class to handle it so we simply return
// binary option type for now.
// @todo implement a class to handle AUTH option.
{ "authenticate", DHO_AUTHENTICATE, OPT_BINARY_TYPE, false },
{ "client-last-transaction-time", DHO_CLIENT_LAST_TRANSACTION_TIME,
OPT_UINT32_TYPE, false },
{ "associated-ip", DHO_ASSOCIATED_IP, OPT_IPV4_ADDRESS_TYPE, true },
{ "subnet-selection", DHO_SUBNET_SELECTION,
OPT_IPV4_ADDRESS_TYPE, false },
// The following options need a special encoding of data
// being carried by them. Therefore, there is no way they can
// be handled by OptionCustom. We may need to implement
// dedicated classes to handle them. Until that happens
// let's treat them as 'binary' options.
{ "domain-search", DHO_DOMAIN_SEARCH, OPT_BINARY_TYPE, false },
{ "vivco-suboptions", DHO_VIVCO_SUBOPTIONS,
OPT_BINARY_TYPE, false },
{ "vivso-suboptions", DHO_VIVSO_SUBOPTIONS, OPT_BINARY_TYPE,
false }
// @todo add definitions for all remaning options.
};
/// Number of option definitions defined.
const int OPTION_DEF_PARAMS_SIZE4 =
sizeof(OPTION_DEF_PARAMS4) / sizeof(OPTION_DEF_PARAMS4[0]);
/// Start Definition of DHCPv6 options
// client-fqdn
RECORD_DECL(clientFqdnRecords, OPT_UINT8_TYPE, OPT_FQDN_TYPE);
// geoconf-civic
......@@ -76,7 +221,7 @@ RECORD_DECL(vendorClassRecords, OPT_UINT32_TYPE, OPT_BINARY_TYPE);
// vendor-opts
RECORD_DECL(vendorOptsRecords, OPT_UINT32_TYPE, OPT_BINARY_TYPE);
/// Stdandard DHCPv6 option definitions.
/// Standard DHCPv6 option definitions.
static const OptionDefParams OPTION_DEF_PARAMS6[] = {
{ "clientid", D6O_CLIENTID, OPT_BINARY_TYPE, false },
{ "serverid", D6O_SERVERID, OPT_BINARY_TYPE, false },
......
......@@ -55,7 +55,23 @@ public:
return OptionPtr(option);
}
/// @brief Test option option definition.
/// @brief Test DHCPv4 option definition.
///
/// This function tests if option definition for standard
/// option has been initialized correctly.
///
/// @param code option code.
/// @param bug buffer to be used to create option instance.
/// @param expected_type type of the option created by the
/// factory function returned by the option definition.
static void testStdOptionDefs4(const uint16_t code,
const OptionBuffer& buf,
const std::type_info& expected_type) {
// Use V4 universe.
testStdOptionDefs(Option::V4, code, buf, expected_type);
}
/// @brief Test DHCPv6 option definition.
///
/// This function tests if option definition for standard
/// option has been initialized correctly.
......@@ -65,13 +81,31 @@ public:
/// @param expected_type type of the option created by the
/// factory function returned by the option definition.
static void testStdOptionDefs6(const uint16_t code,
const OptionBuffer& buf,
const std::type_info& expected_type) {
const OptionBuffer& buf,
const std::type_info& expected_type) {
// Use V6 universe.
testStdOptionDefs(Option::V6, code, buf, expected_type);
}
private:
/// @brief Test DHCPv4 or DHCPv6 option definition.
///
/// This function tests if option definition for standard
/// option has been initialized correctly.
///
/// @param code option code.
/// @param bug buffer to be used to create option instance.
/// @param expected_type type of the option created by the
/// factory function returned by the option definition.
static void testStdOptionDefs(const Option::Universe u,
const uint16_t code,
const OptionBuffer& buf,
const std::type_info& expected_type) {
// Get all option definitions, we will use them to extract
// the definition for a particular option code.
// We don't have to initialize option definitions here because they
// are initialized in the class's constructor.
OptionDefContainer options = LibDHCP::getOptionDefs(Option::V6);
OptionDefContainer options = LibDHCP::getOptionDefs(u);
// Get the container index #1. This one allows for searching
// option definitions using option code.
const OptionDefContainerTypeIndex& idx = options.get<1>();
......@@ -91,7 +125,7 @@ public:
ASSERT_NO_THROW(def->validate());
OptionPtr option;
// Create the option.
ASSERT_NO_THROW(option = def->optionFactory(Option::V6, code, buf))
ASSERT_NO_THROW(option = def->optionFactory(u, code, buf))
<< "Option creation failed to option code " << code;
// Make sure it is not NULL.
ASSERT_TRUE(option);
......@@ -396,6 +430,164 @@ TEST_F(LibDhcpTest, unpackOptions4) {
EXPECT_TRUE(x == options.end()); // option 2 not found
}
TEST_F(LibDhcpTest, stdOptionDefs4) {
// Create a buffer that holds dummy option data.
// It will be used to create most of the options.
std::vector<uint8_t> buf(48, 1);
LibDhcpTest::testStdOptionDefs4(DHO_SUBNET_MASK, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_TIME_OFFSET, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ROUTERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_TIME_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NAME_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DOMAIN_NAME_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_LOG_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_COOKIE_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_LPR_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_IMPRESS_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_RESOURCE_LOCATION_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_HOST_NAME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_BOOT_SIZE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_MERIT_DUMP, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DOMAIN_NAME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_SWAP_SERVER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ROOT_PATH, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_EXTENSIONS_PATH, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_IP_FORWARDING, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NON_LOCAL_SOURCE_ROUTING, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_POLICY_FILTER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_MAX_DGRAM_REASSEMBLY, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_MAX_DGRAM_REASSEMBLY, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DEFAULT_IP_TTL, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_PATH_MTU_AGING_TIMEOUT, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_PATH_MTU_PLATEAU_TABLE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_INTERFACE_MTU, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ALL_SUBNETS_LOCAL, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_BROADCAST_ADDRESS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_PERFORM_MASK_DISCOVERY, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_MASK_SUPPLIER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ROUTER_DISCOVERY, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ROUTER_SOLICITATION_ADDRESS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_STATIC_ROUTES, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_TRAILER_ENCAPSULATION, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ARP_CACHE_TIMEOUT, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_IEEE802_3_ENCAPSULATION, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DEFAULT_TCP_TTL, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_TCP_KEEPALIVE_INTERVAL, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_TCP_KEEPALIVE_GARBAGE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NIS_DOMAIN, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NIS_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NTP_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_VENDOR_ENCAPSULATED_OPTIONS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NETBIOS_NAME_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NETBIOS_DD_SERVER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NETBIOS_NODE_TYPE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NETBIOS_SCOPE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_FONT_SERVERS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_X_DISPLAY_MANAGER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_REQUESTED_ADDRESS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_LEASE_TIME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_OPTION_OVERLOAD, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_MESSAGE_TYPE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_SERVER_IDENTIFIER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_PARAMETER_REQUEST_LIST, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_MESSAGE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_MAX_MESSAGE_SIZE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_RENEWAL_TIME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_REBINDING_TIME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_VENDOR_CLASS_IDENTIFIER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_CLIENT_IDENTIFIER, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NWIP_DOMAIN_NAME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_NWIP_SUBOPTIONS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_USER_CLASS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_FQDN, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DHCP_AGENT_OPTIONS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_AUTHENTICATE, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_CLIENT_LAST_TRANSACTION_TIME, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_ASSOCIATED_IP, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_SUBNET_SELECTION, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_DOMAIN_SEARCH, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_VIVCO_SUBOPTIONS, buf,
typeid(OptionCustom));
LibDhcpTest::testStdOptionDefs4(DHO_VIVSO_SUBOPTIONS, buf,
typeid(OptionCustom));
}
// Test that definitions of standard options have been initialized
// correctly.
// @todo Only limited number of option definitions are now created
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment