A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::StatusCodeOption Class Reference

Implements the Status Code option. More...

#include "dhcp6-options.h"

+ Inheritance diagram for ns3::StatusCodeOption:
+ Collaboration diagram for ns3::StatusCodeOption:

Public Member Functions

 StatusCodeOption ()
 Default constructor.
 
StatusCodeValues GetStatusCode () const
 Get the status code of the operation.
 
std::string GetStatusMessage () const
 Get the status message of the operation.
 
void SetStatusCode (StatusCodeValues statusCode)
 Set the status code of the operation.
 
void SetStatusMessage (std::string statusMessage)
 Set the status message of the operation.
 
- Public Member Functions inherited from ns3::Options
 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

StatusCodeValues m_statusCode
 The status code of an operation involving the IA_NA, IA_TA or IA address.
 
std::string m_statusMessage
 The status message of the operation.
 

Additional Inherited Members

- Public Types inherited from ns3::Options
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...
 

Detailed Description

Implements the Status Code option.

Definition at line 171 of file dhcp6-options.h.

Constructor & Destructor Documentation

◆ StatusCodeOption()

ns3::StatusCodeOption::StatusCodeOption ( )

Default constructor.

Definition at line 104 of file dhcp6-options.cc.

References m_statusCode, m_statusMessage, and ns3::Options::Success.

Member Function Documentation

◆ GetStatusCode()

Options::StatusCodeValues ns3::StatusCodeOption::GetStatusCode ( ) const

Get the status code of the operation.

Returns
the status code.

Definition at line 111 of file dhcp6-options.cc.

References m_statusCode.

Referenced by ns3::Dhcp6Client::CheckLeaseStatus(), and ns3::Dhcp6Header::Serialize().

+ Here is the caller graph for this function:

◆ GetStatusMessage()

std::string ns3::StatusCodeOption::GetStatusMessage ( ) const

Get the status message of the operation.

Returns
the status message

Definition at line 124 of file dhcp6-options.cc.

References m_statusMessage.

Referenced by ns3::Dhcp6Header::AddStatusCode(), and ns3::Dhcp6Header::Serialize().

+ Here is the caller graph for this function:

◆ SetStatusCode()

void ns3::StatusCodeOption::SetStatusCode ( StatusCodeValues statusCode)

Set the status code of the operation.

Parameters
statusCodethe status code of the performed operation.

Definition at line 117 of file dhcp6-options.cc.

References m_statusCode, and NS_LOG_FUNCTION.

Referenced by ns3::Dhcp6Header::AddStatusCode(), and ns3::Dhcp6Header::Deserialize().

+ Here is the caller graph for this function:

◆ SetStatusMessage()

void ns3::StatusCodeOption::SetStatusMessage ( std::string statusMessage)

Set the status message of the operation.

Parameters
statusMessagethe status message of the operation.

Definition at line 130 of file dhcp6-options.cc.

References m_statusMessage, and NS_LOG_FUNCTION.

Referenced by ns3::Dhcp6Header::AddStatusCode(), and ns3::Dhcp6Header::Deserialize().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_statusCode

StatusCodeValues ns3::StatusCodeOption::m_statusCode
private

The status code of an operation involving the IA_NA, IA_TA or IA address.

Definition at line 208 of file dhcp6-options.h.

Referenced by StatusCodeOption(), GetStatusCode(), and SetStatusCode().

◆ m_statusMessage

std::string ns3::StatusCodeOption::m_statusMessage
private

The status message of the operation.

This is to be UTF-8 encoded as per RFC 3629.

Definition at line 214 of file dhcp6-options.h.

Referenced by StatusCodeOption(), GetStatusMessage(), and SetStatusMessage().


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