30 typedef std::map<unsigned short, Option::Factory*>
FactoryMap;
61 const std::string& name);
71 const uint32_t vendor_id,
84 const uint32_t vendor_id,
85 const std::string& name);
106 const std::string& name);
123 const uint16_t code);
132 const std::string& name);
151 const uint16_t code);
244 const std::string& option_space,
246 size_t* relay_msg_offset = 0,
247 size_t* relay_msg_len = 0);
269 const std::string& option_space,
271 std::list<uint16_t>& deferred,
272 bool flexible_pad_end =
false);
294 const uint32_t vendor_id);
378 static bool initOptionDefs();
381 static bool initialized_;
384 static FactoryMap v4factories_;
387 static FactoryMap v6factories_;
static OptionDefContainerPtr getRuntimeOptionDefs(const std::string &space)
Returns runtime (non-standard) option definitions for specified option space name.
static OptionDefinitionPtr getRuntimeOptionDef(const std::string &space, const uint16_t code)
Returns runtime (non-standard) option definition by space and option code.
static void clearRuntimeOptionDefs()
Removes runtime option definitions.
static void packOptions6(isc::util::OutputBuffer &buf, const isc::dhcp::OptionCollection &options)
Stores DHCPv6 options in a buffer.
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.
boost::shared_ptr< Option > OptionPtr
Universe
defines option universe DHCPv4 or DHCPv6
static void setRuntimeOptionDefs(const OptionDefSpaceContainer &defs)
Copies option definitions created at runtime.
static void commitRuntimeOptionDefs()
Commits runtime option definitions.
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Class of option definition space container.
static void packOptions4(isc::util::OutputBuffer &buf, const isc::dhcp::OptionCollection &options, bool top=false)
Stores DHCPv4 options in a buffer.
static isc::dhcp::OptionPtr optionFactory(isc::dhcp::Option::Universe u, uint16_t type, const OptionBuffer &buf)
Factory function to create instance of option.
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)
Parses provided buffer as DHCPv6 options and creates Option objects.
std::map< unsigned short, Option::Factory * > FactoryMap
Map of factory functions.
static const OptionDefContainerPtr getVendorOptionDefs(Option::Universe u, const uint32_t vendor_id)
Returns option definitions for given universe and vendor.
boost::shared_ptr< OptionDefContainer > OptionDefContainerPtr
Pointer to an option definition container.
std::multimap< unsigned int, OptionPtr > OptionCollection
A collection of DHCP (v4 or v6) options.
static OptionDefinitionPtr getOptionDef(const std::string &space, const uint16_t code)
Return the first option definition matching a particular option code.
The OutputBuffer class is a buffer abstraction for manipulating mutable data.
static void revertRuntimeOptionDefs()
Reverts uncommitted changes to runtime option definitions.
std::map< std::string, OptionDefContainerPtr > OptionDefContainers
Container that holds option definitions for various option spaces.
Defines the logger used by the top-level component of kea-dhcp-ddns.
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 OptionDefinitionPtr getLastResortOptionDef(const std::string &space, const uint16_t code)
Returns last resort option definition by space and option code.
boost::shared_ptr< OptionDefinition > OptionDefinitionPtr
Pointer to option definition object.
static uint32_t optionSpaceToVendorId(const std::string &option_space)
Converts option space name to vendor id.
static void OptionFactoryRegister(Option::Universe u, uint16_t type, Option::Factory *factory)
Registers factory method that produces options of specific option types.
static bool shouldDeferOptionUnpack(const std::string &space, const uint16_t code)
Checks if an option unpacking has to be deferred.
This class implements set/commit mechanism for a single object.
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.
OptionPtr Factory(Option::Universe u, uint16_t type, const OptionBuffer &buf)
a factory function prototype
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 const OptionDefContainerPtr getOptionDefs(const std::string &space)
Returns collection of option definitions.
static OptionDefContainerPtr getLastResortOptionDefs(const std::string &space)
Returns last resort option definitions for specified option space name.