Router prefix for radvd application. More...
#include "radvd-prefix.h"
Public Member Functions | |
RadvdPrefix (Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime=604800, uint32_t validLifeTime=2592000, bool onLinkFlag=true, bool autonomousFlag=true, bool routerAddrFlag=false) | |
Constructor. More... | |
~RadvdPrefix () | |
Destructor. More... | |
Ipv6Address | GetNetwork () const |
Get network prefix. More... | |
uint32_t | GetPreferredLifeTime () const |
Get preferred lifetime. More... | |
uint8_t | GetPrefixLength () const |
Get prefix length. More... | |
uint32_t | GetValidLifeTime () const |
Get valid lifetime. More... | |
bool | IsAutonomousFlag () const |
Is autonomous flag ? More... | |
bool | IsOnLinkFlag () const |
Is on-link flag ? More... | |
bool | IsRouterAddrFlag () const |
Is router address flag ? More... | |
void | SetAutonomousFlag (bool autonomousFlag) |
Set autonomous flag. More... | |
void | SetNetwork (Ipv6Address network) |
Set network prefix. More... | |
void | SetOnLinkFlag (bool onLinkFlag) |
Set on-link flag. More... | |
void | SetPreferredLifeTime (uint32_t preferredLifeTime) |
Set preferred lifetime. More... | |
void | SetPrefixLength (uint8_t prefixLength) |
Set prefix length. More... | |
void | SetRouterAddrFlag (bool routerAddrFlag) |
Set router address flag. More... | |
void | SetValidLifeTime (uint32_t validLifeTime) |
Set valid lifetime. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< RadvdPrefix > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Private Attributes | |
bool | m_autonomousFlag |
Autonomous flag, it is used for autonomous address configuration (RFC 2462). More... | |
Ipv6Address | m_network |
Network prefix. More... | |
bool | m_onLinkFlag |
On link flag, indicates that this prefix can be used for on-link determination. More... | |
uint32_t | m_preferredLifeTime |
Preferred time. More... | |
uint8_t | m_prefixLength |
Prefix length. More... | |
bool | m_routerAddrFlag |
Router address flag, indicates that router address is sent instead of network prefix as is required by Mobile IPv6. More... | |
uint32_t | m_validLifeTime |
Valid time. More... | |
Router prefix for radvd application.
Definition at line 35 of file radvd-prefix.h.
ns3::RadvdPrefix::RadvdPrefix | ( | Ipv6Address | network, |
uint8_t | prefixLength, | ||
uint32_t | preferredLifeTime = 604800 , |
||
uint32_t | validLifeTime = 2592000 , |
||
bool | onLinkFlag = true , |
||
bool | autonomousFlag = true , |
||
bool | routerAddrFlag = false |
||
) |
Constructor.
network | network prefix advertised |
prefixLength | prefix length ( 0 < x <= 128) |
preferredLifeTime | preferred life time in seconds (default 7 days) |
validLifeTime | valid life time in seconds (default 30 days) |
onLinkFlag | on link flag |
autonomousFlag | autonomous link flag |
routerAddrFlag | router address flag (for Mobile IPv6) |
Definition at line 29 of file radvd-prefix.cc.
References NS_LOG_FUNCTION.
ns3::RadvdPrefix::~RadvdPrefix | ( | ) |
Ipv6Address ns3::RadvdPrefix::GetNetwork | ( | ) | const |
Get network prefix.
Definition at line 54 of file radvd-prefix.cc.
References m_network, and NS_LOG_FUNCTION.
uint32_t ns3::RadvdPrefix::GetPreferredLifeTime | ( | ) | const |
Get preferred lifetime.
Definition at line 96 of file radvd-prefix.cc.
References m_preferredLifeTime, and NS_LOG_FUNCTION.
uint8_t ns3::RadvdPrefix::GetPrefixLength | ( | ) | const |
Get prefix length.
Definition at line 68 of file radvd-prefix.cc.
References m_prefixLength, and NS_LOG_FUNCTION.
uint32_t ns3::RadvdPrefix::GetValidLifeTime | ( | ) | const |
Get valid lifetime.
Definition at line 82 of file radvd-prefix.cc.
References m_validLifeTime, and NS_LOG_FUNCTION.
bool ns3::RadvdPrefix::IsAutonomousFlag | ( | ) | const |
Is autonomous flag ?
Definition at line 124 of file radvd-prefix.cc.
References m_autonomousFlag, and NS_LOG_FUNCTION.
bool ns3::RadvdPrefix::IsOnLinkFlag | ( | ) | const |
Is on-link flag ?
Definition at line 110 of file radvd-prefix.cc.
References m_onLinkFlag, and NS_LOG_FUNCTION.
bool ns3::RadvdPrefix::IsRouterAddrFlag | ( | ) | const |
Is router address flag ?
Definition at line 138 of file radvd-prefix.cc.
References m_routerAddrFlag, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetAutonomousFlag | ( | bool | autonomousFlag | ) |
Set autonomous flag.
autonomousFlag | value |
Definition at line 131 of file radvd-prefix.cc.
References m_autonomousFlag, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetNetwork | ( | Ipv6Address | network | ) |
Set network prefix.
network | network prefix |
Definition at line 61 of file radvd-prefix.cc.
References m_network, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetOnLinkFlag | ( | bool | onLinkFlag | ) |
Set on-link flag.
onLinkFlag | value |
Definition at line 117 of file radvd-prefix.cc.
References m_onLinkFlag, and NS_LOG_FUNCTION.
Referenced by RadvdTestCase::DoRun().
void ns3::RadvdPrefix::SetPreferredLifeTime | ( | uint32_t | preferredLifeTime | ) |
Set preferred lifetime.
preferredLifeTime | lifetime |
Definition at line 103 of file radvd-prefix.cc.
References m_preferredLifeTime, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetPrefixLength | ( | uint8_t | prefixLength | ) |
Set prefix length.
prefixLength | prefix length |
Definition at line 75 of file radvd-prefix.cc.
References m_prefixLength, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetRouterAddrFlag | ( | bool | routerAddrFlag | ) |
Set router address flag.
routerAddrFlag | value |
Definition at line 145 of file radvd-prefix.cc.
References m_routerAddrFlag, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetValidLifeTime | ( | uint32_t | validLifeTime | ) |
Set valid lifetime.
validLifeTime | lifetime |
Definition at line 89 of file radvd-prefix.cc.
References m_validLifeTime, and NS_LOG_FUNCTION.
|
private |
Autonomous flag, it is used for autonomous address configuration (RFC 2462).
Definition at line 174 of file radvd-prefix.h.
Referenced by IsAutonomousFlag(), and SetAutonomousFlag().
|
private |
Network prefix.
Definition at line 149 of file radvd-prefix.h.
Referenced by GetNetwork(), and SetNetwork().
|
private |
On link flag, indicates that this prefix can be used for on-link determination.
Definition at line 169 of file radvd-prefix.h.
Referenced by IsOnLinkFlag(), and SetOnLinkFlag().
|
private |
Preferred time.
Definition at line 159 of file radvd-prefix.h.
Referenced by GetPreferredLifeTime(), and SetPreferredLifeTime().
|
private |
Prefix length.
Definition at line 154 of file radvd-prefix.h.
Referenced by GetPrefixLength(), and SetPrefixLength().
|
private |
Router address flag, indicates that router address is sent instead of network prefix as is required by Mobile IPv6.
Definition at line 180 of file radvd-prefix.h.
Referenced by IsRouterAddrFlag(), and SetRouterAddrFlag().
|
private |
Valid time.
Definition at line 164 of file radvd-prefix.h.
Referenced by GetValidLifeTime(), and SetValidLifeTime().