A Discrete-Event Network Simulator
API
ns3::dot11s::HwmpRtable Class Reference

Routing table for HWMP – 802.11s routing protocol. More...

#include "hwmp-rtable.h"

+ Inheritance diagram for ns3::dot11s::HwmpRtable:
+ Collaboration diagram for ns3::dot11s::HwmpRtable:

Classes

struct  LookupResult
 Route lookup result, return type of LookupXXX methods. More...
 
struct  Precursor
 Route found in reactive mode. More...
 
struct  ProactiveRoute
 Route found in proactive mode. More...
 
struct  ReactiveRoute
 Route found in reactive mode. More...
 

Public Types

typedef std::vector< std::pair< uint32_t, Mac48Address > > PrecursorList
 Path precursor = {MAC, interface ID}. More...
 

Public Member Functions

 HwmpRtable ()
 
 ~HwmpRtable ()
 
void DoDispose ()
 Destructor implementation. More...
 
std::vector< HwmpProtocol::FailedDestinationGetUnreachableDestinations (Mac48Address peerAddress)
 When peer link with a given MAC-address fails - it returns list of unreachable destination addresses. More...
 
Add/delete paths
void AddReactivePath (Mac48Address destination, Mac48Address retransmitter, uint32_t interface, uint32_t metric, Time lifetime, uint32_t seqnum)
 Add a reactive path. More...
 
void AddProactivePath (uint32_t metric, Mac48Address root, Mac48Address retransmitter, uint32_t interface, Time lifetime, uint32_t seqnum)
 Add a proactive path. More...
 
void AddPrecursor (Mac48Address destination, uint32_t precursorInterface, Mac48Address precursorAddress, Time lifetime)
 Add a precursor. More...
 
PrecursorList GetPrecursors (Mac48Address destination)
 Get the precursors list. More...
 
void DeleteProactivePath ()
 Delete all the proactive paths. More...
 
void DeleteProactivePath (Mac48Address root)
 Delete all the proactive paths from a given root. More...
 
void DeleteReactivePath (Mac48Address destination)
 Delete the reactive paths toward a destination. More...
 
Lookup
LookupResult LookupReactive (Mac48Address destination)
 Lookup path to destination. More...
 
LookupResult LookupReactiveExpired (Mac48Address destination)
 Return all reactive paths, including expired. More...
 
LookupResult LookupProactive ()
 Find proactive path to tree root. More...
 
LookupResult LookupProactiveExpired ()
 Return all proactive paths, including expired. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 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...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Static Public Attributes

static const uint32_t INTERFACE_ANY = 0xffffffff
 Means all interfaces. More...
 
static const uint32_t MAX_METRIC = 0xffffffff
 Maximum (the best?) path metric. More...
 

Private Attributes

ProactiveRoute m_root
 Path to proactive tree root MP. More...
 
std::map< Mac48Address, ReactiveRoutem_routes
 List of routes. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

Routing table for HWMP – 802.11s routing protocol.

Introspection did not find any typical Config paths.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 144 bytes (on a 64-bit architecture).

Definition at line 35 of file hwmp-rtable.h.

Member Typedef Documentation

◆ PrecursorList

typedef std::vector<std::pair<uint32_t, Mac48Address> > ns3::dot11s::HwmpRtable::PrecursorList

Path precursor = {MAC, interface ID}.

Definition at line 77 of file hwmp-rtable.h.

Constructor & Destructor Documentation

◆ HwmpRtable()

ns3::dot11s::HwmpRtable::HwmpRtable ( )

Definition at line 46 of file hwmp-rtable.cc.

References DeleteProactivePath().

+ Here is the call graph for this function:

◆ ~HwmpRtable()

ns3::dot11s::HwmpRtable::~HwmpRtable ( )

Definition at line 50 of file hwmp-rtable.cc.

Member Function Documentation

◆ AddPrecursor()

void ns3::dot11s::HwmpRtable::AddPrecursor ( Mac48Address  destination,
uint32_t  precursorInterface,
Mac48Address  precursorAddress,
Time  lifetime 
)

Add a precursor.

Parameters
destinationthe destination address
precursorInterfacethe precursor interface
precursorAddressthe address of the precursor
lifetimethe lifetime

Definition at line 90 of file hwmp-rtable.cc.

References ns3::dot11s::HwmpRtable::Precursor::address, ns3::dot11s::HwmpRtable::Precursor::interface, m_routes, ns3::Simulator::Now(), NS_LOG_FUNCTION, and ns3::dot11s::HwmpRtable::Precursor::whenExpire.

Referenced by ns3::dot11s::HwmpProtocol::ReceivePrep(), ns3::dot11s::HwmpProtocol::ReceivePreq(), and HwmpRtableTest::TestPrecursorAdd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddProactivePath()

void ns3::dot11s::HwmpRtable::AddProactivePath ( uint32_t  metric,
Mac48Address  root,
Mac48Address  retransmitter,
uint32_t  interface,
Time  lifetime,
uint32_t  seqnum 
)

Add a proactive path.

Parameters
metricthe metric
rootthe address of the root
retransmitterthe retransmitter address
interfacethe interface
lifetimethe lifetime
seqnumthe sequence number

Definition at line 78 of file hwmp-rtable.cc.

References ns3::dot11s::HwmpRtable::ProactiveRoute::interface, m_root, ns3::dot11s::HwmpRtable::ProactiveRoute::metric, ns3::Simulator::Now(), NS_LOG_FUNCTION, ns3::dot11s::HwmpRtable::ProactiveRoute::retransmitter, ns3::dot11s::HwmpRtable::ProactiveRoute::root, ns3::dot11s::HwmpRtable::ProactiveRoute::seqnum, and ns3::dot11s::HwmpRtable::ProactiveRoute::whenExpire.

Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq(), HwmpRtableTest::TestAddPath(), and HwmpRtableTest::TestLookup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddReactivePath()

void ns3::dot11s::HwmpRtable::AddReactivePath ( Mac48Address  destination,
Mac48Address  retransmitter,
uint32_t  interface,
uint32_t  metric,
Time  lifetime,
uint32_t  seqnum 
)

Add a reactive path.

Parameters
destinationthe destination address
retransmitterthe retransmitter address
interfacethe interface
metricthe metric
lifetimethe lifetime
seqnumthe sequence number

Definition at line 59 of file hwmp-rtable.cc.

References ns3::Time::GetSeconds(), m_routes, ns3::Simulator::Now(), NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::dot11s::HwmpProtocol::ReceivePrep(), ns3::dot11s::HwmpProtocol::ReceivePreq(), HwmpRtableTest::TestAddPath(), and HwmpRtableTest::TestLookup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteProactivePath() [1/2]

◆ DeleteProactivePath() [2/2]

void ns3::dot11s::HwmpRtable::DeleteProactivePath ( Mac48Address  root)

Delete all the proactive paths from a given root.

Parameters
rootthe address of the root

Definition at line 131 of file hwmp-rtable.cc.

References DeleteProactivePath(), m_root, NS_LOG_FUNCTION, and ns3::dot11s::HwmpRtable::ProactiveRoute::root.

+ Here is the call graph for this function:

◆ DeleteReactivePath()

void ns3::dot11s::HwmpRtable::DeleteReactivePath ( Mac48Address  destination)

Delete the reactive paths toward a destination.

Parameters
destinationthe destination

Definition at line 140 of file hwmp-rtable.cc.

References m_routes, and NS_LOG_FUNCTION.

Referenced by ns3::dot11s::HwmpProtocol::GetPerrReceivers(), ns3::dot11s::HwmpProtocol::MakePathError(), and HwmpRtableTest::TestLookup().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::dot11s::HwmpRtable::DoDispose ( void  )
virtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 54 of file hwmp-rtable.cc.

References m_routes.

◆ GetPrecursors()

HwmpRtable::PrecursorList ns3::dot11s::HwmpRtable::GetPrecursors ( Mac48Address  destination)

Get the precursors list.

Parameters
destinationthe destination
Returns
the precursors list

Definition at line 223 of file hwmp-rtable.cc.

References m_routes, ns3::Simulator::Now(), and NS_LOG_FUNCTION.

Referenced by ns3::dot11s::HwmpProtocol::GetPerrReceivers(), and HwmpRtableTest::TestPrecursorFind().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::dot11s::HwmpRtable::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 38 of file hwmp-rtable.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ GetUnreachableDestinations()

std::vector< HwmpProtocol::FailedDestination > ns3::dot11s::HwmpRtable::GetUnreachableDestinations ( Mac48Address  peerAddress)

When peer link with a given MAC-address fails - it returns list of unreachable destination addresses.

Parameters
peerAddressthe peer address
Returns
the list of unreachable destinations

Definition at line 198 of file hwmp-rtable.cc.

References ns3::dot11s::HwmpProtocol::FailedDestination::destination, m_root, m_routes, NS_LOG_FUNCTION, ns3::dot11s::HwmpRtable::ProactiveRoute::retransmitter, ns3::dot11s::HwmpRtable::ProactiveRoute::root, ns3::dot11s::HwmpProtocol::FailedDestination::seqnum, and ns3::dot11s::HwmpRtable::ProactiveRoute::seqnum.

Referenced by ns3::dot11s::HwmpProtocol::ForwardUnicast(), and ns3::dot11s::HwmpProtocol::PeerLinkStatus().

+ Here is the caller graph for this function:

◆ LookupProactive()

HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupProactive ( )

Find proactive path to tree root.

Note that calling this method has side effect of deleting expired proactive path

Returns
The lookup result

Definition at line 179 of file hwmp-rtable.cc.

References DeleteProactivePath(), LookupProactiveExpired(), m_root, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::dot11s::HwmpRtable::ProactiveRoute::whenExpire.

Referenced by ns3::dot11s::HwmpProtocol::ForwardUnicast(), ns3::dot11s::HwmpProtocol::ProactivePathResolved(), ns3::dot11s::HwmpProtocol::ReceivePreq(), ns3::dot11s::HwmpProtocol::RetryPathDiscovery(), HwmpRtableTest::TestExpire(), and HwmpRtableTest::TestLookup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LookupProactiveExpired()

HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupProactiveExpired ( )

◆ LookupReactive()

HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupReactive ( Mac48Address  destination)

Lookup path to destination.

Parameters
destinationthe destination
Returns
The lookup result

Definition at line 150 of file hwmp-rtable.cc.

References LookupReactiveExpired(), m_routes, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Seconds().

Referenced by ns3::dot11s::HwmpProtocol::ForwardUnicast(), ns3::dot11s::HwmpProtocol::ReactivePathResolved(), ns3::dot11s::HwmpProtocol::ReceivePrep(), ns3::dot11s::HwmpProtocol::ReceivePreq(), ns3::dot11s::HwmpProtocol::RetryPathDiscovery(), HwmpRtableTest::TestExpire(), and HwmpRtableTest::TestLookup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LookupReactiveExpired()

HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupReactiveExpired ( Mac48Address  destination)

Return all reactive paths, including expired.

Parameters
destinationthe destination
Returns
The lookup result

Definition at line 166 of file hwmp-rtable.cc.

References m_routes, ns3::Simulator::Now(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::dot11s::HwmpProtocol::ForwardUnicast(), LookupReactive(), ns3::dot11s::HwmpProtocol::ReceivePerr(), ns3::dot11s::HwmpProtocol::RetryPathDiscovery(), and HwmpRtableTest::TestExpire().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ INTERFACE_ANY

const uint32_t ns3::dot11s::HwmpRtable::INTERFACE_ANY = 0xffffffff
static

Means all interfaces.

Definition at line 39 of file hwmp-rtable.h.

Referenced by DeleteProactivePath(), and ns3::dot11s::HwmpRtable::LookupResult::IsValid().

◆ m_root

ProactiveRoute ns3::dot11s::HwmpRtable::m_root
private

Path to proactive tree root MP.

Definition at line 224 of file hwmp-rtable.h.

Referenced by AddProactivePath(), DeleteProactivePath(), GetUnreachableDestinations(), LookupProactive(), and LookupProactiveExpired().

◆ m_routes

std::map<Mac48Address, ReactiveRoute> ns3::dot11s::HwmpRtable::m_routes
private

◆ MAX_METRIC

const uint32_t ns3::dot11s::HwmpRtable::MAX_METRIC = 0xffffffff
static

Maximum (the best?) path metric.

Definition at line 41 of file hwmp-rtable.h.

Referenced by DeleteProactivePath(), ns3::dot11s::HwmpRtable::LookupResult::IsValid(), and ns3::dot11s::HwmpProtocol::RetryPathDiscovery().


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