A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::dot11s::PeerManagementProtocolMac Class Reference

This is plugin to Mesh WiFi MAC, which implements interface to dot11s peer management protocol: it takes proper frames from MAC-layer, extracts peer link management information element and mesh configuration element and passes it to main part of protocol. More...

#include <peer-management-protocol-mac.h>

+ Inheritance diagram for ns3::dot11s::PeerManagementProtocolMac:

Classes

struct  PlinkFrameStart
 This structure keeps all fields in peer link management frame, which are not subclasses of WifiInformationElement. More...
 
struct  Statistics
 

Public Member Functions

 PeerManagementProtocolMac (uint32_t interface, Ptr< PeerManagementProtocol > protocol)
 
Inherited from plugin abstract class
void SetParent (Ptr< MeshWifiInterfaceMac > parent)
 Each plugin must be installed on interface to work.
 
bool Receive (Ptr< Packet > packet, const WifiMacHeader &header)
 Process received frame. More...
 
bool UpdateOutcomingFrame (Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
 Update frame before it will be forwarded down. More...
 
void UpdateBeacon (MeshWifiBeacon &beacon) const
 Update beacon before it will be formed and sent. More...
 
int64_t AssignStreams (int64_t stream)
 
- Public Member Functions inherited from ns3::MeshWifiInterfaceMacPlugin
virtual ~MeshWifiInterfaceMacPlugin ()
 This is for subclasses.
 
- Public Member Functions inherited from ns3::SimpleRefCount< MeshWifiInterfaceMacPlugin >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 

Private Member Functions

 PeerManagementProtocolMac (const PeerManagementProtocolMac &)
 
Mac48Address GetAddress () const
 debug only, used to print established links
 
PeerManagementProtocolMacoperator= (const PeerManagementProtocolMac &)
 
void SendPeerLinkManagementFrame (Mac48Address peerAddress, Mac48Address peerMpAddress, uint16_t aid, IePeerManagement peerElement, IeConfiguration meshConfig)
 
void SetBeaconShift (Time shift)
 BCA functionality.
 
void SetPeerManagerProtcol (Ptr< PeerManagementProtocol > protocol)
 
void TxError (WifiMacHeader const &hdr)
 Closes link when a proper number of successive transmissions have failed.
 
void TxOk (WifiMacHeader const &hdr)
 
Create peer link management frames
Ptr< PacketCreatePeerLinkOpenFrame ()
 
Ptr< PacketCreatePeerLinkConfirmFrame ()
 
Ptr< PacketCreatePeerLinkCloseFrame ()
 
PlinkFrameStart ParsePlinkFrame (Ptr< const Packet > packet)
 Parses the start of the frame, where no WifiInformationElements exist.
 

Private Attributes

Information about MAC and protocol:
Ptr< MeshWifiInterfaceMacm_parent
 
uint32_t m_ifIndex
 
Ptr< PeerManagementProtocolm_protocol
 

Friends

class PeerLink
 
class PeerManagementProtocol
 

Statistics

struct Statistics m_stats
 
void Report (std::ostream &) const
 
void ResetStats ()
 
uint32_t GetLinkMetric (Mac48Address peerAddress)
 

Additional Inherited Members

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

Detailed Description

This is plugin to Mesh WiFi MAC, which implements interface to dot11s peer management protocol: it takes proper frames from MAC-layer, extracts peer link management information element and mesh configuration element and passes it to main part of protocol.

Definition at line 42 of file peer-management-protocol-mac.h.

Member Function Documentation

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

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

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 320 of file peer-management-protocol-mac.cc.

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

Process received frame.

Returns
false if (and only if) frame should be dropped TODO define when MAC call this

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 63 of file peer-management-protocol-mac.cc.

References ns3::Packet::Copy(), ns3::WifiInformationElementVector::FindFirst(), ns3::Packet::GetSize(), ns3::MicroSeconds(), NS_ASSERT, ns3::Packet::RemoveHeader(), and ns3::dot11s::PeerLinkFrameStart::SetPlinkFrameSubtype().

void ns3::dot11s::PeerManagementProtocolMac::UpdateBeacon ( MeshWifiBeacon beacon) const
virtual

Update beacon before it will be formed and sent.

TODO define when MAC call this

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 184 of file peer-management-protocol-mac.cc.

References ns3::MeshWifiBeacon::AddInformationElement(), and ns3::MeshWifiBeacon::GetBeaconInterval().

bool ns3::dot11s::PeerManagementProtocolMac::UpdateOutcomingFrame ( Ptr< Packet packet,
WifiMacHeader header,
Mac48Address  from,
Mac48Address  to 
)
virtual

Update frame before it will be forwarded down.

Returns
false if (and only if) frame should be dropped TODO define when MAC call this, preconditions & postconditions

Implements ns3::MeshWifiInterfaceMacPlugin.

Definition at line 154 of file peer-management-protocol-mac.cc.

References ns3::Mac48Address::IsGroup(), and ns3::Packet::PeekHeader().


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