Routing table for HWMP – 802.11s routing protocol. More...
#include <hwmp-rtable.h>
Classes | |
struct | LookupResult |
Route lookup result, return type of LookupXXX methods. More... | |
struct | Precursor |
Route found in reactive mode. More... | |
struct | ProactiveRoute |
Route fond in proactive mode. More... | |
struct | ReactiveRoute |
Public Types | |
typedef std::vector< std::pair < uint32_t, Mac48Address > > | PrecursorList |
Path precursor = {MAC, interface ID}. More... | |
Public Member Functions | |
HwmpRtable () | |
~HwmpRtable () | |
void | DoDispose () |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
std::vector < HwmpProtocol::FailedDestination > | GetUnreachableDestinations (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) |
void | AddProactivePath (uint32_t metric, Mac48Address root, Mac48Address retransmitter, uint32_t interface, Time lifetime, uint32_t seqnum) |
void | AddPrecursor (Mac48Address destination, uint32_t precursorInterface, Mac48Address precursorAddress, Time lifetime) |
PrecursorList | GetPrecursors (Mac48Address destination) |
void | DeleteProactivePath () |
void | DeleteProactivePath (Mac48Address root) |
void | DeleteReactivePath (Mac48Address destination) |
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. Note that calling this method has side effect of deleting expired proactive path. More... | |
LookupResult | LookupProactiveExpired () |
Return all proactive paths, including expired. More... | |
![]() | |
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... | |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
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) |
Static Public Member Functions | |
static TypeId | GetTypeId () |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
![]() | |
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, ReactiveRoute > | m_routes |
List of routes. More... | |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
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... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
Routing table for HWMP – 802.11s routing protocol.
Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 35 of file hwmp-rtable.h.
typedef std::vector<std::pair<uint32_t, Mac48Address> > ns3::dot11s::HwmpRtable::PrecursorList |
Path precursor = {MAC, interface ID}.
Definition at line 62 of file hwmp-rtable.h.
ns3::dot11s::HwmpRtable::HwmpRtable | ( | ) |
Definition at line 44 of file hwmp-rtable.cc.
References DeleteProactivePath().
ns3::dot11s::HwmpRtable::~HwmpRtable | ( | ) |
Definition at line 48 of file hwmp-rtable.cc.
void ns3::dot11s::HwmpRtable::AddPrecursor | ( | Mac48Address | destination, |
uint32_t | precursorInterface, | ||
Mac48Address | precursorAddress, | ||
Time | lifetime | ||
) |
Definition at line 86 of file hwmp-rtable.cc.
References ns3::dot11s::HwmpRtable::Precursor::address, ns3::dot11s::HwmpRtable::Precursor::interface, m_routes, ns3::Simulator::Now(), and ns3::dot11s::HwmpRtable::Precursor::whenExpire.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePrep(), ns3::dot11s::HwmpProtocol::ReceivePreq(), and HwmpRtableTest::TestPrecursorAdd().
void ns3::dot11s::HwmpRtable::AddProactivePath | ( | uint32_t | metric, |
Mac48Address | root, | ||
Mac48Address | retransmitter, | ||
uint32_t | interface, | ||
Time | lifetime, | ||
uint32_t | seqnum | ||
) |
Definition at line 75 of file hwmp-rtable.cc.
References ns3::dot11s::HwmpRtable::ProactiveRoute::interface, m_root, ns3::dot11s::HwmpRtable::ProactiveRoute::metric, ns3::Simulator::Now(), 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().
void ns3::dot11s::HwmpRtable::AddReactivePath | ( | Mac48Address | destination, |
Mac48Address | retransmitter, | ||
uint32_t | interface, | ||
uint32_t | metric, | ||
Time | lifetime, | ||
uint32_t | seqnum | ||
) |
Definition at line 57 of file hwmp-rtable.cc.
References m_routes, ns3::Simulator::Now(), and NS_ASSERT.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePrep(), ns3::dot11s::HwmpProtocol::ReceivePreq(), HwmpRtableTest::TestAddPath(), and HwmpRtableTest::TestLookup().
void ns3::dot11s::HwmpRtable::DeleteProactivePath | ( | ) |
Definition at line 115 of file hwmp-rtable.cc.
References ns3::Mac48Address::GetBroadcast(), ns3::dot11s::HwmpRtable::ProactiveRoute::interface, INTERFACE_ANY, m_root, MAX_METRIC, ns3::dot11s::HwmpRtable::ProactiveRoute::metric, ns3::Simulator::Now(), ns3::dot11s::HwmpRtable::ProactiveRoute::precursors, ns3::dot11s::HwmpRtable::ProactiveRoute::retransmitter, ns3::dot11s::HwmpRtable::ProactiveRoute::seqnum, and ns3::dot11s::HwmpRtable::ProactiveRoute::whenExpire.
Referenced by DeleteProactivePath(), ns3::dot11s::HwmpProtocol::GetPerrReceivers(), HwmpRtable(), LookupProactive(), and HwmpRtableTest::TestLookup().
void ns3::dot11s::HwmpRtable::DeleteProactivePath | ( | Mac48Address | root | ) |
Definition at line 125 of file hwmp-rtable.cc.
References DeleteProactivePath(), m_root, and ns3::dot11s::HwmpRtable::ProactiveRoute::root.
void ns3::dot11s::HwmpRtable::DeleteReactivePath | ( | Mac48Address | destination | ) |
Definition at line 133 of file hwmp-rtable.cc.
References m_routes.
Referenced by ns3::dot11s::HwmpProtocol::GetPerrReceivers(), ns3::dot11s::HwmpProtocol::MakePathError(), and HwmpRtableTest::TestLookup().
|
virtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden 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 52 of file hwmp-rtable.cc.
References m_routes.
HwmpRtable::PrecursorList ns3::dot11s::HwmpRtable::GetPrecursors | ( | Mac48Address | destination | ) |
Definition at line 208 of file hwmp-rtable.cc.
References m_routes, and ns3::Simulator::Now().
Referenced by ns3::dot11s::HwmpProtocol::GetPerrReceivers(), and HwmpRtableTest::TestPrecursorFind().
|
static |
Definition at line 37 of file hwmp-rtable.cc.
References ns3::TypeId::SetParent().
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.
Definition at line 184 of file hwmp-rtable.cc.
References ns3::dot11s::HwmpProtocol::FailedDestination::destination, m_root, m_routes, 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().
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.
Definition at line 168 of file hwmp-rtable.cc.
References DeleteProactivePath(), LookupProactiveExpired(), m_root, ns3::Simulator::Now(), NS_LOG_DEBUG, 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().
HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupProactiveExpired | ( | ) |
Return all proactive paths, including expired.
Definition at line 178 of file hwmp-rtable.cc.
References ns3::dot11s::HwmpRtable::ProactiveRoute::interface, m_root, ns3::dot11s::HwmpRtable::ProactiveRoute::metric, ns3::Simulator::Now(), ns3::dot11s::HwmpRtable::ProactiveRoute::retransmitter, ns3::dot11s::HwmpRtable::ProactiveRoute::seqnum, and ns3::dot11s::HwmpRtable::ProactiveRoute::whenExpire.
Referenced by ns3::dot11s::HwmpProtocol::ForwardUnicast(), LookupProactive(), and HwmpRtableTest::TestExpire().
HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupReactive | ( | Mac48Address | destination | ) |
Lookup path to destination.
Definition at line 142 of file hwmp-rtable.cc.
References LookupReactiveExpired(), m_routes, ns3::Simulator::Now(), NS_LOG_DEBUG, 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().
HwmpRtable::LookupResult ns3::dot11s::HwmpRtable::LookupReactiveExpired | ( | Mac48Address | destination | ) |
Return all reactive paths, including expired.
Definition at line 157 of file hwmp-rtable.cc.
References m_routes, and ns3::Simulator::Now().
Referenced by ns3::dot11s::HwmpProtocol::ForwardUnicast(), LookupReactive(), ns3::dot11s::HwmpProtocol::ReceivePerr(), ns3::dot11s::HwmpProtocol::RetryPathDiscovery(), and HwmpRtableTest::TestExpire().
|
static |
Means all interfaces.
Definition at line 39 of file hwmp-rtable.h.
Referenced by DeleteProactivePath(), and ns3::dot11s::HwmpRtable::LookupResult::IsValid().
|
private |
Path to proactive tree root MP.
Definition at line 142 of file hwmp-rtable.h.
Referenced by AddProactivePath(), DeleteProactivePath(), GetUnreachableDestinations(), LookupProactive(), and LookupProactiveExpired().
|
private |
List of routes.
Definition at line 140 of file hwmp-rtable.h.
Referenced by AddPrecursor(), AddReactivePath(), DeleteReactivePath(), DoDispose(), GetPrecursors(), GetUnreachableDestinations(), LookupReactive(), and LookupReactiveExpired().
|
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().