17#include "ns3/callback.h"
18#include "ns3/event-id.h"
19#include "ns3/mac48-address.h"
20#include "ns3/nstime.h"
21#include "ns3/object.h"
28class PeerManagementProtocolMac;
182 void Report(std::ostream& os)
const;
An identifier for simulation events.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
See 7.3.2.89 of 802.11s draft 2.07.
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.
Ptr< PeerManagementProtocolMac > m_macPlugin
pointer to MAC plugin, which is responsible for peer management
void MLMEActivePeerLinkOpen()
MLME-ActivePeerLinkOpen.request.
static TypeId GetTypeId()
Get the type ID.
void SendPeerLinkOpen()
Send a peer link open.
Callback< void, uint32_t, Mac48Address, Mac48Address, PeerLink::PeerState, PeerLink::PeerState > SignalStatusCallback
Callback type for MLME-SignalPeerLinkStatus event.
Time m_dot11MeshRetryTimeout
Retry timeout.
void SetHoldingTimer()
Set the holding timer.
void OpenAccept(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp)
Accept open link.
void TransmissionFailure()
Callback type for MLME-SignalPeerLinkStatus event.
void RetryTimeout()
Retry Timeout event handler.
void SetRetryTimer()
Set the retry timer.
PeerState
Peer Link state:
PeerLink & operator=(const PeerLink &)=delete
void MLMESetSignalStatusCallback(SignalStatusCallback cb)
Set callback.
void DoDispose() override
Destructor implementation.
void StateMachine(PeerEvent event, PmpReasonCode=REASON11S_RESERVED)
State transition.
Time m_dot11MeshConfirmTimeout
Confirm timeout.
static const char *const PeerStateNames[6]
Literal names of Mesh Peer Management states for use in log messages.
void SetBeaconInformation(Time lastBeacon, Time BeaconInterval)
Process beacon received from peer.
void Close(uint16_t localLinkID, uint16_t peerLinkID, PmpReasonCode reason)
Close link.
void SetLocalLinkId(uint16_t id)
Set the local link ID.
uint16_t m_maxBeaconLoss
Maximum number of lost beacons before link will be closed.
Mac48Address m_peerMeshPointAddress
Mesh point address, equal to peer address in case of single interface mesh point.
void ConfirmTimeout()
Confirm Timeout event handler.
uint16_t m_maxPacketFail
Maximum number of failed packets before link will be closed.
void SetLocalAid(uint16_t aid)
Set the local association ID.
uint32_t m_interface
The number of interface I am associated with.
void MLMEPeeringRequestReject()
MLME-PeeringRequestReject.
void BeaconLoss()
Several successive beacons were lost, close link.
void MLMECancelPeerLink(PmpReasonCode reason)
MLME-CancelPeerLink.request.
uint16_t m_peerAssocId
Assoc Id assigned to me by peer.
PeerState m_state
Current state.
void SendPeerLinkClose(PmpReasonCode reasoncode)
Send a peer link close.
void ConfirmReject(uint16_t localLinkId, uint16_t peerLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Confirm reject.
Time m_beaconInterval
Current beacon interval on corresponding interface.
void SetPeerAddress(Mac48Address macaddr)
Set the peer address.
void ClearConfirmTimer()
Clear the confirm timer.
EventId m_holdingTimer
Holding timer.
void SetBeaconTimingElement(IeBeaconTiming beaconTiming)
Set the beacon timing element.
EventId m_retryTimer
Retry timer.
void ClearHoldingTimer()
Clear the holding timer.
void SetMacPlugin(Ptr< PeerManagementProtocolMac > plugin)
Set pointer to MAC-plugin, which is responsible for sending peer link management frames.
void SetPeerMeshPointAddress(Mac48Address macaddr)
Set the peer mesh point address.
PeerLink()
C-tor create empty link.
Time GetLastBeacon() const
Get the time of the last received beacon.
SignalStatusCallback m_linkStatusCallback
How to report my status change.
void Report(std::ostream &os) const
Statistics.
void OpenReject(uint16_t localLinkId, IeConfiguration conf, Mac48Address peerMp, PmpReasonCode reason)
Reject open link.
Mac48Address GetPeerAddress() const
Get the peer address.
Time GetBeaconInterval() const
Get the beacon interval.
Mac48Address m_peerAddress
Peer address.
void SetConfirmTimer()
Set the confirm timer.
IeConfiguration m_configuration
Mesh interface configuration.
void ConfirmAccept(uint16_t localLinkId, uint16_t peerLinkId, uint16_t peerAid, IeConfiguration conf, Mac48Address peerMp)
Confirm accept.
IeBeaconTiming m_beaconTiming
Beacon timing element received from the peer. Needed by BCA.
IeBeaconTiming GetBeaconTimingElement() const
Get the beacon timing element.
void TransmissionSuccess()
Reports about transmission success/failure.
void SendPeerLinkConfirm()
Send a peer link confirm.
void SetLinkStatusCallback(Callback< void, uint32_t, Mac48Address, bool > cb)
Method used to detect peer link changes.
PeerEvent
Peer link events, see 802.11s draft 11B.3.3.2.
@ TOR1
Timeout of retry timer.
@ TOH
Timeout of holding (graceful closing) timer.
@ CNF_ACPT
PeerLinkConfirm_Accept.
@ CLS_ACPT
PeerLinkClose_Accept.
@ TOC
Timeout of confirm timer.
@ ACTOPN
Active peer link open.
@ OPN_RJCT
PeerLinkOpen_Reject.
@ TOR2
also timeout of retry timer
@ CNF_RJCT
PeerLinkConfirm_Reject.
@ OPN_ACPT
PeerLinkOpen_Accept.
@ REQ_RJCT
PeerLinkOpenReject by internal reason.
EventId m_beaconLossTimer
Beacon loss timer.
uint16_t GetLocalAid() const
Get the local association ID.
uint16_t m_retryCounter
Retry counter.
uint16_t m_dot11MeshMaxRetries
Maximum number of retries.
uint16_t m_localLinkId
My ID of this link.
uint16_t m_packetFail
How many successive packets were failed to transmit.
uint16_t GetPeerAid() const
Set the peer association ID.
void SetInterface(uint32_t interface)
Set the interface.
uint16_t m_assocId
My association ID.
Time m_dot11MeshHoldingTimeout
Holding timeout.
PeerLink(const PeerLink &)=delete
uint16_t m_peerLinkId
Peer ID of this link.
EventId m_confirmTimer
Confirm timer.
802.11s Peer Management Protocol model
PmpReasonCode
Codes used by 802.11s Peer Management Protocol.
Every class exported by the ns3 library is enclosed in the ns3 namespace.