IPv6 address associated with an interface. More...
#include <ipv6-interface-address.h>
Public Types | |
enum | State_e { TENTATIVE, DEPRECATED, PREFERRED, PERMANENT, HOMEADDRESS, TENTATIVE_OPTIMISTIC, INVALID } |
State of an address associated with an interface. More... | |
enum | Scope_e { HOST, LINKLOCAL, GLOBAL } |
Scope of address. More... | |
Public Member Functions | |
Ipv6InterfaceAddress () | |
Default constructor. | |
Ipv6InterfaceAddress (Ipv6Address address) | |
Constructor. Prefix is 64 by default. | |
Ipv6InterfaceAddress (Ipv6Address address, Ipv6Prefix prefix) | |
Constructor. | |
Ipv6InterfaceAddress (const Ipv6InterfaceAddress &o) | |
Copy constructor. | |
~Ipv6InterfaceAddress () | |
Destructor. | |
void | SetAddress (Ipv6Address address) |
Set IPv6 address (and scope). | |
Ipv6Address | GetAddress () const |
Get the IPv6 address. | |
Ipv6Prefix | GetPrefix () const |
Get the IPv6 prefix. | |
void | SetState (Ipv6InterfaceAddress::State_e state) |
Set the state. | |
Ipv6InterfaceAddress::State_e | GetState () const |
Get the address state. | |
void | SetScope (Ipv6InterfaceAddress::Scope_e scope) |
Set the scope. | |
Ipv6InterfaceAddress::Scope_e | GetScope () const |
Get address scope. | |
void | SetNsDadUid (uint32_t uid) |
Set the latest DAD probe packet UID. | |
uint32_t | GetNsDadUid () const |
Get the latest DAD probe packet UID. | |
Private Attributes | |
Ipv6Address | m_address |
The IPv6 address. | |
Ipv6Prefix | m_prefix |
The IPv6 prefix. | |
State_e | m_state |
State of the address. | |
Scope_e | m_scope |
Scope of the address. | |
uint32_t | m_nsDadUid |
Last DAD probe packet UID. |
IPv6 address associated with an interface.
State of an address associated with an interface.
TENTATIVE |
Address is tentative, no packet can be sent unless DAD finished |
DEPRECATED |
Address is deprecated and should not be used |
PREFERRED |
Preferred address |
PERMANENT |
Permanent address |
HOMEADDRESS |
Address is a HomeAddress |
TENTATIVE_OPTIMISTIC |
Address is tentative but we are optimistic so we can send packet even if DAD is not yet finished |
INVALID |
Invalid state (after a DAD failed) |
ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | Ipv6Address | address | ) |
Constructor. Prefix is 64 by default.
address | the IPv6 address to set |
ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | Ipv6Address | address, | |
Ipv6Prefix | prefix | |||
) |
Constructor.
address | IPv6 address to set | |
prefix | IPv6 prefix |
ns3::Ipv6InterfaceAddress::Ipv6InterfaceAddress | ( | const Ipv6InterfaceAddress & | o | ) |
Copy constructor.
o | object to copy |
Ipv6Address ns3::Ipv6InterfaceAddress::GetAddress | ( | ) | const |
Get the IPv6 address.
uint32_t ns3::Ipv6InterfaceAddress::GetNsDadUid | ( | ) | const |
Get the latest DAD probe packet UID.
Ipv6Prefix ns3::Ipv6InterfaceAddress::GetPrefix | ( | ) | const |
Get the IPv6 prefix.
Ipv6InterfaceAddress::Scope_e ns3::Ipv6InterfaceAddress::GetScope | ( | ) | const |
Get address scope.
Ipv6InterfaceAddress::State_e ns3::Ipv6InterfaceAddress::GetState | ( | ) | const |
Get the address state.
void ns3::Ipv6InterfaceAddress::SetAddress | ( | Ipv6Address | address | ) |
Set IPv6 address (and scope).
address | IPv6 address to set |
void ns3::Ipv6InterfaceAddress::SetNsDadUid | ( | uint32_t | uid | ) |
Set the latest DAD probe packet UID.
uid | packet uid |
void ns3::Ipv6InterfaceAddress::SetScope | ( | Ipv6InterfaceAddress::Scope_e | scope | ) |
Set the scope.
scope | the scope of address |
void ns3::Ipv6InterfaceAddress::SetState | ( | Ipv6InterfaceAddress::State_e | state | ) |
Set the state.
state | the state |