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

Router prefix information. More...

#include <ipv6-autoconfigured-prefix.h>

+ Inheritance 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.
 
void FunctionPreferredTimeout ()
 Signal that the preferred time expired and start the valid timer.
 
void FunctionValidTimeout ()
 Signal that the valid time expired.
 
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.
 
void MarkValidTime ()
 Set the prefix as valid.
 
void RemoveMe ()
 Remove this prefix from the prefix list.
 
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.
 
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.
 
void SetValidLifeTime (uint32_t v)
 Set the prefix valid life time. More...
 
void StartPreferredTimer ()
 Start the preferred timer.
 
void StartValidTimer ()
 Start the valid timer.
 
void StopPreferredTimer ()
 Stop the preferred timer.
 
void StopValidTimer ()
 Stop the valid timer.
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
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)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
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.
 
uint32_t m_interface
 The interface index (which is stored the address corresponding of the prefix).
 
Ipv6Prefix m_mask
 The prefix bitmask (length).
 
Ptr< Nodem_node
 The node.
 
bool m_preferred
 true if the prefix is preferred.
 
uint32_t m_preferredLifeTime
 the preferred life time.
 
Timer m_preferredTimer
 the timer for preferred life time.
 
Ipv6Address m_prefix
 The prefix IP6 address.
 
bool m_valid
 true if the prefix is valid.
 
uint32_t m_validLifeTime
 the valid life time.
 
Timer m_validTimer
 the timer for valid life time.
 

Static Private Attributes

static uint32_t m_prefixId = 0
 a static identifier.
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void DoDispose (void)
 
virtual void DoInitialize (void)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

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.

Member Function Documentation

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 165 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 190 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 180 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 170 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 175 of file ipv6-autoconfigured-prefix.cc.

References m_valid.

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 195 of file ipv6-autoconfigured-prefix.cc.

References m_mask.

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 185 of file ipv6-autoconfigured-prefix.cc.

References m_prefix.

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.

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().


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