10#ifndef DHCP6_OPTIONS_H
11#define DHCP6_OPTIONS_H
15#include "ns3/address.h"
16#include "ns3/buffer.h"
17#include "ns3/header.h"
18#include "ns3/ipv6-address.h"
20#include "ns3/nstime.h"
22#include "ns3/random-variable-stream.h"
96 Options(OptionType code, uint16_t length);
a polymophic address class
Implements the unique identifier for DHCPv6.
Implements the IA Address options.
void SetPreferredLifetime(uint32_t preferredLifetime)
Set the preferred lifetime.
IaAddressOption()
Default constructor.
StatusCodeOption m_statusCodeOption
(optional) The status code of any operation involving this address
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.
Implements the IANA and IATA options.
uint32_t GetT2() const
Get the time interval in seconds after which the client contacts any available server to extend the a...
std::vector< IaAddressOption > m_iaAddressOption
The list of IA Address options associated with the IANA.
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.
StatusCodeOption m_statusCodeOption
(optional) The status code of any operation involving the IANA.
Implements the client and server identifier options.
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.
T m_optionValue
Indicates the elapsed time or preference value.
void SetOptionValue(T optionValue)
Set the option value.
IntegerOptions()
Constructor.
T GetOptionValue() const
Get the option value.
Describes an IPv6 address.
Implements the functionality of DHCPv6 options.
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.
@ OPTION_INFORMATION_REFRESH_TIME
Options()
Default constructor.
void SetOptionLength(uint16_t length)
Set the option length.
Implements the Option Request option.
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.
Implements the Server Unicast option.
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.
Implements the Status Code option.
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.
IntegerOptions< uint8_t > PreferenceOption
Create the typedef PreferenceOption with T as uint8_t.
IntegerOptions< uint16_t > ElapsedTimeOption
Create the typedef ElapsedTimeOption with T as uint16_t.
Every class exported by the ns3 library is enclosed in the ns3 namespace.