25 #include "ns3/nstime.h" 
   26 #include "ns3/object.h" 
   27 #include "ns3/callback.h" 
   28 #include "ns3/mac48-address.h" 
   29 #include "ns3/event-id.h" 
   30 #include "ns3/ie-dot11s-beacon-timing.h" 
   31 #include "ns3/ie-dot11s-peer-management.h" 
   32 #include "ns3/ie-dot11s-configuration.h" 
   37 class PeerManagementProtocolMac;
 
  109   void Report (std::ostream & os) 
const;
 
  145     uint16_t localLinkId,
 
  153     uint16_t localLinkId,
 
keep track of time values and allow control of global simulation resolution 
 
void SetBeaconTimingElement(IeBeaconTiming beaconTiming)
 
void TransmissionSuccess()
Reports about transmission success/failure. 
 
Mac48Address m_peerMeshPointAddress
 
void MLMECancelPeerLink(PmpReasonCode reason)
MLME-CancelPeerLink.request. 
 
void SetPeerAddress(Mac48Address macaddr)
 
void Report(std::ostream &os) const 
Statistics. 
 
uint16_t GetPeerAid() const 
 
SignalStatusCallback m_linkStatusCallback
How to report my status change. 
 
IeConfiguration m_configuration
Mesh interface configuration. 
 
void StateMachine(PeerEvent event, PmpReasonCode=REASON11S_RESERVED)
State transition. 
 
bool LinkIsIdle() const 
True if link is idle. Link can be deleted in this state. 
 
void SetLocalAid(uint16_t aid)
 
IeBeaconTiming m_beaconTiming
Beacon timing element received from the peer. Needed by BCA. 
 
Ptr< PeerManagementProtocolMac > m_macPlugin
pointer to MAC plugin, which is responsible for peer management 
 
void SetLocalLinkId(uint16_t id)
 
void OpenAccept(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp)
Accept open link. 
 
PeerState
Peer Link state: 
 
uint16_t m_peerLinkId
Peer ID of this link. 
 
void SendPeerLinkClose(PmpReasonCode reasoncode)
 
void BeaconLoss()
Several successive beacons were lost, close link. 
 
void SetLinkStatusCallback(Callback< void, uint32_t, Mac48Address, bool > cb)
Method used to detect peer link changes. 
 
uint16_t m_packetFail
How many successive packets were failed to transmit. 
 
uint16_t GetLocalAid() const 
 
PeerLink()
C-tor create empty link. 
 
also timeout of retry timer 
 
See 7.3.2.89 of 802.11s draft 2.07. 
 
uint16_t m_assocId
My association ID. 
 
IeBeaconTiming GetBeaconTimingElement() const 
 
void SetMacPlugin(Ptr< PeerManagementProtocolMac > plugin)
 
void Close(uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason)
Close link. 
 
Time m_dot11MeshHoldingTimeout
 
void MLMEActivePeerLinkOpen()
MLME-ActivePeerLinkOpen.request. 
 
Time m_dot11MeshConfirmTimeout
 
PeerState m_state
Current state. 
 
Mac48Address m_peerAddress
Peer address. 
 
Callback< void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState > SignalStatusCallback
Callback type for MLME-SignalPeerLinkStatus event. 
 
PeerLinkOpenReject by internal reason. 
 
void SetPeerMeshPointAddress(Mac48Address macaddr)
 
Time GetLastBeacon() const 
 
void SetInterface(uint32_t interface)
 
void MLMESetSignalStatusCallback(SignalStatusCallback)
Set callback. 
 
void SetBeaconInformation(Time lastBeacon, Time BeaconInterval)
Process beacon received from peer. 
 
Timeout of confirm timer. 
 
uint16_t m_peerAssocId
Assoc Id assigned to me by peer. 
 
EventId m_beaconLossTimer
 
bool LinkIsEstab() const 
True if link is established. 
 
an identifier for simulation events. 
 
PeerEvent
Peer link events, see 802.11s draft 11B.3.3.2. 
 
PmpReasonCode
Codes used by 802.11s Peer Management Protocol. 
 
uint16_t m_dot11MeshMaxRetries
 
Time m_beaconInterval
Current beacon interval on corresponding interface. 
 
uint16_t m_localLinkId
My ID of this link. 
 
Describes Mesh Configuration Element see 7.3.2.86 of 802.11s draft 3.0. 
 
Peer link model for 802.11s Peer Management protocol. 
 
Time m_lastBeacon
When last beacon was received. 
 
static TypeId GetTypeId()
Support object system. 
 
a base class which provides memory management and object aggregation 
 
Time GetBeaconInterval() const 
 
void TransmissionFailure()
Callback type for MLME-SignalPeerLinkStatus event. 
 
void SendPeerLinkConfirm()
 
uint32_t m_interface
The number of interface I am associated with. 
 
Timeout of holding (graceful closing) timer. 
 
Mac48Address GetPeerAddress() const 
 
void ConfirmReject(uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Confirm reject. 
 
a unique identifier for an interface. 
 
Time m_dot11MeshRetryTimeout
 
void ConfirmAccept(uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp)
Confirm accept. 
 
void MLMEPeeringRequestReject()
MLME-PeeringRequestReject. 
 
PeerLink & operator=(const PeerLink &)
 
void OpenReject(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Reject open link. 
 
802.11s Peer Management Protocol model