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. | |
~RadvdPrefix () | |
Destructor. | |
Ipv6Address | GetNetwork () const |
Get network prefix. | |
uint32_t | GetPreferredLifeTime () const |
Get preferred lifetime. | |
uint8_t | GetPrefixLength () const |
Get prefix length. | |
uint32_t | GetValidLifeTime () const |
Get valid lifetime. | |
bool | IsAutonomousFlag () const |
Is autonomous flag ? | |
bool | IsOnLinkFlag () const |
Is on-link flag ? | |
bool | IsRouterAddrFlag () const |
Is router address flag ? | |
void | SetAutonomousFlag (bool autonomousFlag) |
Set autonomous flag. | |
void | SetNetwork (Ipv6Address network) |
Set network prefix. | |
void | SetOnLinkFlag (bool onLinkFlag) |
Set on-link flag. | |
void | SetPreferredLifeTime (uint32_t preferredLifeTime) |
Set preferred lifetime. | |
void | SetPrefixLength (uint8_t prefixLength) |
Set prefix length. | |
void | SetRouterAddrFlag (bool routerAddrFlag) |
Set router address flag. | |
void | SetValidLifeTime (uint32_t validLifeTime) |
Set valid lifetime. | |
Public Member Functions inherited from ns3::SimpleRefCount< RadvdPrefix > | |
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. | |
Private Attributes | |
bool | m_autonomousFlag |
Autonomous flag, it is used for autonomous address configuration (RFC 2462 ). | |
Ipv6Address | m_network |
Network prefix. | |
bool | m_onLinkFlag |
On link flag, indicates that this prefix can be used for on-link determination. | |
uint32_t | m_preferredLifeTime |
Preferred time. | |
uint8_t | m_prefixLength |
Prefix length. | |
bool | m_routerAddrFlag |
Router address flag, indicates that router address is sent instead of network prefix as is required by Mobile IPv6. | |
uint32_t | m_validLifeTime |
Valid time. | |
Router prefix for radvd application.
Definition at line 24 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 18 of file radvd-prefix.cc.
References NS_LOG_FUNCTION.
ns3::RadvdPrefix::~RadvdPrefix | ( | ) |
Ipv6Address ns3::RadvdPrefix::GetNetwork | ( | ) | const |
Get network prefix.
Definition at line 43 of file radvd-prefix.cc.
References m_network, and NS_LOG_FUNCTION.
uint32_t ns3::RadvdPrefix::GetPreferredLifeTime | ( | ) | const |
Get preferred lifetime.
Definition at line 85 of file radvd-prefix.cc.
References m_preferredLifeTime, and NS_LOG_FUNCTION.
uint8_t ns3::RadvdPrefix::GetPrefixLength | ( | ) | const |
Get prefix length.
Definition at line 57 of file radvd-prefix.cc.
References m_prefixLength, and NS_LOG_FUNCTION.
uint32_t ns3::RadvdPrefix::GetValidLifeTime | ( | ) | const |
Get valid lifetime.
Definition at line 71 of file radvd-prefix.cc.
References m_validLifeTime, and NS_LOG_FUNCTION.
bool ns3::RadvdPrefix::IsAutonomousFlag | ( | ) | const |
Is autonomous flag ?
Definition at line 113 of file radvd-prefix.cc.
References m_autonomousFlag, and NS_LOG_FUNCTION.
bool ns3::RadvdPrefix::IsOnLinkFlag | ( | ) | const |
Is on-link flag ?
Definition at line 99 of file radvd-prefix.cc.
References m_onLinkFlag, and NS_LOG_FUNCTION.
bool ns3::RadvdPrefix::IsRouterAddrFlag | ( | ) | const |
Is router address flag ?
Definition at line 127 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 120 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 50 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 106 of file radvd-prefix.cc.
References m_onLinkFlag, and NS_LOG_FUNCTION.
void ns3::RadvdPrefix::SetPreferredLifeTime | ( | uint32_t | preferredLifeTime | ) |
Set preferred lifetime.
preferredLifeTime | lifetime |
Definition at line 92 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 64 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 134 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 78 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 163 of file radvd-prefix.h.
Referenced by IsAutonomousFlag(), and SetAutonomousFlag().
|
private |
Network prefix.
Definition at line 138 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 158 of file radvd-prefix.h.
Referenced by IsOnLinkFlag(), and SetOnLinkFlag().
|
private |
Preferred time.
Definition at line 148 of file radvd-prefix.h.
Referenced by GetPreferredLifeTime(), and SetPreferredLifeTime().
|
private |
Prefix length.
Definition at line 143 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 169 of file radvd-prefix.h.
Referenced by IsRouterAddrFlag(), and SetRouterAddrFlag().
|
private |
Valid time.
Definition at line 153 of file radvd-prefix.h.
Referenced by GetValidLifeTime(), and SetValidLifeTime().