14#include "ns3/address-utils.h"
15#include "ns3/assert.h"
17#include "ns3/loopback-net-device.h"
19#include "ns3/simulator.h"
84 linkLayerAddress.
CopyTo(buffer);
86 std::vector<uint8_t> identifier;
87 std::copy(buffer, buffer + linkLayerAddress.
GetLength(), identifier.begin());
242std::vector<Options::OptionType>
264 return m_optionValue;
272 m_optionValue = optionValue;
a polymophic address class
uint8_t GetLength() const
Get the length of the underlying address.
uint32_t CopyTo(uint8_t buffer[MAX_SIZE]) const
Copy the address bytes into a buffer.
Implements the unique identifier for DHCPv6.
void SetHardwareType(uint16_t hardwareType)
Set the hardware type.
void SetDuidType(Type duidType)
Set the DUID type.
void SetDuid(std::vector< uint8_t > identifier)
Set the identifier as the DUID.
void SetPreferredLifetime(uint32_t preferredLifetime)
Set the preferred lifetime.
IaAddressOption()
Default constructor.
Ipv6Address GetIaAddress() const
Get the IA Address.
uint32_t GetValidLifetime() const
Get the valid lifetime.
void SetValidLifetime(uint32_t validLifetime)
Set the valid lifetime.
Ipv6Address m_iaAddress
the IPv6 address offered to the client.
void SetIaAddress(Ipv6Address iaAddress)
Set the IA Address.
uint32_t m_preferredLifetime
The preferred lifetime of the address, in seconds.
uint32_t GetPreferredLifetime() const
Get the preferred lifetime.
uint32_t m_validLifetime
The valid lifetime of the address, in seconds.
uint32_t GetT2() const
Get the time interval in seconds after which the client contacts any available server to extend the a...
void SetT1(uint32_t t1)
Set the time interval in seconds after which the client contacts the server which provided the addres...
uint32_t GetT1() const
Get the time interval in seconds after which the client contacts the server which provided the addres...
uint32_t m_t1
The time interval in seconds after which the client contacts the server which provided the address to...
IaOptions()
Default constructor.
uint32_t m_t2
The time interval in seconds after which the client contacts any available server to extend the addre...
uint32_t m_iaid
The unique identifier for the given IA_NA or IA_TA.
void SetT2(uint32_t t2)
Set the time interval in seconds after which the client contacts any available server to extend the a...
uint32_t GetIaid() const
Get the unique identifier for the given IANA or IATA.
void SetIaid(uint32_t iaid)
Set the unique identifier for the given IANA or IATA.
IdentifierOption()
Default constructor.
void SetDuid(Duid duid)
Set the DUID.
Duid GetDuid() const
Get the DUID object.
Duid m_duid
Unique identifier of the node.
Implements the Preference and Elapsed Time options.
void SetOptionValue(T optionValue)
Set the option value.
IntegerOptions()
Constructor.
T GetOptionValue() const
Get the option value.
Describes an IPv6 address.
StatusCodeValues
Enum to identify the status code of the operation.
uint16_t m_optionLength
Option length.
void SetOptionCode(OptionType code)
Set the option code.
OptionType m_optionCode
Option code.
uint16_t GetOptionLength() const
Get the option length.
OptionType GetOptionCode() const
Get the option code.
OptionType
Enum to identify the option type.
Options()
Default constructor.
void SetOptionLength(uint16_t length)
Set the option length.
std::vector< OptionType > GetRequestedOptions() const
Get the option values.
void AddRequestedOption(OptionType requestedOption)
Set the option values.
RequestOptions()
Constructor.
std::vector< OptionType > m_requestedOptions
List of requested options.
Ipv6Address m_serverAddress
The 128-bit server address to which the client should send unicast messages.
void SetServerAddress(Ipv6Address serverAddress)
Set the server address.
Ipv6Address GetServerAddress()
Get the server address.
StatusCodeOption()
Default constructor.
std::string m_statusMessage
The status message of the operation.
void SetStatusCode(StatusCodeValues statusCode)
Set the status code of the operation.
StatusCodeValues GetStatusCode() const
Get the status code of the operation.
StatusCodeValues m_statusCode
The status code of an operation involving the IA_NA, IA_TA or IA address.
std::string GetStatusMessage() const
Get the status message of the operation.
void SetStatusMessage(std::string statusMessage)
Set the status message of the operation.
Simulation virtual time values and global simulation resolution.
bool IsZero() const
Exactly equivalent to t == 0.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Every class exported by the ns3 library is enclosed in the ns3 namespace.