Implements the functionality of DHCPv6 options. More...
#include "dhcp6-options.h"
Public Types | |
enum class | OptionType { OPTION_INIT = 0 , OPTION_CLIENTID = 1 , OPTION_SERVERID = 2 , OPTION_IA_NA = 3 , OPTION_IA_TA = 4 , OPTION_IAADDR = 5 , OPTION_ORO = 6 , OPTION_PREFERENCE = 7 , OPTION_ELAPSED_TIME = 8 , OPTION_RELAY_MSG = 9 , OPTION_AUTH = 11 , OPTION_UNICAST = 12 , OPTION_STATUS_CODE = 13 , OPTION_RAPID_COMMIT = 14 , OPTION_USER_CLASS = 15 , OPTION_VENDOR_CLASS = 16 , OPTION_VENDOR_OPTS = 17 , OPTION_INTERFACE_ID = 18 , OPTION_RECONF_MSG = 19 , OPTION_RECONF_ACCEPT = 20 , OPTION_IA_PD = 25 , OPTION_IAPREFIX = 26 , OPTION_INFORMATION_REFRESH_TIME = 32 , OPTION_SOL_MAX_RT = 82 , OPTION_INF_MAX_RT = 83 } |
Enum to identify the option type. More... | |
enum class | StatusCodeValues { Success = 0 , UnspecFail = 1 , NoAddrsAvail = 2 , NoBinding = 3 , NotOnLink = 4 , UseMulticast = 5 , NoPrefixAvail = 6 } |
Enum to identify the status code of the operation. More... | |
Public Member Functions | |
Options () | |
Default constructor. | |
Options (OptionType code, uint16_t length) | |
Constructor. | |
OptionType | GetOptionCode () const |
Get the option code. | |
uint16_t | GetOptionLength () const |
Get the option length. | |
void | SetOptionCode (OptionType code) |
Set the option code. | |
void | SetOptionLength (uint16_t length) |
Set the option length. | |
Private Attributes | |
OptionType | m_optionCode |
Option code. | |
uint16_t | m_optionLength |
Option length. | |
Implements the functionality of DHCPv6 options.
Definition at line 33 of file dhcp6-options.h.
|
strong |
Enum to identify the option type.
These symbols and values are defined in [RFC 8415, section 21] (https://datatracker.ietf.org/doc/html/rfc8415#section-21)
Definition at line 57 of file dhcp6-options.h.
|
strong |
Enum to identify the status code of the operation.
These symbols and values are defined in RFC 8415, section 21.13
Enumerator | |
---|---|
Success | |
UnspecFail | |
NoAddrsAvail | |
NoBinding | |
NotOnLink | |
UseMulticast | |
NoPrefixAvail |
Definition at line 41 of file dhcp6-options.h.
ns3::Options::Options | ( | ) |
Default constructor.
Definition at line 26 of file dhcp6-options.cc.
References m_optionCode, m_optionLength, and OPTION_INIT.
ns3::Options::Options | ( | OptionType | code, |
uint16_t | length ) |
Constructor.
code | The option code. |
length | The option length. |
Definition at line 32 of file dhcp6-options.cc.
References m_optionCode, m_optionLength, and NS_LOG_FUNCTION.
Options::OptionType ns3::Options::GetOptionCode | ( | ) | const |
Get the option code.
Definition at line 40 of file dhcp6-options.cc.
References m_optionCode.
Referenced by ns3::Dhcp6Header::Serialize().
uint16_t ns3::Options::GetOptionLength | ( | ) | const |
Get the option length.
Definition at line 53 of file dhcp6-options.cc.
References m_optionLength.
Referenced by ns3::Dhcp6Header::AddOptionRequest(), ns3::Dhcp6Header::AddStatusCode(), ns3::Dhcp6Header::Deserialize(), and ns3::Dhcp6Header::Serialize().
void ns3::Options::SetOptionCode | ( | OptionType | code | ) |
Set the option code.
code | The option code to be added. |
Definition at line 46 of file dhcp6-options.cc.
References m_optionCode, and NS_LOG_FUNCTION.
Referenced by ns3::Dhcp6Header::AddAddress(), ns3::Dhcp6Header::AddElapsedTime(), ns3::Dhcp6Header::AddIaOption(), ns3::Dhcp6Header::AddIdentifierOption(), ns3::Dhcp6Header::AddOptionRequest(), ns3::Dhcp6Header::AddStatusCode(), and ns3::Dhcp6Header::Deserialize().
void ns3::Options::SetOptionLength | ( | uint16_t | length | ) |
Set the option length.
length | The option length to be parsed. |
Definition at line 59 of file dhcp6-options.cc.
References m_optionLength, and NS_LOG_FUNCTION.
Referenced by ns3::Dhcp6Header::AddAddress(), ns3::Dhcp6Header::AddElapsedTime(), ns3::Dhcp6Header::AddIaOption(), ns3::Dhcp6Header::AddIdentifierOption(), ns3::Dhcp6Header::AddOptionRequest(), ns3::Dhcp6Header::AddStatusCode(), and ns3::Dhcp6Header::Deserialize().
|
private |
Option code.
Definition at line 123 of file dhcp6-options.h.
Referenced by Options(), Options(), GetOptionCode(), and SetOptionCode().
|
private |
Option length.
Definition at line 124 of file dhcp6-options.h.
Referenced by Options(), Options(), GetOptionLength(), and SetOptionLength().