27#include <boost/foreach.hpp>
28#include <boost/lexical_cast.hpp>
29#include <boost/shared_array.hpp>
30#include <boost/shared_ptr.hpp>
34#include <unordered_map>
50 { STANDARD_V4_OPTION_DEFINITIONS, STANDARD_V4_OPTION_DEFINITIONS_SIZE,
DHCP4_OPTION_SPACE },
51 { STANDARD_V6_OPTION_DEFINITIONS, STANDARD_V6_OPTION_DEFINITIONS_SIZE,
DHCP6_OPTION_SPACE },
61 { CABLELABS_CLIENT_CONF_DEFINITIONS, CABLELABS_CLIENT_CONF_DEFINITIONS_SIZE,
74map<unsigned short, Option::Factory*> LibDHCP::v4factories_;
77map<unsigned short, Option::Factory*> LibDHCP::v6factories_;
102bool LibDHCP::initialized_ = LibDHCP::initOptionDefs();
106 auto const& container = option_defs_.find(space);
107 if (container != option_defs_.end()) {
108 return (container->second);
123 }
else if (ENTERPRISE_ID_ISC == vendor_id) {
136 if (range.first != range.second) {
137 return (*range.first);
148 if (range.first != range.second) {
149 return (*range.first);
157 const string& name) {
166 if (range.first != range.second) {
167 return (*range.first);
175 const uint16_t code) {
187 if (range.first != range.second) {
188 return (*range.first);
199 if (range.first != range.second) {
200 return (*range.first);
211 if (range.first != range.second) {
212 return (*range.first);
220 return (runtime_option_defs_.getValue().getItems(space));
227 for (
auto const& name : option_space_names) {
229 for (
auto const& def : *container) {
234 runtime_option_defs_ = defs_copy;
239 runtime_option_defs_.reset();
244 runtime_option_defs_.revert();
249 runtime_option_defs_.commit();
257 if (range.first != range.second) {
258 return (*range.first);
269 if (range.first != range.second) {
270 return (*range.first);
289 ((code >= 224) && (code <= 254))));
296 FactoryMap::iterator it;
298 it = v4factories_.find(type);
299 if (it == v4factories_.end()) {
301 "for DHCP v4 option type " << type);
304 it = v6factories_.find(type);
305 if (it == v6factories_.end()) {
307 "for DHCPv6 option type " << type);
311 "Option::V4 or Option::V6");
313 return (it->second(u, type, buf));
322 size_t* relay_msg_offset ,
323 size_t* relay_msg_len ,
330 size_t length = buf.size();
331 size_t last_offset = 0;
350 while (offset < length) {
352 last_offset = offset;
355 if (offset + 4 > length) {
357 return (last_offset);
361 uint16_t opt_type =
readUint16(&buf[offset], 2);
364 uint16_t opt_len =
readUint16(&buf[offset], 2);
367 if (offset + opt_len > length) {
376 return (last_offset);
379 if (opt_type ==
D6O_RELAY_MSG && relay_msg_offset && relay_msg_len) {
381 *relay_msg_offset = offset;
382 *relay_msg_len = opt_len;
390 if (offset + 4 > length) {
394 return (last_offset);
399 buf.begin() + offset + opt_len));
400 options.insert(std::make_pair(opt_type, vendor_opt));
417 range = idx.equal_range(opt_type);
418 num_defs = std::distance(range.first, range.second);
424 range = runtime_idx.equal_range(opt_type);
425 num_defs = std::distance(range.first, range.second);
432 " definitions for option type " << opt_type <<
433 " returned. Currently it is not supported to initialize"
434 " multiple option definitions for the same option code."
435 " This will be supported once support for option spaces"
437 }
else if (num_defs == 0) {
444 buf.begin() + offset,
445 buf.begin() + offset + opt_len));
452 opt = def->optionFactory(
Option::V6, opt_type,
453 buf.begin() + offset,
454 buf.begin() + offset + opt_len,
460 }
catch (
const std::exception& ex) {
462 <<
", opt_len " <<
static_cast<uint16_t
>(opt_len)
463 <<
", error: " << ex.what());
469 options.insert(std::make_pair(opt_type, opt));
475 last_offset = offset;
476 return (last_offset);
484 size_t last_offset = 0;
501 bool flex_pad = (check && (runtime_idx.count(
DHO_PAD) == 0));
502 bool flex_end = (check && (runtime_idx.count(
DHO_END) == 0));
508 vector<uint32_t> count(256, 0);
509 while (offset < buf.size()) {
511 uint8_t opt_type = buf[offset++];
516 if ((opt_type ==
DHO_END) && (space_is_dhcp4 || flex_end)) {
525 if ((opt_type ==
DHO_PAD) && (space_is_dhcp4 || flex_pad)) {
529 if (offset + 1 > buf.size()) {
534 uint8_t opt_len = buf[offset++];
535 if (offset + opt_len > buf.size()) {
541 if (space_is_dhcp4 && opt_len == 0 && opt_type ==
DHO_HOST_NAME) {
548 count[opt_type] += 1;
552 unordered_map<uint8_t, pair<OptionBuffer, uint32_t>> fused;
556 while (offset < buf.size()) {
558 last_offset = offset;
561 uint8_t opt_type = buf[offset++];
566 if ((opt_type ==
DHO_END) && (space_is_dhcp4 || flex_end)) {
570 return (last_offset);
577 if ((opt_type ==
DHO_PAD) && (space_is_dhcp4 || flex_pad)) {
581 if (offset + 1 > buf.size()) {
589 return (last_offset);
592 uint8_t opt_len = buf[offset++];
593 if (offset + opt_len > buf.size()) {
598 return (last_offset);
606 if (space_is_dhcp4 && opt_len == 0 && opt_type ==
DHO_HOST_NAME) {
610 OptionBuffer obuf(buf.begin() + offset, buf.begin() + offset + opt_len);
614 uint32_t opt_count = count[opt_type];
617 previous.insert(previous.end(), obuf.begin(), obuf.end());
618 uint32_t& already_seen = fused[opt_type].second;
620 if (already_seen != opt_count) {
640 range = idx.equal_range(opt_type);
641 num_defs = std::distance(range.first, range.second);
647 range = runtime_idx.equal_range(opt_type);
648 num_defs = std::distance(range.first, range.second);
656 for (
auto const& existing : deferred) {
657 if (existing == opt_type) {
663 deferred.push_back(opt_type);
667 if (space_is_dhcp4 &&
677 " definitions for option type " <<
678 static_cast<int>(opt_type) <<
679 " returned. Currently it is not supported to initialize"
680 " multiple option definitions for the same option code."
681 " This will be supported once support for option spaces"
683 }
else if (num_defs == 0) {
691 opt = def->optionFactory(
Option::V4, opt_type, obuf);
696 }
catch (
const std::exception& ex) {
698 <<
", opt_len: " <<
static_cast<uint16_t
>(opt_len)
699 <<
", error: " << ex.what());
705 options.insert(std::make_pair(opt_type, opt));
708 last_offset = offset;
709 return (last_offset);
718 typedef vector<OpaqueDataTuple> TuplesCollection;
719 map<uint32_t, TuplesCollection> vendors_tuples;
721 BOOST_FOREACH(
auto const& it, range) {
723 auto const&
data = it.second->getData();
725 while ((size =
data.size() - offset) != 0) {
726 if (size <
sizeof(uint32_t)) {
729 "Truncated vendor-class information option"
730 <<
", length=" << size);
738 vendors_tuples[vendor_id].push_back(tuple);
739 offset += tuple.getTotalLength();
743 }
catch (
const isc::Exception&) {
749 if (vendors_tuples.empty()) {
755 for (
auto const& vendor : vendors_tuples) {
756 if (vendor.second.empty()) {
761 for (
size_t i = 0; i < vendor.second.size(); ++i) {
763 vendor_opt->setTuple(0, vendor.second[0]);
765 vendor_opt->addTuple(vendor.second[i]);
778 map<uint32_t, OptionCollection> vendors_data;
780 BOOST_FOREACH(
auto const& it, range) {
782 auto const& data = it.second->getData();
784 while ((size = data.size() - offset) != 0) {
785 if (size <
sizeof(uint32_t)) {
788 "Truncated vendor-specific information option"
789 <<
", length=" << size);
791 uint32_t vendor_id =
readUint32(&data[offset], data.size());
793 const OptionBuffer vendor_buffer(data.begin() + offset, data.end());
796 vendors_data[vendor_id]);
800 }
catch (
const isc::Exception&) {
806 if (vendors_data.empty()) {
812 for (
auto const& vendor : vendors_data) {
814 for (
auto const& option : vendor.second) {
815 vendor_opt->addOption(option.second);
827 extendVivco(options);
828 extendVivso(options);
835 size_t length = buf.size();
846 idx = &(option_defs->get<1>());
851 while (offset < length) {
852 if (offset + 4 > length) {
854 "Vendor option parse failed: truncated header");
857 uint16_t opt_type =
readUint16(&buf[offset], 2);
860 uint16_t opt_len =
readUint16(&buf[offset], 2);
863 if (offset + opt_len > length) {
865 "Vendor option parse failed. Tried to parse "
866 << offset + opt_len <<
" bytes from " << length
867 <<
"-byte long buffer.");
881 idx->equal_range(opt_type);
884 size_t num_defs = std::distance(range.first, range.second);
890 " definitions for option type " << opt_type <<
891 " returned. Currently it is not supported to"
892 " initialize multiple option definitions for the"
893 " same option code. This will be supported once"
894 " support for option spaces is implemented");
895 }
else if (num_defs == 1) {
900 opt = def->optionFactory(
Option::V6, opt_type,
901 buf.begin() + offset,
902 buf.begin() + offset + opt_len);
913 buf.begin() + offset,
914 buf.begin() + offset + opt_len));
919 options.insert(std::make_pair(opt_type, opt));
939 idx = &(option_defs->get<1>());
944 while (offset < buf.size()) {
948 uint8_t data_len = buf[offset++];
950 if (offset + data_len > buf.size()) {
953 "Attempt to parse truncated vendor option");
956 uint8_t offset_end = offset + data_len;
959 while (offset < offset_end) {
960 uint8_t opt_type = buf[offset++];
964 if (offset + 1 > offset_end) {
969 "Attempt to parse truncated vendor option "
970 <<
static_cast<int>(opt_type));
973 uint8_t opt_len = buf[offset++];
974 if (offset + opt_len > offset_end) {
976 "Option parse failed. Tried to parse "
977 << offset + opt_len <<
" bytes from " << buf.size()
978 <<
"-byte long buffer.");
991 idx->equal_range(opt_type);
994 size_t num_defs = std::distance(range.first, range.second);
1000 " option definitions for option type "
1001 << opt_type <<
" returned. Currently it is"
1002 " not supported to initialize multiple option"
1003 " definitions for the same option code."
1004 " This will be supported once support for"
1005 " option spaces is implemented");
1006 }
else if (num_defs == 1) {
1011 opt = def->optionFactory(
Option::V4, opt_type,
1012 buf.begin() + offset,
1013 buf.begin() + offset + opt_len);
1019 buf.begin() + offset,
1020 buf.begin() + offset + opt_len));
1023 options.insert(std::make_pair(opt_type, opt));
1035 bool top,
bool check) {
1045 if (x != options.end()) {
1046 x->second->pack(buf, check);
1050 for (
auto const& option : options) {
1052 switch (option.first) {
1059 end = option.second;
1062 option.second->pack(buf, check);
1068 for (
auto const& option : agent) {
1069 option.second->pack(buf, check);
1074 end->pack(buf, check);
1082 bool result =
false;
1088 if (tries == std::numeric_limits<uint16_t>::max()) {
1090 << tries <<
" times.");
1097 for (
auto const& option : options) {
1102 bool updated =
false;
1103 bool found_suboptions =
false;
1118 if (sub_options.size()) {
1122 used + candidate->getHeaderLen());
1137 if (found_suboptions || candidate->len() > (255 - used)) {
1140 scoped_options.push_back(candidate_scoped_options);
1143 copy.erase(option.first);
1153 for (
auto const& sub_option : candidate->getMutableOptions()) {
1155 candidate->getType(),
1157 data_sub_option->addOption(sub_option.second);
1158 distinct_options.insert(make_pair(candidate->getType(), data_sub_option));
1167 candidate->getType(),
1169 candidate->getData().end())));
1171 data_option->pack(buf,
false);
1172 uint32_t header_len = candidate->getHeaderLen();
1174 if (used >= 255 - header_len) {
1176 << candidate->getType() <<
" after parent already used "
1181 uint8_t len = 255 - header_len - used;
1186 uint32_t size = buf.
getLength() - header_len;
1204 copy.erase(option.first);
1207 uint32_t offset = 0;
1210 for (; offset != size;) {
1214 if (size - offset < len) {
1215 len = size - offset;
1222 candidate->getType(),
1224 data + offset + len)));
1229 copy.insert(make_pair(candidate->getType(), new_option));
1231 }
else if ((candidate->len() > (255 - used)) && size) {
1236 copy.insert(make_pair(candidate->getType(), data_option));
1241 copy.insert(distinct_options.begin(), distinct_options.end());
1261 for (
auto const& option : options) {
1262 option.second->pack(buf);
1268 pair<OptionCollection::const_iterator, OptionCollection::const_iterator>
1270 if (range.first == range.second) {
1274 static_cast<void>(options.erase(range.first, range.second));
1276 for (
auto const& opt : ntp_servers) {
1277 for (
auto const& sub : opt.second->getOptions()) {
1279 new_option->addOption(sub.second);
1291 if (v6factories_.find(opt_type) != v6factories_.end()) {
1293 <<
"for option type " << opt_type);
1295 v6factories_[opt_type] = factory;
1302 if (opt_type == 0) {
1308 if (opt_type > 254) {
1311 if (v4factories_.find(opt_type) != v4factories_.end()) {
1313 <<
"for option type " << opt_type);
1315 v4factories_[opt_type] = factory;
1326LibDHCP::initOptionDefs() {
1327 for (uint32_t i = 0; OPTION_DEF_PARAMS[i].optionDefParams; ++i) {
1328 string space = OPTION_DEF_PARAMS[i].space;
1331 OPTION_DEF_PARAMS[i].optionDefParams,
1332 OPTION_DEF_PARAMS[i].size);
1356 if ((option_space.size() < 8) || (option_space.substr(0,7) !=
"vendor-")) {
1363 string x = option_space.substr(7);
1365 check = boost::lexical_cast<int64_t>(x);
1366 }
catch (
const boost::bad_lexical_cast &) {
1370 if ((check < 0) || (check > std::numeric_limits<uint32_t>::max())) {
1375 return (
static_cast<uint32_t
>(check));
1380 size_t params_size) {
1390 for (
size_t i = 0; i < params_size; ++i) {
1391 string encapsulates(params[i].encapsulates);
1392 if (!encapsulates.empty() && params[i].
array) {
1394 <<
"option with code '" << params[i].code
1395 <<
"' may not encapsulate option space '"
1396 << encapsulates <<
"' because the definition"
1397 <<
" indicates that this option comprises an array"
1405 if (encapsulates.empty()) {
1418 params[i].encapsulates));
1422 for (
size_t rec = 0; rec < params[i].
records_size; ++rec) {
1423 definition->addRecordField(params[i].records[rec]);
1427 definition->validate();
1439 static_cast<void>(defs->push_back(definition));
1447 static bool check_once(
true);
1465 static bool check_once(
true);
1483 static bool check_once(
true);
1501 static bool check_once(
true);
1519 static bool check_once(
true);
1537 static bool check_once(
true);
1555 static bool check_once(
true);
1573 static bool check_once(
true);
1591 static bool check_once(
true);
1609 static bool check_once(
true);
1627 static bool check_once(
true);
1645 static bool check_once(
true);
1663 static bool check_once(
true);
1681 static bool check_once(
true);
A generic exception that is thrown if a parameter given to a method is considered invalid in that con...
This is a base class for exceptions thrown from the DNS library module.
A generic exception that is thrown when an unexpected error condition occurs.
static size_t unpackOptions4(const OptionBuffer &buf, const std::string &option_space, isc::dhcp::OptionCollection &options, std::list< uint16_t > &deferred, bool flexible_pad_end=false)
Parses provided buffer as DHCPv4 options and creates Option objects.
static void OptionFactoryRegister(Option::Universe u, uint16_t type, Option::Factory *factory)
Registers factory method that produces options of specific option types.
static const OptionDefinition & D6O_LQ_RELAY_DATA_DEF()
Get definition of D6O_LQ_RELAY_DATA option.
static const OptionDefinition & D6O_NTP_SERVER_DEF()
Get definition of D6O_NTP_SERVER option.
static const OptionDefinition & D6O_RSOO_DEF()
Get definition of D6O_RSOO option.
static size_t MAX_RECURSION_LEVEL
Maximum level of recursion unpacking options.
static size_t unpackVendorOptions6(const uint32_t vendor_id, const OptionBuffer &buf, isc::dhcp::OptionCollection &options)
Parses provided buffer as DHCPv6 vendor options and creates Option objects.
static const OptionDefContainerPtr getOptionDefs(const std::string &space)
Returns collection of option definitions.
static void splitNtpServerOptions6(isc::dhcp::OptionCollection &options)
Split NTP server option to one suboption per instance.
static bool shouldDeferOptionUnpack(const std::string &space, const uint16_t code)
Checks if an option unpacking has to be deferred.
static isc::dhcp::OptionPtr optionFactory(isc::dhcp::Option::Universe u, uint16_t type, const OptionBuffer &buf)
Factory function to create instance of option.
static void setRuntimeOptionDefs(const OptionDefSpaceContainer &defs)
Copies option definitions created at runtime.
static OptionDefinitionPtr getOptionDef(const std::string &space, const uint16_t code)
Return the first option definition matching a particular option code.
static OptionDefinitionPtr getVendorOptionDef(const Option::Universe u, const uint32_t vendor_id, const uint16_t code)
Returns vendor option definition for a given vendor-id and code.
static size_t unpackOptions6(const OptionBuffer &buf, const std::string &option_space, isc::dhcp::OptionCollection &options, size_t *relay_msg_offset=0, size_t *relay_msg_len=0, size_t rec_level=0)
Parses provided buffer as DHCPv6 options and creates Option objects.
static OptionDefContainerPtr getLastResortOptionDefs(const std::string &space)
Returns last resort option definitions for specified option space name.
static const OptionDefinition & D6O_LQ_QUERY_DEF()
Get definition of D6O_LQ_QUERY option.
static OptionDefContainerPtr getRuntimeOptionDefs(const std::string &space)
Returns runtime (non-standard) option definitions for specified option space name.
static void commitRuntimeOptionDefs()
Commits runtime option definitions.
static void clearRuntimeOptionDefs()
Removes runtime option definitions.
static const OptionDefinition & D6O_IAADDR_DEF()
Get definition of D6O_IAADDR option.
static void extendVendorOptions4(isc::dhcp::OptionCollection &options)
Extend vendor options from fused options in multiple OptionVendor or OptionVendorClass options and ad...
static const OptionDefinition & D6O_CLIENT_DATA_DEF()
Get definition of D6O_CLIENT_DATA option.
static void packOptions4(isc::util::OutputBuffer &buf, const isc::dhcp::OptionCollection &options, bool top=false, bool check=true)
Stores DHCPv4 options in a buffer.
static bool splitOptions4(isc::dhcp::OptionCollection &options, ScopedOptionsCopyContainer &scopedOptions, uint32_t used=0)
Split long options in multiple options with the same option code (RFC3396).
static const OptionDefinition & DHO_DHCP_REQUESTED_ADDRESS_DEF()
Get definition of DHO_DHCP_REQUESTED_ADDRESS option.
static const OptionDefinition & D6O_BOOTFILE_URL_DEF()
Get definition of D6O_BOOTFILE_URL option.
static const OptionDefinition & DHO_DHCP_SERVER_IDENTIFIER_DEF()
Get definition of DHO_DHCP_SERVER_IDENTIFIER option.
static const OptionDefinition & DHO_SUBNET_SELECTION_DEF()
Get definition of DHO_SUBNET_SELECTION option.
static void revertRuntimeOptionDefs()
Reverts uncommitted changes to runtime option definitions.
static const OptionDefinition & DHO_DOMAIN_SEARCH_DEF()
Get definition of DHO_DOMAIN_SEARCH option.
static const OptionDefContainerPtr getVendorOptionDefs(Option::Universe u, const uint32_t vendor_id)
Returns option definitions for given universe and vendor.
static const OptionDefinition & D6O_CLIENT_FQDN_DEF()
Get definition of D6O_CLIENT_FQDN option.
static const OptionDefinition & DHO_DHCP_AGENT_OPTIONS_DEF()
Get definition of DHO_DHCP_AGENT_OPTIONS option.
static uint32_t optionSpaceToVendorId(const std::string &option_space)
Converts option space name to vendor id.
static OptionDefinitionPtr getRuntimeOptionDef(const std::string &space, const uint16_t code)
Returns runtime (non-standard) option definition by space and option code.
static void packOptions6(isc::util::OutputBuffer &buf, const isc::dhcp::OptionCollection &options)
Stores DHCPv6 options in a buffer.
static const OptionDefinition & DHO_STATUS_CODE_DEF()
Get definition of DHO_STATUS_CODE option.
static OptionDefinitionPtr getLastResortOptionDef(const std::string &space, const uint16_t code)
Returns last resort option definition by space and option code.
static size_t unpackVendorOptions4(const uint32_t vendor_id, const OptionBuffer &buf, isc::dhcp::OptionCollection &options)
Parses provided buffer as DHCPv4 vendor options and creates Option objects.
Exception to be thrown when the operation on OpaqueDataTuple object results in an error.
Represents a single instance of the opaque data preceded by length.
Option with defined data fields represented as buffers that can be accessed using data field index.
Class of option definition space container.
void addItem(const OptionDefinitionPtr &def)
Adds a new option definition to the container.
Base class representing a DHCP option definition.
Wrapper exception thrown by unpackOptionsX functions to add option type and len to the underlying err...
std::list< Selector > getOptionSpaceNames() const
Get a list of existing option spaces.
ItemsContainerPtr getItems(const Selector &option_space) const
Get all items for the particular option space.
This class encapsulates DHCPv6 Vendor Class and DHCPv4 V-I Vendor Class options.
This class represents vendor-specific information option.
Universe
defines option universe DHCPv4 or DHCPv6
OptionPtr Factory(Option::Universe u, uint16_t type, const OptionBuffer &buf)
a factory function prototype
RAII object enabling duplication of the stored options and restoring the original options on destruct...
Exception thrown during option unpacking This exception is thrown when an error has occurred,...
Exception thrown during option unpacking This exception is thrown when an error has occurred unpackin...
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
const uint8_t * getData() const
Return a pointer to the head of the data stored in the buffer.
size_t getLength() const
Return the length of data written in the buffer.
This class implements set/commit mechanism for a single object.
#define DOCSIS3_V6_OPTION_SPACE
#define VENDOR_ID_CABLE_LABS
#define DOCSIS3_V4_OPTION_SPACE
global docsis3 option spaces
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
#define isc_throw_assert(expr)
Replacement for assert() that throws if the expression is false.
void initOptionSpace(OptionDefContainerPtr &defs, const OptionDefParams *params, size_t params_size)
const OptionDefContainerPtr null_option_def_container_(new OptionDefContainer())
ElementPtr copy(ConstElementPtr from, unsigned level)
Copy the data up to a nesting level.
boost::shared_ptr< OptionVendor > OptionVendorPtr
Pointer to a vendor option.
@ DHO_DHCP_SERVER_IDENTIFIER
@ DHO_DHCP_REQUESTED_ADDRESS
@ DHO_VENDOR_ENCAPSULATED_OPTIONS
std::multimap< unsigned int, OptionPtr > OptionCollection
A collection of DHCP (v4 or v6) options.
const OptionDefParams DOCSIS3_V4_OPTION_DEFINITIONS[]
Definitions of standard DHCPv4 options.
const char * DOCSIS3_CLASS_EROUTER
The class as specified in vendor-class option by the devices.
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
const int DOCSIS3_V6_OPTION_DEFINITIONS_SIZE
Number of option definitions defined.
std::pair< OptionDefContainerNameIndex::const_iterator, OptionDefContainerNameIndex::const_iterator > OptionDefContainerNameRange
Pair of iterators to represent the range of options definitions having the same option name.
const char * DOCSIS3_CLASS_MODEM
DOCSIS3.0 compatible cable modem.
boost::shared_ptr< OptionVendorClass > OptionVendorClassPtr
Defines a pointer to the OptionVendorClass.
std::map< std::string, OptionDefContainerPtr > OptionDefContainers
Container that holds option definitions for various option spaces.
std::shared_ptr< ScopedSubOptionsCopy > ScopedOptionsCopyPtr
A pointer to a ScopedSubOptionsCopy object.
OptionDefContainer::nth_index< 2 >::type OptionDefContainerNameIndex
Type of the index #2 - option name.
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
std::pair< OptionDefContainerTypeIndex::const_iterator, OptionDefContainerTypeIndex::const_iterator > OptionDefContainerTypeRange
Pair of iterators to represent the range of options definitions having the same option type value.
boost::multi_index_container< OptionDefinitionPtr, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::hashed_non_unique< boost::multi_index::const_mem_fun< OptionDefinition, uint16_t, &OptionDefinition::getCode > >, boost::multi_index::hashed_non_unique< boost::multi_index::const_mem_fun< OptionDefinition, std::string, &OptionDefinition::getName > >, boost::multi_index::ordered_non_unique< boost::multi_index::const_mem_fun< data::BaseStampedElement, boost::posix_time::ptime, &data::StampedElement::getModificationTime > >, boost::multi_index::hashed_non_unique< boost::multi_index::tag< OptionIdIndexTag >, boost::multi_index::const_mem_fun< data::BaseStampedElement, uint64_t, &data::BaseStampedElement::getId > > > > OptionDefContainer
Multi index container for DHCP option definitions.
const int DOCSIS3_V4_OPTION_DEFINITIONS_SIZE
Number of option definitions defined.
OptionDefContainer::nth_index< 1 >::type OptionDefContainerTypeIndex
Type of the index #1 - option type.
boost::shared_ptr< Option > OptionPtr
std::vector< ScopedOptionsCopyPtr > ScopedOptionsCopyContainer
A container of ScopedOptionsCopyPtr objects.
const OptionDefParams DOCSIS3_V6_OPTION_DEFINITIONS[]
Definitions of standard DHCPv6 options.
boost::shared_ptr< OptionDefContainer > OptionDefContainerPtr
Pointer to an option definition container.
uint16_t readUint16(void const *const buffer, size_t const length)
uint16_t wrapper over readUint.
uint32_t readUint32(void const *const buffer, size_t const length)
uint32_t wrapper over readUint.
Defines the logger used by the top-level component of kea-lfc.
#define V4V6_BIND_OPTION_SPACE
#define LAST_RESORT_V4_OPTION_SPACE
#define DHCP4_OPTION_SPACE
global std option spaces
#define ISC_V6_OPTION_SPACE
#define V6_NTP_SERVER_SPACE
#define V4V6_RULE_OPTION_SPACE
#define MAPE_V6_OPTION_SPACE
#define DHCP_AGENT_OPTION_SPACE
encapsulated option spaces
#define LW_V6_OPTION_SPACE
#define DHCP6_OPTION_SPACE
#define MAPT_V6_OPTION_SPACE
#define CABLELABS_CLIENT_CONF_SPACE
Encapsulation of option definition parameters and the structure size.
Parameters being used to make up an option definition.