A Discrete-Event Network Simulator
API
ns3::RadvdPrefix Class Reference

Router prefix for radvd application. More...

#include "radvd-prefix.h"

+ Inheritance diagram for ns3::RadvdPrefix:
+ Collaboration diagram for ns3::RadvdPrefix:

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 (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) 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...
 

Detailed Description

Router prefix for radvd application.

Definition at line 36 of file radvd-prefix.h.

Constructor & Destructor Documentation

◆ RadvdPrefix()

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.

Parameters
networknetwork prefix advertised
prefixLengthprefix length ( 0 < x <= 128)
preferredLifeTimepreferred life time in seconds (default 7 days)
validLifeTimevalid life time in seconds (default 30 days)
onLinkFlagon link flag
autonomousFlagautonomous link flag
routerAddrFlagrouter address flag (for Mobile IPv6)

Definition at line 29 of file radvd-prefix.cc.

References NS_LOG_FUNCTION.

◆ ~RadvdPrefix()

ns3::RadvdPrefix::~RadvdPrefix ( )

Destructor.

Definition at line 41 of file radvd-prefix.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ GetNetwork()

Ipv6Address ns3::RadvdPrefix::GetNetwork ( ) const

Get network prefix.

Returns
network prefix

Definition at line 46 of file radvd-prefix.cc.

References m_network, and NS_LOG_FUNCTION.

◆ GetPreferredLifeTime()

uint32_t ns3::RadvdPrefix::GetPreferredLifeTime ( ) const

Get preferred lifetime.

Returns
lifetime

Definition at line 82 of file radvd-prefix.cc.

References m_preferredLifeTime, and NS_LOG_FUNCTION.

◆ GetPrefixLength()

uint8_t ns3::RadvdPrefix::GetPrefixLength ( ) const

Get prefix length.

Returns
prefix length

Definition at line 58 of file radvd-prefix.cc.

References m_prefixLength, and NS_LOG_FUNCTION.

◆ GetValidLifeTime()

uint32_t ns3::RadvdPrefix::GetValidLifeTime ( void  ) const

Get valid lifetime.

Returns
lifetime

Definition at line 70 of file radvd-prefix.cc.

References m_validLifeTime, and NS_LOG_FUNCTION.

◆ IsAutonomousFlag()

bool ns3::RadvdPrefix::IsAutonomousFlag ( ) const

Is autonomous flag ?

Returns
true if autonomous is activated, false otherwise

Definition at line 106 of file radvd-prefix.cc.

References m_autonomousFlag, and NS_LOG_FUNCTION.

◆ IsOnLinkFlag()

bool ns3::RadvdPrefix::IsOnLinkFlag ( ) const

Is on-link flag ?

Returns
true if on-link is activated, false otherwise

Definition at line 94 of file radvd-prefix.cc.

References m_onLinkFlag, and NS_LOG_FUNCTION.

◆ IsRouterAddrFlag()

bool ns3::RadvdPrefix::IsRouterAddrFlag ( ) const

Is router address flag ?

Returns
true if router address is activated, false otherwise

Definition at line 118 of file radvd-prefix.cc.

References m_routerAddrFlag, and NS_LOG_FUNCTION.

◆ SetAutonomousFlag()

void ns3::RadvdPrefix::SetAutonomousFlag ( bool  autonomousFlag)

Set autonomous flag.

Parameters
autonomousFlagvalue

Definition at line 112 of file radvd-prefix.cc.

References m_autonomousFlag, and NS_LOG_FUNCTION.

◆ SetNetwork()

void ns3::RadvdPrefix::SetNetwork ( Ipv6Address  network)

Set network prefix.

Parameters
networknetwork prefix

Definition at line 52 of file radvd-prefix.cc.

References m_network, and NS_LOG_FUNCTION.

◆ SetOnLinkFlag()

void ns3::RadvdPrefix::SetOnLinkFlag ( bool  onLinkFlag)

Set on-link flag.

Parameters
onLinkFlagvalue

Definition at line 100 of file radvd-prefix.cc.

References m_onLinkFlag, and NS_LOG_FUNCTION.

Referenced by RadvdTestCase::DoRun().

+ Here is the caller graph for this function:

◆ SetPreferredLifeTime()

void ns3::RadvdPrefix::SetPreferredLifeTime ( uint32_t  preferredLifeTime)

Set preferred lifetime.

Parameters
preferredLifeTimelifetime

Definition at line 88 of file radvd-prefix.cc.

References m_preferredLifeTime, and NS_LOG_FUNCTION.

◆ SetPrefixLength()

void ns3::RadvdPrefix::SetPrefixLength ( uint8_t  prefixLength)

Set prefix length.

Parameters
prefixLengthprefix length

Definition at line 64 of file radvd-prefix.cc.

References m_prefixLength, and NS_LOG_FUNCTION.

◆ SetRouterAddrFlag()

void ns3::RadvdPrefix::SetRouterAddrFlag ( bool  routerAddrFlag)

Set router address flag.

Parameters
routerAddrFlagvalue

Definition at line 124 of file radvd-prefix.cc.

References m_routerAddrFlag, and NS_LOG_FUNCTION.

◆ SetValidLifeTime()

void ns3::RadvdPrefix::SetValidLifeTime ( uint32_t  validLifeTime)

Set valid lifetime.

Parameters
validLifeTimelifetime

Definition at line 76 of file radvd-prefix.cc.

References m_validLifeTime, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_autonomousFlag

bool ns3::RadvdPrefix::m_autonomousFlag
private

Autonomous flag, it is used for autonomous address configuration (RFC 2462).

Definition at line 169 of file radvd-prefix.h.

Referenced by IsAutonomousFlag(), and SetAutonomousFlag().

◆ m_network

Ipv6Address ns3::RadvdPrefix::m_network
private

Network prefix.

Definition at line 144 of file radvd-prefix.h.

Referenced by GetNetwork(), and SetNetwork().

◆ m_onLinkFlag

bool ns3::RadvdPrefix::m_onLinkFlag
private

On link flag, indicates that this prefix can be used for on-link determination.

Definition at line 164 of file radvd-prefix.h.

Referenced by IsOnLinkFlag(), and SetOnLinkFlag().

◆ m_preferredLifeTime

uint32_t ns3::RadvdPrefix::m_preferredLifeTime
private

Preferred time.

Definition at line 154 of file radvd-prefix.h.

Referenced by GetPreferredLifeTime(), and SetPreferredLifeTime().

◆ m_prefixLength

uint8_t ns3::RadvdPrefix::m_prefixLength
private

Prefix length.

Definition at line 149 of file radvd-prefix.h.

Referenced by GetPrefixLength(), and SetPrefixLength().

◆ m_routerAddrFlag

bool ns3::RadvdPrefix::m_routerAddrFlag
private

Router address flag, indicates that router address is sent instead of network prefix as is required by Mobile IPv6.

Definition at line 175 of file radvd-prefix.h.

Referenced by IsRouterAddrFlag(), and SetRouterAddrFlag().

◆ m_validLifeTime

uint32_t ns3::RadvdPrefix::m_validLifeTime
private

Valid time.

Definition at line 159 of file radvd-prefix.h.

Referenced by GetValidLifeTime(), and SetValidLifeTime().


The documentation for this class was generated from the following files: