27 #include "ns3/mesh-wifi-interface-mac.h"
28 #include "ns3/simulator.h"
29 #include "ns3/wifi-mac-header.h"
30 #include "ns3/mesh-information-element-vector.h"
77 if ((meshId != 0) && (
m_protocol->GetMeshId ()->IsEqual (*meshId)))
130 if (peerElement->SubtypeIsOpen ())
135 if (peerElement->SubtypeIsConfirm ())
140 if (peerElement->SubtypeIsClose ())
186 if (
m_protocol->GetBeaconCollisionAvoidance ())
209 fields.
config = meshConfig;
254 m_parent->SendManagementFrame (packet, hdr);
279 txOpen (0), txConfirm (0), txClose (0), rxOpen (0), rxConfirm (0), rxClose (0), dropped (0), brokenMgt (0),
280 txMgt (0), txMgtBytes (0), rxMgt (0), rxMgtBytes (0), beaconShift (0)
287 "txOpen=\"" << txOpen <<
"\"" << std::endl <<
288 "txConfirm=\"" << txConfirm <<
"\"" << std::endl <<
289 "txClose=\"" << txClose <<
"\"" << std::endl <<
290 "rxOpen=\"" << rxOpen <<
"\"" << std::endl <<
291 "rxConfirm=\"" << rxConfirm <<
"\"" << std::endl <<
292 "rxClose=\"" << rxClose <<
"\"" << std::endl <<
293 "dropped=\"" << dropped <<
"\"" << std::endl <<
294 "brokenMgt=\"" << brokenMgt <<
"\"" << std::endl <<
295 "txMgt=\"" << txMgt <<
"\"" << std::endl <<
296 "txMgtBytes=\"" << txMgtBytes <<
"\"" << std::endl <<
297 "rxMgt=\"" << rxMgt <<
"\"" << std::endl <<
298 "rxMgtBytes=\"" << rxMgtBytes <<
"\"" << std::endl <<
299 "beaconShift=\"" << beaconShift <<
"\"/>" << std::endl;
304 os <<
"<PeerManagementProtocolMac "
305 "address=\"" <<
m_parent->GetAddress () <<
"\">" << std::endl;
307 os <<
"</PeerManagementProtocolMac>" << std::endl;
317 return m_parent->GetLinkMetric (peerAddress);
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void AddInformationElement(Ptr< WifiInformationElement > ie)
Add information element.
Simulation virtual time values and global simulation resolution.
smart pointer class similar to boost::intrusive_ptr
void SetBeaconShift(Time shift)
BCA functionality.
802.11s Peer link management frame
void SetPlinkFrameSubtype(uint8_t subtype)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
struct Statistics m_stats
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
bool SubtypeIsOpen() const
See 7.3.2.85 of draft 2.07.
PeerManagementProtocolMac(uint32_t interface, Ptr< PeerManagementProtocol > protocol)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
bool UpdateOutcomingFrame(Ptr< Packet > packet, WifiMacHeader &header, Mac48Address from, Mac48Address to)
Update frame before it will be forwarded down.
uint32_t GetLinkMetric(Mac48Address peerAddress)
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
PlinkFrameStartFields GetFields() const
void SendPeerLinkManagementFrame(Mac48Address peerAddress, Mac48Address peerMpAddress, uint16_t aid, IePeerManagement peerElement, IeConfiguration meshConfig)
Mac48Address GetAddress() const
debug only, used to print established links
void SetPlinkFrameStart(PlinkFrameStartFields)
Beacon is beacon header + list of arbitrary information elements.
Ptr< MeshWifiInterfaceMac > m_parent
Time GetBeaconInterval() const
Returns a beacon interval of wifi beacon.
void TxOk(WifiMacHeader const &hdr)
void UpdateBeacon(MeshWifiBeacon &beacon) const
Update beacon before it will be formed and sent.
void Report(std::ostream &) const
bool SubtypeIsClose() const
Time Seconds(double value)
Construct a Time in the indicated unit.
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0.
void SetNeighborCount(uint8_t neighbors)
bool IsEqual(IeMeshId const &o) const
bool Receive(Ptr< Packet > packet, const WifiMacHeader &header)
Process received frame.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
~PeerManagementProtocolMac()
void SetParent(Ptr< MeshWifiInterfaceMac > parent)
Each plugin must be installed on interface to work.
void TxError(WifiMacHeader const &hdr)
Closes link when a proper number of successive transmissions have failed.
Ptr< PeerManagementProtocol > m_protocol
PmpReasonCode GetReasonCode() const
void AddHeader(const Header &header)
Add header to this packet.
void Print(std::ostream &os) const
bool SubtypeIsConfirm() const