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

Hybrid wireless mesh protocol – a routing protocol of IEEE 802.11s draft. More...

#include "hwmp-protocol.h"

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

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)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
void DoDispose ()
 Destructor implementation. More...
 
bool Install (Ptr< MeshPointDevice >)
 Install HWMP on given mesh point. More...
 
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. More...
 
void Report (std::ostream &) const
 Statistics: More...
 
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. More...
 
void ResetStats ()
 
void SetNeighboursCallback (Callback< std::vector< Mac48Address >, uint32_t > cb)
 This callback is used to obtain active neighbours on a given interface. More...
 
Proactive PREQ mechanism:
void SetRoot ()
 
void UnsetRoot ()
 
- Public Member Functions inherited from ns3::MeshL2RoutingProtocol
virtual ~MeshL2RoutingProtocol ()
 virtual D-tor for subclasses More...
 
Ptr< MeshPointDeviceGetMeshPoint () const
 Each mesh protocol must be installed on the mesh point to work. More...
 
void SetMeshPoint (Ptr< MeshPointDevice > mp)
 Set host mesh point, analog of SetNode (...) methods for upper layer protocols. 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
 Implement the GetInstanceTypeId method defined in ObjectBase. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. 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 ()
 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
 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 ()
 
- Static Public Member Functions inherited from ns3::MeshL2RoutingProtocol
static TypeId GetTypeId ()
 Never forget to support NS3 object model. More...
 
- 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...
 

Private Types

typedef std::map< uint32_t, Ptr< HwmpProtocolMac > > HwmpProtocolMacMap
 

Private Member Functions

 HwmpProtocol (const HwmpProtocol &)
 
virtual void DoInitialize ()
 Initialize() implementation. More...
 
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. More...
 
Mac48Address GetAddress ()
 
HwmpProtocoloperator= (const HwmpProtocol &)
 
Interaction with HWMP MAC plugin
void ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
 Handler for receiving Path Request. More...
 
void ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric)
 Handler for receiving Path Reply. More...
 
void ReceivePerr (std::vector< FailedDestination >, Mac48Address from, uint32_t interface, Mac48Address fromMp)
 Handler for receiving Path Error. More...
 
void SendPrep (Mac48Address src, Mac48Address dst, Mac48Address retransmitter, uint32_t initMetric, uint32_t originatorDsn, uint32_t destinationSN, uint32_t lifetime, uint32_t interface)
 Send Path Reply. More...
 
PathError MakePathError (std::vector< FailedDestination > destinations)
 forms a path error information element when list of destination fails on a given interface More...
 
void ForwardPathError (PathError perr)
 Forwards a received path error. More...
 
void InitiatePathError (PathError perr)
 Passes a self-generated PERR to interface-plugin. More...
 
std::vector< std::pair< uint32_t, Mac48Address > > GetPerrReceivers (std::vector< FailedDestination > failedDest)
 
std::vector< Mac48AddressGetPreqReceivers (uint32_t interface)
 
std::vector< Mac48AddressGetBroadcastReceivers (uint32_t interface)
 
bool DropDataFrame (uint32_t seqno, Mac48Address source)
 MAC-plugin asks whether the frame can be dropped. More...
 
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. More...
 
void RetryPathDiscovery (Mac48Address dst, uint8_t numOfRetry)
 Generates PREQ retry when retry timeout has expired and route is still unresolved. More...
 
void SendProactivePreq ()
 Proactive Preq routines: More...
 
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 ()
 

Private Attributes

Mac48Address m_address
 
Ptr< UniformRandomVariablem_coefficient
 Random variable for random start time. More...
 
uint32_t m_dataSeqno
 
uint32_t m_hwmpSeqno
 
HwmpProtocolMacMap m_interfaces
 
Callback< std::vector< Mac48Address >, uint32_t > m_neighboursCallback
 
uint32_t m_preqId
 
TracedCallback< Timem_routeDiscoveryTimeCallback
 Route discovery time: More...
 
std::vector< QueuedPacketm_rqueue
 Packet Queue. More...
 
Ptr< HwmpRtablem_rtable
 Routing table. More...
 
Statistics:
Statistics m_stats
 
Sequence number filters

Data sequence number database

std::map< Mac48Address, uint32_t > m_lastDataSeqno
 keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address More...
 
std::map< Mac48Address, std::pair< uint32_t, uint32_t > > m_hwmpSeqnoMetricDatabase
 keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address More...
 
Timers:
std::map< Mac48Address, PreqEventm_preqTimeouts
 Random start in Proactive PREQ propagation. More...
 
EventId m_proactivePreqTimer
 Random start in Proactive PREQ propagation. More...
 
Time m_randomStart
 Random start in Proactive PREQ propagation. More...
 
HWMP-protocol parameters

These are all Attributes

uint16_t m_maxQueueSize
 
uint8_t m_dot11MeshHWMPmaxPREQretries
 
Time m_dot11MeshHWMPnetDiameterTraversalTime
 
Time m_dot11MeshHWMPpreqMinInterval
 
Time m_dot11MeshHWMPperrMinInterval
 
Time m_dot11MeshHWMPactiveRootTimeout
 
Time m_dot11MeshHWMPactivePathTimeout
 
Time m_dot11MeshHWMPpathToRootInterval
 
Time m_dot11MeshHWMPrannInterval
 
bool m_isRoot
 
uint8_t m_maxTtl
 
uint8_t m_unicastPerrThreshold
 
uint8_t m_unicastPreqThreshold
 
uint8_t m_unicastDataThreshold
 
bool m_doFlag
 
bool m_rfFlag
 

Friends

class HwmpProtocolMac
 

Additional Inherited Members

- Public Types inherited from ns3::MeshL2RoutingProtocol
typedef Callback< void, bool, Ptr< Packet >, Mac48Address, Mac48Address, uint16_t, uint32_t > RouteReplyCallback
 Callback to be invoked when route discovery procedure is completed. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. 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...
 
- Protected Attributes inherited from ns3::MeshL2RoutingProtocol
Ptr< MeshPointDevicem_mp
 Host mesh point. More...
 

Detailed Description

Hybrid wireless mesh protocol – a routing protocol of IEEE 802.11s draft.

Config Paths

ns3::dot11s::HwmpProtocol is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::MeshPointDevice/RoutingProtocol/$ns3::dot11s::HwmpProtocol"

Attributes

  • RandomStart: Random delay at first proactive PREQ
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +100000000.0ns
    • Flags: construct write read
  • MaxQueueSize: Maximum number of packets we can store when resolving route
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 1:65535
    • Initial value: 255
    • Flags: construct write read
  • Dot11MeshHWMPmaxPREQretries: Maximum number of retries before we suppose the destination to be unreachable
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:255
    • Initial value: 3
    • Flags: construct write read
  • Dot11MeshHWMPnetDiameterTraversalTime: Time we suppose the packet to go from one edge of the network to another
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +102400000.0ns
    • Flags: construct write read
  • Dot11MeshHWMPpreqMinInterval: Minimal interval between to successive PREQs
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +102400000.0ns
    • Flags: construct write read
  • Dot11MeshHWMPperrMinInterval: Minimal interval between to successive PREQs
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +102400000.0ns
    • Flags: construct write read
  • Dot11MeshHWMPactiveRootTimeout: Lifetime of poractive routing information
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +5120000000.0ns
    • Flags: construct write read
  • Dot11MeshHWMPactivePathTimeout: Lifetime of reactive routing information
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +5120000000.0ns
    • Flags: construct write read
  • Dot11MeshHWMPpathToRootInterval: Interval between two successive proactive PREQs
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +2048000000.0ns
    • Flags: construct write read
  • Dot11MeshHWMPrannInterval: Lifetime of poractive routing information
    • Set with class: ns3::TimeValue
    • Underlying type: Time –9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +5120000000.0ns
    • Flags: construct write read
  • MaxTtl: Initial value of Time To Live field
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 2:255
    • Initial value: 32
    • Flags: construct write read
  • UnicastPerrThreshold: Maximum number of PERR receivers, when we send a PERR as a chain of unicasts
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:255
    • Initial value: 32
    • Flags: construct write read
  • UnicastPreqThreshold: Maximum number of PREQ receivers, when we send a PREQ as a chain of unicasts
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:255
    • Initial value: 1
    • Flags: construct write read
  • UnicastDataThreshold: Maximum number ofbroadcast receivers, when we send a broadcast as a chain of unicasts
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 1:255
    • Initial value: 1
    • Flags: construct write read
  • DoFlag: Destination only HWMP flag
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • RfFlag: Reply and forward flag
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read

TraceSources

  • RouteDiscoveryTime: The time of route discovery procedure
    Callback signature: ns3::Time::TracedCallback

Size of this type is 448 bytes (on a 64-bit architecture).

Definition at line 47 of file hwmp-protocol.h.

Member Typedef Documentation

typedef std::map<uint32_t, Ptr<HwmpProtocolMac> > ns3::dot11s::HwmpProtocol::HwmpProtocolMacMap
private

Definition at line 128 of file hwmp-protocol.h.

Constructor & Destructor Documentation

ns3::dot11s::HwmpProtocol::HwmpProtocol ( )

Definition at line 175 of file hwmp-protocol.cc.

References m_coefficient, and NS_LOG_FUNCTION_NOARGS.

ns3::dot11s::HwmpProtocol::~HwmpProtocol ( )

Definition at line 202 of file hwmp-protocol.cc.

References NS_LOG_FUNCTION_NOARGS.

ns3::dot11s::HwmpProtocol::HwmpProtocol ( const HwmpProtocol )
private

Member Function Documentation

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.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 1176 of file hwmp-protocol.cc.

References m_coefficient, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

HwmpProtocol::QueuedPacket ns3::dot11s::HwmpProtocol::DequeueFirstPacket ( )
private

Definition at line 907 of file hwmp-protocol.cc.

References m_rqueue, and ns3::dot11s::HwmpProtocol::QueuedPacket::pkt.

Referenced by ProactivePathResolved().

+ Here is the caller graph for this function:

HwmpProtocol::QueuedPacket ns3::dot11s::HwmpProtocol::DequeueFirstPacketByDst ( Mac48Address  dst)
private

Definition at line 890 of file hwmp-protocol.cc.

References m_rqueue, and ns3::dot11s::HwmpProtocol::QueuedPacket::pkt.

Referenced by ReactivePathResolved(), and RetryPathDiscovery().

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocol::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 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 219 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.

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocol::DoInitialize ( void  )
privatevirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 208 of file hwmp-protocol.cc.

References ns3::Time::GetSeconds(), ns3::UniformRandomVariable::GetValue(), m_coefficient, m_isRoot, m_proactivePreqTimer, m_randomStart, ns3::Simulator::Schedule(), ns3::Seconds(), SendProactivePreq(), and ns3::ObjectBase::SetAttribute().

+ Here is the call graph for this function:

bool ns3::dot11s::HwmpProtocol::DropDataFrame ( uint32_t  seqno,
Mac48Address  source 
)
private

MAC-plugin asks whether the frame can be dropped.

Protocol automatically updates seqno.

Returns
true if frame can be dropped
Parameters
seqnois the sequence number of source
sourceis the source address

Definition at line 748 of file hwmp-protocol.cc.

References GetAddress(), and m_lastDataSeqno.

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocol::ForwardPathError ( PathError  perr)
private

Forwards a received path error.

Definition at line 804 of file hwmp-protocol.cc.

References ns3::dot11s::HwmpProtocol::PathError::destinations, m_interfaces, and ns3::dot11s::HwmpProtocol::PathError::receivers.

Referenced by ReceivePerr().

+ Here is the caller graph for this function:

bool ns3::dot11s::HwmpProtocol::ForwardUnicast ( uint32_t  sourceIface,
const Mac48Address  source,
const Mac48Address  destination,
Ptr< Packet packet,
uint16_t  protocolType,
RouteReplyCallback  routeReply,
uint32_t  ttl 
)
private

Like RequestRoute, but for unicast packets.

Definition at line 329 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::dot11s::HwmpProtocol::GetActivePathLifetime ( )
private

Definition at line 1097 of file hwmp-protocol.cc.

References ns3::Time::GetMicroSeconds(), and m_dot11MeshHWMPactivePathTimeout.

+ Here is the call graph for this function:

Mac48Address ns3::dot11s::HwmpProtocol::GetAddress ( void  )
private
Returns
address of MeshPointDevice

Definition at line 1107 of file hwmp-protocol.cc.

References m_address.

Referenced by DropDataFrame(), ForwardUnicast(), ReceivePerr(), ReceivePrep(), ReceivePreq(), and SendProactivePreq().

+ Here is the caller graph for this function:

std::vector< Mac48Address > ns3::dot11s::HwmpProtocol::GetBroadcastReceivers ( uint32_t  interface)
private
Returns
list of addresses where a broadcast should be

Definition at line 863 of file hwmp-protocol.cc.

References ns3::Mac48Address::GetBroadcast(), m_neighboursCallback, and m_unicastDataThreshold.

Referenced by RequestRoute().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::dot11s::HwmpProtocol::GetDoFlag ( )
private

Definition at line 1060 of file hwmp-protocol.cc.

References m_doFlag.

uint8_t ns3::dot11s::HwmpProtocol::GetMaxTtl ( )
private

Definition at line 1080 of file hwmp-protocol.cc.

References m_maxTtl.

uint32_t ns3::dot11s::HwmpProtocol::GetNextHwmpSeqno ( )
private

Definition at line 1091 of file hwmp-protocol.cc.

References m_hwmpSeqno.

Referenced by ForwardUnicast(), ReceivePreq(), RetryPathDiscovery(), and SendProactivePreq().

+ Here is the caller graph for this function:

uint32_t ns3::dot11s::HwmpProtocol::GetNextPreqId ( )
private

Definition at line 1085 of file hwmp-protocol.cc.

References m_preqId.

Referenced by SendProactivePreq().

+ Here is the caller graph for this function:

Time ns3::dot11s::HwmpProtocol::GetPerrMinInterval ( )
private

Definition at line 1075 of file hwmp-protocol.cc.

References m_dot11MeshHWMPperrMinInterval.

std::vector< std::pair< uint32_t, Mac48Address > > ns3::dot11s::HwmpProtocol::GetPerrReceivers ( std::vector< FailedDestination failedDest)
private
Returns
list of addresses where a PERR should be sent to

Definition at line 821 of file hwmp-protocol.cc.

References ns3::dot11s::HwmpRtable::DeleteProactivePath(), ns3::dot11s::HwmpRtable::DeleteReactivePath(), ns3::dot11s::HwmpRtable::GetPrecursors(), and m_rtable.

Referenced by MakePathError().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::dot11s::HwmpProtocol::GetPreqMinInterval ( )
private

Definition at line 1070 of file hwmp-protocol.cc.

References m_dot11MeshHWMPpreqMinInterval.

std::vector< Mac48Address > ns3::dot11s::HwmpProtocol::GetPreqReceivers ( uint32_t  interface)
private
Returns
list of addresses where a PREQ should be sent to

Definition at line 848 of file hwmp-protocol.cc.

References ns3::Mac48Address::GetBroadcast(), m_neighboursCallback, and m_unicastPreqThreshold.

+ Here is the call graph for this function:

bool ns3::dot11s::HwmpProtocol::GetRfFlag ( )
private

Definition at line 1065 of file hwmp-protocol.cc.

References m_rfFlag.

uint8_t ns3::dot11s::HwmpProtocol::GetUnicastPerrThreshold ( )
private

Definition at line 1102 of file hwmp-protocol.cc.

References m_unicastPerrThreshold.

void ns3::dot11s::HwmpProtocol::InitiatePathError ( PathError  perr)
private

Passes a self-generated PERR to interface-plugin.

Definition at line 788 of file hwmp-protocol.cc.

References ns3::dot11s::HwmpProtocol::PathError::destinations, m_interfaces, and ns3::dot11s::HwmpProtocol::PathError::receivers.

Referenced by ForwardUnicast(), and PeerLinkStatus().

+ Here is the caller graph for this function:

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 701 of file hwmp-protocol.cc.

References ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric(), ns3::Mac48Address::ConvertFrom(), first::interfaces, m_address, m_interfaces, ns3::MeshL2RoutingProtocol::m_mp, third::mac, and ns3::MakeCallback().

+ Here is the call graph for this function:

HwmpProtocol::PathError ns3::dot11s::HwmpProtocol::MakePathError ( std::vector< FailedDestination destinations)
private

forms a path error information element when list of destination fails on a given interface

Attention
removes all entries from routing table!

Definition at line 770 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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

HwmpProtocol& ns3::dot11s::HwmpProtocol::operator= ( const HwmpProtocol )
private
void ns3::dot11s::HwmpProtocol::PeerLinkStatus ( Mac48Address  meshPontAddress,
Mac48Address  peerAddress,
uint32_t  interface,
bool  status 
)

Definition at line 733 of file hwmp-protocol.cc.

References ns3::dot11s::HwmpRtable::GetUnreachableDestinations(), InitiatePathError(), m_rtable, and MakePathError().

Referenced by ns3::Dot11sStack::InstallStack().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::dot11s::HwmpProtocol::QueuePacket ( QueuedPacket  packet)
private

Definition at line 879 of file hwmp-protocol.cc.

References m_maxQueueSize, and m_rqueue.

Referenced by ForwardUnicast().

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocol::ReceivePerr ( std::vector< FailedDestination destinations,
Mac48Address  from,
uint32_t  interface,
Mac48Address  fromMp 
)
private
bool ns3::dot11s::HwmpProtocol::RemoveRoutingStuff ( uint32_t  fromIface,
const Mac48Address  source,
const Mac48Address  destination,
Ptr< Packet packet,
uint16_t &  protocolType 
)
virtual

Cleanup packet from all tags.

Implements ns3::MeshL2RoutingProtocol.

Definition at line 318 of file hwmp-protocol.cc.

References NS_FATAL_ERROR, and ns3::Packet::RemovePacketTag().

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocol::ResetStats ( )

Definition at line 1166 of file hwmp-protocol.cc.

References m_interfaces, and m_stats.

void ns3::dot11s::HwmpProtocol::SendPrep ( Mac48Address  src,
Mac48Address  dst,
Mac48Address  retransmitter,
uint32_t  initMetric,
uint32_t  originatorDsn,
uint32_t  destinationSN,
uint32_t  lifetime,
uint32_t  interface 
)
private
void ns3::dot11s::HwmpProtocol::SetNeighboursCallback ( Callback< std::vector< Mac48Address >, uint32_t >  cb)

This callback is used to obtain active neighbours on a given interface.

Parameters
cbis a callback, which returns a list of addresses on given interface (uint32_t)

Definition at line 743 of file hwmp-protocol.cc.

References m_neighboursCallback.

void ns3::dot11s::HwmpProtocol::SetRoot ( )

Definition at line 1029 of file hwmp-protocol.cc.

References m_address, m_isRoot, and NS_LOG_DEBUG.

bool ns3::dot11s::HwmpProtocol::ShouldSendPreq ( Mac48Address  dst)
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 972 of file hwmp-protocol.cc.

References m_dot11MeshHWMPnetDiameterTraversalTime, m_preqTimeouts, ns3::Simulator::Now(), RetryPathDiscovery(), and ns3::Simulator::Schedule().

Referenced by ForwardUnicast().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocol::UnsetRoot ( )

Definition at line 1035 of file hwmp-protocol.cc.

References ns3::EventId::Cancel(), and m_proactivePreqTimer.

+ Here is the call graph for this function:

Friends And Related Function Documentation

friend class HwmpProtocolMac
friend

Definition at line 100 of file hwmp-protocol.h.

Member Data Documentation

Mac48Address ns3::dot11s::HwmpProtocol::m_address
private

Definition at line 240 of file hwmp-protocol.h.

Referenced by GetAddress(), Install(), Report(), and SetRoot().

Ptr<UniformRandomVariable> ns3::dot11s::HwmpProtocol::m_coefficient
private

Random variable for random start time.

Definition at line 291 of file hwmp-protocol.h.

Referenced by AssignStreams(), DoInitialize(), and HwmpProtocol().

uint32_t ns3::dot11s::HwmpProtocol::m_dataSeqno
private

Definition at line 241 of file hwmp-protocol.h.

Referenced by RequestRoute().

bool ns3::dot11s::HwmpProtocol::m_doFlag
private

Definition at line 286 of file hwmp-protocol.h.

Referenced by GetDoFlag(), GetTypeId(), and Report().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPactivePathTimeout
private

Definition at line 278 of file hwmp-protocol.h.

Referenced by GetActivePathLifetime(), GetTypeId(), and Report().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPactiveRootTimeout
private

Definition at line 277 of file hwmp-protocol.h.

Referenced by GetTypeId(), Report(), and SendProactivePreq().

uint8_t ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPmaxPREQretries
private

Definition at line 273 of file hwmp-protocol.h.

Referenced by GetTypeId(), Report(), and RetryPathDiscovery().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPnetDiameterTraversalTime
private

Definition at line 274 of file hwmp-protocol.h.

Referenced by GetTypeId(), Report(), RetryPathDiscovery(), and ShouldSendPreq().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPpathToRootInterval
private

Definition at line 279 of file hwmp-protocol.h.

Referenced by GetTypeId(), Report(), and SendProactivePreq().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPperrMinInterval
private

Definition at line 276 of file hwmp-protocol.h.

Referenced by GetPerrMinInterval(), GetTypeId(), and Report().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPpreqMinInterval
private

Definition at line 275 of file hwmp-protocol.h.

Referenced by GetPreqMinInterval(), GetTypeId(), and Report().

Time ns3::dot11s::HwmpProtocol::m_dot11MeshHWMPrannInterval
private

Definition at line 280 of file hwmp-protocol.h.

Referenced by GetTypeId(), and Report().

uint32_t ns3::dot11s::HwmpProtocol::m_hwmpSeqno
private

Definition at line 242 of file hwmp-protocol.h.

Referenced by GetNextHwmpSeqno().

std::map<Mac48Address, std::pair<uint32_t, uint32_t> > ns3::dot11s::HwmpProtocol::m_hwmpSeqnoMetricDatabase
private

keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address

Definition at line 249 of file hwmp-protocol.h.

Referenced by DoDispose(), ReceivePrep(), and ReceivePreq().

bool ns3::dot11s::HwmpProtocol::m_isRoot
private

Definition at line 281 of file hwmp-protocol.h.

Referenced by DoInitialize(), Report(), and SetRoot().

std::map<Mac48Address, uint32_t> ns3::dot11s::HwmpProtocol::m_lastDataSeqno
private

keeps HWMP seqno (first in pair) and HWMP metric (second in pair) for each address

Definition at line 247 of file hwmp-protocol.h.

Referenced by DoDispose(), and DropDataFrame().

uint16_t ns3::dot11s::HwmpProtocol::m_maxQueueSize
private

Definition at line 272 of file hwmp-protocol.h.

Referenced by GetTypeId(), QueuePacket(), and Report().

uint8_t ns3::dot11s::HwmpProtocol::m_maxTtl
private

Definition at line 282 of file hwmp-protocol.h.

Referenced by GetMaxTtl(), GetTypeId(), Report(), RequestRoute(), SendPrep(), and SendProactivePreq().

Callback<std::vector<Mac48Address>, uint32_t> ns3::dot11s::HwmpProtocol::m_neighboursCallback
private

Definition at line 292 of file hwmp-protocol.h.

Referenced by GetBroadcastReceivers(), GetPreqReceivers(), and SetNeighboursCallback().

uint32_t ns3::dot11s::HwmpProtocol::m_preqId
private

Definition at line 243 of file hwmp-protocol.h.

Referenced by GetNextPreqId().

std::map<Mac48Address, PreqEvent> ns3::dot11s::HwmpProtocol::m_preqTimeouts
private

Random start in Proactive PREQ propagation.

Definition at line 261 of file hwmp-protocol.h.

Referenced by DoDispose(), ReactivePathResolved(), RetryPathDiscovery(), and ShouldSendPreq().

EventId ns3::dot11s::HwmpProtocol::m_proactivePreqTimer
private

Random start in Proactive PREQ propagation.

Definition at line 262 of file hwmp-protocol.h.

Referenced by DoDispose(), DoInitialize(), SendProactivePreq(), and UnsetRoot().

Time ns3::dot11s::HwmpProtocol::m_randomStart
private

Random start in Proactive PREQ propagation.

Definition at line 264 of file hwmp-protocol.h.

Referenced by DoInitialize(), and GetTypeId().

bool ns3::dot11s::HwmpProtocol::m_rfFlag
private

Definition at line 287 of file hwmp-protocol.h.

Referenced by GetRfFlag(), GetTypeId(), and Report().

TracedCallback<Time> ns3::dot11s::HwmpProtocol::m_routeDiscoveryTimeCallback
private

Route discovery time:

Definition at line 178 of file hwmp-protocol.h.

Referenced by GetTypeId(), ReactivePathResolved(), and RetryPathDiscovery().

std::vector<QueuedPacket> ns3::dot11s::HwmpProtocol::m_rqueue
private
uint8_t ns3::dot11s::HwmpProtocol::m_unicastDataThreshold
private

Definition at line 285 of file hwmp-protocol.h.

Referenced by GetBroadcastReceivers(), GetTypeId(), and Report().

uint8_t ns3::dot11s::HwmpProtocol::m_unicastPerrThreshold
private

Definition at line 283 of file hwmp-protocol.h.

Referenced by GetTypeId(), GetUnicastPerrThreshold(), and Report().

uint8_t ns3::dot11s::HwmpProtocol::m_unicastPreqThreshold
private

Definition at line 284 of file hwmp-protocol.h.

Referenced by GetPreqReceivers(), GetTypeId(), and Report().


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