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

Interface MAC plugin for HWMP – 802.11s routing protocol. More...

#include "hwmp-protocol-mac.h"

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

Classes

struct  MyPerr
 
struct  Statistics
 

Public Member Functions

 HwmpProtocolMac (uint32_t, Ptr< HwmpProtocol >)
 
 ~HwmpProtocolMac ()
 
Inherited from MAC plugin
void SetParent (Ptr< MeshWifiInterfaceMac > parent)
 Update beacon is empty, because HWMP does not know anything about beacons. More...
 
bool Receive (Ptr< Packet > packet, const WifiMacHeader &header)
 Update beacon is empty, because HWMP does not know anything about beacons. More...
 
bool UpdateOutcomingFrame (Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
 Update beacon is empty, because HWMP does not know anything about beacons. More...
 
void UpdateBeacon (MeshWifiBeacon &beacon) const
 Update beacon is empty, because HWMP does not know anything about beacons. More...
 
int64_t AssignStreams (int64_t stream)
 Update beacon is empty, because HWMP does not know anything about beacons. More...
 
- Public Member Functions inherited from ns3::MeshWifiInterfaceMacPlugin
virtual ~MeshWifiInterfaceMacPlugin ()
 This is for subclasses. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< MeshWifiInterfaceMacPlugin >
 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...
 

Private Member Functions

uint16_t GetChannelId () const
 
uint32_t GetLinkMetric (Mac48Address peerAddress) const
 
bool ReceiveAction (Ptr< Packet > packet, const WifiMacHeader &header)
 Receive action management frame. More...
 
bool ReceiveData (Ptr< Packet > packet, const WifiMacHeader &header)
 Receive data frame. More...
 
void Report (std::ostream &) const
 Report statistics. More...
 
void ResetStats ()
 
void SendMyPerr ()
 
void SendMyPreq ()
 Sends one PREQ when PreqMinInterval after last PREQ expires (if any PREQ exists in rhe queue) More...
 
Interaction with HWMP:
void SendPreq (IePreq preq)
 Request a destination. More...
 
void SendPreq (std::vector< IePreq > preq)
 Request a destination. More...
 
void SendPrep (IePrep prep, Mac48Address receiver)
 Request a destination. More...
 
void ForwardPerr (std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
 Request a destination. More...
 
void InitiatePerr (std::vector< HwmpProtocol::FailedDestination > destinations, std::vector< Mac48Address > receivers)
 Request a destination. More...
 
void RequestDestination (Mac48Address dest, uint32_t originator_seqno, uint32_t dst_seqno)
 Request a destination. More...
 

Static Private Member Functions

static WifiActionHeader GetWifiActionHeader ()
 

Private Attributes

uint32_t m_ifIndex
 
Ptr< MeshWifiInterfaceMacm_parent
 
Ptr< HwmpProtocolm_protocol
 
my PREQ and PREQ timer:
EventId m_preqTimer
 
std::vector< IePreqm_myPreq
 
PERR timer and stored path error
EventId m_perrTimer
 
MyPerr m_myPerr
 
Statistics:
Statistics m_stats
 

Friends

class HwmpProtocol
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< MeshWifiInterfaceMacPlugin >
static void Cleanup (void)
 Noop. More...
 

Detailed Description

Interface MAC plugin for HWMP – 802.11s routing protocol.

Definition at line 44 of file hwmp-protocol-mac.h.

Constructor & Destructor Documentation

ns3::dot11s::HwmpProtocolMac::HwmpProtocolMac ( uint32_t  ifIndex,
Ptr< HwmpProtocol protocol 
)

Definition at line 41 of file hwmp-protocol-mac.cc.

ns3::dot11s::HwmpProtocolMac::~HwmpProtocolMac ( )

Definition at line 45 of file hwmp-protocol-mac.cc.

Member Function Documentation

int64_t ns3::dot11s::HwmpProtocolMac::AssignStreams ( int64_t  stream)
virtual

Update beacon is empty, because HWMP does not know anything about beacons.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 483 of file hwmp-protocol-mac.cc.

References m_protocol.

void ns3::dot11s::HwmpProtocolMac::ForwardPerr ( std::vector< HwmpProtocol::FailedDestination destinations,
std::vector< Mac48Address receivers 
)
private

Request a destination.

If can not send preq immediately - add a destination to existing PREQ generated by me and stored in PREQ queue

Parameters
destis the destination to be resolved
originator_seqnois a sequence number that shall be preq originator sequenece number
dst_seqnois a sequence number taken from routing table

Definition at line 322 of file hwmp-protocol-mac.cc.

References ns3::Packet::AddHeader(), ns3::WifiInformationElementVector::AddInformationElement(), first::address, ns3::Mac48Address::GetBroadcast(), ns3::Packet::GetSize(), GetWifiActionHeader(), m_parent, m_protocol, m_stats, NS_LOG_FUNCTION_NOARGS, ns3::WifiMacHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::dot11s::HwmpProtocolMac::Statistics::txMgt, ns3::dot11s::HwmpProtocolMac::Statistics::txMgtBytes, and ns3::dot11s::HwmpProtocolMac::Statistics::txPerr.

Referenced by SendMyPerr().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint16_t ns3::dot11s::HwmpProtocolMac::GetChannelId ( ) const
private

Definition at line 440 of file hwmp-protocol-mac.cc.

References m_parent.

uint32_t ns3::dot11s::HwmpProtocolMac::GetLinkMetric ( Mac48Address  peerAddress) const
private
Returns
metric to HWMP protocol, needed only by metrics to add

Definition at line 435 of file hwmp-protocol-mac.cc.

References m_parent.

WifiActionHeader ns3::dot11s::HwmpProtocolMac::GetWifiActionHeader ( )
staticprivate
Returns
a path selection action header

Definition at line 210 of file hwmp-protocol-mac.cc.

References ns3::WifiActionHeader::MESH, ns3::WifiActionHeader::ActionValue::meshAction, ns3::WifiActionHeader::PATH_SELECTION, and ns3::WifiActionHeader::SetAction().

Referenced by ForwardPerr(), SendPrep(), and SendPreq().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocolMac::InitiatePerr ( std::vector< HwmpProtocol::FailedDestination destinations,
std::vector< Mac48Address receivers 
)
private

Request a destination.

If can not send preq immediately - add a destination to existing PREQ generated by me and stored in PREQ queue

Parameters
destis the destination to be resolved
originator_seqnois a sequence number that shall be preq originator sequenece number
dst_seqnois a sequence number taken from routing table

Definition at line 376 of file hwmp-protocol-mac.cc.

References ns3::dot11s::HwmpProtocolMac::MyPerr::destinations, m_myPerr, ns3::dot11s::HwmpProtocolMac::MyPerr::receivers, and SendMyPerr().

+ Here is the call graph for this function:

bool ns3::dot11s::HwmpProtocolMac::Receive ( Ptr< Packet packet,
const WifiMacHeader header 
)
virtual

Update beacon is empty, because HWMP does not know anything about beacons.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 167 of file hwmp-protocol-mac.cc.

References ns3::WifiMacHeader::IsAction(), ns3::WifiMacHeader::IsData(), ReceiveAction(), and ReceiveData().

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocolMac::Report ( std::ostream &  os) const
private

Report statistics.

Definition at line 469 of file hwmp-protocol-mac.cc.

References m_parent, m_stats, and ns3::dot11s::HwmpProtocolMac::Statistics::Print().

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocolMac::RequestDestination ( Mac48Address  dest,
uint32_t  originator_seqno,
uint32_t  dst_seqno 
)
private

Request a destination.

If can not send preq immediately - add a destination to existing PREQ generated by me and stored in PREQ queue

Parameters
destis the destination to be resolved
originator_seqnois a sequence number that shall be preq originator sequenece number
dst_seqnois a sequence number taken from routing table

Definition at line 256 of file hwmp-protocol-mac.cc.

References ns3::dot11s::IePreq::AddDestinationAddressElement(), m_myPreq, m_protocol, NS_ASSERT, NS_LOG_FUNCTION_NOARGS, SendMyPreq(), 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().

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocolMac::ResetStats ( )
private

Definition at line 477 of file hwmp-protocol-mac.cc.

References m_stats.

void ns3::dot11s::HwmpProtocolMac::SendMyPerr ( )
private

Definition at line 422 of file hwmp-protocol-mac.cc.

References ns3::dot11s::HwmpProtocolMac::MyPerr::destinations, ForwardPerr(), ns3::EventId::IsRunning(), m_myPerr, m_perrTimer, m_protocol, NS_LOG_FUNCTION_NOARGS, ns3::dot11s::HwmpProtocolMac::MyPerr::receivers, and ns3::Simulator::Schedule().

Referenced by InitiatePerr().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocolMac::SendMyPreq ( )
private

Sends one PREQ when PreqMinInterval after last PREQ expires (if any PREQ exists in rhe queue)

Definition at line 280 of file hwmp-protocol-mac.cc.

References ns3::EventId::IsRunning(), m_myPreq, m_preqTimer, m_protocol, NS_ASSERT, NS_LOG_FUNCTION_NOARGS, ns3::Simulator::Schedule(), and SendPreq().

Referenced by RequestDestination().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocolMac::SendPrep ( IePrep  prep,
Mac48Address  receiver 
)
private

Request a destination.

If can not send preq immediately - add a destination to existing PREQ generated by me and stored in PREQ queue

Parameters
destis the destination to be resolved
originator_seqnois a sequence number that shall be preq originator sequenece number
dst_seqnois a sequence number taken from routing table

Definition at line 298 of file hwmp-protocol-mac.cc.

References ns3::Packet::AddHeader(), ns3::WifiInformationElementVector::AddInformationElement(), ns3::Packet::GetSize(), GetWifiActionHeader(), m_parent, m_protocol, m_stats, NS_LOG_FUNCTION_NOARGS, ns3::WifiMacHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::dot11s::HwmpProtocolMac::Statistics::txMgt, ns3::dot11s::HwmpProtocolMac::Statistics::txMgtBytes, and ns3::dot11s::HwmpProtocolMac::Statistics::txPrep.

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocolMac::SendPreq ( IePreq  preq)
private

Request a destination.

If can not send preq immediately - add a destination to existing PREQ generated by me and stored in PREQ queue

Parameters
destis the destination to be resolved
originator_seqnois a sequence number that shall be preq originator sequenece number
dst_seqnois a sequence number taken from routing table

Definition at line 219 of file hwmp-protocol-mac.cc.

References NS_LOG_FUNCTION_NOARGS.

Referenced by SendMyPreq().

+ Here is the caller graph for this function:

void ns3::dot11s::HwmpProtocolMac::SendPreq ( std::vector< IePreq preq)
private

Request a destination.

If can not send preq immediately - add a destination to existing PREQ generated by me and stored in PREQ queue

Parameters
destis the destination to be resolved
originator_seqnois a sequence number that shall be preq originator sequenece number
dst_seqnois a sequence number taken from routing table

Definition at line 227 of file hwmp-protocol-mac.cc.

References ns3::Packet::AddHeader(), ns3::WifiInformationElementVector::AddInformationElement(), ns3::Packet::GetSize(), GetWifiActionHeader(), m_ifIndex, m_parent, m_protocol, m_stats, ns3::WifiMacHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::dot11s::HwmpProtocolMac::Statistics::txMgt, ns3::dot11s::HwmpProtocolMac::Statistics::txMgtBytes, and ns3::dot11s::HwmpProtocolMac::Statistics::txPreq.

+ Here is the call graph for this function:

void ns3::dot11s::HwmpProtocolMac::SetParent ( Ptr< MeshWifiInterfaceMac parent)
virtual

Update beacon is empty, because HWMP does not know anything about beacons.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 49 of file hwmp-protocol-mac.cc.

References m_parent.

void ns3::dot11s::HwmpProtocolMac::UpdateBeacon ( MeshWifiBeacon beacon) const
inlinevirtual

Update beacon is empty, because HWMP does not know anything about beacons.

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 55 of file hwmp-protocol-mac.h.

Friends And Related Function Documentation

friend class HwmpProtocol
friend

Definition at line 60 of file hwmp-protocol-mac.h.

Member Data Documentation

uint32_t ns3::dot11s::HwmpProtocolMac::m_ifIndex
private

Definition at line 94 of file hwmp-protocol-mac.h.

Referenced by ReceiveAction(), and SendPreq().

MyPerr ns3::dot11s::HwmpProtocolMac::m_myPerr
private

Definition at line 109 of file hwmp-protocol-mac.h.

Referenced by InitiatePerr(), and SendMyPerr().

std::vector<IePreq> ns3::dot11s::HwmpProtocolMac::m_myPreq
private

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

Referenced by RequestDestination(), and SendMyPreq().

Ptr<MeshWifiInterfaceMac> ns3::dot11s::HwmpProtocolMac::m_parent
private
EventId ns3::dot11s::HwmpProtocolMac::m_perrTimer
private

Definition at line 104 of file hwmp-protocol-mac.h.

Referenced by SendMyPerr().

EventId ns3::dot11s::HwmpProtocolMac::m_preqTimer
private

Definition at line 99 of file hwmp-protocol-mac.h.

Referenced by SendMyPreq().

Ptr<HwmpProtocol> ns3::dot11s::HwmpProtocolMac::m_protocol
private
Statistics ns3::dot11s::HwmpProtocolMac::m_stats
private

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