A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Ipv6AutoconfiguredPrefix Class Reference

Router prefix information. More...

#include <ipv6-autoconfigured-prefix.h>

+ Inheritance diagram for ns3::Ipv6AutoconfiguredPrefix:
+ Collaboration diagram for ns3::Ipv6AutoconfiguredPrefix:

Public Member Functions

 Ipv6AutoconfiguredPrefix (Ptr< Node > node, uint32_t interface, Ipv6Address prefix, Ipv6Prefix mask, uint32_t preferredLifeTime, uint32_t validLifeTime, Ipv6Address router=Ipv6Address("::"))
 Constructor. More...
 
 ~Ipv6AutoconfiguredPrefix ()
 Destructor. More...
 
void FunctionPreferredTimeout ()
 Signal that the preferred time expired and start the valid timer. More...
 
void FunctionValidTimeout ()
 Signal that the valid time expired. More...
 
Ipv6Address GetDefaultGatewayRouter () const
 Get the default gateway address. More...
 
uint32_t GetId () const
 Get the prefix identifier. More...
 
uint32_t GetInterface () const
 Get the interface index. More...
 
Ipv6Prefix GetMask () const
 Get the bitmask prefix. More...
 
uint32_t GetPreferredLifeTime () const
 Get the prefix preferred life time. More...
 
Ipv6Address GetPrefix () const
 Get the prefix address. More...
 
uint32_t GetValidLifeTime (void) const
 Get the prefix valid life time. More...
 
bool IsPreferred () const
 Test if the prefix is preferred. More...
 
bool IsValid () const
 Test if the prefix is valid. More...
 
void MarkPreferredTime ()
 Set the prefix as preferred. More...
 
void MarkValidTime ()
 Set the prefix as valid. More...
 
void RemoveMe ()
 Remove this prefix from the prefix list. More...
 
void SetDefaultGatewayRouter (Ipv6Address router)
 Set the default gateway router. More...
 
void SetInterface (uint32_t interface)
 Set the interface. More...
 
void SetMask (Ipv6Prefix mask)
 Set the bitmask prefix. More...
 
void SetPreferred ()
 Set the prefix as preferred. More...
 
void SetPreferredLifeTime (uint32_t p)
 Set the prefix preferred life time. More...
 
void SetPrefix (Ipv6Address prefix)
 Set the prefix address. More...
 
void SetValid ()
 Set the prefix as valid. More...
 
void SetValidLifeTime (uint32_t v)
 Set the prefix valid life time. More...
 
void StartPreferredTimer ()
 Start the preferred timer. More...
 
void StartValidTimer ()
 Start the valid timer. More...
 
void StopPreferredTimer ()
 Stop the preferred timer. More...
 
void StopValidTimer ()
 Stop the valid timer. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Private Attributes

Ipv6Address m_defaultGatewayRouter
 Default gateway router. More...
 
uint32_t m_id
 the identifier of this prefix. More...
 
uint32_t m_interface
 The interface index (which is stored the address corresponding of the prefix). More...
 
Ipv6Prefix m_mask
 The prefix bitmask (length). More...
 
Ptr< Nodem_node
 The node. More...
 
bool m_preferred
 true if the prefix is preferred. More...
 
uint32_t m_preferredLifeTime
 the preferred life time. More...
 
Timer m_preferredTimer
 the timer for preferred life time. More...
 
Ipv6Address m_prefix
 The prefix IP6 address. More...
 
bool m_valid
 true if the prefix is valid. More...
 
uint32_t m_validLifeTime
 the valid life time. More...
 
Timer m_validTimer
 the timer for valid life time. More...
 

Static Private Attributes

static uint32_t m_prefixId = 0
 a static identifier. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoDispose (void)
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
virtual void DoInitialize (void)
 This method is called only once by Object::Initialize. More...
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 

Detailed Description

Router prefix information.

Definition at line 40 of file ipv6-autoconfigured-prefix.h.

Constructor & Destructor Documentation

ns3::Ipv6AutoconfiguredPrefix::Ipv6AutoconfiguredPrefix ( Ptr< Node node,
uint32_t  interface,
Ipv6Address  prefix,
Ipv6Prefix  mask,
uint32_t  preferredLifeTime,
uint32_t  validLifeTime,
Ipv6Address  router = Ipv6Address ("::") 
)

Constructor.

Parameters
nodenode
interfaceinterface index
prefixIPv6 address
maskbitmask prefix
preferredLifeTimethe preferred life time
validLifeTimethe valid life time
routerif it the prefix that configure the default gateway

Definition at line 34 of file ipv6-autoconfigured-prefix.cc.

References m_defaultGatewayRouter, m_id, m_interface, m_mask, m_node, m_preferred, m_preferredLifeTime, m_prefix, m_prefixId, m_valid, and m_validLifeTime.

ns3::Ipv6AutoconfiguredPrefix::~Ipv6AutoconfiguredPrefix ( )

Destructor.

Definition at line 49 of file ipv6-autoconfigured-prefix.cc.

Member Function Documentation

void ns3::Ipv6AutoconfiguredPrefix::FunctionPreferredTimeout ( )

Signal that the preferred time expired and start the valid timer.

Definition at line 104 of file ipv6-autoconfigured-prefix.cc.

References m_preferred, m_prefix, MarkValidTime(), NS_LOG_INFO, and StartValidTimer().

Referenced by StartPreferredTimer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6AutoconfiguredPrefix::FunctionValidTimeout ( )

Signal that the valid time expired.

Definition at line 112 of file ipv6-autoconfigured-prefix.cc.

References m_prefix, m_valid, NS_LOG_INFO, and RemoveMe().

Referenced by StartValidTimer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv6Address ns3::Ipv6AutoconfiguredPrefix::GetDefaultGatewayRouter ( ) const

Get the default gateway address.

Returns
IPv6 link-local address of the default router

Definition at line 58 of file ipv6-autoconfigured-prefix.cc.

References m_defaultGatewayRouter.

uint32_t ns3::Ipv6AutoconfiguredPrefix::GetId ( void  ) const

Get the prefix identifier.

Returns
id of the prefix.

Definition at line 177 of file ipv6-autoconfigured-prefix.cc.

References m_id.

uint32_t ns3::Ipv6AutoconfiguredPrefix::GetInterface ( void  ) const

Get the interface index.

Returns
interface index

Definition at line 68 of file ipv6-autoconfigured-prefix.cc.

References m_interface.

Ipv6Prefix ns3::Ipv6AutoconfiguredPrefix::GetMask ( void  ) const

Get the bitmask prefix.

Returns
bitmask prefix

Definition at line 202 of file ipv6-autoconfigured-prefix.cc.

References m_mask.

uint32_t ns3::Ipv6AutoconfiguredPrefix::GetPreferredLifeTime ( ) const

Get the prefix preferred life time.

Returns
preferred life time

Definition at line 78 of file ipv6-autoconfigured-prefix.cc.

References m_preferredLifeTime.

Ipv6Address ns3::Ipv6AutoconfiguredPrefix::GetPrefix ( ) const

Get the prefix address.

Returns
prefix address

Definition at line 192 of file ipv6-autoconfigured-prefix.cc.

References m_prefix.

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

Get the prefix valid life time.

Returns
valid life time

Definition at line 88 of file ipv6-autoconfigured-prefix.cc.

References m_validLifeTime.

bool ns3::Ipv6AutoconfiguredPrefix::IsPreferred ( ) const

Test if the prefix is preferred.

Returns
true if prefix is in preferred state, false otherwise

Definition at line 182 of file ipv6-autoconfigured-prefix.cc.

References m_preferred.

bool ns3::Ipv6AutoconfiguredPrefix::IsValid ( ) const

Test if the prefix is valid.

Returns
true if prefix is in valid state, false otherwise

Definition at line 187 of file ipv6-autoconfigured-prefix.cc.

References m_valid.

void ns3::Ipv6AutoconfiguredPrefix::MarkPreferredTime ( )

Set the prefix as preferred.

Definition at line 93 of file ipv6-autoconfigured-prefix.cc.

References m_preferred.

void ns3::Ipv6AutoconfiguredPrefix::MarkValidTime ( )

Set the prefix as valid.

Definition at line 98 of file ipv6-autoconfigured-prefix.cc.

References m_preferred, and m_valid.

Referenced by FunctionPreferredTimeout().

+ Here is the caller graph for this function:

void ns3::Ipv6AutoconfiguredPrefix::RemoveMe ( )

Remove this prefix from the prefix list.

Definition at line 159 of file ipv6-autoconfigured-prefix.cc.

References ns3::Object::GetObject(), m_defaultGatewayRouter, m_interface, m_mask, m_node, m_prefix, and NS_LOG_INFO.

Referenced by FunctionValidTimeout().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6AutoconfiguredPrefix::SetDefaultGatewayRouter ( Ipv6Address  router)

Set the default gateway router.

Parameters
routerIPv6 link-local address of the default router

Definition at line 53 of file ipv6-autoconfigured-prefix.cc.

References m_defaultGatewayRouter.

void ns3::Ipv6AutoconfiguredPrefix::SetInterface ( uint32_t  interface)

Set the interface.

Parameters
interfaceinterface index to set

Definition at line 63 of file ipv6-autoconfigured-prefix.cc.

References m_interface.

void ns3::Ipv6AutoconfiguredPrefix::SetMask ( Ipv6Prefix  mask)

Set the bitmask prefix.

Parameters
maskprefix

Definition at line 207 of file ipv6-autoconfigured-prefix.cc.

References m_mask.

void ns3::Ipv6AutoconfiguredPrefix::SetPreferred ( )

Set the prefix as preferred.

Definition at line 166 of file ipv6-autoconfigured-prefix.cc.

References m_preferred.

void ns3::Ipv6AutoconfiguredPrefix::SetPreferredLifeTime ( uint32_t  p)

Set the prefix preferred life time.

Parameters
pthe prefix preferred life time

Definition at line 73 of file ipv6-autoconfigured-prefix.cc.

References m_preferredLifeTime.

void ns3::Ipv6AutoconfiguredPrefix::SetPrefix ( Ipv6Address  prefix)

Set the prefix address.

Parameters
prefixprefix address to set

Definition at line 197 of file ipv6-autoconfigured-prefix.cc.

References m_prefix.

void ns3::Ipv6AutoconfiguredPrefix::SetValid ( )

Set the prefix as valid.

Definition at line 171 of file ipv6-autoconfigured-prefix.cc.

References m_preferred, and m_valid.

void ns3::Ipv6AutoconfiguredPrefix::SetValidLifeTime ( uint32_t  v)

Set the prefix valid life time.

Parameters
vthe prefix valid life time

Definition at line 83 of file ipv6-autoconfigured-prefix.cc.

References m_validLifeTime.

void ns3::Ipv6AutoconfiguredPrefix::StartPreferredTimer ( )

Start the preferred timer.

Definition at line 119 of file ipv6-autoconfigured-prefix.cc.

References FunctionPreferredTimeout(), m_preferredLifeTime, m_preferredTimer, m_prefix, NS_LOG_INFO, ns3::Timer::Schedule(), ns3::Timer::SetDelay(), and ns3::Timer::SetFunction().

Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6AutoconfiguredPrefix::StartValidTimer ( )

Start the valid timer.

Definition at line 130 of file ipv6-autoconfigured-prefix.cc.

References FunctionValidTimeout(), m_preferredLifeTime, m_prefix, m_validLifeTime, m_validTimer, NS_LOG_INFO, ns3::Timer::Schedule(), ns3::Timer::SetDelay(), and ns3::Timer::SetFunction().

Referenced by FunctionPreferredTimeout().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6AutoconfiguredPrefix::StopPreferredTimer ( )

Stop the preferred timer.

Definition at line 141 of file ipv6-autoconfigured-prefix.cc.

References ns3::Timer::Cancel(), ns3::Timer::IsRunning(), m_preferredTimer, m_prefix, and NS_LOG_INFO.

+ Here is the call graph for this function:

void ns3::Ipv6AutoconfiguredPrefix::StopValidTimer ( )

Stop the valid timer.

Definition at line 150 of file ipv6-autoconfigured-prefix.cc.

References ns3::Timer::Cancel(), ns3::Timer::IsRunning(), m_prefix, m_validTimer, and NS_LOG_INFO.

+ Here is the call graph for this function:

Member Data Documentation

Ipv6Address ns3::Ipv6AutoconfiguredPrefix::m_defaultGatewayRouter
private

Default gateway router.

If the RA received also configured the default gateway, this variable has the link-local address. Otherwise this is "::"

Definition at line 238 of file ipv6-autoconfigured-prefix.h.

Referenced by GetDefaultGatewayRouter(), Ipv6AutoconfiguredPrefix(), RemoveMe(), and SetDefaultGatewayRouter().

uint32_t ns3::Ipv6AutoconfiguredPrefix::m_id
private

the identifier of this prefix.

Definition at line 214 of file ipv6-autoconfigured-prefix.h.

Referenced by GetId(), and Ipv6AutoconfiguredPrefix().

uint32_t ns3::Ipv6AutoconfiguredPrefix::m_interface
private

The interface index (which is stored the address corresponding of the prefix).

Definition at line 244 of file ipv6-autoconfigured-prefix.h.

Referenced by GetInterface(), Ipv6AutoconfiguredPrefix(), RemoveMe(), and SetInterface().

Ipv6Prefix ns3::Ipv6AutoconfiguredPrefix::m_mask
private

The prefix bitmask (length).

Definition at line 229 of file ipv6-autoconfigured-prefix.h.

Referenced by GetMask(), Ipv6AutoconfiguredPrefix(), RemoveMe(), and SetMask().

Ptr<Node> ns3::Ipv6AutoconfiguredPrefix::m_node
private

The node.

Definition at line 219 of file ipv6-autoconfigured-prefix.h.

Referenced by Ipv6AutoconfiguredPrefix(), and RemoveMe().

bool ns3::Ipv6AutoconfiguredPrefix::m_preferred
private
uint32_t ns3::Ipv6AutoconfiguredPrefix::m_preferredLifeTime
private
Timer ns3::Ipv6AutoconfiguredPrefix::m_preferredTimer
private

the timer for preferred life time.

Definition at line 269 of file ipv6-autoconfigured-prefix.h.

Referenced by StartPreferredTimer(), and StopPreferredTimer().

uint32_t ns3::Ipv6AutoconfiguredPrefix::m_prefixId = 0
staticprivate

a static identifier.

Definition at line 209 of file ipv6-autoconfigured-prefix.h.

Referenced by Ipv6AutoconfiguredPrefix().

bool ns3::Ipv6AutoconfiguredPrefix::m_valid
private

true if the prefix is valid.

Definition at line 264 of file ipv6-autoconfigured-prefix.h.

Referenced by FunctionValidTimeout(), Ipv6AutoconfiguredPrefix(), IsValid(), MarkValidTime(), and SetValid().

uint32_t ns3::Ipv6AutoconfiguredPrefix::m_validLifeTime
private

the valid life time.

Definition at line 249 of file ipv6-autoconfigured-prefix.h.

Referenced by GetValidLifeTime(), Ipv6AutoconfiguredPrefix(), SetValidLifeTime(), and StartValidTimer().

Timer ns3::Ipv6AutoconfiguredPrefix::m_validTimer
private

the timer for valid life time.

Definition at line 274 of file ipv6-autoconfigured-prefix.h.

Referenced by StartValidTimer(), and StopValidTimer().


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