summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dhcp/docsis3_option_defs.h36
-rw-r--r--src/lib/dhcp/libdhcp++.cc2
-rw-r--r--src/lib/dhcp/option_data_types.h4
-rw-r--r--src/lib/dhcp/option_definition.cc47
-rw-r--r--src/lib/dhcp/option_definition.h68
-rw-r--r--src/lib/dhcp/std_option_defs.h410
6 files changed, 298 insertions, 269 deletions
diff --git a/src/lib/dhcp/docsis3_option_defs.h b/src/lib/dhcp/docsis3_option_defs.h
index 3595f1b354..a60ca01340 100644
--- a/src/lib/dhcp/docsis3_option_defs.h
+++ b/src/lib/dhcp/docsis3_option_defs.h
@@ -24,8 +24,10 @@ namespace dhcp {
/// @brief Definitions of standard DHCPv4 options.
const OptionDefParams DOCSIS3_V4_OPTION_DEFINITIONS[] = {
- { "oro", DOCSIS3_V4_ORO, OPT_UINT8_TYPE, true, NO_RECORD_DEF, "" },
- { "tftp-servers", DOCSIS3_V4_TFTP_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" }
+ { "oro", DOCSIS3_V4_ORO,
+ DOCSIS3_V4_OPTION_SPACE, OPT_UINT8_TYPE, true, NO_RECORD_DEF, "" },
+ { "tftp-servers", DOCSIS3_V4_TFTP_SERVERS,
+ DOCSIS3_V4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" }
};
/// Number of option definitions defined.
@@ -50,16 +52,26 @@ const int DOCSIS3_V4_OPTION_DEFINITIONS_SIZE =
/// @brief Definitions of standard DHCPv6 options.
const OptionDefParams DOCSIS3_V6_OPTION_DEFINITIONS[] = {
- { "oro", DOCSIS3_V6_ORO, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
- { "device-type", DOCSIS3_V6_DEVICE_TYPE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "vendor-type", DOCSIS3_V6_VENDOR_NAME, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "tftp-servers", DOCSIS3_V6_TFTP_SERVERS, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "time-servers", DOCSIS3_V6_TIME_SERVERS, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "config-file", DOCSIS3_V6_CONFIG_FILE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "syslog-servers", DOCSIS3_V6_SYSLOG_SERVERS, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "device-id", DOCSIS3_V6_DEVICE_ID, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "time-offset", DOCSIS3_V6_TIME_OFFSET, OPT_INT32_TYPE, false, NO_RECORD_DEF, "" },
- { "cmts-cm-mac", DOCSIS3_V6_CMTS_CM_MAC, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" }
+ { "oro", DOCSIS3_V6_ORO,
+ DOCSIS3_V6_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ { "device-type", DOCSIS3_V6_DEVICE_TYPE,
+ DOCSIS3_V6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "vendor-type", DOCSIS3_V6_VENDOR_NAME,
+ DOCSIS3_V6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "tftp-servers", DOCSIS3_V6_TFTP_SERVERS,
+ DOCSIS3_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "time-servers", DOCSIS3_V6_TIME_SERVERS,
+ DOCSIS3_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "config-file", DOCSIS3_V6_CONFIG_FILE,
+ DOCSIS3_V6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "syslog-servers", DOCSIS3_V6_SYSLOG_SERVERS,
+ DOCSIS3_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "device-id", DOCSIS3_V6_DEVICE_ID,
+ DOCSIS3_V6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "time-offset", DOCSIS3_V6_TIME_OFFSET,
+ DOCSIS3_V6_OPTION_SPACE, OPT_INT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "cmts-cm-mac", DOCSIS3_V6_CMTS_CM_MAC,
+ DOCSIS3_V6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" }
// @todo add definitions for all remaining options.
};
diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc
index 6c417d24ce..fa3fb996cf 100644
--- a/src/lib/dhcp/libdhcp++.cc
+++ b/src/lib/dhcp/libdhcp++.cc
@@ -978,12 +978,14 @@ initOptionSpace(OptionDefContainerPtr& defs,
// Option does not encapsulate any option space.
definition.reset(new OptionDefinition(params[i].name,
params[i].code,
+ params[i].space,
params[i].type,
params[i].array));
} else {
// Option does encapsulate an option space.
definition.reset(new OptionDefinition(params[i].name,
params[i].code,
+ params[i].space,
params[i].type,
params[i].encapsulates));
diff --git a/src/lib/dhcp/option_data_types.h b/src/lib/dhcp/option_data_types.h
index 1408b48c64..a3c4413350 100644
--- a/src/lib/dhcp/option_data_types.h
+++ b/src/lib/dhcp/option_data_types.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2020 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -33,7 +33,6 @@ public:
isc::Exception(file, line, what) { };
};
-
/// @brief Data types of DHCP option fields.
///
/// @warning The order of data types matters: OPT_UNKNOWN_TYPE
@@ -68,6 +67,7 @@ enum OptionDataType {
struct OptionDefParams {
const char* name; // option name
uint16_t code; // option code
+ const char* space; // option space
OptionDataType type; // data type
bool array; // is array
const OptionDataType* records; // record fields
diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc
index 2452f598bd..c83474a10d 100644
--- a/src/lib/dhcp/option_definition.cc
+++ b/src/lib/dhcp/option_definition.cc
@@ -42,9 +42,10 @@ namespace isc {
namespace dhcp {
OptionDefinition::OptionDefinition(const std::string& name,
- const uint16_t code,
- const std::string& type,
- const bool array_type /* = false */)
+ const uint16_t code,
+ const std::string& space,
+ const std::string& type,
+ const bool array_type /* = false */)
: name_(name),
code_(code),
type_(OPT_UNKNOWN_TYPE),
@@ -52,7 +53,7 @@ OptionDefinition::OptionDefinition(const std::string& name,
encapsulated_space_(""),
record_fields_(),
user_context_(),
- option_space_name_() {
+ option_space_name_(space) {
// Data type is held as enum value by this class.
// Use the provided option type string to get the
// corresponding enum value.
@@ -61,19 +62,22 @@ OptionDefinition::OptionDefinition(const std::string& name,
OptionDefinition::OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
const bool array_type /* = false */)
: name_(name),
code_(code),
type_(type),
array_type_(array_type),
- encapsulated_space_("") {
+ encapsulated_space_(""),
+ option_space_name_(space){
}
OptionDefinition::OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
- const char* encapsulated_space)
+ const std::string& encapsulated_space)
: name_(name),
code_(code),
// Data type is held as enum value by this class.
@@ -84,13 +88,14 @@ OptionDefinition::OptionDefinition(const std::string& name,
encapsulated_space_(encapsulated_space),
record_fields_(),
user_context_(),
- option_space_name_() {
+ option_space_name_(space) {
}
OptionDefinition::OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
- const char* encapsulated_space)
+ const std::string& encapsulated_space)
: name_(name),
code_(code),
type_(type),
@@ -98,39 +103,43 @@ OptionDefinition::OptionDefinition(const std::string& name,
encapsulated_space_(encapsulated_space),
record_fields_(),
user_context_(),
- option_space_name_() {
+ option_space_name_(space) {
}
OptionDefinitionPtr
OptionDefinition::create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
const bool array_type) {
- return (boost::make_shared<OptionDefinition>(name, code, type, array_type));
+ return (boost::make_shared<OptionDefinition>(name, code, space, type, array_type));
}
OptionDefinitionPtr
OptionDefinition::create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
const bool array_type) {
- return (boost::make_shared<OptionDefinition>(name, code, type, array_type));
+ return (boost::make_shared<OptionDefinition>(name, code, space, type, array_type));
}
OptionDefinitionPtr
OptionDefinition::create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
- const char* encapsulated_space) {
- return (boost::make_shared<OptionDefinition>(name, code, type, encapsulated_space));
+ const std::string& encapsulated_space) {
+ return (boost::make_shared<OptionDefinition>(name, code, space, type, encapsulated_space));
}
OptionDefinitionPtr
OptionDefinition::create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
- const char* encapsulated_space) {
- return (boost::make_shared<OptionDefinition>(name, code, type, encapsulated_space));
+ const std::string& encapsulated_space) {
+ return (boost::make_shared<OptionDefinition>(name, code, space, type, encapsulated_space));
}
bool
@@ -342,6 +351,10 @@ OptionDefinition::validate() const {
all(find_tail(name_, 1), boost::is_any_of(std::string("-_")))) {
err_str << "invalid option name '" << name_ << "'";
+ } else if (!OptionSpace::validateName(option_space_name_)) {
+ err_str << "invalid option space name: '"
+ << option_space_name_ << "'";
+
} else if (!encapsulated_space_.empty() &&
!OptionSpace::validateName(encapsulated_space_)) {
err_str << "invalid encapsulated option space name: '"
@@ -897,7 +910,7 @@ OptionPtr
OptionDefinition::factorySpecialFormatOption(Option::Universe u,
OptionBufferConstIter begin,
OptionBufferConstIter end) const {
- if (u == Option::V6) {
+ if ((u == Option::V6) && haveSpace(DHCP6_OPTION_SPACE)) {
if ((getCode() == D6O_IA_NA || getCode() == D6O_IA_PD) &&
haveIA6Format()) {
// Return Option6IA instance for IA_PD and IA_NA option
@@ -937,7 +950,7 @@ OptionDefinition::factorySpecialFormatOption(Option::Universe u,
// Prefix Exclude (option code 67)
return (OptionPtr(new Option6PDExclude(begin, end)));
}
- } else {
+ } else if ((u == Option::V4) && haveSpace(DHCP4_OPTION_SPACE)) {
if ((getCode() == DHO_SERVICE_SCOPE) && haveServiceScopeFormat()) {
return (OptionPtr(new Option4SlpServiceScope(begin, end)));
} else if ((getCode() == DHO_FQDN) && haveFqdn4Format()) {
diff --git a/src/lib/dhcp/option_definition.h b/src/lib/dhcp/option_definition.h
index ad02da54ff..b29898600c 100644
--- a/src/lib/dhcp/option_definition.h
+++ b/src/lib/dhcp/option_definition.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2012-2019 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012-2020 Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -80,6 +80,7 @@ class OptionIntArray;
/// the format of the option. In particular, it defines:
/// - option name,
/// - option code,
+/// - option space,
/// - data fields order and their types,
/// - sub options space that the particular option encapsulates.
///
@@ -132,7 +133,6 @@ class OptionIntArray;
/// - "record" (set of data fields of different types)
///
/// @todo Extend the comment to describe "generic factories".
-/// @todo Extend this class to use custom namespaces.
/// @todo Extend this class with more factory functions.
/// @todo Derive from UserContext without breaking the multi index.
class OptionDefinition : public data::StampedElement {
@@ -147,11 +147,13 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type as string.
/// @param array_type array indicator, if true it indicates that the
/// option fields are the array.
explicit OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
const bool array_type = false);
@@ -159,11 +161,13 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type.
/// @param array_type array indicator, if true it indicates that the
/// option fields are the array.
explicit OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
const bool array_type = false);
@@ -178,13 +182,15 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type given as string.
/// @param encapsulated_space name of the option space being
/// encapsulated by this option.
explicit OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
- const char* encapsulated_space);
+ const std::string& encapsulated_space);
/// @brief Constructor.
///
@@ -197,13 +203,15 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type.
/// @param encapsulated_space name of the option space being
/// encapsulated by this option.
explicit OptionDefinition(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
- const char* encapsulated_space);
+ const std::string& encapsulated_space);
/// @brief Factory function creating an instance of the @c OptionDefinition.
///
@@ -214,6 +222,7 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type as string.
/// @param array_type array indicator, if true it indicates that the
/// option fields are the array.
@@ -221,6 +230,7 @@ public:
/// @return Pointer to the @c OptionDefinition instance.
static OptionDefinitionPtr create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
const bool array_type = false);
@@ -233,6 +243,7 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type.
/// @param array_type array indicator, if true it indicates that the
/// option fields are the array.
@@ -240,6 +251,7 @@ public:
/// @return Pointer to the @c OptionDefinition instance.
static OptionDefinitionPtr create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
const bool array_type = false);
@@ -252,6 +264,7 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type given as string.
/// @param encapsulated_space name of the option space being
/// encapsulated by this option.
@@ -259,8 +272,9 @@ public:
/// @return Pointer to the @c OptionDefinition instance.
static OptionDefinitionPtr create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const std::string& type,
- const char* encapsulated_space);
+ const std::string& encapsulated_space);
/// @brief Factory function creating an instance of the @c OptionDefinition.
///
@@ -271,6 +285,7 @@ public:
///
/// @param name option name.
/// @param code option code.
+ /// @param space option space.
/// @param type option data type.
/// @param encapsulated_space name of the option space being
/// encapsulated by this option.
@@ -278,8 +293,9 @@ public:
/// @return Pointer to the @c OptionDefinition instance.
static OptionDefinitionPtr create(const std::string& name,
const uint16_t code,
+ const std::string& space,
const OptionDataType type,
- const char* encapsulated_space);
+ const std::string& encapsulated_space);
/// @name Comparison functions and operators.
///
@@ -358,6 +374,13 @@ public:
return (record_fields_);
}
+ /// @brief Returns option space name.
+ ///
+ /// @return Option space name.
+ std::string getOptionSpaceName() const {
+ return (option_space_name_);
+ }
+
/// @brief Return option data type.
///
/// @return option data type.
@@ -384,32 +407,6 @@ public:
user_context_.contextToElement(map);
}
- /// @brief Returns option space name.
- ///
- /// Option definitions are associated with option spaces. Typically,
- /// such association is made when the option definition is put into
- /// the @c CfgOptionDef structure. However, in some cases it is also
- /// required to associate option definition with the particular option
- /// space outside of that structure. In particular, when the option
- /// definition is fetched from a database. The database configuration
- /// backend will set option space upon return of the option definition.
- /// In other cases this value won't be set.
- ///
- /// @return Option space name or empty string if option space
- /// name is not set.
- std::string getOptionSpaceName() const {
- return (option_space_name_);
- }
-
- /// @brief Sets option space name for option definition.
- ///
- /// See @c getOptionSpaceName to learn when option space name is set.
- ///
- /// @param option_space_name New option space name.
- void setOptionSpaceName(const std::string& option_space_name) {
- option_space_name_ = option_space_name;
- }
-
/// @brief Check if the option definition is valid.
///
/// Note that it is a responsibility of the code that created
@@ -768,6 +765,13 @@ private:
return (type == type_);
}
+ /// @brief Check if specified type matches option definition space.
+ ///
+ /// @return true if specified type matches option definition space.
+ inline bool haveSpace(const std::string& space) const {
+ return (space == option_space_name_);
+ }
+
/// @brief Converts a string value to a boolean value.
///
/// This function converts the value represented as string to a boolean
diff --git a/src/lib/dhcp/std_option_defs.h b/src/lib/dhcp/std_option_defs.h
index 0c741cabb8..3c230eb530 100644
--- a/src/lib/dhcp/std_option_defs.h
+++ b/src/lib/dhcp/std_option_defs.h
@@ -106,156 +106,156 @@ RECORD_DECL(OPT_6RD_RECORDS, OPT_UINT8_TYPE, OPT_UINT8_TYPE,
/// @brief Definitions of standard DHCPv4 options.
const OptionDefParams STANDARD_V4_OPTION_DEFINITIONS[] = {
- { "subnet-mask", DHO_SUBNET_MASK, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
- { "time-offset", DHO_TIME_OFFSET, OPT_INT32_TYPE, false, NO_RECORD_DEF, "" },
- { "routers", DHO_ROUTERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "time-servers", DHO_TIME_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "name-servers", DHO_NAME_SERVERS, OPT_IPV4_ADDRESS_TYPE,
+ { "subnet-mask", DHO_SUBNET_MASK, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "time-offset", DHO_TIME_OFFSET, DHCP4_OPTION_SPACE, OPT_INT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "routers", DHO_ROUTERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "time-servers", DHO_TIME_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "name-servers", DHO_NAME_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE,
true, NO_RECORD_DEF, "" },
{ "domain-name-servers", DHO_DOMAIN_NAME_SERVERS,
- OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "log-servers", DHO_LOG_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "cookie-servers", DHO_COOKIE_SERVERS, OPT_IPV4_ADDRESS_TYPE,
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "log-servers", DHO_LOG_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "cookie-servers", DHO_COOKIE_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE,
true, NO_RECORD_DEF, "" },
- { "lpr-servers", DHO_LPR_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "impress-servers", DHO_IMPRESS_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "lpr-servers", DHO_LPR_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "impress-servers", DHO_IMPRESS_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "resource-location-servers", DHO_RESOURCE_LOCATION_SERVERS,
- OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "host-name", DHO_HOST_NAME, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "boot-size", DHO_BOOT_SIZE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
- { "merit-dump", DHO_MERIT_DUMP, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "domain-name", DHO_DOMAIN_NAME, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "swap-server", DHO_SWAP_SERVER, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
- { "root-path", DHO_ROOT_PATH, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "extensions-path", DHO_EXTENSIONS_PATH, OPT_STRING_TYPE,
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "host-name", DHO_HOST_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "boot-size", DHO_BOOT_SIZE, DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
+ { "merit-dump", DHO_MERIT_DUMP, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "domain-name", DHO_DOMAIN_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "swap-server", DHO_SWAP_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "root-path", DHO_ROOT_PATH, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "extensions-path", DHO_EXTENSIONS_PATH, DHCP4_OPTION_SPACE, OPT_STRING_TYPE,
false, NO_RECORD_DEF, "" },
- { "ip-forwarding", DHO_IP_FORWARDING, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ { "ip-forwarding", DHO_IP_FORWARDING, DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
{ "non-local-source-routing", DHO_NON_LOCAL_SOURCE_ROUTING,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
- { "policy-filter", DHO_POLICY_FILTER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ { "policy-filter", DHO_POLICY_FILTER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "max-dgram-reassembly", DHO_MAX_DGRAM_REASSEMBLY,
- OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
- { "default-ip-ttl", DHO_DEFAULT_IP_TTL, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
+ { "default-ip-ttl", DHO_DEFAULT_IP_TTL, DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
{ "path-mtu-aging-timeout", DHO_PATH_MTU_AGING_TIMEOUT,
- OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
{ "path-mtu-plateau-table", DHO_PATH_MTU_PLATEAU_TABLE,
- OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
- { "interface-mtu", DHO_INTERFACE_MTU, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ { "interface-mtu", DHO_INTERFACE_MTU, DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
{ "all-subnets-local", DHO_ALL_SUBNETS_LOCAL,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
{ "broadcast-address", DHO_BROADCAST_ADDRESS,
- OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
{ "perform-mask-discovery", DHO_PERFORM_MASK_DISCOVERY,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
- { "mask-supplier", DHO_MASK_SUPPLIER, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ { "mask-supplier", DHO_MASK_SUPPLIER, DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
{ "router-discovery", DHO_ROUTER_DISCOVERY,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
{ "router-solicitation-address", DHO_ROUTER_SOLICITATION_ADDRESS,
- OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
{ "static-routes", DHO_STATIC_ROUTES,
- OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "trailer-encapsulation", DHO_TRAILER_ENCAPSULATION,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
{ "arp-cache-timeout", DHO_ARP_CACHE_TIMEOUT,
- OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
{ "ieee802-3-encapsulation", DHO_IEEE802_3_ENCAPSULATION,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
- { "default-tcp-ttl", DHO_DEFAULT_TCP_TTL, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ { "default-tcp-ttl", DHO_DEFAULT_TCP_TTL, DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
{ "tcp-keepalive-interval", DHO_TCP_KEEPALIVE_INTERVAL,
- OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
{ "tcp-keepalive-garbage", DHO_TCP_KEEPALIVE_GARBAGE,
- OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
- { "nis-domain", DHO_NIS_DOMAIN, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "nis-servers", DHO_NIS_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "ntp-servers", DHO_NTP_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_BOOLEAN_TYPE, false, NO_RECORD_DEF, "" },
+ { "nis-domain", DHO_NIS_DOMAIN, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "nis-servers", DHO_NIS_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "ntp-servers", DHO_NTP_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
/// vendor-encapsulated-options (43) is deferred
{ "netbios-name-servers", DHO_NETBIOS_NAME_SERVERS,
- OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "netbios-dd-server", DHO_NETBIOS_DD_SERVER,
- OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "netbios-node-type", DHO_NETBIOS_NODE_TYPE,
- OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
- { "netbios-scope", DHO_NETBIOS_SCOPE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "font-servers", DHO_FONT_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ { "netbios-scope", DHO_NETBIOS_SCOPE, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "font-servers", DHO_FONT_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "x-display-manager", DHO_X_DISPLAY_MANAGER,
- OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
{ "dhcp-requested-address", DHO_DHCP_REQUESTED_ADDRESS,
- OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
- { "dhcp-lease-time", DHO_DHCP_LEASE_TIME, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "dhcp-lease-time", DHO_DHCP_LEASE_TIME, DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
{ "dhcp-option-overload", DHO_DHCP_OPTION_OVERLOAD,
- OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
- { "dhcp-message-type", DHO_DHCP_MESSAGE_TYPE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ { "dhcp-message-type", DHO_DHCP_MESSAGE_TYPE, DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
{ "dhcp-server-identifier", DHO_DHCP_SERVER_IDENTIFIER,
- OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
{ "dhcp-parameter-request-list", DHO_DHCP_PARAMETER_REQUEST_LIST,
- OPT_UINT8_TYPE, true, NO_RECORD_DEF, "" },
- { "dhcp-message", DHO_DHCP_MESSAGE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, true, NO_RECORD_DEF, "" },
+ { "dhcp-message", DHO_DHCP_MESSAGE, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
{ "dhcp-max-message-size", DHO_DHCP_MAX_MESSAGE_SIZE,
- OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
- { "dhcp-renewal-time", DHO_DHCP_RENEWAL_TIME, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
+ { "dhcp-renewal-time", DHO_DHCP_RENEWAL_TIME, DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
{ "dhcp-rebinding-time", DHO_DHCP_REBINDING_TIME,
- OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
{ "vendor-class-identifier", DHO_VENDOR_CLASS_IDENTIFIER,
- OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
{ "dhcp-client-identifier", DHO_DHCP_CLIENT_IDENTIFIER,
- OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "nwip-domain-name", DHO_NWIP_DOMAIN_NAME, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "nwip-suboptions", DHO_NWIP_SUBOPTIONS, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "nisplus-domain-name", DHO_NISP_DOMAIN_NAME, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "nisplus-servers", DHO_NISP_SERVER_ADDR, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "tftp-server-name", DHO_TFTP_SERVER_NAME, OPT_STRING_TYPE, false,
+ DHCP4_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "nwip-domain-name", DHO_NWIP_DOMAIN_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "nwip-suboptions", DHO_NWIP_SUBOPTIONS, DHCP4_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "nisplus-domain-name", DHO_NISP_DOMAIN_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "nisplus-servers", DHO_NISP_SERVER_ADDR, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "tftp-server-name", DHO_TFTP_SERVER_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
- { "boot-file-name", DHO_BOOT_FILE_NAME, OPT_STRING_TYPE, false,
+ { "boot-file-name", DHO_BOOT_FILE_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
- { "mobile-ip-home-agent", DHO_HOME_AGENT_ADDRS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "smtp-server", DHO_SMTP_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "pop-server", DHO_POP3_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "nntp-server", DHO_NNTP_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "www-server", DHO_WWW_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "finger-server", DHO_FINGER_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "irc-server", DHO_IRC_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "streettalk-server", DHO_STREETTALK_SERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "streettalk-directory-assistance-server", DHO_STDASERVER, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "user-class", DHO_USER_CLASS, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "slp-directory-agent", DHO_DIRECTORY_AGENT, OPT_RECORD_TYPE, true,
+ { "mobile-ip-home-agent", DHO_HOME_AGENT_ADDRS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "smtp-server", DHO_SMTP_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "pop-server", DHO_POP3_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "nntp-server", DHO_NNTP_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "www-server", DHO_WWW_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "finger-server", DHO_FINGER_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "irc-server", DHO_IRC_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "streettalk-server", DHO_STREETTALK_SERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "streettalk-directory-assistance-server", DHO_STDASERVER, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "user-class", DHO_USER_CLASS, DHCP4_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "slp-directory-agent", DHO_DIRECTORY_AGENT, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, true,
RECORD_DEF(DIRECTORY_AGENT_RECORDS), "" },
- { "slp-service-scope", DHO_SERVICE_SCOPE, OPT_RECORD_TYPE, false,
+ { "slp-service-scope", DHO_SERVICE_SCOPE, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(SERVICE_SCOPE_RECORDS), "" },
- { "fqdn", DHO_FQDN, OPT_RECORD_TYPE, false, RECORD_DEF(FQDN_RECORDS), "" },
+ { "fqdn", DHO_FQDN, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(FQDN_RECORDS), "" },
{ "dhcp-agent-options", DHO_DHCP_AGENT_OPTIONS,
- OPT_EMPTY_TYPE, false, NO_RECORD_DEF, DHCP_AGENT_OPTION_SPACE },
- { "nds-servers", DHO_NDS_SERVERS, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "nds-tree-name", DHO_NDS_TREE_NAME, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "nds-context", DHO_NDS_CONTEXT, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "bcms-controller-names", DHO_BCMCS_DOMAIN_NAME_LIST, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
- { "bcms-controller-address", DHO_BCMCS_IPV4_ADDR, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, DHCP_AGENT_OPTION_SPACE },
+ { "nds-servers", DHO_NDS_SERVERS, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "nds-tree-name", DHO_NDS_TREE_NAME, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "nds-context", DHO_NDS_CONTEXT, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "bcms-controller-names", DHO_BCMCS_DOMAIN_NAME_LIST, DHCP4_OPTION_SPACE, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
+ { "bcms-controller-address", DHO_BCMCS_IPV4_ADDR, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
// 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, NO_RECORD_DEF, "" },
+ { "authenticate", DHO_AUTHENTICATE, DHCP4_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
{ "client-last-transaction-time", DHO_CLIENT_LAST_TRANSACTION_TIME,
- OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "associated-ip", DHO_ASSOCIATED_IP, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "client-system", DHO_SYSTEM, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
- { "client-ndi", DHO_NDI, OPT_RECORD_TYPE, false, RECORD_DEF(CLIENT_NDI_RECORDS), "" },
- { "uuid-guid", DHO_UUID_GUID, OPT_RECORD_TYPE, false, RECORD_DEF(UUID_GUID_RECORDS), "" },
- { "uap-servers", DHO_USER_AUTH, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "geoconf-civic", DHO_GEOCONF_CIVIC, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "pcode", DHO_PCODE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "tcode", DHO_TCODE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "v6-only-preferred", DHO_V6_ONLY_PREFERRED, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "netinfo-server-address", DHO_NETINFO_ADDR, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "netinfo-server-tag", DHO_NETINFO_TAG, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "default-url", DHO_URL, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "auto-config", DHO_AUTO_CONFIG, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
- { "name-service-search", DHO_NAME_SERVICE_SEARCH, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "associated-ip", DHO_ASSOCIATED_IP, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "client-system", DHO_SYSTEM, DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ { "client-ndi", DHO_NDI, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(CLIENT_NDI_RECORDS), "" },
+ { "uuid-guid", DHO_UUID_GUID, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(UUID_GUID_RECORDS), "" },
+ { "uap-servers", DHO_USER_AUTH, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "geoconf-civic", DHO_GEOCONF_CIVIC, DHCP4_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "pcode", DHO_PCODE, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "tcode", DHO_TCODE, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "v6-only-preferred", DHO_V6_ONLY_PREFERRED, DHCP4_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "netinfo-server-address", DHO_NETINFO_ADDR, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "netinfo-server-tag", DHO_NETINFO_TAG, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "default-url", DHO_URL, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "auto-config", DHO_AUTO_CONFIG, DHCP4_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ { "name-service-search", DHO_NAME_SERVICE_SEARCH, DHCP4_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
{ "subnet-selection", DHO_SUBNET_SELECTION,
- OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
- { "domain-search", DHO_DOMAIN_SEARCH, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
- { "vivco-suboptions", DHO_VIVCO_SUBOPTIONS, OPT_RECORD_TYPE,
+ DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "domain-search", DHO_DOMAIN_SEARCH, DHCP4_OPTION_SPACE, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
+ { "vivco-suboptions", DHO_VIVCO_SUBOPTIONS, DHCP4_OPTION_SPACE, 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.
@@ -269,19 +269,19 @@ const OptionDefParams STANDARD_V4_OPTION_DEFINITIONS[] = {
/// 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,
+ { "vivso-suboptions", DHO_VIVSO_SUBOPTIONS, DHCP4_OPTION_SPACE, OPT_UINT32_TYPE,
false, NO_RECORD_DEF, "" },
- { "pana-agent", DHO_PANA_AGENT, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "v4-lost", DHO_V4_LOST, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" },
- { "capwap-ac-v4", DHO_CAPWAP_AC_V4, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
- { "sip-ua-cs-domains", DHO_SIP_UA_CONF_SERVICE_DOMAINS, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
- { "rdnss-selection", DHO_RDNSS_SELECT, OPT_RECORD_TYPE, true,
+ { "pana-agent", DHO_PANA_AGENT, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "v4-lost", DHO_V4_LOST, DHCP4_OPTION_SPACE, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" },
+ { "capwap-ac-v4", DHO_CAPWAP_AC_V4, DHCP4_OPTION_SPACE, OPT_IPV4_ADDRESS_TYPE, true, NO_RECORD_DEF, "" },
+ { "sip-ua-cs-domains", DHO_SIP_UA_CONF_SERVICE_DOMAINS, DHCP4_OPTION_SPACE, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
+ { "rdnss-selection", DHO_RDNSS_SELECT, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, true,
RECORD_DEF(V4_RDNSS_SELECT_RECORDS), "" },
- { "v4-portparams", DHO_V4_PORTPARAMS, OPT_RECORD_TYPE, false,
+ { "v4-portparams", DHO_V4_PORTPARAMS, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(V4_PORTPARAMS_RECORDS), "" },
- { "v4-captive-portal", DHO_V4_CAPTIVE_PORTAL, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "option-6rd", DHO_6RD, OPT_RECORD_TYPE, true, RECORD_DEF(OPT_6RD_RECORDS), "" },
- { "v4-access-domain", DHO_V4_ACCESS_DOMAIN, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" }
+ { "v4-captive-portal", DHO_V4_CAPTIVE_PORTAL, DHCP4_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "option-6rd", DHO_6RD, DHCP4_OPTION_SPACE, OPT_RECORD_TYPE, true, RECORD_DEF(OPT_6RD_RECORDS), "" },
+ { "v4-access-domain", DHO_V4_ACCESS_DOMAIN, DHCP4_OPTION_SPACE, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" }
// @todo add definitions for all remaining options.
};
@@ -295,7 +295,7 @@ const int STANDARD_V4_OPTION_DEFINITIONS_SIZE =
/// are applied in deferred unpacking when none is found).
const OptionDefParams LAST_RESORT_V4_OPTION_DEFINITIONS[] = {
{ "vendor-encapsulated-options", DHO_VENDOR_ENCAPSULATED_OPTIONS,
- OPT_EMPTY_TYPE, false, NO_RECORD_DEF, VENDOR_ENCAPSULATED_OPTION_SPACE }
+ DHCP4_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, VENDOR_ENCAPSULATED_OPTION_SPACE }
};
const int LAST_RESORT_V4_OPTION_DEFINITIONS_SIZE =
@@ -359,123 +359,123 @@ RECORD_DECL(CLIENT_NII_RECORDS, OPT_UINT8_TYPE, OPT_UINT8_TYPE, OPT_UINT8_TYPE);
/// warning about lack of initializers for some struct members
/// causing build to fail.
const OptionDefParams STANDARD_V6_OPTION_DEFINITIONS[] = {
- { "clientid", D6O_CLIENTID, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "serverid", D6O_SERVERID, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "ia-na", D6O_IA_NA, OPT_RECORD_TYPE, false, RECORD_DEF(IA_NA_RECORDS), "" },
- { "ia-ta", D6O_IA_TA, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "iaaddr", D6O_IAADDR, OPT_RECORD_TYPE, false, RECORD_DEF(IAADDR_RECORDS), "" },
- { "oro", D6O_ORO, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
- { "preference", D6O_PREFERENCE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
- { "elapsed-time", D6O_ELAPSED_TIME, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
- { "relay-msg", D6O_RELAY_MSG, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "clientid", D6O_CLIENTID, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "serverid", D6O_SERVERID, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "ia-na", D6O_IA_NA, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(IA_NA_RECORDS), "" },
+ { "ia-ta", D6O_IA_TA, DHCP6_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "iaaddr", D6O_IAADDR, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(IAADDR_RECORDS), "" },
+ { "oro", D6O_ORO, DHCP6_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ { "preference", D6O_PREFERENCE, DHCP6_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ { "elapsed-time", D6O_ELAPSED_TIME, DHCP6_OPTION_SPACE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
+ { "relay-msg", D6O_RELAY_MSG, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
// Unfortunately the AUTH 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.
- { "auth", D6O_AUTH, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "unicast", D6O_UNICAST, OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
- { "status-code", D6O_STATUS_CODE, OPT_RECORD_TYPE, false,
+ { "auth", D6O_AUTH, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "unicast", D6O_UNICAST, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "status-code", D6O_STATUS_CODE, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(STATUS_CODE_RECORDS), "" },
- { "rapid-commit", D6O_RAPID_COMMIT, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, "" },
- { "user-class", D6O_USER_CLASS, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "vendor-class", D6O_VENDOR_CLASS, OPT_RECORD_TYPE, false,
+ { "rapid-commit", D6O_RAPID_COMMIT, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, "" },
+ { "user-class", D6O_USER_CLASS, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "vendor-class", D6O_VENDOR_CLASS, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(VENDOR_CLASS_RECORDS), "" },
- { "vendor-opts", D6O_VENDOR_OPTS, OPT_UINT32_TYPE, false,
+ { "vendor-opts", D6O_VENDOR_OPTS, DHCP6_OPTION_SPACE, OPT_UINT32_TYPE, false,
NO_RECORD_DEF, "" },
- { "interface-id", D6O_INTERFACE_ID, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "reconf-msg", D6O_RECONF_MSG, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
- { "reconf-accept", D6O_RECONF_ACCEPT, OPT_EMPTY_TYPE, false,
+ { "interface-id", D6O_INTERFACE_ID, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "reconf-msg", D6O_RECONF_MSG, DHCP6_OPTION_SPACE, OPT_UINT8_TYPE, false, NO_RECORD_DEF, "" },
+ { "reconf-accept", D6O_RECONF_ACCEPT, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false,
NO_RECORD_DEF, "" },
- { "sip-server-dns", D6O_SIP_SERVERS_DNS, OPT_FQDN_TYPE, true,
+ { "sip-server-dns", D6O_SIP_SERVERS_DNS, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, true,
NO_RECORD_DEF, "" },
- { "sip-server-addr", D6O_SIP_SERVERS_ADDR, OPT_IPV6_ADDRESS_TYPE, true,
+ { "sip-server-addr", D6O_SIP_SERVERS_ADDR, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "dns-servers", D6O_NAME_SERVERS, OPT_IPV6_ADDRESS_TYPE, true,
+ { "dns-servers", D6O_NAME_SERVERS, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "domain-search", D6O_DOMAIN_SEARCH, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
- { "ia-pd", D6O_IA_PD, OPT_RECORD_TYPE, false, RECORD_DEF(IA_PD_RECORDS), "" },
- { "iaprefix", D6O_IAPREFIX, OPT_RECORD_TYPE, false,
+ { "domain-search", D6O_DOMAIN_SEARCH, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, true, NO_RECORD_DEF, "" },
+ { "ia-pd", D6O_IA_PD, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(IA_PD_RECORDS), "" },
+ { "iaprefix", D6O_IAPREFIX, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(IA_PREFIX_RECORDS), "" },
- { "nis-servers", D6O_NIS_SERVERS, OPT_IPV6_ADDRESS_TYPE, true,
+ { "nis-servers", D6O_NIS_SERVERS, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "nisp-servers", D6O_NISP_SERVERS, OPT_IPV6_ADDRESS_TYPE, true,
+ { "nisp-servers", D6O_NISP_SERVERS, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "nis-domain-name", D6O_NIS_DOMAIN_NAME, OPT_FQDN_TYPE, true,
+ { "nis-domain-name", D6O_NIS_DOMAIN_NAME, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, true,
NO_RECORD_DEF, "" },
- { "nisp-domain-name", D6O_NISP_DOMAIN_NAME, OPT_FQDN_TYPE, true,
+ { "nisp-domain-name", D6O_NISP_DOMAIN_NAME, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, true,
NO_RECORD_DEF, "" },
- { "sntp-servers", D6O_SNTP_SERVERS, OPT_IPV6_ADDRESS_TYPE, true,
+ { "sntp-servers", D6O_SNTP_SERVERS, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
{ "information-refresh-time", D6O_INFORMATION_REFRESH_TIME,
- OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "bcmcs-server-dns", D6O_BCMCS_SERVER_D, OPT_FQDN_TYPE, true,
+ DHCP6_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "bcmcs-server-dns", D6O_BCMCS_SERVER_D, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, true,
NO_RECORD_DEF, "" },
- { "bcmcs-server-addr", D6O_BCMCS_SERVER_A, OPT_IPV6_ADDRESS_TYPE, true,
+ { "bcmcs-server-addr", D6O_BCMCS_SERVER_A, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "geoconf-civic", D6O_GEOCONF_CIVIC, OPT_RECORD_TYPE, false,
+ { "geoconf-civic", D6O_GEOCONF_CIVIC, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(GEOCONF_CIVIC_RECORDS), "" },
- { "remote-id", D6O_REMOTE_ID, OPT_RECORD_TYPE, false,
+ { "remote-id", D6O_REMOTE_ID, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(REMOTE_ID_RECORDS), "" },
- { "subscriber-id", D6O_SUBSCRIBER_ID, OPT_BINARY_TYPE, false,
+ { "subscriber-id", D6O_SUBSCRIBER_ID, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false,
NO_RECORD_DEF, "" },
- { "client-fqdn", D6O_CLIENT_FQDN, OPT_RECORD_TYPE, false,
+ { "client-fqdn", D6O_CLIENT_FQDN, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(CLIENT_FQDN_RECORDS), "" },
- { "pana-agent", D6O_PANA_AGENT, OPT_IPV6_ADDRESS_TYPE, true,
+ { "pana-agent", D6O_PANA_AGENT, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "new-posix-timezone", D6O_NEW_POSIX_TIMEZONE, OPT_STRING_TYPE, false,
+ { "new-posix-timezone", D6O_NEW_POSIX_TIMEZONE, DHCP6_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
- { "new-tzdb-timezone", D6O_NEW_TZDB_TIMEZONE, OPT_STRING_TYPE, false,
+ { "new-tzdb-timezone", D6O_NEW_TZDB_TIMEZONE, DHCP6_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
- { "ero", D6O_ERO, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
- { "lq-query", D6O_LQ_QUERY, OPT_RECORD_TYPE, false,
+ { "ero", D6O_ERO, DHCP6_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ { "lq-query", D6O_LQ_QUERY, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(LQ_QUERY_RECORDS), DHCP6_OPTION_SPACE },
- { "client-data", D6O_CLIENT_DATA, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
+ { "client-data", D6O_CLIENT_DATA, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
DHCP6_OPTION_SPACE },
- { "clt-time", D6O_CLT_TIME, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "lq-relay-data", D6O_LQ_RELAY_DATA, OPT_RECORD_TYPE, false,
+ { "clt-time", D6O_CLT_TIME, DHCP6_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "lq-relay-data", D6O_LQ_RELAY_DATA, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(LQ_RELAY_DATA_RECORDS), "" },
- { "lq-client-link", D6O_LQ_CLIENT_LINK, OPT_IPV6_ADDRESS_TYPE, true,
+ { "lq-client-link", D6O_LQ_CLIENT_LINK, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "v6-lost", D6O_V6_LOST, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" },
- { "capwap-ac-v6", D6O_CAPWAP_AC_V6, OPT_IPV6_ADDRESS_TYPE, true,
+ { "v6-lost", D6O_V6_LOST, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" },
+ { "capwap-ac-v6", D6O_CAPWAP_AC_V6, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "relay-id", D6O_RELAY_ID, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "v6-access-domain", D6O_V6_ACCESS_DOMAIN, OPT_FQDN_TYPE, false,
+ { "relay-id", D6O_RELAY_ID, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "v6-access-domain", D6O_V6_ACCESS_DOMAIN, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, false,
NO_RECORD_DEF, "" },
- { "sip-ua-cs-list", D6O_SIP_UA_CS_LIST, OPT_FQDN_TYPE, true,
+ { "sip-ua-cs-list", D6O_SIP_UA_CS_LIST, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, true,
NO_RECORD_DEF, "" },
- { "bootfile-url", D6O_BOOTFILE_URL, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
- { "bootfile-param", D6O_BOOTFILE_PARAM, OPT_TUPLE_TYPE, true, NO_RECORD_DEF, "" },
- { "client-arch-type", D6O_CLIENT_ARCH_TYPE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
- { "nii", D6O_NII, OPT_RECORD_TYPE, false, RECORD_DEF(CLIENT_NII_RECORDS), "" },
- { "aftr-name", D6O_AFTR_NAME, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" },
- { "erp-local-domain-name", D6O_ERP_LOCAL_DOMAIN_NAME, OPT_FQDN_TYPE, false,
+ { "bootfile-url", D6O_BOOTFILE_URL, DHCP6_OPTION_SPACE, OPT_STRING_TYPE, false, NO_RECORD_DEF, "" },
+ { "bootfile-param", D6O_BOOTFILE_PARAM, DHCP6_OPTION_SPACE, OPT_TUPLE_TYPE, true, NO_RECORD_DEF, "" },
+ { "client-arch-type", D6O_CLIENT_ARCH_TYPE, DHCP6_OPTION_SPACE, OPT_UINT16_TYPE, true, NO_RECORD_DEF, "" },
+ { "nii", D6O_NII, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, false, RECORD_DEF(CLIENT_NII_RECORDS), "" },
+ { "aftr-name", D6O_AFTR_NAME, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, false, NO_RECORD_DEF, "" },
+ { "erp-local-domain-name", D6O_ERP_LOCAL_DOMAIN_NAME, DHCP6_OPTION_SPACE, OPT_FQDN_TYPE, false,
NO_RECORD_DEF, "" },
- { "rsoo", D6O_RSOO, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, "rsoo-opts" },
- { "pd-exclude", D6O_PD_EXCLUDE, OPT_IPV6_PREFIX_TYPE, false, NO_RECORD_DEF, "" },
- { "rdnss-selection", D6O_RDNSS_SELECTION, OPT_RECORD_TYPE, true,
+ { "rsoo", D6O_RSOO, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF, "rsoo-opts" },
+ { "pd-exclude", D6O_PD_EXCLUDE, DHCP6_OPTION_SPACE, OPT_IPV6_PREFIX_TYPE, false, NO_RECORD_DEF, "" },
+ { "rdnss-selection", D6O_RDNSS_SELECTION, DHCP6_OPTION_SPACE, OPT_RECORD_TYPE, true,
RECORD_DEF(V6_RDNSS_SELECT_RECORDS), "" },
- { "client-linklayer-addr", D6O_CLIENT_LINKLAYER_ADDR, OPT_BINARY_TYPE, false,
+ { "client-linklayer-addr", D6O_CLIENT_LINKLAYER_ADDR, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false,
NO_RECORD_DEF, "" },
- { "link-address", D6O_LINK_ADDRESS, OPT_IPV6_ADDRESS_TYPE, false,
+ { "link-address", D6O_LINK_ADDRESS, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, false,
NO_RECORD_DEF, "" },
- { "solmax-rt", D6O_SOL_MAX_RT, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "inf-max-rt", D6O_INF_MAX_RT, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
- { "dhcpv4-message", D6O_DHCPV4_MSG, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
- { "dhcp4o6-server-addr", D6O_DHCPV4_O_DHCPV6_SERVER, OPT_IPV6_ADDRESS_TYPE, true,
+ { "solmax-rt", D6O_SOL_MAX_RT, DHCP6_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "inf-max-rt", D6O_INF_MAX_RT, DHCP6_OPTION_SPACE, OPT_UINT32_TYPE, false, NO_RECORD_DEF, "" },
+ { "dhcpv4-message", D6O_DHCPV4_MSG, DHCP6_OPTION_SPACE, OPT_BINARY_TYPE, false, NO_RECORD_DEF, "" },
+ { "dhcp4o6-server-addr", D6O_DHCPV4_O_DHCPV6_SERVER, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "v6-captive-portal", D6O_V6_CAPTIVE_PORTAL, OPT_STRING_TYPE, false,
+ { "v6-captive-portal", D6O_V6_CAPTIVE_PORTAL, DHCP6_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
- { "relay-source-port", D6O_RELAY_SOURCE_PORT, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
- { "ipv6-address-andsf", D6O_IPV6_ADDRESS_ANDSF, OPT_IPV6_ADDRESS_TYPE, true,
+ { "relay-source-port", D6O_RELAY_SOURCE_PORT, DHCP6_OPTION_SPACE, OPT_UINT16_TYPE, false, NO_RECORD_DEF, "" },
+ { "ipv6-address-andsf", D6O_IPV6_ADDRESS_ANDSF, DHCP6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE, true,
NO_RECORD_DEF, "" },
- { "s46-cont-mape", D6O_S46_CONT_MAPE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
+ { "s46-cont-mape", D6O_S46_CONT_MAPE, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
MAPE_V6_OPTION_SPACE },
- { "s46-cont-mapt", D6O_S46_CONT_MAPT, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
+ { "s46-cont-mapt", D6O_S46_CONT_MAPT, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
MAPT_V6_OPTION_SPACE },
- { "s46-cont-lw", D6O_S46_CONT_LW, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
+ { "s46-cont-lw", D6O_S46_CONT_LW, DHCP6_OPTION_SPACE, OPT_EMPTY_TYPE, false, NO_RECORD_DEF,
LW_V6_OPTION_SPACE }
// @todo There is still a bunch of options for which we have to provide
@@ -488,14 +488,6 @@ const int STANDARD_V6_OPTION_DEFINITIONS_SIZE =
sizeof(STANDARD_V6_OPTION_DEFINITIONS) /
sizeof(STANDARD_V6_OPTION_DEFINITIONS[0]);
-// Option definitions that belong to two or more option spaces are defined here.
-const OptionDefParams OPTION_DEF_PARAMS_S46_BR = { "s46-br", D6O_S46_BR,
- OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" };
-const OptionDefParams OPTION_DEF_PARAMS_S46_RULE = { "s46-rule", D6O_S46_RULE,
- OPT_RECORD_TYPE, false, RECORD_DEF(S46_RULE), V4V6_RULE_OPTION_SPACE };
-const OptionDefParams OPTION_DEF_PARAMS_S46_PORTPARAMS = { "s46-portparams",
- D6O_S46_PORTPARAMS, OPT_RECORD_TYPE, false, RECORD_DEF(S46_PORTPARAMS), "" };
-
/// @brief Definitions of vendor-specific DHCPv6 options, defined by ISC.
/// 4o6-* options are used for inter-process communication. For details, see
/// https://gitlab.isc.org/isc-projects/kea/wikis/designs/dhcpv4o6-design
@@ -503,11 +495,11 @@ const OptionDefParams OPTION_DEF_PARAMS_S46_PORTPARAMS = { "s46-portparams",
/// @todo: As those options are defined by ISC, they do not belong in std_option_defs.h.
/// We need to move them to a separate file, e.g. isc_option_defs.h
const OptionDefParams ISC_V6_OPTION_DEFINITIONS[] = {
- { "4o6-interface", ISC_V6_4O6_INTERFACE, OPT_STRING_TYPE, false,
+ { "4o6-interface", ISC_V6_4O6_INTERFACE, ISC_V6_OPTION_SPACE, OPT_STRING_TYPE, false,
NO_RECORD_DEF, "" },
- { "4o6-source-address", ISC_V6_4O6_SRC_ADDRESS, OPT_IPV6_ADDRESS_TYPE,
+ { "4o6-source-address", ISC_V6_4O6_SRC_ADDRESS, ISC_V6_OPTION_SPACE, OPT_IPV6_ADDRESS_TYPE,
false, NO_RECORD_DEF, "" },
- { "4o6-source-port", ISC_V6_4O6_SRC_PORT, OPT_UINT16_TYPE, false,
+ { "4o6-source-port", ISC_V6_4O6_SRC_PORT, ISC_V6_OPTION_SPACE, OPT_UINT16_TYPE, false,
NO_RECORD_DEF, "" }
};
@@ -517,8 +509,10 @@ const int ISC_V6_OPTION_DEFINITIONS_SIZE =
/// @brief MAPE option definitions
const OptionDefParams MAPE_V6_OPTION_DEFINITIONS[] = {
- OPTION_DEF_PARAMS_S46_BR,
- OPTION_DEF_PARAMS_S46_RULE
+ { "s46-br", D6O_S46_BR, MAPE_V6_OPTION_SPACE,
+ OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "s46-rule", D6O_S46_RULE, MAPE_V6_OPTION_SPACE,
+ OPT_RECORD_TYPE, false, RECORD_DEF(S46_RULE), V4V6_RULE_OPTION_SPACE }
};
const int MAPE_V6_OPTION_DEFINITIONS_SIZE =
@@ -527,8 +521,9 @@ const int MAPE_V6_OPTION_DEFINITIONS_SIZE =
/// @brief MAPT option definitions
const OptionDefParams MAPT_V6_OPTION_DEFINITIONS[] = {
- OPTION_DEF_PARAMS_S46_RULE,
- { "s46-dmr", D6O_S46_DMR, OPT_IPV6_PREFIX_TYPE, false, NO_RECORD_DEF, "" }
+ { "s46-rule", D6O_S46_RULE, MAPT_V6_OPTION_SPACE,
+ OPT_RECORD_TYPE, false, RECORD_DEF(S46_RULE), V4V6_RULE_OPTION_SPACE },
+ { "s46-dmr", D6O_S46_DMR, MAPT_V6_OPTION_SPACE, OPT_IPV6_PREFIX_TYPE, false, NO_RECORD_DEF, "" }
};
const int MAPT_V6_OPTION_DEFINITIONS_SIZE =
@@ -537,8 +532,9 @@ const int MAPT_V6_OPTION_DEFINITIONS_SIZE =
/// @brief LW option definitions
const OptionDefParams LW_V6_OPTION_DEFINITIONS[] = {
- OPTION_DEF_PARAMS_S46_BR,
- { "s46-v4v6bind", D6O_S46_V4V6BIND, OPT_RECORD_TYPE, false,
+ { "s46-br", D6O_S46_BR, LW_V6_OPTION_SPACE,
+ OPT_IPV6_ADDRESS_TYPE, false, NO_RECORD_DEF, "" },
+ { "s46-v4v6bind", D6O_S46_V4V6BIND, LW_V6_OPTION_SPACE, OPT_RECORD_TYPE, false,
RECORD_DEF(S46_V4V6BIND), V4V6_BIND_OPTION_SPACE }
};
@@ -548,7 +544,8 @@ const int LW_V6_OPTION_DEFINITIONS_SIZE =
/// @brief Rule option definitions
const OptionDefParams V4V6_RULE_OPTION_DEFINITIONS[] = {
- OPTION_DEF_PARAMS_S46_PORTPARAMS
+ { "s46-portparams", D6O_S46_PORTPARAMS, V4V6_RULE_OPTION_SPACE,
+ OPT_RECORD_TYPE, false, RECORD_DEF(S46_PORTPARAMS), "" }
};
const int V4V6_RULE_OPTION_DEFINITIONS_SIZE =
@@ -557,7 +554,8 @@ const int V4V6_RULE_OPTION_DEFINITIONS_SIZE =
/// @brief Bind option definitions
const OptionDefParams V4V6_BIND_OPTION_DEFINITIONS[] = {
- OPTION_DEF_PARAMS_S46_PORTPARAMS
+ { "s46-portparams", D6O_S46_PORTPARAMS, V4V6_BIND_OPTION_SPACE,
+ OPT_RECORD_TYPE, false, RECORD_DEF(S46_PORTPARAMS), "" }
};
const int V4V6_BIND_OPTION_DEFINITIONS_SIZE =