Kea 2.7.6
isc::dhcp::OptionSpace6 Class Reference

DHCPv6 option space with enterprise number assigned. More...

#include <option_space.h>

+ Inheritance diagram for isc::dhcp::OptionSpace6:

Public Member Functions

 OptionSpace6 (const std::string &name)
 Constructor for non-vendor-specific options.
 
 OptionSpace6 (const std::string &name, const uint32_t enterprise_number)
 Constructor for vendor-specific options.
 
uint32_t getEnterpriseNumber () const
 Return enterprise number for the option space.
 
void setVendorSpace (const uint32_t enterprise_number)
 Mark option space as vendor specific.
 
- Public Member Functions inherited from isc::dhcp::OptionSpace
 OptionSpace (const std::string &name, const bool vendor_space=false)
 Constructor.
 
void clearVendorSpace ()
 Mark option space as non-vendor space.
 
const std::string & getName () const
 Return option space name.
 
bool isVendorSpace () const
 Check if option space is vendor specific.
 
void setVendorSpace ()
 Mark option space as vendor specific.
 

Additional Inherited Members

- Static Public Member Functions inherited from isc::dhcp::OptionSpace
static bool validateName (const std::string &name)
 Checks that the provided option space name is valid.
 

Detailed Description

DHCPv6 option space with enterprise number assigned.

This class extends the base class with the support for enterprise numbers. The enterprise numbers are assigned by IANA to various organizations and they are carried as uint32_t integers in DHCPv6 Vendor Specific Information Options (VSIO). For more information refer to RFC 8415. All option spaces that group VSIO options must have enterprise number set. It can be set using a constructor or setVendorSpace function. The extra functionality of this class (enterprise numbers) allows to represent DHCPv6 vendor-specific option spaces but this class is also intended to be used for all other DHCPv6 option spaces. That way all DHCPv6 option spaces can be stored in the container holding OptionSpace6 objects. Also, it is easy to mark vendor-specific option space as non-vendor specific option space (and the other way around) without a need to cast between OptionSpace and OptionSpace6 types.

Definition at line 136 of file option_space.h.

Constructor & Destructor Documentation

◆ OptionSpace6() [1/2]

isc::dhcp::OptionSpace6::OptionSpace6 ( const std::string & name)

Constructor for non-vendor-specific options.

This constructor marks option space as non-vendor specific.

Parameters
nameoption space name.
Exceptions
isc::dhcp::InvalidOptionSpaceif given option space name contains invalid characters or is empty. This constructor uses OptionSpace::validateName function to check that the specified name is correct.

Definition at line 47 of file option_space.cc.

◆ OptionSpace6() [2/2]

isc::dhcp::OptionSpace6::OptionSpace6 ( const std::string & name,
const uint32_t enterprise_number )

Constructor for vendor-specific options.

This constructor marks option space as vendor specific and sets enterprise number to a given value.

Parameters
nameoption space name.
enterprise_numberenterprise number.
Exceptions
isc::dhcp::InvalidOptionSpaceif given option space name contains invalid characters or is empty. This constructor uses OptionSpace::validateName function to check that the specified name is correct.

Definition at line 52 of file option_space.cc.

Member Function Documentation

◆ getEnterpriseNumber()

uint32_t isc::dhcp::OptionSpace6::getEnterpriseNumber ( ) const
inline

Return enterprise number for the option space.

Returns
enterprise number.

Definition at line 168 of file option_space.h.

◆ setVendorSpace()

void isc::dhcp::OptionSpace6::setVendorSpace ( const uint32_t enterprise_number)

Mark option space as vendor specific.

Parameters
enterprise_numberenterprise number.

Definition at line 59 of file option_space.cc.

References isc::dhcp::OptionSpace::setVendorSpace().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: