Hybrid wireless mesh protocol – a routing protocol of IEEE 802.11s draft. More...
#include <hwmp-protocol.h>
Classes | |
struct | FailedDestination |
structure of unreachable destination - address and sequence number More... | |
struct | PathError |
Structure of path error: IePerr and list of receivers: interfaces and MAC address. More... | |
struct | PreqEvent |
struct | QueuedPacket |
Packet waiting its routing information. More... | |
struct | Statistics |
Public Member Functions | |
HwmpProtocol () | |
~HwmpProtocol () | |
int64_t | AssignStreams (int64_t stream) |
void | DoDispose () |
bool | Install (Ptr< MeshPointDevice >) |
Install HWMP on given mesh point. | |
void | PeerLinkStatus (Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface, bool status) |
bool | RemoveRoutingStuff (uint32_t fromIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t &protocolType) |
Cleanup packet from all tags. | |
void | Report (std::ostream &) const |
Statistics: | |
bool | RequestRoute (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< const Packet > packet, uint16_t protocolType, RouteReplyCallback routeReply) |
Route request, inherited from MeshL2RoutingProtocol. | |
void | ResetStats () |
void | SetNeighboursCallback (Callback< std::vector< Mac48Address >, uint32_t > cb) |
This callback is used to obtain active neighbours on a given interface. | |
Proactive PREQ mechanism: | |
void | SetRoot () |
void | UnsetRoot () |
![]() | |
virtual | ~MeshL2RoutingProtocol () |
virtual D-tor for subclasses | |
Ptr< MeshPointDevice > | GetMeshPoint () const |
Each mesh protocol must be installed on the mesh point to work. | |
void | SetMeshPoint (Ptr< MeshPointDevice > mp) |
Set host mesh point, analog of SetNode (...) methods for upper layer protocols. | |
![]() | |
Object () | |
virtual | ~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 | Start (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~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) |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Never forget to support NS3 object model. |
Private Types | |
typedef std::map< uint32_t, Ptr< HwmpProtocolMac > > | HwmpProtocolMacMap |
Private Member Functions | |
HwmpProtocol (const HwmpProtocol &) | |
virtual void | DoStart () |
bool | ForwardUnicast (uint32_t sourceIface, const Mac48Address source, const Mac48Address destination, Ptr< Packet > packet, uint16_t protocolType, RouteReplyCallback routeReply, uint32_t ttl) |
Like RequestRoute, but for unicast packets. | |
Mac48Address | GetAddress () |
HwmpProtocol & | operator= (const HwmpProtocol &) |
Interaction with HWMP MAC plugin | |
void | ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric) |
void | ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric) |
void | ReceivePerr (std::vector< FailedDestination >, Mac48Address from, uint32_t interface, Mac48Address fromMp) |
void | SendPrep (Mac48Address src, Mac48Address dst, Mac48Address retransmitter, uint32_t initMetric, uint32_t originatorDsn, uint32_t destinationSN, uint32_t lifetime, uint32_t interface) |
PathError | MakePathError (std::vector< FailedDestination > destinations) |
forms a path error information element when list of destination fails on a given interface | |
void | ForwardPathError (PathError perr) |
Forwards a received path error. | |
void | InitiatePathError (PathError perr) |
Passes a self-generated PERR to interface-plugin. | |
std::vector< std::pair < uint32_t, Mac48Address > > | GetPerrReceivers (std::vector< FailedDestination > failedDest) |
std::vector< Mac48Address > | GetPreqReceivers (uint32_t interface) |
std::vector< Mac48Address > | GetBroadcastReceivers (uint32_t interface) |
bool | DropDataFrame (uint32_t seqno, Mac48Address source) |
MAC-plugin asks whether the frame can be dropped. Protocol automatically updates seqno. | |
Methods related to Queue/Dequeue procedures | |
bool | QueuePacket (QueuedPacket packet) |
QueuedPacket | DequeueFirstPacketByDst (Mac48Address dst) |
QueuedPacket | DequeueFirstPacket () |
void | ReactivePathResolved (Mac48Address dst) |
void | ProactivePathResolved () |
Methods responsible for path discovery retry procedure: | |
bool | ShouldSendPreq (Mac48Address dst) |
checks when the last path discovery procedure was started for a given destination. | |
void | RetryPathDiscovery (Mac48Address dst, uint8_t numOfRetry) |
Generates PREQ retry when retry timeout has expired and route is still unresolved. | |
void | SendProactivePreq () |
Proactive Preq routines: | |
Methods needed by HwmpMacLugin to access protocol parameters: | |
bool | GetDoFlag () |
bool | GetRfFlag () |
Time | GetPreqMinInterval () |
Time | GetPerrMinInterval () |
uint8_t | GetMaxTtl () |
uint32_t | GetNextPreqId () |
uint32_t | GetNextHwmpSeqno () |
uint32_t | GetActivePathLifetime () |
uint8_t | GetUnicastPerrThreshold () |
Friends | |
class | HwmpProtocolMac |
Additional Inherited Members | |
![]() | |
typedef Callback< void, bool, Ptr< Packet >, Mac48Address, Mac48Address, uint16_t, uint32_t > | RouteReplyCallback |
![]() | |
Object (const Object &o) | |
virtual void | DoStart (void) |
virtual void | NotifyNewAggregate (void) |
![]() | |
Ptr< MeshPointDevice > | m_mp |
Host mesh point. |
Hybrid wireless mesh protocol – a routing protocol of IEEE 802.11s draft.
ns3::dot11s::HwmpProtocol is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 47 of file hwmp-protocol.h.
|
private |
Definition at line 128 of file hwmp-protocol.h.
ns3::dot11s::HwmpProtocol::HwmpProtocol | ( | ) |
Definition at line 171 of file hwmp-protocol.cc.
References m_coefficient, and NS_LOG_FUNCTION_NOARGS.
ns3::dot11s::HwmpProtocol::~HwmpProtocol | ( | ) |
Definition at line 198 of file hwmp-protocol.cc.
References NS_LOG_FUNCTION_NOARGS.
|
private |
int64_t ns3::dot11s::HwmpProtocol::AssignStreams | ( | int64_t | stream | ) |
Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.
stream | first stream index to use |
Definition at line 1173 of file hwmp-protocol.cc.
References m_coefficient, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().
Referenced by ns3::dot11s::HwmpProtocolMac::AssignStreams().
|
private |
Definition at line 902 of file hwmp-protocol.cc.
References m_rqueue, and ns3::dot11s::HwmpProtocol::QueuedPacket::pkt.
Referenced by ProactivePathResolved().
|
private |
Definition at line 885 of file hwmp-protocol.cc.
References m_rqueue, and ns3::dot11s::HwmpProtocol::QueuedPacket::pkt.
Referenced by ReactivePathResolved(), and RetryPathDiscovery().
|
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 214 of file hwmp-protocol.cc.
References ns3::EventId::Cancel(), m_hwmpSeqnoMetricDatabase, m_interfaces, m_lastDataSeqno, ns3::MeshL2RoutingProtocol::m_mp, m_preqTimeouts, m_proactivePreqTimer, m_rqueue, m_rtable, and NS_LOG_FUNCTION_NOARGS.
|
privatevirtual |
Definition at line 204 of file hwmp-protocol.cc.
References ns3::Time::GetSeconds(), m_coefficient, m_isRoot, m_randomStart, ns3::ObjectBase::SetAttribute(), and SetRoot().
|
private |
MAC-plugin asks whether the frame can be dropped. Protocol automatically updates seqno.
seqno | is the sequence number of source |
source | is the source address |
Definition at line 743 of file hwmp-protocol.cc.
References GetAddress(), and m_lastDataSeqno.
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveData().
|
private |
Forwards a received path error.
Definition at line 799 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpProtocol::PathError::destinations, m_interfaces, and ns3::dot11s::HwmpProtocol::PathError::receivers.
Referenced by ReceivePerr().
|
private |
Like RequestRoute, but for unicast packets.
Definition at line 324 of file hwmp-protocol.cc.
References ns3::Packet::AddPacketTag(), ns3::dot11s::HwmpProtocol::QueuedPacket::dst, GetAddress(), ns3::Mac48Address::GetBroadcast(), ns3::MeshL2RoutingProtocol::GetMeshPoint(), GetNextHwmpSeqno(), ns3::Packet::GetSize(), ns3::dot11s::HwmpRtable::GetUnreachableDestinations(), ns3::dot11s::HwmpRtable::LookupResult::ifIndex, ns3::dot11s::HwmpProtocol::QueuedPacket::inInterface, ns3::dot11s::HwmpProtocol::Statistics::initiatedPreq, InitiatePathError(), ns3::dot11s::HwmpRtable::LookupProactive(), ns3::dot11s::HwmpRtable::LookupProactiveExpired(), ns3::dot11s::HwmpRtable::LookupReactive(), ns3::dot11s::HwmpRtable::LookupReactiveExpired(), m_interfaces, m_rtable, m_stats, MakePathError(), NS_ASSERT, NS_LOG_DEBUG, ns3::dot11s::HwmpProtocol::QueuedPacket::pkt, ns3::dot11s::HwmpProtocol::QueuedPacket::protocol, QueuePacket(), ns3::dot11s::HwmpProtocol::QueuedPacket::reply, ns3::dot11s::HwmpRtable::LookupResult::retransmitter, ns3::dot11s::HwmpRtable::LookupResult::seqnum, ns3::dot11s::HwmpTag::SetAddress(), ns3::dot11s::HwmpTag::SetTtl(), ShouldSendPreq(), ns3::dot11s::HwmpProtocol::QueuedPacket::src, ns3::dot11s::HwmpProtocol::Statistics::totalDropped, ns3::dot11s::HwmpProtocol::Statistics::totalQueued, ns3::dot11s::HwmpProtocol::Statistics::txBytes, and ns3::dot11s::HwmpProtocol::Statistics::txUnicast.
Referenced by RequestRoute().
|
private |
Definition at line 1094 of file hwmp-protocol.cc.
References ns3::Time::GetMicroSeconds(), and m_dot11MeshHWMPactivePathTimeout.
Referenced by ns3::dot11s::HwmpProtocolMac::RequestDestination().
|
private |
Definition at line 1104 of file hwmp-protocol.cc.
References m_address.
Referenced by DropDataFrame(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ForwardUnicast(), ns3::dot11s::HwmpProtocolMac::ReceiveAction(), ReceivePerr(), ReceivePrep(), ReceivePreq(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), and SendProactivePreq().
|
private |
Definition at line 858 of file hwmp-protocol.cc.
References ns3::Mac48Address::GetBroadcast(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_neighboursCallback, and m_unicastDataThreshold.
Referenced by RequestRoute().
|
private |
Definition at line 1057 of file hwmp-protocol.cc.
References m_doFlag.
Referenced by ns3::dot11s::HwmpProtocolMac::RequestDestination().
|
private |
Definition at line 1077 of file hwmp-protocol.cc.
References m_maxTtl.
Referenced by ns3::dot11s::HwmpProtocolMac::RequestDestination().
|
private |
Definition at line 1088 of file hwmp-protocol.cc.
References m_hwmpSeqno.
Referenced by ForwardUnicast(), ReceivePreq(), RetryPathDiscovery(), and SendProactivePreq().
|
private |
Definition at line 1082 of file hwmp-protocol.cc.
References m_preqId.
Referenced by ns3::dot11s::HwmpProtocolMac::RequestDestination(), and SendProactivePreq().
|
private |
Definition at line 1072 of file hwmp-protocol.cc.
References m_dot11MeshHWMPperrMinInterval.
Referenced by ns3::dot11s::HwmpProtocolMac::SendMyPerr().
|
private |
Definition at line 816 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpRtable::DeleteProactivePath(), ns3::dot11s::HwmpRtable::DeleteReactivePath(), ns3::dot11s::HwmpRtable::GetPrecursors(), and m_rtable.
Referenced by MakePathError().
|
private |
Definition at line 1067 of file hwmp-protocol.cc.
References m_dot11MeshHWMPpreqMinInterval.
Referenced by ns3::dot11s::HwmpProtocolMac::SendMyPreq().
|
private |
Definition at line 843 of file hwmp-protocol.cc.
References ns3::Mac48Address::GetBroadcast(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), m_neighboursCallback, and m_unicastPreqThreshold.
Referenced by ns3::dot11s::HwmpProtocolMac::SendPreq().
|
private |
Definition at line 1062 of file hwmp-protocol.cc.
References m_rfFlag.
Referenced by ns3::dot11s::HwmpProtocolMac::RequestDestination().
|
static |
Never forget to support NS3 object model.
Reimplemented from ns3::MeshL2RoutingProtocol.
Definition at line 46 of file hwmp-protocol.cc.
References m_doFlag, m_dot11MeshHWMPactivePathTimeout, m_dot11MeshHWMPactiveRootTimeout, m_dot11MeshHWMPmaxPREQretries, m_dot11MeshHWMPnetDiameterTraversalTime, m_dot11MeshHWMPpathToRootInterval, m_dot11MeshHWMPperrMinInterval, m_dot11MeshHWMPpreqMinInterval, m_dot11MeshHWMPrannInterval, m_maxQueueSize, m_maxTtl, m_randomStart, m_rfFlag, m_routeDiscoveryTimeCallback, m_unicastDataThreshold, m_unicastPerrThreshold, m_unicastPreqThreshold, ns3::MakeTraceSourceAccessor(), ns3::MicroSeconds(), ns3::Seconds(), and ns3::TypeId::SetParent().
|
private |
Definition at line 1099 of file hwmp-protocol.cc.
References m_unicastPerrThreshold.
Referenced by ns3::dot11s::HwmpProtocolMac::ForwardPerr().
|
private |
Passes a self-generated PERR to interface-plugin.
Definition at line 783 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpProtocol::PathError::destinations, m_interfaces, and ns3::dot11s::HwmpProtocol::PathError::receivers.
Referenced by ForwardUnicast(), and PeerLinkStatus().
bool ns3::dot11s::HwmpProtocol::Install | ( | Ptr< MeshPointDevice > | mp | ) |
Install HWMP on given mesh point.
Installing protocol cause installing its interface MAC plugins.
Also MP aggregates all installed protocols, HWMP protocol can be accessed via MeshPointDevice::GetObject<dot11s::HwmpProtocol>();
Definition at line 696 of file hwmp-protocol.cc.
References ns3::Object::AggregateObject(), ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric(), ns3::Mac48Address::ConvertFrom(), ns3::MeshPointDevice::GetAddress(), ns3::MeshPointDevice::GetInterfaces(), ns3::MeshWifiInterfaceMac::InstallPlugin(), m_address, m_interfaces, ns3::MeshL2RoutingProtocol::m_mp, ns3::MakeCallback(), ns3::MeshWifiInterfaceMac::SetLinkMetricCallback(), and ns3::MeshPointDevice::SetRoutingProtocol().
Referenced by ns3::Dot11sStack::InstallStack().
|
private |
forms a path error information element when list of destination fails on a given interface
Definition at line 765 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpRtable::DeleteReactivePath(), ns3::dot11s::HwmpProtocol::PathError::destinations, GetPerrReceivers(), ns3::dot11s::HwmpProtocol::Statistics::initiatedPerr, m_rtable, m_stats, and ns3::dot11s::HwmpProtocol::PathError::receivers.
Referenced by ForwardUnicast(), PeerLinkStatus(), and ReceivePerr().
|
private |
void ns3::dot11s::HwmpProtocol::PeerLinkStatus | ( | Mac48Address | meshPontAddress, |
Mac48Address | peerAddress, | ||
uint32_t | interface, | ||
bool | status | ||
) |
Definition at line 728 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpRtable::GetUnreachableDestinations(), InitiatePathError(), m_rtable, and MakePathError().
Referenced by ns3::Dot11sStack::InstallStack().
|
private |
Definition at line 942 of file hwmp-protocol.cc.
References ns3::Packet::AddPacketTag(), DequeueFirstPacket(), ns3::dot11s::HwmpProtocol::QueuedPacket::dst, ns3::Mac48Address::GetBroadcast(), ns3::Packet::GetSize(), ns3::dot11s::HwmpRtable::LookupResult::ifIndex, ns3::dot11s::HwmpRtable::LookupProactive(), m_rtable, m_stats, NS_ASSERT, NS_FATAL_ERROR, ns3::dot11s::HwmpProtocol::QueuedPacket::pkt, ns3::dot11s::HwmpProtocol::QueuedPacket::protocol, ns3::Packet::RemovePacketTag(), ns3::dot11s::HwmpProtocol::QueuedPacket::reply, ns3::dot11s::HwmpRtable::LookupResult::retransmitter, ns3::dot11s::HwmpTag::SetAddress(), ns3::dot11s::HwmpProtocol::QueuedPacket::src, ns3::dot11s::HwmpProtocol::Statistics::txBytes, and ns3::dot11s::HwmpProtocol::Statistics::txUnicast.
Referenced by ReceivePreq().
|
private |
Definition at line 874 of file hwmp-protocol.cc.
References m_maxQueueSize, and m_rqueue.
Referenced by ForwardUnicast().
|
private |
Definition at line 915 of file hwmp-protocol.cc.
References ns3::Packet::AddPacketTag(), DequeueFirstPacketByDst(), ns3::dot11s::HwmpProtocol::QueuedPacket::dst, ns3::Mac48Address::GetBroadcast(), ns3::Packet::GetSize(), ns3::dot11s::HwmpRtable::LookupResult::ifIndex, ns3::dot11s::HwmpRtable::LookupReactive(), m_preqTimeouts, m_routeDiscoveryTimeCallback, m_rtable, m_stats, ns3::Simulator::Now(), NS_ASSERT, ns3::dot11s::HwmpProtocol::QueuedPacket::pkt, ns3::dot11s::HwmpProtocol::QueuedPacket::protocol, ns3::Packet::RemovePacketTag(), ns3::dot11s::HwmpProtocol::QueuedPacket::reply, ns3::dot11s::HwmpRtable::LookupResult::retransmitter, ns3::dot11s::HwmpTag::SetAddress(), ns3::dot11s::HwmpProtocol::QueuedPacket::src, ns3::dot11s::HwmpProtocol::Statistics::txBytes, and ns3::dot11s::HwmpProtocol::Statistics::txUnicast.
Referenced by ReceivePrep(), and ReceivePreq().
|
private |
Definition at line 646 of file hwmp-protocol.cc.
References ForwardPathError(), GetAddress(), ns3::dot11s::HwmpRtable::LookupResult::ifIndex, ns3::dot11s::HwmpRtable::LookupReactiveExpired(), m_rtable, MakePathError(), NS_LOG_DEBUG, ns3::dot11s::HwmpRtable::LookupResult::retransmitter, and ns3::dot11s::HwmpRtable::LookupResult::seqnum.
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().
|
private |
Definition at line 567 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpRtable::AddPrecursor(), ns3::dot11s::HwmpRtable::AddReactivePath(), GetAddress(), ns3::Mac48Address::GetBroadcast(), ns3::dot11s::IePrep::GetDestinationAddress(), ns3::dot11s::IePrep::GetDestinationSeqNumber(), ns3::dot11s::IePrep::GetLifetime(), ns3::dot11s::IePrep::GetMetric(), ns3::dot11s::IePrep::GetOriginatorAddress(), ns3::dot11s::IePrep::IncrementMetric(), ns3::dot11s::HwmpRtable::LookupReactive(), m_hwmpSeqnoMetricDatabase, m_interfaces, m_rtable, ns3::MicroSeconds(), NS_ASSERT, NS_LOG_DEBUG, and ReactivePathResolved().
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().
|
private |
Definition at line 404 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpRtable::AddPrecursor(), ns3::dot11s::HwmpRtable::AddProactivePath(), ns3::dot11s::HwmpRtable::AddReactivePath(), ns3::dot11s::IePreq::DelDestinationAddressElement(), GetAddress(), ns3::Mac48Address::GetBroadcast(), ns3::dot11s::IePreq::GetDestCount(), ns3::dot11s::IePreq::GetDestinationList(), ns3::dot11s::IePreq::GetLifetime(), ns3::dot11s::IePreq::GetMetric(), ns3::Time::GetMicroSeconds(), GetNextHwmpSeqno(), ns3::dot11s::IePreq::GetOriginatorAddress(), ns3::dot11s::IePreq::GetOriginatorSeqNumber(), ns3::dot11s::IePreq::IncrementMetric(), ns3::dot11s::IePreq::IsNeedNotPrep(), ns3::dot11s::HwmpRtable::LookupResult::lifetime, ns3::dot11s::HwmpRtable::LookupProactive(), ns3::dot11s::HwmpRtable::LookupReactive(), m_hwmpSeqnoMetricDatabase, m_interfaces, m_rtable, ns3::dot11s::HwmpRtable::LookupResult::metric, ns3::MicroSeconds(), NS_ASSERT, NS_LOG_DEBUG, ProactivePathResolved(), ReactivePathResolved(), ns3::dot11s::HwmpRtable::LookupResult::retransmitter, SendPrep(), and ns3::dot11s::HwmpRtable::LookupResult::seqnum.
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().
|
virtual |
Cleanup packet from all tags.
Implements ns3::MeshL2RoutingProtocol.
Definition at line 313 of file hwmp-protocol.cc.
References NS_FATAL_ERROR, and ns3::Packet::RemovePacketTag().
void ns3::dot11s::HwmpProtocol::Report | ( | std::ostream & | os | ) | const |
Definition at line 1135 of file hwmp-protocol.cc.
References ns3::Time::GetSeconds(), m_address, m_doFlag, m_dot11MeshHWMPactivePathTimeout, m_dot11MeshHWMPactiveRootTimeout, m_dot11MeshHWMPmaxPREQretries, m_dot11MeshHWMPnetDiameterTraversalTime, m_dot11MeshHWMPpathToRootInterval, m_dot11MeshHWMPperrMinInterval, m_dot11MeshHWMPpreqMinInterval, m_dot11MeshHWMPrannInterval, m_interfaces, m_isRoot, m_maxQueueSize, m_maxTtl, m_rfFlag, m_stats, m_unicastDataThreshold, m_unicastPerrThreshold, m_unicastPreqThreshold, and ns3::dot11s::HwmpProtocol::Statistics::Print().
Referenced by ns3::Dot11sStack::Report().
|
virtual |
Route request, inherited from MeshL2RoutingProtocol.
Implements ns3::MeshL2RoutingProtocol.
Definition at line 232 of file hwmp-protocol.cc.
References ns3::Packet::AddPacketTag(), ns3::Packet::Copy(), ns3::dot11s::HwmpTag::DecrementTtl(), ns3::dot11s::HwmpProtocol::Statistics::droppedTtl, ForwardUnicast(), ns3::Mac48Address::GetBroadcast(), GetBroadcastReceivers(), ns3::MeshL2RoutingProtocol::GetMeshPoint(), ns3::Packet::GetSize(), ns3::dot11s::HwmpTag::GetTtl(), m_dataSeqno, m_interfaces, m_maxTtl, m_stats, NS_FATAL_ERROR, ns3::Packet::PeekPacketTag(), ns3::Packet::RemovePacketTag(), ns3::dot11s::HwmpTag::SetAddress(), ns3::dot11s::HwmpTag::SetSeqno(), ns3::dot11s::HwmpTag::SetTtl(), ns3::dot11s::HwmpProtocol::Statistics::txBroadcast, and ns3::dot11s::HwmpProtocol::Statistics::txBytes.
void ns3::dot11s::HwmpProtocol::ResetStats | ( | ) |
Definition at line 1163 of file hwmp-protocol.cc.
References m_interfaces, and m_stats.
Referenced by ns3::Dot11sStack::ResetStats().
|
private |
Generates PREQ retry when retry timeout has expired and route is still unresolved.
When PREQ retry has achieved the maximum level - retry mechanism should be canceled
Definition at line 981 of file hwmp-protocol.cc.
References DequeueFirstPacketByDst(), ns3::dot11s::HwmpProtocol::QueuedPacket::dst, ns3::Mac48Address::GetBroadcast(), GetNextHwmpSeqno(), ns3::dot11s::HwmpRtable::LookupProactive(), ns3::dot11s::HwmpRtable::LookupReactive(), ns3::dot11s::HwmpRtable::LookupReactiveExpired(), m_dot11MeshHWMPmaxPREQretries, m_dot11MeshHWMPnetDiameterTraversalTime, m_interfaces, m_preqTimeouts, m_routeDiscoveryTimeCallback, m_rtable, m_stats, ns3::dot11s::HwmpRtable::MAX_METRIC, ns3::Simulator::Now(), NS_ASSERT, ns3::dot11s::HwmpProtocol::QueuedPacket::pkt, ns3::dot11s::HwmpProtocol::QueuedPacket::protocol, ns3::dot11s::HwmpProtocol::QueuedPacket::reply, ns3::dot11s::HwmpRtable::LookupResult::retransmitter, ns3::Simulator::Schedule(), ns3::dot11s::HwmpRtable::LookupResult::seqnum, ns3::dot11s::HwmpProtocol::QueuedPacket::src, and ns3::dot11s::HwmpProtocol::Statistics::totalDropped.
Referenced by ShouldSendPreq().
|
private |
Definition at line 671 of file hwmp-protocol.cc.
References ns3::dot11s::HwmpProtocol::Statistics::initiatedPrep, m_interfaces, m_maxTtl, m_stats, NS_ASSERT, ns3::dot11s::IePrep::SetDestinationAddress(), ns3::dot11s::IePrep::SetDestinationSeqNumber(), ns3::dot11s::IePrep::SetHopcount(), ns3::dot11s::IePrep::SetLifetime(), ns3::dot11s::IePrep::SetMetric(), ns3::dot11s::IePrep::SetOriginatorAddress(), ns3::dot11s::IePrep::SetOriginatorSeqNumber(), and ns3::dot11s::IePrep::SetTtl().
Referenced by ReceivePreq().
|
private |
Proactive Preq routines:
Definition at line 1037 of file hwmp-protocol.cc.
References ns3::dot11s::IePreq::AddDestinationAddressElement(), GetAddress(), ns3::Mac48Address::GetBroadcast(), ns3::Time::GetMicroSeconds(), GetNextHwmpSeqno(), GetNextPreqId(), m_dot11MeshHWMPactiveRootTimeout, m_dot11MeshHWMPpathToRootInterval, m_interfaces, m_maxTtl, m_proactivePreqTimer, ns3::Simulator::Schedule(), ns3::dot11s::IePreq::SetHopcount(), ns3::dot11s::IePreq::SetLifetime(), ns3::dot11s::IePreq::SetOriginatorAddress(), ns3::dot11s::IePreq::SetOriginatorSeqNumber(), ns3::dot11s::IePreq::SetPreqID(), and ns3::dot11s::IePreq::SetTTL().
Referenced by SetRoot().
void ns3::dot11s::HwmpProtocol::SetNeighboursCallback | ( | Callback< std::vector< Mac48Address >, uint32_t > | cb | ) |
This callback is used to obtain active neighbours on a given interface.
cb | is a callback, which returns a list of addresses on given interface (uint32_t) |
Definition at line 738 of file hwmp-protocol.cc.
References m_neighboursCallback.
Referenced by ns3::Dot11sStack::InstallStack().
void ns3::dot11s::HwmpProtocol::SetRoot | ( | ) |
Definition at line 1024 of file hwmp-protocol.cc.
References ns3::UniformRandomVariable::GetValue(), m_address, m_coefficient, m_isRoot, m_proactivePreqTimer, NS_LOG_DEBUG, ns3::Simulator::Schedule(), ns3::Seconds(), and SendProactivePreq().
Referenced by DoStart(), and ns3::Dot11sStack::InstallStack().
|
private |
checks when the last path discovery procedure was started for a given destination.
If the retry counter has not achieved the maximum level - preq should not be sent
Definition at line 967 of file hwmp-protocol.cc.
References m_dot11MeshHWMPnetDiameterTraversalTime, m_preqTimeouts, ns3::Now(), RetryPathDiscovery(), and ns3::Simulator::Schedule().
Referenced by ForwardUnicast().
void ns3::dot11s::HwmpProtocol::UnsetRoot | ( | ) |
Definition at line 1032 of file hwmp-protocol.cc.
References ns3::EventId::Cancel(), and m_proactivePreqTimer.
|
friend |
Definition at line 100 of file hwmp-protocol.h.
|
private |
Definition at line 236 of file hwmp-protocol.h.
Referenced by GetAddress(), Install(), Report(), and SetRoot().
|
private |
Random variable for random start time
Definition at line 284 of file hwmp-protocol.h.
Referenced by AssignStreams(), DoStart(), HwmpProtocol(), and SetRoot().
|
private |
Definition at line 237 of file hwmp-protocol.h.
Referenced by RequestRoute().
|
private |
Definition at line 280 of file hwmp-protocol.h.
Referenced by GetDoFlag(), GetTypeId(), and Report().
|
private |
Definition at line 272 of file hwmp-protocol.h.
Referenced by GetActivePathLifetime(), GetTypeId(), and Report().
|
private |
Definition at line 271 of file hwmp-protocol.h.
Referenced by GetTypeId(), Report(), and SendProactivePreq().
|
private |
Definition at line 267 of file hwmp-protocol.h.
Referenced by GetTypeId(), Report(), and RetryPathDiscovery().
|
private |
Definition at line 268 of file hwmp-protocol.h.
Referenced by GetTypeId(), Report(), RetryPathDiscovery(), and ShouldSendPreq().
|
private |
Definition at line 273 of file hwmp-protocol.h.
Referenced by GetTypeId(), Report(), and SendProactivePreq().
|
private |
Definition at line 270 of file hwmp-protocol.h.
Referenced by GetPerrMinInterval(), GetTypeId(), and Report().
|
private |
Definition at line 269 of file hwmp-protocol.h.
Referenced by GetPreqMinInterval(), GetTypeId(), and Report().
|
private |
Definition at line 274 of file hwmp-protocol.h.
Referenced by GetTypeId(), and Report().
|
private |
Definition at line 238 of file hwmp-protocol.h.
Referenced by GetNextHwmpSeqno().
|
private |
keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address
Definition at line 245 of file hwmp-protocol.h.
Referenced by DoDispose(), ReceivePrep(), and ReceivePreq().
|
private |
Definition at line 235 of file hwmp-protocol.h.
Referenced by DoDispose(), ForwardPathError(), ForwardUnicast(), InitiatePathError(), Install(), ReceivePrep(), ReceivePreq(), Report(), RequestRoute(), ResetStats(), RetryPathDiscovery(), SendPrep(), and SendProactivePreq().
|
private |
Definition at line 275 of file hwmp-protocol.h.
|
private |
Definition at line 243 of file hwmp-protocol.h.
Referenced by DoDispose(), and DropDataFrame().
|
private |
Definition at line 266 of file hwmp-protocol.h.
Referenced by GetTypeId(), QueuePacket(), and Report().
|
private |
Definition at line 276 of file hwmp-protocol.h.
Referenced by GetMaxTtl(), GetTypeId(), Report(), RequestRoute(), SendPrep(), and SendProactivePreq().
|
private |
Definition at line 285 of file hwmp-protocol.h.
Referenced by GetBroadcastReceivers(), GetPreqReceivers(), and SetNeighboursCallback().
|
private |
Definition at line 239 of file hwmp-protocol.h.
Referenced by GetNextPreqId().
|
private |
Definition at line 257 of file hwmp-protocol.h.
Referenced by DoDispose(), ReactivePathResolved(), RetryPathDiscovery(), and ShouldSendPreq().
|
private |
Definition at line 258 of file hwmp-protocol.h.
Referenced by DoDispose(), SendProactivePreq(), SetRoot(), and UnsetRoot().
|
private |
Random start in Proactive PREQ propagation.
Definition at line 260 of file hwmp-protocol.h.
Referenced by DoStart(), and GetTypeId().
|
private |
Definition at line 281 of file hwmp-protocol.h.
Referenced by GetRfFlag(), GetTypeId(), and Report().
|
private |
Route discovery time:
Definition at line 174 of file hwmp-protocol.h.
Referenced by GetTypeId(), ReactivePathResolved(), and RetryPathDiscovery().
|
private |
Definition at line 263 of file hwmp-protocol.h.
Referenced by DequeueFirstPacket(), DequeueFirstPacketByDst(), DoDispose(), and QueuePacket().
|
private |
Routing table.
Definition at line 249 of file hwmp-protocol.h.
Referenced by DoDispose(), ForwardUnicast(), GetPerrReceivers(), MakePathError(), PeerLinkStatus(), ProactivePathResolved(), ReactivePathResolved(), ReceivePerr(), ReceivePrep(), ReceivePreq(), and RetryPathDiscovery().
|
private |
Definition at line 233 of file hwmp-protocol.h.
Referenced by ForwardUnicast(), MakePathError(), ProactivePathResolved(), ReactivePathResolved(), Report(), RequestRoute(), ResetStats(), RetryPathDiscovery(), and SendPrep().
|
private |
Definition at line 279 of file hwmp-protocol.h.
Referenced by GetBroadcastReceivers(), GetTypeId(), and Report().
|
private |
Definition at line 277 of file hwmp-protocol.h.
Referenced by GetTypeId(), GetUnicastPerrThreshold(), and Report().
|
private |
Definition at line 278 of file hwmp-protocol.h.
Referenced by GetPreqReceivers(), GetTypeId(), and Report().