A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 ~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.
 
SimpleRefCountoperator= (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.
 

Detailed Description

Router prefix for radvd application.

Definition at line 24 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 18 of file radvd-prefix.cc.

References NS_LOG_FUNCTION.

◆ ~RadvdPrefix()

ns3::RadvdPrefix::~RadvdPrefix ( )

Destructor.

Definition at line 37 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 43 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 85 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 57 of file radvd-prefix.cc.

References m_prefixLength, and NS_LOG_FUNCTION.

◆ GetValidLifeTime()

uint32_t ns3::RadvdPrefix::GetValidLifeTime ( ) const

Get valid lifetime.

Returns
lifetime

Definition at line 71 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 113 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 99 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 127 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 120 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 50 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 106 of file radvd-prefix.cc.

References m_onLinkFlag, and NS_LOG_FUNCTION.

◆ SetPreferredLifeTime()

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

Set preferred lifetime.

Parameters
preferredLifeTimelifetime

Definition at line 92 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 134 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 78 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 163 of file radvd-prefix.h.

Referenced by IsAutonomousFlag(), and SetAutonomousFlag().

◆ m_network

Ipv6Address ns3::RadvdPrefix::m_network
private

Network prefix.

Definition at line 138 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 158 of file radvd-prefix.h.

Referenced by IsOnLinkFlag(), and SetOnLinkFlag().

◆ m_preferredLifeTime

uint32_t ns3::RadvdPrefix::m_preferredLifeTime
private

Preferred time.

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

Referenced by GetPreferredLifeTime(), and SetPreferredLifeTime().

◆ m_prefixLength

uint8_t ns3::RadvdPrefix::m_prefixLength
private

Prefix length.

Definition at line 143 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 169 of file radvd-prefix.h.

Referenced by IsRouterAddrFlag(), and SetRouterAddrFlag().

◆ m_validLifeTime

uint32_t ns3::RadvdPrefix::m_validLifeTime
private

Valid time.

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

Referenced by GetValidLifeTime(), and SetValidLifeTime().


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