18#include "ns3/mesh-information-element-vector.h"
19#include "ns3/mesh-wifi-interface-mac.h"
20#include "ns3/mgt-action-headers.h"
21#include "ns3/simulator.h"
22#include "ns3/wifi-mpdu.h"
46 m_parent->TraceConnectWithoutContext(
"DroppedMpdu",
48 m_parent->TraceConnectWithoutContext(
"AckedMpdu",
79 packet->RemoveHeader(elements, packet->GetSize());
84 if (meshId && (
m_protocol->GetMeshId()->IsEqual(*meshId)))
94 << (*meshId) <<
"; ignoring");
132 if (!(
m_parent->CheckSupportedRates(
150 if (!(
m_parent->CheckSupportedRates(
153 NS_LOG_DEBUG(
"PEER_LINK_CONFIRM: configuration mismatch");
171 NS_LOG_DEBUG(
"PEER_LINK_CLOSE: configuration mismatch");
181 "Unknown Self-protected Action type: " <<
actionValue.selfProtectedAction);
187 packet->RemoveHeader(elements, packet->GetSize());
257 if (
m_protocol->GetBeaconCollisionAvoidance())
279 packet->AddHeader(elements);
393 << txOpen <<
"\"" << std::endl
394 <<
"txConfirm=\"" << txConfirm <<
"\"" << std::endl
395 <<
"txClose=\"" << txClose <<
"\"" << std::endl
396 <<
"rxOpen=\"" << rxOpen <<
"\"" << std::endl
397 <<
"rxConfirm=\"" << rxConfirm <<
"\"" << std::endl
398 <<
"rxClose=\"" << rxClose <<
"\"" << std::endl
399 <<
"dropped=\"" << dropped <<
"\"" << std::endl
400 <<
"brokenMgt=\"" << brokenMgt <<
"\"" << std::endl
401 <<
"txMgt=\"" << txMgt <<
"\"" << std::endl
402 <<
"txMgtBytes=\"" << txMgtBytes <<
"\"" << std::endl
403 <<
"rxMgt=\"" << rxMgt <<
"\"" << std::endl
404 <<
"rxMgtBytes=\"" << rxMgtBytes <<
"\"" << std::endl
405 <<
"beaconShift=\"" << beaconShift <<
"\"/>" << std::endl;
411 os <<
"<PeerManagementProtocolMac "
413 <<
m_parent->GetAddress() <<
"\">" << std::endl;
415 os <<
"</PeerManagementProtocolMac>" << std::endl;
Beacon is beacon header + list of arbitrary information elements.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
bool IsZero() const
Exactly equivalent to t == 0.
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
according to IEEE 802.11 - 2012
802.11s Peer link close management frame
802.11s Peer link confirm management frame
802.11s Peer link open management frame
Ptr< MeshWifiInterfaceMac > m_parent
parent
void SetParent(Ptr< MeshWifiInterfaceMac > parent) override
Set pointer to parent.
PeerManagementProtocolMac(uint32_t interface, Ptr< PeerManagementProtocol > protocol)
Constructor.
void Report(std::ostream &) const
Report statistics.
Statistics m_stats
statistics
uint32_t m_ifIndex
IF index.
Mac48Address GetAddress() const
debug only, used to print established links
void UpdateBeacon(MeshWifiBeacon &beacon) const override
Add beacon timing and mesh ID information elements, and notify beacon sent.
bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to) override
This method appears to test a few conditions.
void TxError(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
Closes link when a proper number of successive transmissions have failed.
void ResetStats()
Reset stats.
int64_t AssignStreams(int64_t stream) override
Assign the streams.
void SendPeerLinkManagementFrame(Mac48Address peerAddress, Mac48Address peerMpAddress, uint16_t aid, IePeerManagement peerElement, IeConfiguration meshConfig)
Send peer link management frame function.
void TxOk(Ptr< const WifiMpdu > mpdu)
Transmit OK function.
uint32_t GetLinkMetric(Mac48Address peerAddress)
Get the link metric.
bool Receive(Ptr< Packet > packet, const WifiMacHeader &header) override
Receive and process a packet.
~PeerManagementProtocolMac() override
Ptr< PeerManagementProtocol > m_protocol
protocol
void SetBeaconShift(Time shift)
Set beacon shift function.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
WifiMacDropReason
The reason why an MPDU was dropped.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Struct containing all supported rates.
IeMeshId meshId
open and close
SupportedRates rates
open and confirm
SupportedRates rates
open and confirm
uint16_t txOpen
transmit open
uint16_t txConfirm
transmit confirm
uint16_t rxConfirm
receive confirm
uint16_t rxClose
receive close
uint32_t txMgtBytes
transmit management bytes
uint16_t brokenMgt
broken management
uint16_t txClose
transmit close
uint16_t rxMgt
receive management
uint16_t rxOpen
receive open
uint16_t txMgt
transmit management
uint16_t beaconShift
beacon shift
uint32_t rxMgtBytes
receive management bytes
void Print(std::ostream &os) const
Print function.