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;
77 void SetInterface (uint32_t interface);
78 void SetLocalLinkId (uint16_t
id);
79 void SetLocalAid (uint16_t aid);
80 uint16_t GetPeerAid ()
const;
83 uint16_t GetLocalAid ()
const;
84 Time GetLastBeacon ()
const;
85 Time GetBeaconInterval ()
const;
106 void TransmissionFailure ();
109 void Report (std::ostream & os)
const;
145 uint16_t localLinkId,
153 uint16_t localLinkId,
173 void ClearRetryTimer ();
174 void ClearConfirmTimer ();
175 void ClearHoldingTimer ();
176 void SetHoldingTimer ();
177 void SetRetryTimer ();
178 void SetConfirmTimer ();
186 void SendPeerLinkOpen ();
187 void SendPeerLinkConfirm ();
194 void HoldingTimeout ();
195 void RetryTimeout ();
196 void ConfirmTimeout ();
244 uint16_t m_dot11MeshMaxRetries;
245 Time m_dot11MeshRetryTimeout;
246 Time m_dot11MeshHoldingTimeout;
247 Time m_dot11MeshConfirmTimeout;
252 uint16_t m_retryCounter;
254 uint16_t m_maxBeaconLoss;
255 uint16_t m_maxPacketFail;
void TransmissionSuccess()
Reports about transmission success/failure.
Mac48Address m_peerMeshPointAddress
void MLMECancelPeerLink(PmpReasonCode reason)
MLME-CancelPeerLink.request.
void Report(std::ostream &os) const
Statistics.
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.
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 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 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.
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.
void SetMacPlugin(Ptr< PeerManagementProtocolMac > plugin)
void Close(uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason)
Close link.
void MLMEActivePeerLinkOpen()
MLME-ActivePeerLinkOpen.request.
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 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.
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.
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
uint32_t m_interface
The number of interface I am associated with.
Timeout of holding (graceful closing) timer.
void ConfirmReject(uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Confirm reject.
a unique identifier for an interface.
void ConfirmAccept(uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp)
Confirm accept.
void MLMEPeeringRequestReject()
MLME-PeeringRequestReject.
void OpenReject(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Reject open link.
802.11s Peer Management Protocol model