DHCPv6 client config details about each interface on the node. More...
#include "dhcp6-client.h"
Public Member Functions | |
InterfaceConfig () | |
The default constructor. | |
~InterfaceConfig () | |
Destructor. | |
void | AcceptedAddress (const Ipv6Address &offeredAddress) |
Accept the DHCPv6 offer. | |
void | Cleanup () |
Cleanup the internal callbacks and timers. | |
void | DeclinedAddress (const Ipv6Address &offeredAddress) |
Add a declined address to the list maintained by the client. | |
void | DeclineOffer () |
Send a Decline message to the DHCPv6 server. | |
![]() | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Attributes | |
std::optional< Callback< void, const Ipv6Address & > > | m_acceptedAddressCb {std::nullopt} |
Callback for the accepted addresses - needed for cleanup. | |
Ptr< Dhcp6Client > | m_client |
The Dhcp6Client on which the interface is present. | |
std::optional< Callback< void, const Ipv6Address & > > | m_declinedAddressCb {std::nullopt} |
Callback for the declined addresses - needed for cleanup. | |
std::vector< Ipv6Address > | m_declinedAddresses |
List of addresses to be declined by the client. | |
std::vector< uint32_t > | m_iaids |
The IAIDs associated with this DHCPv6 client interface. | |
uint32_t | m_interfaceIndex |
The IPv6 interface index of this configuration. | |
Time | m_msgStartTime |
Time when message exchange starts. | |
uint8_t | m_nAcceptedAddresses |
Number of addresses accepted by client. | |
std::vector< Ipv6Address > | m_offeredAddresses |
List of addresses offered to the client. | |
Time | m_prefLifetime |
Preferred lifetime of the address. | |
EventId | m_rebindEvent |
Event ID for the rebind event. | |
Time | m_rebindTime |
REB_MAX_RT, Time after which client should send a Rebind message. | |
std::vector< EventId > | m_releaseEvent |
Store all the Event IDs for the addresses being Released. | |
EventId | m_renewEvent |
Event ID for the Renew event. | |
Time | m_renewTime |
REN_MAX_RT, Time after which lease should be renewed. | |
Duid | m_serverDuid |
The server DUID. | |
Ptr< Socket > | m_socket |
The socket that has been opened for this interface. | |
TrickleTimer | m_solicitTimer |
TrickleTimer to schedule Solicit messages. | |
State | m_state |
The DHCPv6 state of the client interface. | |
uint32_t | m_transactId |
Transaction ID of the client-initiated message. | |
Time | m_validLifetime |
Valid lifetime of the address. | |
DHCPv6 client config details about each interface on the node.
Definition at line 77 of file dhcp6-client.h.
ns3::Dhcp6Client::InterfaceConfig::InterfaceConfig | ( | ) |
The default constructor.
Definition at line 205 of file dhcp6-client.cc.
References m_nAcceptedAddresses, m_prefLifetime, m_rebindTime, m_renewTime, m_validLifetime, and ns3::Seconds().
ns3::Dhcp6Client::InterfaceConfig::~InterfaceConfig | ( | ) |
Destructor.
Definition at line 214 of file dhcp6-client.cc.
void ns3::Dhcp6Client::InterfaceConfig::AcceptedAddress | ( | const Ipv6Address & | offeredAddress | ) |
Accept the DHCPv6 offer.
offeredAddress | The IPv6 address that has been accepted. |
Definition at line 235 of file dhcp6-client.cc.
References NS_LOG_DEBUG.
Referenced by ns3::Dhcp6Client::ProcessReply().
void ns3::Dhcp6Client::InterfaceConfig::Cleanup | ( | ) |
Cleanup the internal callbacks and timers.
MUST be used before removing an interface to avoid circular references locks.
Definition at line 349 of file dhcp6-client.cc.
References ns3::DynamicCast(), ns3::Icmpv6L4Protocol::GetStaticProtocolNumber(), and ns3::MakeNullCallback().
void ns3::Dhcp6Client::InterfaceConfig::DeclinedAddress | ( | const Ipv6Address & | offeredAddress | ) |
Add a declined address to the list maintained by the client.
offeredAddress | The IPv6 address to be declined. |
Definition at line 261 of file dhcp6-client.cc.
References NS_LOG_DEBUG.
Referenced by ns3::Dhcp6Client::ProcessReply().
void ns3::Dhcp6Client::InterfaceConfig::DeclineOffer | ( | ) |
Send a Decline message to the DHCPv6 server.
Definition at line 287 of file dhcp6-client.cc.
References ns3::Dhcp6Header::AddAddress(), ns3::Dhcp6Header::AddClientIdentifier(), ns3::Dhcp6Header::AddElapsedTime(), ns3::Dhcp6Header::AddIanaOption(), ns3::Dhcp6Header::AddServerIdentifier(), ns3::Create(), ns3::Dhcp6Header::DECLINE, ns3::Ipv6Address::GetAllNodesMulticast(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_INFO, ns3::Dhcp6Header::SERVER_PORT, ns3::Dhcp6Header::SetMessageType(), ns3::Dhcp6Header::SetTransactId(), and ns3::Dhcp6Client::WAIT_REPLY_AFTER_DECLINE.
std::optional<Callback<void, const Ipv6Address&> > ns3::Dhcp6Client::InterfaceConfig::m_acceptedAddressCb {std::nullopt} |
Callback for the accepted addresses - needed for cleanup.
Definition at line 136 of file dhcp6-client.h.
Ptr<Dhcp6Client> ns3::Dhcp6Client::InterfaceConfig::m_client |
The Dhcp6Client on which the interface is present.
Definition at line 91 of file dhcp6-client.h.
std::optional<Callback<void, const Ipv6Address&> > ns3::Dhcp6Client::InterfaceConfig::m_declinedAddressCb {std::nullopt} |
Callback for the declined addresses - needed for cleanup.
Definition at line 145 of file dhcp6-client.h.
std::vector<Ipv6Address> ns3::Dhcp6Client::InterfaceConfig::m_declinedAddresses |
List of addresses to be declined by the client.
Definition at line 117 of file dhcp6-client.h.
std::vector<uint32_t> ns3::Dhcp6Client::InterfaceConfig::m_iaids |
The IAIDs associated with this DHCPv6 client interface.
Definition at line 106 of file dhcp6-client.h.
uint32_t ns3::Dhcp6Client::InterfaceConfig::m_interfaceIndex |
The IPv6 interface index of this configuration.
Definition at line 94 of file dhcp6-client.h.
Time ns3::Dhcp6Client::InterfaceConfig::m_msgStartTime |
Time when message exchange starts.
Definition at line 109 of file dhcp6-client.h.
uint8_t ns3::Dhcp6Client::InterfaceConfig::m_nAcceptedAddresses |
Number of addresses accepted by client.
Definition at line 111 of file dhcp6-client.h.
Referenced by InterfaceConfig().
std::vector<Ipv6Address> ns3::Dhcp6Client::InterfaceConfig::m_offeredAddresses |
List of addresses offered to the client.
Definition at line 114 of file dhcp6-client.h.
Time ns3::Dhcp6Client::InterfaceConfig::m_prefLifetime |
Preferred lifetime of the address.
Definition at line 121 of file dhcp6-client.h.
Referenced by InterfaceConfig().
EventId ns3::Dhcp6Client::InterfaceConfig::m_rebindEvent |
Event ID for the rebind event.
Definition at line 124 of file dhcp6-client.h.
Time ns3::Dhcp6Client::InterfaceConfig::m_rebindTime |
REB_MAX_RT, Time after which client should send a Rebind message.
Definition at line 120 of file dhcp6-client.h.
Referenced by InterfaceConfig().
std::vector<EventId> ns3::Dhcp6Client::InterfaceConfig::m_releaseEvent |
Store all the Event IDs for the addresses being Released.
Definition at line 127 of file dhcp6-client.h.
EventId ns3::Dhcp6Client::InterfaceConfig::m_renewEvent |
Event ID for the Renew event.
Definition at line 123 of file dhcp6-client.h.
Time ns3::Dhcp6Client::InterfaceConfig::m_renewTime |
REN_MAX_RT, Time after which lease should be renewed.
Definition at line 119 of file dhcp6-client.h.
Referenced by InterfaceConfig().
Duid ns3::Dhcp6Client::InterfaceConfig::m_serverDuid |
The server DUID.
Definition at line 103 of file dhcp6-client.h.
The socket that has been opened for this interface.
Definition at line 97 of file dhcp6-client.h.
TrickleTimer ns3::Dhcp6Client::InterfaceConfig::m_solicitTimer |
TrickleTimer to schedule Solicit messages.
Definition at line 108 of file dhcp6-client.h.
State ns3::Dhcp6Client::InterfaceConfig::m_state |
The DHCPv6 state of the client interface.
Definition at line 100 of file dhcp6-client.h.
uint32_t ns3::Dhcp6Client::InterfaceConfig::m_transactId |
Transaction ID of the client-initiated message.
Definition at line 110 of file dhcp6-client.h.
Time ns3::Dhcp6Client::InterfaceConfig::m_validLifetime |
Valid lifetime of the address.
Definition at line 122 of file dhcp6-client.h.
Referenced by InterfaceConfig().