A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WifiMac Class Referenceabstract

base class for all MAC-level wifi objects. More...

#include "wifi-mac.h"

+ Inheritance diagram for ns3::WifiMac:
+ Collaboration diagram for ns3::WifiMac:

Classes

struct  LinkEntity
 Structure holding information specific to a single link. More...
 

Public Types

typedef Callback< void, Ptr< const Packet >, Mac48Address, Mac48AddressForwardUpCallback
 This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack.
 
using OriginatorAgreementOptConstRef
 optional const reference to OriginatorBlockAckAgreement
 
using RecipientAgreementOptConstRef
 optional const reference to RecipientBlockAckAgreement
 

Public Member Functions

 WifiMac ()
 
 WifiMac (const WifiMac &)=delete
 
 ~WifiMac () override
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model.
 
void BlockUnicastTxOnLinks (WifiQueueBlockedReason reason, const Mac48Address &address, const std::set< uint8_t > &linkIds)
 Block the transmission on the given links of all unicast frames addressed to the station with the given address for the given reason.
 
virtual bool CanForwardPacketsTo (Mac48Address to) const =0
 Return true if packets can be forwarded to the given destination, false otherwise.
 
void Enqueue (Ptr< Packet > packet, Mac48Address to)
 
void Enqueue (Ptr< Packet > packet, Mac48Address to, Mac48Address from)
 
void Enqueue (Ptr< Packet > packet, Mac48Address to, Mac48Address from, uint8_t tid)
 
Mac48Address GetAddress () const
 
OriginatorAgreementOptConstRef GetBaAgreementEstablishedAsOriginator (Mac48Address recipient, uint8_t tid) const
 
RecipientAgreementOptConstRef GetBaAgreementEstablishedAsRecipient (Mac48Address originator, uint8_t tid) const
 
BlockAckReqType GetBarTypeAsOriginator (const Mac48Address &recipient, uint8_t tid) const
 
BlockAckReqType GetBarTypeAsRecipient (Mac48Address originator, uint8_t tid) const
 
BlockAckType GetBaTypeAsOriginator (const Mac48Address &recipient, uint8_t tid) const
 
BlockAckType GetBaTypeAsRecipient (Mac48Address originator, uint8_t tid) const
 
Mac48Address GetBssid (uint8_t linkId) const
 
Ptr< ChannelAccessManagerGetChannelAccessManager (uint8_t linkId=SINGLE_LINK_OP_ID) const
 Get the Channel Access Manager associated with the given link.
 
Ptr< WifiNetDeviceGetDevice () const
 Return the device this PHY is associated with.
 
bool GetDsssSupported (uint8_t linkId) const
 Return whether the device supports DSSS on the given link.
 
EhtCapabilities GetEhtCapabilities (uint8_t linkId) const
 Return the EHT capabilities of the device for the given link.
 
Ptr< EhtConfigurationGetEhtConfiguration () const
 
bool GetEhtSupported () const
 Return whether the device supports EHT.
 
bool GetEhtSupported (const Mac48Address &address) const
 
bool GetErpSupported (uint8_t linkId) const
 Return whether the device supports ERP on the given link.
 
ExtendedCapabilities GetExtendedCapabilities () const
 Return the extended capabilities of the device.
 
Ptr< FrameExchangeManagerGetFrameExchangeManager (uint8_t linkId=SINGLE_LINK_OP_ID) const
 Get the Frame Exchange Manager associated with the given link.
 
He6GhzBandCapabilities GetHe6GhzBandCapabilities (uint8_t linkId) const
 Return the HE 6GHz band capabilities of the device for the given 6 GHz link.
 
HeCapabilities GetHeCapabilities (uint8_t linkId) const
 Return the HE capabilities of the device for the given link.
 
Ptr< HeConfigurationGetHeConfiguration () const
 
bool GetHeSupported () const
 Return whether the device supports HE.
 
bool GetHeSupported (const Mac48Address &address) const
 
HtCapabilities GetHtCapabilities (uint8_t linkId) const
 Return the HT capabilities of the device for the given link.
 
Ptr< HtConfigurationGetHtConfiguration () const
 
bool GetHtSupported (const Mac48Address &address) const
 
bool GetHtSupported (uint8_t linkId) const
 Return whether the device supports HT on the given link.
 
std::optional< uint8_t > GetLinkForPhy (Ptr< const WifiPhy > phy) const
 Get the ID of the link (if any) on which the given PHY is operating.
 
std::optional< uint8_t > GetLinkForPhy (std::size_t phyId) const
 Get the ID of the link (if any) on which the given PHY is operating.
 
virtual std::optional< uint8_t > GetLinkIdByAddress (const Mac48Address &address) const
 Get the ID of the link having the given MAC address, if any.
 
const std::set< uint8_t > & GetLinkIds () const
 
Mac48Address GetLocalAddress (const Mac48Address &remoteAddr) const
 Get the local MAC address used to communicate with a remote STA.
 
Ptr< WifiMacQueueSchedulerGetMacQueueScheduler () const
 Get the wifi MAC queue scheduler.
 
uint32_t GetMaxAmpduSize (AcIndex ac) const
 Return the maximum A-MPDU size of the given Access Category.
 
uint16_t GetMaxAmsduSize (AcIndex ac) const
 Return the maximum A-MSDU size of the given Access Category.
 
uint16_t GetMaxBaBufferSize (std::optional< Mac48Address > address=std::nullopt) const
 Get the maximum Block Ack buffer size (in number of MPDUs) supported by the given device, if any, or by this device, otherwise, based on the supported standard.
 
std::optional< Mac48AddressGetMldAddress (const Mac48Address &remoteAddr) const
 
uint16_t GetMpduBufferSize () const
 
uint8_t GetNLinks () const
 Get the number of links (can be greater than 1 for 11be devices only).
 
bool GetQosSupported () const
 Return whether the device supports QoS.
 
Ptr< QosTxopGetQosTxop (AcIndex ac) const
 Accessor for a specified EDCA object.
 
Ptr< QosTxopGetQosTxop (uint8_t tid) const
 Accessor for a specified EDCA object.
 
Ssid GetSsid () const
 
std::optional< std::reference_wrapper< const WifiTidLinkMapping > > GetTidToLinkMapping (Mac48Address mldAddr, WifiDirection dir) const
 Get the TID-to-Link Mapping negotiated with the given MLD (if any) for the given direction.
 
bool GetTxBlockedOnLink (AcIndex ac, const WifiContainerQueueId &queueId, uint8_t linkId, WifiQueueBlockedReason reason=WifiQueueBlockedReason::REASONS_COUNT) const
 Check whether the transmission of the packets in the given container queue of the given Access Category are blocked on the given link for the given reason (if any).
 
Ptr< TxopGetTxop () const
 Accessor for the Txop object.
 
virtual Ptr< WifiMacQueueGetTxopQueue (AcIndex ac) const
 Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise.
 
TypeOfStation GetTypeOfStation () const
 Return the type of station.
 
VhtCapabilities GetVhtCapabilities (uint8_t linkId) const
 Return the VHT capabilities of the device for the given link.
 
Ptr< VhtConfigurationGetVhtConfiguration () const
 
bool GetVhtSupported (const Mac48Address &address) const
 
bool GetVhtSupported (uint8_t linkId) const
 Return whether the device supports VHT on the given link.
 
Ptr< WifiPhyGetWifiPhy (uint8_t linkId=SINGLE_LINK_OP_ID) const
 
Ptr< WifiRemoteStationManagerGetWifiRemoteStationManager (uint8_t linkId=0) const
 
virtual bool HasFramesToTransmit (uint8_t linkId)
 Check if the MAC has frames to transmit over the given link.
 
bool Is6GhzBand (uint8_t linkId) const
 Indicate if a given link is on the 6 GHz band.
 
virtual void NotifyChannelSwitching (uint8_t linkId)
 Notify that channel on the given link has been switched.
 
void NotifyPromiscRx (Ptr< const Packet > packet)
 
void NotifyRx (Ptr< const Packet > packet)
 
void NotifyRxDrop (Ptr< const Packet > packet)
 
void NotifyTx (Ptr< const Packet > packet)
 
void NotifyTxDrop (Ptr< const Packet > packet)
 
WifiMacoperator= (const WifiMac &)=delete
 
void ResetWifiPhys ()
 Remove currently attached WifiPhy objects from this MAC.
 
virtual void SetAddress (Mac48Address address)
 
void SetBssid (Mac48Address bssid, uint8_t linkId)
 
void SetChannelAccessManagers (const std::vector< Ptr< ChannelAccessManager > > &caManagers)
 
void SetCtsToSelfSupported (bool enable)
 Enable or disable CTS-to-self feature.
 
void SetDevice (const Ptr< WifiNetDevice > device)
 Sets the device this PHY is associated with.
 
void SetForwardUpCallback (ForwardUpCallback upCallback)
 
void SetFrameExchangeManagers (const std::vector< Ptr< FrameExchangeManager > > &feManagers)
 
void SetLinkDownCallback (Callback< void > linkDown)
 
virtual void SetLinkUpCallback (Callback< void > linkUp)
 
virtual void SetMacQueueScheduler (Ptr< WifiMacQueueScheduler > scheduler)
 Set the wifi MAC queue scheduler.
 
void SetMpduBufferSize (uint16_t size)
 
void SetPromisc ()
 Sets the interface in promiscuous mode.
 
void SetSsid (Ssid ssid)
 
void SetTypeOfStation (TypeOfStation type)
 This method is invoked by a subclass to specify what type of station it is implementing.
 
virtual void SetWifiPhys (const std::vector< Ptr< WifiPhy > > &phys)
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)
 
void SetWifiRemoteStationManagers (const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
 
virtual bool SupportsSendFrom () const
 
bool TidMappedOnLink (Mac48Address mldAddr, WifiDirection dir, uint8_t tid, uint8_t linkId) const
 Check whether the given TID is mapped on the given link in the given direction for the given MLD.
 
void UnblockUnicastTxOnLinks (WifiQueueBlockedReason reason, const Mac48Address &address, const std::set< uint8_t > &linkIds)
 Unblock the transmission on the given links of all unicast frames addressed to the station with the given address for the given reason.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void ApplyTidLinkMapping (const Mac48Address &mldAddr, WifiDirection dir)
 Apply the TID-to-Link Mapping negotiated with the given MLD for the given direction by properly configuring the queue scheduler.
 
virtual void ConfigureContentionWindow (uint32_t cwMin, uint32_t cwMax)
 
virtual void DeaggregateAmsduAndForward (Ptr< const WifiMpdu > mpdu)
 This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
 
void DoDispose () override
 Destructor implementation.
 
void DoInitialize () override
 Initialize() implementation.
 
void ForwardUp (Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
 Forward the packet up to the device.
 
Ptr< QosTxopGetBEQueue () const
 Accessor for the AC_BE channel access function.
 
Ptr< QosTxopGetBKQueue () const
 Accessor for the AC_BK channel access function.
 
LinkEntityGetLink (uint8_t linkId) const
 Get a reference to the link associated with the given ID.
 
const std::map< uint8_t, std::unique_ptr< LinkEntity > > & GetLinks () const
 
bool GetShortSlotTimeSupported () const
 
Ptr< QosTxopGetVIQueue () const
 Accessor for the AC_VI channel access function.
 
Ptr< QosTxopGetVOQueue () const
 Accessor for the AC_VO channel access function.
 
void NotifyConstructionCompleted () override
 Notifier called once the ObjectBase is fully constructed.
 
virtual void Receive (Ptr< const WifiMpdu > mpdu, uint8_t linkId)
 This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received on the given link.
 
void SetShortSlotTimeSupported (bool enable)
 Enable or disable short slot time feature.
 
void SwapLinks (std::map< uint8_t, uint8_t > links)
 Swap the links based on the information included in the given map.
 
void UpdateTidToLinkMapping (const Mac48Address &mldAddr, WifiDirection dir, const WifiTidLinkMapping &mapping)
 Update the TID-to-Link Mappings for the given MLD in the given direction based on the given negotiated mappings.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 

Protected Attributes

Callback< void > m_linkDown
 Callback when a link is down.
 
Callback< void > m_linkUp
 Callback when a link is up.
 
Ptr< MacRxMiddlem_rxMiddle
 RX middle (defragmentation etc.)
 
Ptr< WifiMacQueueSchedulerm_scheduler
 wifi MAC queue scheduler
 
Ptr< MacTxMiddlem_txMiddle
 TX middle (aggregation etc.)
 
Ptr< Txopm_txop
 TXOP used for transmission of frames to non-QoS peers.
 

Private Types

typedef void(* DroppedMpduCallback) (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
 TracedCallback signature for MPDU drop events.
 
typedef TracedCallback< WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpduTracedCallback
 TracedCallback for MPDU drop events typedef.
 
typedef std::map< AcIndex, Ptr< QosTxop >, std::greater<> > EdcaQueues
 This type defines a mapping between an Access Category index, and a pointer to the corresponding channel access function.
 
typedef void(* IcfDropCallback) (WifiIcfDrop reason, uint8_t linkId)
 TracedCallback signature for ICF drop events.
 
using IcfDropTracedCallback = TracedCallback<WifiIcfDrop, uint8_t>
 TracedCallback for ICF drop events typedef.
 
typedef void(* MpduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
 TracedCallback signature for MPDU response timeout events.
 
typedef TracedCallback< uint8_t, Ptr< const WifiMpdu >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
 TracedCallback for MPDU response timeout events typedef.
 
typedef TracedCallback< Ptr< const WifiMpdu > > MpduTracedCallback
 TracedCallback for acked/nacked MPDUs typedef.
 
typedef void(* PsduMapResponseTimeoutCallback) (uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
 TracedCallback signature for PSDU map response timeout events.
 
typedef TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
 TracedCallback for PSDU map response timeout events typedef.
 
typedef void(* PsduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
 TracedCallback signature for PSDU response timeout events.
 
typedef TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
 TracedCallback for PSDU response timeout events typedef.
 

Private Member Functions

void CompleteConfig ()
 Complete the configuration of the MAC layer components.
 
void ConfigureDcf (Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, std::list< bool > isDsss, AcIndex ac)
 
void ConfigurePhyDependentParameters (uint8_t linkId)
 Configure PHY dependent parameters such as CWmin and CWmax on the given link.
 
virtual std::unique_ptr< LinkEntityCreateLinkEntity () const
 Create a LinkEntity object.
 
bool CreateLinksIfNeeded (std::size_t nLinks)
 If no link has been already created, create the given number links; otherwise, do nothing.
 
virtual void DoCompleteConfig ()=0
 Allow subclasses to complete the configuration of the MAC layer components.
 
virtual Mac48Address DoGetLocalAddress (const Mac48Address &remoteAddr) const
 This method is called if this device is an MLD to determine the MAC address of the affiliated STA used to communicate with the single link device having the given MAC address.
 
virtual void Enqueue (Ptr< WifiMpdu > mpdu, Mac48Address to, Mac48Address from)=0
 
virtual void NotifyDropPacketToEnqueue (Ptr< Packet > packet, Mac48Address to)
 Allow subclasses to take actions when a packet to enqueue has been dropped.
 
void SetBeBlockAckInactivityTimeout (uint16_t timeout)
 Set BE block ack inactivity timeout.
 
void SetBeBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_BE.
 
void SetBeQueue (Ptr< QosTxop > edca)
 Set the AC_BE channel access function This method is private so that it is only used while constructing this object.
 
void SetBkBlockAckInactivityTimeout (uint16_t timeout)
 Set BK block ack inactivity timeout.
 
void SetBkBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_BK.
 
void SetBkQueue (Ptr< QosTxop > edca)
 Set the AC_BK channel access function This method is private so that it is only used while constructing this object.
 
void SetDsssSupported (bool enable, uint8_t linkId)
 Enable or disable DSSS support for the given link.
 
void SetErpSupported (bool enable, uint8_t linkId)
 Enable or disable ERP support for the given link.
 
void SetQosSupported (bool enable)
 Enable or disable QoS support for the device.
 
void SetTxop (Ptr< Txop > dcf)
 Set the Txop object.
 
void SetupDcfQueue ()
 This method is a private utility invoked to configure the channel access function for devices that do not support QoS.
 
void SetupEdcaQueue (AcIndex ac)
 This method is a private utility invoked to configure the channel access function for the specified Access Category.
 
void SetViBlockAckInactivityTimeout (uint16_t timeout)
 Set VI block ack inactivity timeout.
 
void SetViBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_VI.
 
void SetViQueue (Ptr< QosTxop > edca)
 Set the AC_VI channel access function This method is private so that it is only used while constructing this object.
 
void SetVoBlockAckInactivityTimeout (uint16_t timeout)
 Set VO block ack inactivity timeout.
 
void SetVoBlockAckThreshold (uint8_t threshold)
 Set the block ack threshold for AC_VO.
 
void SetVoQueue (Ptr< QosTxop > edca)
 Set the AC_VO channel access function This method is private so that it is only used while constructing this object.
 
void UpdateLinkId (uint8_t id)
 This method is intended to be called when a link changes ID in order to update the link ID stored by the Frame Exchange Manager and the Channel Access Manager operating on that link.
 

Private Attributes

MpduTracedCallback m_ackedMpduCallback
 ack'ed MPDU callback
 
Mac48Address m_address
 MAC address of this station.
 
uint32_t m_beMaxAmpduSize
 maximum A-MPDU size for AC_BE (in bytes)
 
uint16_t m_beMaxAmsduSize
 maximum A-MSDU size for AC_BE (in bytes)
 
uint32_t m_bkMaxAmpduSize
 maximum A-MPDU size for AC_BK (in bytes)
 
uint16_t m_bkMaxAmsduSize
 maximum A-MSDU size for AC_BK (in bytes)
 
bool m_ctsToSelfSupported
 flag indicating whether CTS-To-Self is supported
 
Ptr< WifiNetDevicem_device
 Pointer to the device.
 
std::unordered_map< Mac48Address, WifiTidLinkMapping, WifiAddressHashm_dlTidLinkMappings
 DL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
 
DroppedMpduTracedCallback m_droppedMpduCallback
 This trace indicates that an MPDU was dropped for the given reason.
 
EdcaQueues m_edca
 This is a map from Access Category index to the corresponding channel access function.
 
ForwardUpCallback m_forwardUp
 Callback to forward packet up the stack.
 
IcfDropTracedCallback m_icfDropCallback
 traced callback for ICF drop events
 
std::set< uint8_t > m_linkIds
 IDs of the links in use.
 
std::map< uint8_t, std::unique_ptr< LinkEntity > > m_links
 ID-indexed map of Link objects.
 
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
 The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).
 
TracedCallback< Ptr< const Packet > > m_macRxDropTrace
 The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer during reception.
 
TracedCallback< Ptr< const Packet > > m_macRxTrace
 The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).
 
TracedCallback< Ptr< const Packet > > m_macTxDropTrace
 The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer before being queued for transmission.
 
TracedCallback< Ptr< const Packet > > m_macTxTrace
 The trace source fired when packets come into the "top" of the device at the L3/L2 transition, before being queued for transmission.
 
uint16_t m_mpduBufferSize
 BlockAck buffer size (in number of MPDUs)
 
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
 MPDU response timeout traced callback.
 
MpduTracedCallback m_nackedMpduCallback
 nack'ed MPDU callback
 
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
 PSDU map response timeout traced callback.
 
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
 PSDU response timeout traced callback.
 
bool m_qosSupported
 This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
 
bool m_shortSlotTimeSupported
 flag whether short slot time is supported
 
UniformRandomBitGenerator m_shuffleLinkIdsGen
 random number generator to shuffle link IDs
 
Ssid m_ssid
 Service Set ID (SSID)
 
TypeOfStation m_typeOfStation
 the type of station
 
std::unordered_map< Mac48Address, WifiTidLinkMapping, WifiAddressHashm_ulTidLinkMappings
 UL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
 
uint32_t m_viMaxAmpduSize
 maximum A-MPDU size for AC_VI (in bytes)
 
uint16_t m_viMaxAmsduSize
 maximum A-MSDU size for AC_VI (in bytes)
 
uint32_t m_voMaxAmpduSize
 maximum A-MPDU size for AC_VO (in bytes)
 
uint16_t m_voMaxAmsduSize
 maximum A-MSDU size for AC_VO (in bytes)
 

Additional Inherited Members

Detailed Description

base class for all MAC-level wifi objects.

This class encapsulates all the low-level MAC functionality DCA, EDCA, etc) and all the high-level MAC functionality (association/disassociation state machines).

Definition at line 88 of file wifi-mac.h.

Member Typedef Documentation

◆ DroppedMpduCallback

typedef void(* ns3::WifiMac::DroppedMpduCallback) (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
private

TracedCallback signature for MPDU drop events.

Parameters
reasonthe reason why the MPDU was dropped (
See also
WifiMacDropReason)
Parameters
mpduthe dropped MPDU

Definition at line 1258 of file wifi-mac.h.

◆ DroppedMpduTracedCallback

TracedCallback for MPDU drop events typedef.

Definition at line 1261 of file wifi-mac.h.

◆ EdcaQueues

typedef std::map<AcIndex, Ptr<QosTxop>, std::greater<> > ns3::WifiMac::EdcaQueues
private

This type defines a mapping between an Access Category index, and a pointer to the corresponding channel access function.

Access Categories are sorted in decreasing order of priority.

Definition at line 1187 of file wifi-mac.h.

◆ ForwardUpCallback

This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack.

Parameters
packetthe packet that has been received.
fromthe MAC address of the device that sent the packet.
tothe MAC address of the device that the packet is destined for.

Definition at line 463 of file wifi-mac.h.

◆ IcfDropCallback

typedef void(* ns3::WifiMac::IcfDropCallback) (WifiIcfDrop reason, uint8_t linkId)
private

TracedCallback signature for ICF drop events.

Parameters
reasonthe reason why the ICF was dropped by the EMLSR client
linkIdthe ID of the link on which the ICF was dropped

Definition at line 1345 of file wifi-mac.h.

◆ IcfDropTracedCallback

TracedCallback for ICF drop events typedef.

Definition at line 1348 of file wifi-mac.h.

◆ MpduResponseTimeoutCallback

typedef void(* ns3::WifiMac::MpduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
private

TracedCallback signature for MPDU response timeout events.

Parameters
reasonthe reason why the timer was started
mpduthe MPDU whose response was not received before the timeout
txVectorthe TXVECTOR used to transmit the MPDU

Definition at line 1281 of file wifi-mac.h.

◆ MpduResponseTimeoutTracedCallback

TracedCallback for MPDU response timeout events typedef.

Definition at line 1287 of file wifi-mac.h.

◆ MpduTracedCallback

TracedCallback for acked/nacked MPDUs typedef.

Definition at line 1269 of file wifi-mac.h.

◆ OriginatorAgreementOptConstRef

Initial value:
std::optional<std::reference_wrapper<const OriginatorBlockAckAgreement>>

optional const reference to OriginatorBlockAckAgreement

Definition at line 667 of file wifi-mac.h.

◆ PsduMapResponseTimeoutCallback

typedef void(* ns3::WifiMac::PsduMapResponseTimeoutCallback) (uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
private

TracedCallback signature for PSDU map response timeout events.

Parameters
reasonthe reason why the timer was started
psduMapthe PSDU map for which not all responses were received before the timeout
missingStationsthe MAC addresses of the stations that did not respond
nTotalStationsthe total number of stations that had to respond

Definition at line 1324 of file wifi-mac.h.

◆ PsduMapResponseTimeoutTracedCallback

typedef TracedCallback<uint8_t, WifiPsduMap*, const std::set<Mac48Address>*, std::size_t> ns3::WifiMac::PsduMapResponseTimeoutTracedCallback
private

TracedCallback for PSDU map response timeout events typedef.

Definition at line 1331 of file wifi-mac.h.

◆ PsduResponseTimeoutCallback

typedef void(* ns3::WifiMac::PsduResponseTimeoutCallback) (uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
private

TracedCallback signature for PSDU response timeout events.

Parameters
reasonthe reason why the timer was started
psduthe PSDU whose response was not received before the timeout
txVectorthe TXVECTOR used to transmit the PSDU

Definition at line 1302 of file wifi-mac.h.

◆ PsduResponseTimeoutTracedCallback

TracedCallback for PSDU response timeout events typedef.

Definition at line 1308 of file wifi-mac.h.

◆ RecipientAgreementOptConstRef

Initial value:
std::optional<std::reference_wrapper<const RecipientBlockAckAgreement>>

optional const reference to RecipientBlockAckAgreement

Definition at line 670 of file wifi-mac.h.

Constructor & Destructor Documentation

◆ WifiMac() [1/2]

ns3::WifiMac::WifiMac ( )

Definition at line 46 of file wifi-mac.cc.

References ns3::Create(), m_rxMiddle, m_txMiddle, ns3::MakeCallback(), NS_LOG_FUNCTION, and Receive().

+ Here is the call graph for this function:

◆ ~WifiMac()

ns3::WifiMac::~WifiMac ( )
override

Definition at line 57 of file wifi-mac.cc.

References NS_LOG_FUNCTION.

◆ WifiMac() [2/2]

ns3::WifiMac::WifiMac ( const WifiMac & )
delete

Member Function Documentation

◆ ApplyTidLinkMapping()

void ns3::WifiMac::ApplyTidLinkMapping ( const Mac48Address & mldAddr,
WifiDirection dir )
protected

Apply the TID-to-Link Mapping negotiated with the given MLD for the given direction by properly configuring the queue scheduler.

Parameters
mldAddrthe MLD MAC address of the given MLD
dirthe given direction (DL or UL)

Definition at line 1463 of file wifi-mac.cc.

References ns3::BOTH_DIRECTIONS, dir, ns3::DOWNLINK, GetAddress(), m_dlTidLinkMappings, m_links, m_scheduler, m_ulTidLinkMappings, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::TID_NOT_MAPPED, and ns3::WIFI_QOSDATA_QUEUE.

Referenced by ns3::StaWifiMac::ReceiveAssocResp(), and ns3::ApWifiMac::TxOk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AssignStreams()

int64_t ns3::WifiMac::AssignStreams ( int64_t stream)
virtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Reimplemented in ns3::ApWifiMac, ns3::MeshWifiInterfaceMac, and ns3::StaWifiMac.

Definition at line 374 of file wifi-mac.cc.

References GetNLinks(), ns3::UniformRandomBitGenerator::GetRv(), m_shuffleLinkIdsGen, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::AssignStreams(), ns3::MeshWifiInterfaceMac::AssignStreams(), and ns3::StaWifiMac::AssignStreams().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BlockUnicastTxOnLinks()

void ns3::WifiMac::BlockUnicastTxOnLinks ( WifiQueueBlockedReason reason,
const Mac48Address & address,
const std::set< uint8_t > & linkIds )

Block the transmission on the given links of all unicast frames addressed to the station with the given address for the given reason.

The given MAC address must be the MLD address in case the addressed device is multi-link.

Parameters
reasonthe reason for blocking transmissions
addressthe MAC address of the given device
linkIdsthe IDs of the links to block

Definition at line 1545 of file wifi-mac.cc.

References GetAddress(), GetLink(), ns3::LOG_FUNCTION, m_scheduler, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WIFI_CTL_QUEUE, ns3::WIFI_MGT_QUEUE, ns3::WIFI_QOSDATA_QUEUE, and ns3::wifiAcList.

Referenced by ns3::StaWifiMac::BlockTxOnLink(), and ns3::ApWifiMac::StaSwitchingToPsMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanForwardPacketsTo()

virtual bool ns3::WifiMac::CanForwardPacketsTo ( Mac48Address to) const
pure virtual

Return true if packets can be forwarded to the given destination, false otherwise.

Parameters
tothe address to which the packet should be sent
Returns
whether packets can be forwarded to the given destination

Implemented in MldSwapLinksTest::TestWifiMac, ns3::AdhocWifiMac, ns3::ApWifiMac, ns3::MeshWifiInterfaceMac, and ns3::StaWifiMac.

Referenced by Enqueue().

+ Here is the caller graph for this function:

◆ CompleteConfig()

void ns3::WifiMac::CompleteConfig ( )
private

Complete the configuration of the MAC layer components.

Definition at line 869 of file wifi-mac.cc.

References m_links, NS_ABORT_MSG_IF, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by SetChannelAccessManagers(), SetFrameExchangeManagers(), SetWifiPhys(), and SetWifiRemoteStationManagers().

+ Here is the caller graph for this function:

◆ ConfigureContentionWindow()

void ns3::WifiMac::ConfigureContentionWindow ( uint32_t cwMin,
uint32_t cwMax )
protectedvirtual
Parameters
cwMinthe minimum contention window size
cwMaxthe maximum contention window size

This method is called to set the minimum and the maximum contention window size.

Reimplemented in ns3::MeshWifiInterfaceMac.

Definition at line 757 of file wifi-mac.cc.

References ns3::AC_BE_NQOS, ConfigureDcf(), m_edca, m_links, and m_txop.

Referenced by ns3::MeshWifiInterfaceMac::ConfigureContentionWindow(), and ConfigurePhyDependentParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConfigureDcf()

void ns3::WifiMac::ConfigureDcf ( Ptr< Txop > dcf,
uint32_t cwmin,
uint32_t cwmax,
std::list< bool > isDsss,
AcIndex ac )
private
Parameters
dcfthe DCF to be configured
cwminthe minimum contention window for the DCF
cwmaxthe maximum contention window for the DCF
isDsssvector of flags to indicate whether PHY is DSSS or HR/DSSS for every link
acthe access category for the DCF

Configure the DCF with appropriate values depending on the given access category.

Definition at line 780 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BE_NQOS, ns3::AC_BEACON, ns3::AC_BK, ns3::AC_UNDEF, ns3::AC_VI, ns3::AC_VO, m_links, ns3::MicroSeconds(), NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by ConfigureContentionWindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConfigurePhyDependentParameters()

void ns3::WifiMac::ConfigurePhyDependentParameters ( uint8_t linkId)
private

Configure PHY dependent parameters such as CWmin and CWmax on the given link.

Parameters
linkIdthe ID of the given link

Definition at line 920 of file wifi-mac.cc.

References ConfigureContentionWindow(), GetLink(), ns3::WifiPhy::GetStandard(), m_links, NS_LOG_FUNCTION, ns3::WifiMac::LinkEntity::phy, SetDsssSupported(), SetErpSupported(), ns3::WIFI_PHY_BAND_2_4GHZ, ns3::WIFI_STANDARD_80211b, and ns3::WIFI_STANDARD_80211g.

Referenced by NotifyChannelSwitching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateLinkEntity()

std::unique_ptr< WifiMac::LinkEntity > ns3::WifiMac::CreateLinkEntity ( ) const
privatevirtual

Create a LinkEntity object.

Returns
a unique pointer to the created LinkEntity object

Reimplemented in ns3::ApWifiMac, and ns3::StaWifiMac.

Definition at line 1066 of file wifi-mac.cc.

Referenced by CreateLinksIfNeeded().

+ Here is the caller graph for this function:

◆ CreateLinksIfNeeded()

bool ns3::WifiMac::CreateLinksIfNeeded ( std::size_t nLinks)
private

If no link has been already created, create the given number links; otherwise, do nothing.

Parameters
nLinksthe given number of links
Returns
whether the given number of links have been created

Definition at line 938 of file wifi-mac.cc.

References CreateLinkEntity(), m_linkIds, and m_links.

Referenced by SetChannelAccessManagers(), SetFrameExchangeManagers(), SetWifiPhys(), and SetWifiRemoteStationManagers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeaggregateAmsduAndForward()

void ns3::WifiMac::DeaggregateAmsduAndForward ( Ptr< const WifiMpdu > mpdu)
protectedvirtual

This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.

Parameters
mpduthe MPDU containing the A-MSDU.

Reimplemented in ns3::ApWifiMac.

Definition at line 1786 of file wifi-mac.cc.

References ForwardUp(), NS_LOG_FUNCTION, and ns3::PeekPointer().

Referenced by ns3::AdhocWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoCompleteConfig()

virtual void ns3::WifiMac::DoCompleteConfig ( )
privatepure virtual

Allow subclasses to complete the configuration of the MAC layer components.

Implemented in MldSwapLinksTest::TestWifiMac, ns3::AdhocWifiMac, ns3::ApWifiMac, ns3::MeshWifiInterfaceMac, and ns3::StaWifiMac.

◆ DoDispose()

void ns3::WifiMac::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 427 of file wifi-mac.cc.

References ns3::Object::Dispose(), m_device, m_edca, m_links, m_rxMiddle, m_scheduler, m_txMiddle, m_txop, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::DoDispose(), ns3::MeshWifiInterfaceMac::DoDispose(), and ns3::StaWifiMac::DoDispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoGetLocalAddress()

Mac48Address ns3::WifiMac::DoGetLocalAddress ( const Mac48Address & remoteAddr) const
privatevirtual

This method is called if this device is an MLD to determine the MAC address of the affiliated STA used to communicate with the single link device having the given MAC address.

This method is overridden because its implementation depends on the type of station.

Parameters
remoteAddrthe MAC address of the remote single link device
Returns
the MAC address of the affiliated STA used to communicate with the remote device

Reimplemented in ns3::ApWifiMac, and ns3::StaWifiMac.

Definition at line 1839 of file wifi-mac.cc.

References m_address.

Referenced by GetLocalAddress().

+ Here is the caller graph for this function:

◆ DoInitialize()

void ns3::WifiMac::DoInitialize ( )
overrideprotectedvirtual

Initialize() implementation.

This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 403 of file wifi-mac.cc.

References ns3::Object::Initialize(), m_edca, m_links, m_txop, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::DoInitialize(), and ns3::StaWifiMac::DoInitialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Enqueue() [1/4]

void ns3::WifiMac::Enqueue ( Ptr< Packet > packet,
Mac48Address to )
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.

The packet should be enqueued in a TX queue, and should be dequeued as soon as the DCF/EDCA function determines that access is granted to this MAC.

Definition at line 1673 of file wifi-mac.cc.

References Enqueue(), GetAddress(), and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::DeaggregateAmsduAndForward(), Enqueue(), Enqueue(), Enqueue(), and ns3::ApWifiMac::Receive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Enqueue() [2/4]

void ns3::WifiMac::Enqueue ( Ptr< Packet > packet,
Mac48Address to,
Mac48Address from )
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.
fromthe address from which the packet should be sent.

The packet should be enqueued in a TX queue, and should be dequeued as soon as the DCF/EDCA function determines that access is granted to this MAC. The extra parameter "from" allows this device to operate in a bridged mode, forwarding received frames without altering the source address.

Definition at line 1683 of file wifi-mac.cc.

References Enqueue(), ns3::SocketPriorityTag::GetPriority(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Enqueue() [3/4]

void ns3::WifiMac::Enqueue ( Ptr< Packet > packet,
Mac48Address to,
Mac48Address from,
uint8_t tid )
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.
fromthe address from which the packet should be sent.
tidthe TID to use to send this packet

The packet should be enqueued in a TX queue, and should be dequeued as soon as the DCF/EDCA function determines that access is granted to this MAC. The extra parameter "tid" allows to specify the TID to use in case QoS is supported.

Definition at line 1702 of file wifi-mac.cc.

References CanForwardPacketsTo(), ns3::Create(), Enqueue(), GetAddress(), GetQosSupported(), ns3::WifiMacHeader::NORMAL_ACK, NotifyDropPacketToEnqueue(), NotifyTxDrop(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetNoOrder(), ns3::WifiMacHeader::SetQosAckPolicy(), ns3::WifiMacHeader::SetQosNoAmsdu(), ns3::WifiMacHeader::SetQosNoEosp(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetType(), SupportsSendFrom(), ns3::WIFI_MAC_DATA, and ns3::WIFI_MAC_QOSDATA.

+ Here is the call graph for this function:

◆ Enqueue() [4/4]

virtual void ns3::WifiMac::Enqueue ( Ptr< WifiMpdu > mpdu,
Mac48Address to,
Mac48Address from )
privatepure virtual
Parameters
mpduthe MPDU to send.
tothe address to which the packet should be sent.
fromthe address from which the packet should be sent.

Subclasses need to implement this method to finalize the MAC header of the MPDU (MAC addresses and ToDS/FromDS flags) and enqueue the MPDU in a TX queue.

Implemented in MldSwapLinksTest::TestWifiMac, ns3::AdhocWifiMac, ns3::ApWifiMac, ns3::MeshWifiInterfaceMac, and ns3::StaWifiMac.

◆ ForwardUp()

void ns3::WifiMac::ForwardUp ( Ptr< const Packet > packet,
Mac48Address from,
Mac48Address to )
protected

Forward the packet up to the device.

Parameters
packetthe packet that we are forwarding up to the device
fromthe address of the source
tothe address of the destination

Definition at line 1749 of file wifi-mac.cc.

References m_forwardUp, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::DeaggregateAmsduAndForward(), DeaggregateAmsduAndForward(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the caller graph for this function:

◆ GetAddress()

◆ GetBaAgreementEstablishedAsOriginator()

WifiMac::OriginatorAgreementOptConstRef ns3::WifiMac::GetBaAgreementEstablishedAsOriginator ( Mac48Address recipient,
uint8_t tid ) const
Parameters
recipient(link or device) MAC address of the recipient
tidtraffic ID.
Returns
the originator block ack agreement, if one has been established

Checks if an originator block ack agreement is established with station addressed by recipient for TID tid.

Definition at line 1845 of file wifi-mac.cc.

References ns3::QosTxop::GetBaManager(), GetMldAddress(), and GetQosTxop().

Referenced by GetBarTypeAsOriginator(), and GetBaTypeAsOriginator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBaAgreementEstablishedAsRecipient()

WifiMac::RecipientAgreementOptConstRef ns3::WifiMac::GetBaAgreementEstablishedAsRecipient ( Mac48Address originator,
uint8_t tid ) const
Parameters
originator(link or device) MAC address of the originator
tidtraffic ID.
Returns
the recipient block ack agreement, if one has been established

Checks if a recipient block ack agreement is established with station addressed by originator for TID tid.

Definition at line 1859 of file wifi-mac.cc.

References ns3::QosTxop::GetBaManager(), GetMldAddress(), and GetQosTxop().

Referenced by GetBarTypeAsRecipient(), and GetBaTypeAsRecipient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBarTypeAsOriginator()

BlockAckReqType ns3::WifiMac::GetBarTypeAsOriginator ( const Mac48Address & recipient,
uint8_t tid ) const
Parameters
recipientMAC address of recipient
tidtraffic ID
Returns
the type of Block Ack Requests sent to the recipient

This function returns the type of Block Ack Requests sent to the recipient.

Definition at line 1876 of file wifi-mac.cc.

References GetBaAgreementEstablishedAsOriginator(), and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

◆ GetBarTypeAsRecipient()

BlockAckReqType ns3::WifiMac::GetBarTypeAsRecipient ( Mac48Address originator,
uint8_t tid ) const
Parameters
originatorMAC address of originator
tidtraffic ID
Returns
the type of Block Ack Requests sent by the originator

This function returns the type of Block Ack Requests sent by the originator.

Definition at line 1894 of file wifi-mac.cc.

References GetBaAgreementEstablishedAsRecipient(), and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

◆ GetBaTypeAsOriginator()

BlockAckType ns3::WifiMac::GetBaTypeAsOriginator ( const Mac48Address & recipient,
uint8_t tid ) const
Parameters
recipientMAC address
tidtraffic ID
Returns
the type of Block Acks sent by the recipient

This function returns the type of Block Acks sent by the recipient.

Definition at line 1867 of file wifi-mac.cc.

References GetBaAgreementEstablishedAsOriginator(), and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

◆ GetBaTypeAsRecipient()

BlockAckType ns3::WifiMac::GetBaTypeAsRecipient ( Mac48Address originator,
uint8_t tid ) const
Parameters
originatorMAC address of originator
tidtraffic ID
Returns
the type of Block Acks sent to the originator

This function returns the type of Block Acks sent to the originator.

Definition at line 1885 of file wifi-mac.cc.

References GetBaAgreementEstablishedAsRecipient(), and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

◆ GetBEQueue()

Ptr< QosTxop > ns3::WifiMac::GetBEQueue ( ) const
protected

Accessor for the AC_BE channel access function.

Returns
a smart pointer to QosTxop

Definition at line 637 of file wifi-mac.cc.

References ns3::AC_BE, GetQosTxop(), and m_qosSupported.

Referenced by GetTypeId(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendProbeResp(), SetBeBlockAckInactivityTimeout(), and SetBeBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBKQueue()

Ptr< QosTxop > ns3::WifiMac::GetBKQueue ( ) const
protected

Accessor for the AC_BK channel access function.

Returns
a smart pointer to QosTxop

Definition at line 643 of file wifi-mac.cc.

References ns3::AC_BK, GetQosTxop(), and m_qosSupported.

Referenced by GetTypeId(), SetBkBlockAckInactivityTimeout(), and SetBkBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBssid()

Mac48Address ns3::WifiMac::GetBssid ( uint8_t linkId) const
Returns
the BSSID of the network the given link belongs to.
Parameters
linkIdthe ID of the given link

Definition at line 532 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::feManager, and GetLink().

Referenced by ns3::StaWifiMac::BlockTxOnLink(), ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::StaWifiMac::Receive(), ns3::StaWifiMac::SetPowerSaveMode(), and ns3::StaWifiMac::UnblockTxOnLink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChannelAccessManager()

Ptr< ChannelAccessManager > ns3::WifiMac::GetChannelAccessManager ( uint8_t linkId = SINGLE_LINK_OP_ID) const

Get the Channel Access Manager associated with the given link.

Parameters
linkIdthe ID of the given link
Returns
the Channel Access Manager

Definition at line 1024 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::channelAccessManager, and GetLink().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDevice()

Ptr< WifiNetDevice > ns3::WifiMac::GetDevice ( ) const

Return the device this PHY is associated with.

Returns
the device this PHY is associated with

Definition at line 493 of file wifi-mac.cc.

References m_device.

Referenced by ns3::MeshWifiInterfaceMac::CheckSupportedRates(), GetEhtConfiguration(), GetEhtSupported(), GetHeConfiguration(), GetHeSupported(), GetHtConfiguration(), GetHtSupported(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), GetVhtConfiguration(), GetVhtSupported(), ns3::MeshWifiInterfaceMac::Receive(), ns3::StaWifiMac::Receive(), and Receive().

+ Here is the caller graph for this function:

◆ GetDsssSupported()

bool ns3::WifiMac::GetDsssSupported ( uint8_t linkId) const

Return whether the device supports DSSS on the given link.

Parameters
linkIdthe ID of the given link
Returns
true if DSSS is supported, false otherwise

Definition at line 1410 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::dsssSupported, and GetLink().

Referenced by ns3::ApWifiMac::GetDsssParameterSet(), ns3::ApWifiMac::Receive(), ns3::ApWifiMac::SendOneBeacon(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEhtCapabilities()

EhtCapabilities ns3::WifiMac::GetEhtCapabilities ( uint8_t linkId) const

Return the EHT capabilities of the device for the given link.

Parameters
linkIdthe ID of the given link
Returns
the EHT capabilities that we support

Definition at line 2359 of file wifi-mac.cc.

References ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_160_MHZ, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_20_MHZ_ONLY, ns3::EhtMcsAndNssSet::EHT_MCS_MAP_TYPE_NOT_LARGER_THAN_80_MHZ, GetEhtSupported(), GetHtConfiguration(), GetLink(), GetVhtConfiguration(), m_beMaxAmpduSize, m_beMaxAmsduSize, m_bkMaxAmpduSize, m_bkMaxAmsduSize, ns3::EhtCapabilities::m_phyCapabilities, m_viMaxAmpduSize, m_viMaxAmsduSize, m_voMaxAmpduSize, m_voMaxAmsduSize, NS_ASSERT, NS_LOG_FUNCTION, ns3::WifiMac::LinkEntity::phy, ns3::EhtCapabilities::SetMaxAmpduLength(), ns3::EhtCapabilities::SetMaxMpduLength(), ns3::EhtCapabilities::SetSupportedRxEhtMcsAndNss(), ns3::EhtCapabilities::SetSupportedTxEhtMcsAndNss(), ns3::EhtPhyCapabilities::supportRx1024And4096QamForRuSmallerThan242Tones, ns3::EhtPhyCapabilities::supportTx1024And4096QamForRuSmallerThan242Tones, ns3::WIFI_MOD_CLASS_EHT, and ns3::WIFI_PHY_BAND_2_4GHZ.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEhtConfiguration()

Ptr< EhtConfiguration > ns3::WifiMac::GetEhtConfiguration ( ) const
Returns
pointer to EhtConfiguration if it exists

Definition at line 1921 of file wifi-mac.cc.

References GetDevice().

Referenced by GetEhtSupported(), ns3::ApWifiMac::GetMultiLinkElement(), ns3::StaWifiMac::GetMultiLinkElement(), ns3::StaWifiMac::GetTidToLinkMappingElements(), ns3::ApWifiMac::ReceiveAssocRequest(), and ns3::ApWifiMac::ReceiveEmlOmn().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEhtSupported() [1/2]

bool ns3::WifiMac::GetEhtSupported ( ) const

Return whether the device supports EHT.

Returns
true if EHT is supported, false otherwise

Definition at line 1948 of file wifi-mac.cc.

References GetDevice(), and GetEhtConfiguration().

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), GetEhtCapabilities(), ns3::ApWifiMac::GetEhtOperation(), GetMaxBaBufferSize(), ns3::ApWifiMac::GetReducedNeighborReport(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEhtSupported() [2/2]

bool ns3::WifiMac::GetEhtSupported ( const Mac48Address & address) const
Parameters
addressthe (link or MLD) address of a remote station
Returns
true if the remote station with the given address supports EHT

Definition at line 1993 of file wifi-mac.cc.

References m_links.

◆ GetErpSupported()

bool ns3::WifiMac::GetErpSupported ( uint8_t linkId) const

Return whether the device supports ERP on the given link.

Parameters
linkIdthe ID of the given link
Returns
true if ERP is supported, false otherwise

Definition at line 1386 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::erpSupported, and GetLink().

Referenced by ns3::StaWifiMac::GetCapabilities(), ns3::ApWifiMac::GetErpInformation(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::ApWifiMac::SendOneBeacon(), ns3::ApWifiMac::SendProbeResp(), ns3::StaWifiMac::UpdateApInfo(), ns3::ApWifiMac::UpdateShortPreambleEnabled(), and ns3::ApWifiMac::UpdateShortSlotTimeEnabled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetExtendedCapabilities()

ExtendedCapabilities ns3::WifiMac::GetExtendedCapabilities ( ) const

Return the extended capabilities of the device.

Returns
the extended capabilities that we support

Definition at line 2116 of file wifi-mac.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the caller graph for this function:

◆ GetFrameExchangeManager()

Ptr< FrameExchangeManager > ns3::WifiMac::GetFrameExchangeManager ( uint8_t linkId = SINGLE_LINK_OP_ID) const

Get the Frame Exchange Manager associated with the given link.

Parameters
linkIdthe ID of the given link
Returns
the Frame Exchange Manager

Definition at line 996 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::feManager, and GetLink().

Referenced by ns3::StaWifiMac::BlockTxOnLink(), ns3::ApWifiMac::DoGetLocalAddress(), ns3::ApWifiMac::Enqueue(), ns3::StaWifiMac::Enqueue(), ns3::ApWifiMac::GetMultiLinkElement(), GetTypeId(), ns3::ApWifiMac::Receive(), ns3::StaWifiMac::Receive(), Receive(), ns3::ApWifiMac::SendAssocResp(), ns3::StaWifiMac::SendProbeRequest(), ns3::StaWifiMac::SetPowerSaveMode(), ns3::ApWifiMac::TxFailed(), ns3::ApWifiMac::TxOk(), and ns3::StaWifiMac::UnblockTxOnLink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHe6GhzBandCapabilities()

He6GhzBandCapabilities ns3::WifiMac::GetHe6GhzBandCapabilities ( uint8_t linkId) const

Return the HE 6GHz band capabilities of the device for the given 6 GHz link.

Parameters
linkIdthe ID of the given 6 GHz link
Returns
the HE 6GHz band capabilities that we support

Definition at line 2324 of file wifi-mac.cc.

References GetLink(), m_beMaxAmpduSize, m_beMaxAmsduSize, m_bkMaxAmpduSize, m_bkMaxAmsduSize, m_viMaxAmpduSize, m_viMaxAmsduSize, m_voMaxAmpduSize, m_voMaxAmsduSize, NS_ASSERT_MSG, ns3::WifiMac::LinkEntity::phy, ns3::He6GhzBandCapabilities::SetMaxAmpduLength(), ns3::He6GhzBandCapabilities::SetMaxMpduLength(), and ns3::WIFI_PHY_BAND_6GHZ.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeCapabilities()

HeCapabilities ns3::WifiMac::GetHeCapabilities ( uint8_t linkId) const

◆ GetHeConfiguration()

Ptr< HeConfiguration > ns3::WifiMac::GetHeConfiguration ( ) const
Returns
pointer to HeConfiguration if it exists

Definition at line 1915 of file wifi-mac.cc.

References GetDevice().

Referenced by GetHeCapabilities(), ns3::ApWifiMac::GetHeOperation(), GetHeSupported(), ns3::ApWifiMac::GetMuEdcaParameterSet(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeSupported() [1/2]

bool ns3::WifiMac::GetHeSupported ( ) const

Return whether the device supports HE.

Returns
true if HE is supported, false otherwise

Definition at line 1942 of file wifi-mac.cc.

References GetDevice(), and GetHeConfiguration().

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), GetHeCapabilities(), ns3::ApWifiMac::GetHeOperation(), GetMaxBaBufferSize(), ns3::ApWifiMac::GetMuEdcaParameterSet(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeSupported() [2/2]

bool ns3::WifiMac::GetHeSupported ( const Mac48Address & address) const
Parameters
addressthe (link or MLD) address of a remote station
Returns
true if the remote station with the given address supports HE

Definition at line 1980 of file wifi-mac.cc.

References m_links.

◆ GetHtCapabilities()

HtCapabilities ns3::WifiMac::GetHtCapabilities ( uint8_t linkId) const

Return the HT capabilities of the device for the given link.

Parameters
linkIdthe ID of the given link
Returns
the HT capabilities that we support

Definition at line 2125 of file wifi-mac.cc.

References GetHtConfiguration(), GetHtSupported(), GetWifiPhy(), m_beMaxAmpduSize, m_beMaxAmsduSize, m_bkMaxAmpduSize, m_bkMaxAmsduSize, m_viMaxAmpduSize, m_viMaxAmsduSize, m_voMaxAmpduSize, m_voMaxAmsduSize, ns3::NanoSeconds(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::HtCapabilities::SetLdpc(), ns3::HtCapabilities::SetLSigProtectionSupport(), ns3::HtCapabilities::SetMaxAmpduLength(), ns3::HtCapabilities::SetMaxAmsduLength(), ns3::HtCapabilities::SetRxHighestSupportedDataRate(), ns3::HtCapabilities::SetRxMcsBitmask(), ns3::HtCapabilities::SetShortGuardInterval20(), ns3::HtCapabilities::SetShortGuardInterval40(), ns3::HtCapabilities::SetSupportedChannelWidth(), ns3::HtCapabilities::SetTxMaxNSpatialStreams(), ns3::HtCapabilities::SetTxMcsSetDefined(), ns3::HtCapabilities::SetTxRxMcsSetUnequal(), ns3::HtCapabilities::SetTxUnequalModulation(), and ns3::WIFI_MOD_CLASS_HT.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHtConfiguration()

Ptr< HtConfiguration > ns3::WifiMac::GetHtConfiguration ( ) const
Returns
pointer to HtConfiguration if it exists

Definition at line 1903 of file wifi-mac.cc.

References GetDevice().

Referenced by GetEhtCapabilities(), GetHeCapabilities(), GetHtCapabilities(), ns3::ApWifiMac::GetHtOperation(), GetHtSupported(), GetMaxBaBufferSize(), and GetVhtCapabilities().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHtSupported() [1/2]

bool ns3::WifiMac::GetHtSupported ( const Mac48Address & address) const
Parameters
addressthe (link or MLD) address of a remote station
Returns
true if the remote station with the given address supports HT

Definition at line 1954 of file wifi-mac.cc.

References m_links.

◆ GetHtSupported() [2/2]

bool ns3::WifiMac::GetHtSupported ( uint8_t linkId) const

Return whether the device supports HT on the given link.

Parameters
linkIdthe ID of the given link.
Returns
true if HT is supported, false otherwise

Definition at line 1927 of file wifi-mac.cc.

References GetDevice(), GetHtConfiguration(), GetWifiPhy(), and ns3::WIFI_PHY_BAND_6GHZ.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), GetHtCapabilities(), ns3::ApWifiMac::GetHtOperation(), GetMaxBaBufferSize(), ns3::ApWifiMac::GetSupportedRates(), ns3::StaWifiMac::GetSupportedRates(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetLink()

WifiMac::LinkEntity & ns3::WifiMac::GetLink ( uint8_t linkId) const
protected

Get a reference to the link associated with the given ID.

Parameters
linkIdthe given link ID
Returns
a reference to the link associated with the given ID

Definition at line 1078 of file wifi-mac.cc.

References m_links, and NS_ASSERT.

Referenced by BlockUnicastTxOnLinks(), ns3::MeshWifiInterfaceMac::ConfigureContentionWindow(), ConfigurePhyDependentParameters(), GetBssid(), GetChannelAccessManager(), GetDsssSupported(), GetEhtCapabilities(), GetErpSupported(), GetFrameExchangeManager(), GetHe6GhzBandCapabilities(), GetHeCapabilities(), ns3::ApWifiMac::GetLink(), ns3::StaWifiMac::GetLink(), GetWifiPhy(), GetWifiRemoteStationManager(), Is6GhzBand(), NotifyChannelSwitching(), SetBssid(), SetDsssSupported(), SetErpSupported(), ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel(), UnblockUnicastTxOnLinks(), and UpdateLinkId().

+ Here is the caller graph for this function:

◆ GetLinkForPhy() [1/2]

std::optional< uint8_t > ns3::WifiMac::GetLinkForPhy ( Ptr< const WifiPhy > phy) const

Get the ID of the link (if any) on which the given PHY is operating.

Parameters
phythe given PHY
Returns
the ID of the link (if any) on which the given PHY is operating

Definition at line 1128 of file wifi-mac.cc.

References m_links.

Referenced by ns3::StaWifiMac::DoInitialize(), and GetLinkForPhy().

+ Here is the caller graph for this function:

◆ GetLinkForPhy() [2/2]

std::optional< uint8_t > ns3::WifiMac::GetLinkForPhy ( std::size_t phyId) const

Get the ID of the link (if any) on which the given PHY is operating.

Parameters
phyIdthe index of the given PHY in the vector of PHYs held by WifiNetDevice
Returns
the ID of the link (if any) on which the given PHY is operating

Definition at line 1141 of file wifi-mac.cc.

References GetLinkForPhy(), m_device, and NS_ABORT_UNLESS.

+ Here is the call graph for this function:

◆ GetLinkIdByAddress()

std::optional< uint8_t > ns3::WifiMac::GetLinkIdByAddress ( const Mac48Address & address) const
virtual

Get the ID of the link having the given MAC address, if any.

Parameters
addressthe given MAC address
Returns
the ID of the link having the given MAC address, if any

Definition at line 1115 of file wifi-mac.cc.

References m_links.

Referenced by ns3::ApWifiMac::TxFailed(), ns3::ApWifiMac::TxOk(), and ns3::StaWifiMac::TxOk().

+ Here is the caller graph for this function:

◆ GetLinkIds()

const std::set< uint8_t > & ns3::WifiMac::GetLinkIds ( ) const
Returns
the set of link IDs in use by this device

Definition at line 1093 of file wifi-mac.cc.

References m_linkIds.

◆ GetLinks()

const std::map< uint8_t, std::unique_ptr< WifiMac::LinkEntity > > & ns3::WifiMac::GetLinks ( ) const
protected

◆ GetLocalAddress()

Mac48Address ns3::WifiMac::GetLocalAddress ( const Mac48Address & remoteAddr) const

Get the local MAC address used to communicate with a remote STA.

Specifically:

  • If the given remote address is the address of a STA affiliated with a remote MLD and operating on a setup link, the address of the local STA operating on such a link is returned.
  • If the given remote address is the MLD address of a remote MLD (with which some link has been setup), the MLD address of this device is returned.
  • If this is a single link device, the unique MAC address of this device is returned.
  • Otherwise, return the MAC address of the affiliated STA (which must exists) that can be used to communicate with the remote device.
Parameters
remoteAddrthe MAC address of the remote device
Returns
the local MAC address used to communicate with the remote device

Definition at line 1811 of file wifi-mac.cc.

References DoGetLocalAddress(), GetNLinks(), m_address, and m_links.

+ Here is the call graph for this function:

◆ GetMacQueueScheduler()

Ptr< WifiMacQueueScheduler > ns3::WifiMac::GetMacQueueScheduler ( ) const

Get the wifi MAC queue scheduler.

Returns
the wifi MAC queue scheduler

Definition at line 680 of file wifi-mac.cc.

References m_scheduler.

Referenced by ns3::StaWifiMac::BlockTxOnLink(), and ns3::StaWifiMac::UnblockTxOnLink().

+ Here is the caller graph for this function:

◆ GetMaxAmpduSize()

uint32_t ns3::WifiMac::GetMaxAmpduSize ( AcIndex ac) const

Return the maximum A-MPDU size of the given Access Category.

Parameters
acAccess Category index
Returns
the maximum A-MPDU size

Definition at line 2452 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_beMaxAmpduSize, m_bkMaxAmpduSize, m_viMaxAmpduSize, m_voMaxAmpduSize, and NS_ABORT_MSG.

◆ GetMaxAmsduSize()

uint16_t ns3::WifiMac::GetMaxAmsduSize ( AcIndex ac) const

Return the maximum A-MSDU size of the given Access Category.

Parameters
acAccess Category index
Returns
the maximum A-MSDU size

Definition at line 2477 of file wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_beMaxAmsduSize, m_bkMaxAmsduSize, m_viMaxAmsduSize, m_voMaxAmsduSize, and NS_ABORT_MSG.

◆ GetMaxBaBufferSize()

uint16_t ns3::WifiMac::GetMaxBaBufferSize ( std::optional< Mac48Address > address = std::nullopt) const

Get the maximum Block Ack buffer size (in number of MPDUs) supported by the given device, if any, or by this device, otherwise, based on the supported standard.

Parameters
addressthe (MLD or link) address of the given device
Returns
the maximum supported Block Ack buffer size (in number of MPDUs)

Definition at line 2006 of file wifi-mac.cc.

References GetEhtSupported(), GetHeSupported(), GetHtConfiguration(), GetHtSupported(), and NS_ASSERT.

Referenced by SetDevice(), and SetMpduBufferSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMldAddress()

std::optional< Mac48Address > ns3::WifiMac::GetMldAddress ( const Mac48Address & remoteAddr) const
Parameters
remoteAddrthe (MLD or link) address of a remote device
Returns
the MLD address of the remote device having the given (MLD or link) address, if the remote device is an MLD.

Definition at line 1798 of file wifi-mac.cc.

References m_links.

Referenced by GetBaAgreementEstablishedAsOriginator(), GetBaAgreementEstablishedAsRecipient(), ns3::StaWifiMac::ReceiveAssocResp(), ns3::StaWifiMac::SendAssociationRequest(), and ns3::ApWifiMac::SendAssocResp().

+ Here is the caller graph for this function:

◆ GetMpduBufferSize()

uint16_t ns3::WifiMac::GetMpduBufferSize ( ) const
Returns
the size (in number of MPDUs) of the buffer used for each BlockAck agreement in which this node is a recipient

Definition at line 2030 of file wifi-mac.cc.

References m_mpduBufferSize.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetNLinks()

◆ GetQosSupported()

bool ns3::WifiMac::GetQosSupported ( ) const

Return whether the device supports QoS.

Returns
true if QoS is supported, false otherwise

Definition at line 1380 of file wifi-mac.cc.

References m_qosSupported.

Referenced by ns3::MeshWifiInterfaceMac::DoCompleteConfig(), Enqueue(), ns3::ApWifiMac::GetAssocResp(), ns3::ApWifiMac::GetEdcaParameterSet(), GetTypeId(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), ns3::StaWifiMac::SetPowerSaveMode(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the caller graph for this function:

◆ GetQosTxop() [1/2]

Ptr< QosTxop > ns3::WifiMac::GetQosTxop ( AcIndex ac) const

◆ GetQosTxop() [2/2]

Ptr< QosTxop > ns3::WifiMac::GetQosTxop ( uint8_t tid) const

Accessor for a specified EDCA object.

Parameters
tidthe Traffic ID
Returns
a smart pointer to a QosTxop

Definition at line 619 of file wifi-mac.cc.

References GetQosTxop(), and ns3::QosUtilsMapTidToAc().

+ Here is the call graph for this function:

◆ GetShortSlotTimeSupported()

bool ns3::WifiMac::GetShortSlotTimeSupported ( ) const
protected
Returns
whether the device supports short slot time capability.

Definition at line 1430 of file wifi-mac.cc.

References m_shortSlotTimeSupported.

Referenced by ns3::StaWifiMac::GetCapabilities(), GetTypeId(), and ns3::ApWifiMac::UpdateShortSlotTimeEnabled().

+ Here is the caller graph for this function:

◆ GetSsid()

Ssid ns3::WifiMac::GetSsid ( ) const
Returns
the SSID which this MAC layer is going to try to stay in.

Definition at line 519 of file wifi-mac.cc.

References m_ssid.

Referenced by ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetFilsDiscovery(), GetTypeId(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::StaWifiMac::StartScanning().

+ Here is the caller graph for this function:

◆ GetTidToLinkMapping()

std::optional< std::reference_wrapper< const WifiTidLinkMapping > > ns3::WifiMac::GetTidToLinkMapping ( Mac48Address mldAddr,
WifiDirection dir ) const

Get the TID-to-Link Mapping negotiated with the given MLD (if any) for the given direction.

An empty mapping indicates the default mapping.

Parameters
mldAddrthe MLD address of the given MLD
dirthe given direction (DL or UL)
Returns
the negotiated TID-to-Link Mapping

Definition at line 1280 of file wifi-mac.cc.

References ns3::BOTH_DIRECTIONS, dir, ns3::DOWNLINK, m_dlTidLinkMappings, m_ulTidLinkMappings, and NS_ABORT_MSG_IF.

◆ GetTxBlockedOnLink()

bool ns3::WifiMac::GetTxBlockedOnLink ( AcIndex ac,
const WifiContainerQueueId & queueId,
uint8_t linkId,
WifiQueueBlockedReason reason = WifiQueueBlockedReason::REASONS_COUNT ) const

Check whether the transmission of the packets in the given container queue of the given Access Category are blocked on the given link for the given reason (if any).

Parameters
acthe given Access Category
queueIdthe given container queue
linkIdthe ID of the given link
reasonthe reason to block transmissions (REASONS_COUNT indicate no reason)
Returns
whether transmission is blocked

Definition at line 1654 of file wifi-mac.cc.

References m_scheduler, and ns3::REASONS_COUNT.

◆ GetTxop()

Ptr< Txop > ns3::WifiMac::GetTxop ( ) const

Accessor for the Txop object.

Returns
a smart pointer to Txop

Definition at line 557 of file wifi-mac.cc.

References m_txop.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::ApWifiMac::Enqueue(), ns3::StaWifiMac::Enqueue(), GetTypeId(), ns3::StaWifiMac::ReceiveAssocResp(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the caller graph for this function:

◆ GetTxopQueue()

Ptr< WifiMacQueue > ns3::WifiMac::GetTxopQueue ( AcIndex ac) const
virtual

Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise.

Parameters
acthe given Access Category
Returns
the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise

Reimplemented in ns3::ApWifiMac.

Definition at line 649 of file wifi-mac.cc.

References ns3::AC_BE_NQOS, GetQosTxop(), m_txop, and ns3::StaticCast().

Referenced by ns3::ApWifiMac::GetTxopQueue(), and ns3::StaWifiMac::TxOk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::WifiMac::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 63 of file wifi-mac.cc.

References ns3::TypeId::ATTR_CONSTRUCT, ns3::TypeId::ATTR_GET, GetBEQueue(), GetBKQueue(), GetChannelAccessManager(), GetFrameExchangeManager(), GetMpduBufferSize(), GetNLinks(), GetQosSupported(), GetShortSlotTimeSupported(), GetSsid(), GetTxop(), GetVIQueue(), GetVOQueue(), m_ackedMpduCallback, m_beMaxAmpduSize, m_beMaxAmsduSize, m_bkMaxAmpduSize, m_bkMaxAmsduSize, m_droppedMpduCallback, m_icfDropCallback, m_macPromiscRxTrace, m_macRxDropTrace, m_macRxTrace, m_macTxDropTrace, m_macTxTrace, m_mpduResponseTimeoutCallback, m_nackedMpduCallback, m_psduMapResponseTimeoutCallback, m_psduResponseTimeoutCallback, m_viMaxAmpduSize, m_viMaxAmsduSize, m_voMaxAmpduSize, m_voMaxAmsduSize, ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeObjectVectorAccessor(), ns3::MakeObjectVectorChecker(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeSsidAccessor(), ns3::MakeSsidChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), SetBeBlockAckInactivityTimeout(), SetBeBlockAckThreshold(), SetBeQueue(), SetBkBlockAckInactivityTimeout(), SetBkBlockAckThreshold(), SetBkQueue(), SetCtsToSelfSupported(), SetMpduBufferSize(), ns3::TypeId::SetParent(), SetQosSupported(), SetShortSlotTimeSupported(), SetSsid(), SetTxop(), SetViBlockAckInactivityTimeout(), SetViBlockAckThreshold(), SetViQueue(), SetVoBlockAckInactivityTimeout(), SetVoBlockAckThreshold(), and SetVoQueue().

+ Here is the call graph for this function:

◆ GetTypeOfStation()

TypeOfStation ns3::WifiMac::GetTypeOfStation ( ) const

Return the type of station.

Returns
the type of station.

Definition at line 476 of file wifi-mac.cc.

References m_typeOfStation.

◆ GetVhtCapabilities()

VhtCapabilities ns3::WifiMac::GetVhtCapabilities ( uint8_t linkId) const

Return the VHT capabilities of the device for the given link.

Parameters
linkIdthe ID of the given link
Returns
the VHT capabilities that we support

Definition at line 2184 of file wifi-mac.cc.

References GetHtConfiguration(), GetVhtConfiguration(), GetVhtSupported(), GetWifiPhy(), m_beMaxAmpduSize, m_beMaxAmsduSize, m_bkMaxAmpduSize, m_bkMaxAmsduSize, m_viMaxAmpduSize, m_viMaxAmsduSize, m_voMaxAmpduSize, m_voMaxAmsduSize, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::VhtCapabilities::SetMaxAmpduLength(), ns3::VhtCapabilities::SetMaxMpduLength(), ns3::VhtCapabilities::SetRxHighestSupportedLgiDataRate(), ns3::VhtCapabilities::SetRxLdpc(), ns3::VhtCapabilities::SetRxMcsMap(), ns3::VhtCapabilities::SetRxStbc(), ns3::VhtCapabilities::SetShortGuardIntervalFor160Mhz(), ns3::VhtCapabilities::SetShortGuardIntervalFor80Mhz(), ns3::VhtCapabilities::SetSupportedChannelWidthSet(), ns3::VhtCapabilities::SetTxHighestSupportedLgiDataRate(), ns3::VhtCapabilities::SetTxMcsMap(), ns3::VhtCapabilities::SetTxStbc(), and ns3::WIFI_MOD_CLASS_VHT.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVhtConfiguration()

Ptr< VhtConfiguration > ns3::WifiMac::GetVhtConfiguration ( ) const
Returns
pointer to VhtConfiguration if it exists

Definition at line 1909 of file wifi-mac.cc.

References GetDevice().

Referenced by GetEhtCapabilities(), GetHeCapabilities(), GetVhtCapabilities(), and GetVhtSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVhtSupported() [1/2]

bool ns3::WifiMac::GetVhtSupported ( const Mac48Address & address) const
Parameters
addressthe (link or MLD) address of a remote station
Returns
true if the remote station with the given address supports VHT

Definition at line 1967 of file wifi-mac.cc.

References m_links.

◆ GetVhtSupported() [2/2]

bool ns3::WifiMac::GetVhtSupported ( uint8_t linkId) const

Return whether the device supports VHT on the given link.

Parameters
linkIdthe ID of the given link.
Returns
true if VHT is supported, false otherwise

Definition at line 1934 of file wifi-mac.cc.

References GetDevice(), GetVhtConfiguration(), GetWifiPhy(), ns3::WIFI_PHY_BAND_2_4GHZ, and ns3::WIFI_PHY_BAND_6GHZ.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), GetVhtCapabilities(), ns3::ApWifiMac::GetVhtOperation(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVIQueue()

Ptr< QosTxop > ns3::WifiMac::GetVIQueue ( ) const
protected

Accessor for the AC_VI channel access function.

Returns
a smart pointer to QosTxop

Definition at line 631 of file wifi-mac.cc.

References ns3::AC_VI, GetQosTxop(), and m_qosSupported.

Referenced by GetTypeId(), SetViBlockAckInactivityTimeout(), and SetViBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetVOQueue()

Ptr< QosTxop > ns3::WifiMac::GetVOQueue ( ) const
protected

Accessor for the AC_VO channel access function.

Returns
a smart pointer to QosTxop

Definition at line 625 of file wifi-mac.cc.

References ns3::AC_VO, GetQosTxop(), and m_qosSupported.

Referenced by GetTypeId(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), SetVoBlockAckInactivityTimeout(), and SetVoBlockAckThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWifiPhy()

◆ GetWifiRemoteStationManager()

Ptr< WifiRemoteStationManager > ns3::WifiMac::GetWifiRemoteStationManager ( uint8_t linkId = 0) const
Parameters
linkIdthe ID (starting at 0) of the link of the RemoteStationManager object to retrieve
Returns
the remote station manager operating on the given link

Definition at line 1060 of file wifi-mac.cc.

References GetLink(), and ns3::WifiMac::LinkEntity::stationManager.

Referenced by ns3::StaWifiMac::BlockTxOnLink(), ns3::MeshWifiInterfaceMac::CheckSupportedRates(), ns3::StaWifiMac::Disassociated(), ns3::AdhocWifiMac::Enqueue(), ns3::ApWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::Enqueue(), ns3::StaWifiMac::Enqueue(), ns3::ApWifiMac::GetAssociationId(), ns3::ApWifiMac::GetAssocResp(), ns3::ApWifiMac::GetEhtOperation(), ns3::ApWifiMac::GetHeOperation(), ns3::ApWifiMac::GetHtOperation(), ns3::ApWifiMac::GetLinkIdStaAddrMap(), ns3::ApWifiMac::GetMultiLinkElement(), ns3::ApWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), ns3::ApWifiMac::GetUseNonErpProtection(), ns3::ApWifiMac::GetVhtOperation(), ns3::ApWifiMac::IsAssociated(), ns3::ApWifiMac::ParseReportedStaInfo(), ns3::ApWifiMac::ProcessPowerManagementFlag(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::StaWifiMac::ReceiveAssocResp(), ns3::ApWifiMac::ReceiveEmlOmn(), ns3::StaWifiMac::ScanningTimeout(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::ApWifiMac::SendProbeResp(), ns3::ApWifiMac::SetAid(), ns3::ApWifiMac::StaSwitchingToActiveModeOrDeassociated(), ns3::ApWifiMac::StaSwitchingToPsMode(), TidMappedOnLink(), ns3::ApWifiMac::TxFailed(), ns3::ApWifiMac::TxOk(), ns3::StaWifiMac::UnblockTxOnLink(), ns3::StaWifiMac::UpdateApInfo(), ns3::ApWifiMac::UpdateShortPreambleEnabled(), and ns3::ApWifiMac::UpdateShortSlotTimeEnabled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasFramesToTransmit()

bool ns3::WifiMac::HasFramesToTransmit ( uint8_t linkId)
virtual

Check if the MAC has frames to transmit over the given link.

Parameters
linkIdthe ID of the given link.
Returns
whether the MAC has frames to transmit.

Definition at line 656 of file wifi-mac.cc.

References ns3::Txop::HasFramesToTransmit(), m_edca, and m_txop.

Referenced by ns3::StaWifiMac::SetPowerSaveMode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Is6GhzBand()

bool ns3::WifiMac::Is6GhzBand ( uint8_t linkId) const

Indicate if a given link is on the 6 GHz band.

Parameters
linkIdthe ID of the given link
Returns
whether the given link is on the 6 GHz band

Definition at line 1238 of file wifi-mac.cc.

References GetLink(), NS_ASSERT, ns3::WifiMac::LinkEntity::phy, and ns3::WIFI_PHY_BAND_6GHZ.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::GetAssociationRequest(), ns3::ApWifiMac::GetAssocResp(), ns3::ApWifiMac::ReceiveAssocRequest(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::StaWifiMac::UpdateApInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyChannelSwitching()

void ns3::WifiMac::NotifyChannelSwitching ( uint8_t linkId)
virtual

Notify that channel on the given link has been switched.

Parameters
linkIdthe ID of the given link

Reimplemented in ns3::StaWifiMac.

Definition at line 686 of file wifi-mac.cc.

References ConfigurePhyDependentParameters(), GetLink(), NS_LOG_FUNCTION, and ns3::WifiMac::LinkEntity::stationManager.

Referenced by ns3::StaWifiMac::NotifyChannelSwitching(), and ns3::FrameExchangeManager::NotifySwitchingStartNow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyConstructionCompleted()

void ns3::WifiMac::NotifyConstructionCompleted ( )
overrideprotectedvirtual

Notifier called once the ObjectBase is fully constructed.

This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.

Reimplemented from ns3::ObjectBase.

Definition at line 386 of file wifi-mac.cc.

References m_qosSupported, NS_LOG_FUNCTION, SetupDcfQueue(), SetupEdcaQueue(), and ns3::wifiAcList.

+ Here is the call graph for this function:

◆ NotifyDropPacketToEnqueue()

void ns3::WifiMac::NotifyDropPacketToEnqueue ( Ptr< Packet > packet,
Mac48Address to )
privatevirtual

Allow subclasses to take actions when a packet to enqueue has been dropped.

Parameters
packetthe dropped packet
tothe address to which the packet should have been sent

Reimplemented in ns3::StaWifiMac.

Definition at line 1743 of file wifi-mac.cc.

References NS_LOG_FUNCTION.

Referenced by Enqueue().

+ Here is the caller graph for this function:

◆ NotifyPromiscRx()

void ns3::WifiMac::NotifyPromiscRx ( Ptr< const Packet > packet)
Parameters
packetthe packet we received promiscuously

Public method used to fire a MacPromiscRx trace. Implemented for encapsulation purposes.

Definition at line 717 of file wifi-mac.cc.

References m_macPromiscRxTrace.

◆ NotifyRx()

void ns3::WifiMac::NotifyRx ( Ptr< const Packet > packet)
Parameters
packetthe packet we received

Public method used to fire a MacRx trace. Implemented for encapsulation purposes.

Definition at line 711 of file wifi-mac.cc.

References m_macRxTrace.

◆ NotifyRxDrop()

void ns3::WifiMac::NotifyRxDrop ( Ptr< const Packet > packet)
Parameters
packetthe packet we received but is not destined for us

Public method used to fire a MacRxDrop trace. Implemented for encapsulation purposes.

Definition at line 723 of file wifi-mac.cc.

References m_macRxDropTrace.

Referenced by ns3::ApWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the caller graph for this function:

◆ NotifyTx()

void ns3::WifiMac::NotifyTx ( Ptr< const Packet > packet)
Parameters
packetthe packet being enqueued

Public method used to fire a MacTx trace. Implemented for encapsulation purposes. Note this trace indicates that the packet was accepted by the device only. The packet may be dropped later (e.g. if the queue is full).

Definition at line 699 of file wifi-mac.cc.

References m_macTxTrace.

◆ NotifyTxDrop()

void ns3::WifiMac::NotifyTxDrop ( Ptr< const Packet > packet)
Parameters
packetthe packet being dropped

Public method used to fire a MacTxDrop trace. This trace indicates that the packet was dropped before it was queued for transmission (e.g. when a STA is not associated with an AP).

Definition at line 705 of file wifi-mac.cc.

References m_macTxDropTrace.

Referenced by Enqueue().

+ Here is the caller graph for this function:

◆ operator=()

WifiMac & ns3::WifiMac::operator= ( const WifiMac & )
delete

◆ Receive()

void ns3::WifiMac::Receive ( Ptr< const WifiMpdu > mpdu,
uint8_t linkId )
protectedvirtual

This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received on the given link.

The implementation is intended to capture logic that is going to be common to all (or most) derived classes. Specifically, handling of Block Ack management frames is dealt with here.

This method will need, however, to be overridden by derived classes so that they can perform their data handling before invoking the base version.

The given link may be undefined in some cases (e.g., in case of QoS Data frames received in the context of a Block Ack agreement – because the BlockAckManager does not have to record the link each buffered MPDU has been received on); in such a cases, the value of linkId should be WIFI_LINKID_UNDEFINED.

Parameters
mpduthe MPDU that has been received.
linkIdthe ID of the given link

Reimplemented in ns3::AdhocWifiMac, ns3::ApWifiMac, ns3::MeshWifiInterfaceMac, and ns3::StaWifiMac.

Definition at line 1756 of file wifi-mac.cc.

References ns3::Mac48Address::ConvertFrom(), GetAddress(), GetDevice(), GetFrameExchangeManager(), NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by WifiMac(), ns3::AdhocWifiMac::Receive(), ns3::ApWifiMac::Receive(), and ns3::StaWifiMac::Receive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetWifiPhys()

void ns3::WifiMac::ResetWifiPhys ( )

Remove currently attached WifiPhy objects from this MAC.

Definition at line 1354 of file wifi-mac.cc.

References m_links, and NS_LOG_FUNCTION.

Referenced by SetWifiPhys().

+ Here is the caller graph for this function:

◆ SetAddress()

void ns3::WifiMac::SetAddress ( Mac48Address address)
virtual
Parameters
addressthe current address of this MAC layer.

Definition at line 499 of file wifi-mac.cc.

References m_address, and NS_LOG_FUNCTION.

◆ SetBeBlockAckInactivityTimeout()

void ns3::WifiMac::SetBeBlockAckInactivityTimeout ( uint16_t timeout)
private

Set BE block ack inactivity timeout.

Parameters
timeoutthe BE block ack inactivity timeout.

Definition at line 2096 of file wifi-mac.cc.

References GetBEQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBeBlockAckThreshold()

void ns3::WifiMac::SetBeBlockAckThreshold ( uint8_t threshold)
private

Set the block ack threshold for AC_BE.

Parameters
thresholdthe block ack threshold for AC_BE.

Definition at line 2056 of file wifi-mac.cc.

References GetBEQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBeQueue()

void ns3::WifiMac::SetBeQueue ( Ptr< QosTxop > edca)
private

Set the AC_BE channel access function This method is private so that it is only used while constructing this object.

Parameters
edcathe QosTxop object for AC_BE

Definition at line 583 of file wifi-mac.cc.

References ns3::AC_BE, m_edca, m_qosSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetBkBlockAckInactivityTimeout()

void ns3::WifiMac::SetBkBlockAckInactivityTimeout ( uint16_t timeout)
private

Set BK block ack inactivity timeout.

Parameters
timeoutthe BK block ack inactivity timeout.

Definition at line 2106 of file wifi-mac.cc.

References GetBKQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBkBlockAckThreshold()

void ns3::WifiMac::SetBkBlockAckThreshold ( uint8_t threshold)
private

Set the block ack threshold for AC_BK.

Parameters
thresholdthe block ack threshold for AC_BK.

Definition at line 2066 of file wifi-mac.cc.

References GetBKQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBkQueue()

void ns3::WifiMac::SetBkQueue ( Ptr< QosTxop > edca)
private

Set the AC_BK channel access function This method is private so that it is only used while constructing this object.

Parameters
edcathe QosTxop object for AC_BK

Definition at line 593 of file wifi-mac.cc.

References ns3::AC_BK, m_edca, m_qosSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetBssid()

void ns3::WifiMac::SetBssid ( Mac48Address bssid,
uint8_t linkId )
Parameters
bssidthe BSSID of the network that the given link belongs to.
linkIdthe ID of the given link

Definition at line 525 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::feManager, GetLink(), and NS_LOG_FUNCTION.

Referenced by ns3::StaWifiMac::ReceiveAssocResp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetChannelAccessManagers()

void ns3::WifiMac::SetChannelAccessManagers ( const std::vector< Ptr< ChannelAccessManager > > & caManagers)
Parameters
caManagersthe channel access managers attached to this MAC.

Definition at line 1002 of file wifi-mac.cc.

References CompleteConfig(), CreateLinksIfNeeded(), m_links, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetCtsToSelfSupported()

void ns3::WifiMac::SetCtsToSelfSupported ( bool enable)

Enable or disable CTS-to-self feature.

Parameters
enabletrue if CTS-to-self is to be supported, false otherwise

Definition at line 1416 of file wifi-mac.cc.

References m_ctsToSelfSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDevice()

void ns3::WifiMac::SetDevice ( const Ptr< WifiNetDevice > device)

Sets the device this PHY is associated with.

Parameters
devicethe device this PHY is associated with

Definition at line 482 of file wifi-mac.cc.

References GetMaxBaBufferSize(), m_device, and m_mpduBufferSize.

Referenced by Bug2831TestCase::DoRun(), and DcfImmediateAccessBroadcastTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetDsssSupported()

void ns3::WifiMac::SetDsssSupported ( bool enable,
uint8_t linkId )
private

Enable or disable DSSS support for the given link.

Parameters
enablewhether DSSS is supported
linkIdthe ID of the given link

Definition at line 1403 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::dsssSupported, GetLink(), and NS_LOG_FUNCTION.

Referenced by ConfigurePhyDependentParameters(), and SetErpSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetErpSupported()

void ns3::WifiMac::SetErpSupported ( bool enable,
uint8_t linkId )
private

Enable or disable ERP support for the given link.

Parameters
enablewhether ERP is supported
linkIdthe ID of the given link

Definition at line 1392 of file wifi-mac.cc.

References ns3::WifiMac::LinkEntity::erpSupported, GetLink(), NS_LOG_FUNCTION, and SetDsssSupported().

Referenced by ConfigurePhyDependentParameters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetForwardUpCallback()

void ns3::WifiMac::SetForwardUpCallback ( ForwardUpCallback upCallback)
Parameters
upCallbackthe callback to invoke when a packet must be forwarded up the stack.

Definition at line 1442 of file wifi-mac.cc.

References m_forwardUp, and NS_LOG_FUNCTION.

◆ SetFrameExchangeManagers()

void ns3::WifiMac::SetFrameExchangeManagers ( const std::vector< Ptr< FrameExchangeManager > > & feManagers)
Parameters
feManagersthe frame exchange managers attached to this MAC.

Definition at line 954 of file wifi-mac.cc.

References CompleteConfig(), CreateLinksIfNeeded(), ns3::DynamicCast(), m_ackedMpduCallback, m_droppedMpduCallback, m_icfDropCallback, m_links, m_mpduResponseTimeoutCallback, m_psduMapResponseTimeoutCallback, m_psduResponseTimeoutCallback, ns3::MakeCallback(), NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetLinkDownCallback()

void ns3::WifiMac::SetLinkDownCallback ( Callback< void > linkDown)
Parameters
linkDownthe callback to invoke when the link becomes down.

Definition at line 1456 of file wifi-mac.cc.

References m_linkDown, and NS_LOG_FUNCTION.

◆ SetLinkUpCallback()

void ns3::WifiMac::SetLinkUpCallback ( Callback< void > linkUp)
virtual
Parameters
linkUpthe callback to invoke when the link becomes up.

Reimplemented in ns3::AdhocWifiMac, ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 1449 of file wifi-mac.cc.

References m_linkUp, and NS_LOG_FUNCTION.

Referenced by ns3::AdhocWifiMac::SetLinkUpCallback(), ns3::ApWifiMac::SetLinkUpCallback(), and ns3::MeshWifiInterfaceMac::SetLinkUpCallback().

+ Here is the caller graph for this function:

◆ SetMacQueueScheduler()

void ns3::WifiMac::SetMacQueueScheduler ( Ptr< WifiMacQueueScheduler > scheduler)
virtual

Set the wifi MAC queue scheduler.

Parameters
schedulerthe wifi MAC queue scheduler

Definition at line 673 of file wifi-mac.cc.

References m_scheduler.

◆ SetMpduBufferSize()

void ns3::WifiMac::SetMpduBufferSize ( uint16_t size)
Parameters
sizethe size (in number of MPDUs) of the buffer used for each BlockAck agreement in which this node is a recipient

Definition at line 2021 of file wifi-mac.cc.

References GetMaxBaBufferSize(), m_device, m_mpduBufferSize, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPromisc()

void ns3::WifiMac::SetPromisc ( )

Sets the interface in promiscuous mode.

Enables promiscuous mode on the interface. Note that any further filtering on the incoming frame path may affect the overall behavior.

Definition at line 538 of file wifi-mac.cc.

References m_links.

◆ SetQosSupported()

void ns3::WifiMac::SetQosSupported ( bool enable)
private

Enable or disable QoS support for the device.

Construct a Txop object or QosTxop objects accordingly. This method is private so that it is only used while constructing this object.

Parameters
enablewhether QoS is supported

Definition at line 1372 of file wifi-mac.cc.

References ns3::Object::IsInitialized(), m_qosSupported, NS_ABORT_IF, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetShortSlotTimeSupported()

void ns3::WifiMac::SetShortSlotTimeSupported ( bool enable)
protected

Enable or disable short slot time feature.

Parameters
enabletrue if short slot time is to be supported, false otherwise

Definition at line 1423 of file wifi-mac.cc.

References m_shortSlotTimeSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSsid()

void ns3::WifiMac::SetSsid ( Ssid ssid)
Parameters
ssidthe current SSID of this MAC layer.

Definition at line 512 of file wifi-mac.cc.

References m_ssid, and NS_LOG_FUNCTION.

Referenced by TestUnsupportedModulationReception::DoRun(), WifiPrimaryChannelsTest::DoRun(), WifiTxopTest::DoRun(), and GetTypeId().

+ Here is the caller graph for this function:

◆ SetTxop()

void ns3::WifiMac::SetTxop ( Ptr< Txop > dcf)
private

Set the Txop object.

This method is private so that it is only used while constructing this object.

Parameters
dcfthe Txop object

Definition at line 547 of file wifi-mac.cc.

References m_qosSupported, m_txop, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetTypeOfStation()

void ns3::WifiMac::SetTypeOfStation ( TypeOfStation type)

This method is invoked by a subclass to specify what type of station it is implementing.

This is something that the channel access functions need to know.

Parameters
typethe type of station.

Definition at line 469 of file wifi-mac.cc.

References m_typeOfStation, and NS_LOG_FUNCTION.

Referenced by ns3::AdhocWifiMac::AdhocWifiMac(), ns3::ApWifiMac::ApWifiMac(), ns3::MeshWifiInterfaceMac::MeshWifiInterfaceMac(), and ns3::StaWifiMac::StaWifiMac().

+ Here is the caller graph for this function:

◆ SetupDcfQueue()

void ns3::WifiMac::SetupDcfQueue ( )
private

This method is a private utility invoked to configure the channel access function for devices that do not support QoS.

Definition at line 729 of file wifi-mac.cc.

References m_droppedMpduCallback, m_txMiddle, m_txop, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Txop::SetDroppedMpduCallback(), and ns3::Txop::SetTxMiddle().

Referenced by NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetupEdcaQueue()

void ns3::WifiMac::SetupEdcaQueue ( AcIndex ac)
private

This method is a private utility invoked to configure the channel access function for the specified Access Category.

Parameters
acthe Access Category of the queue to initialise.

Definition at line 740 of file wifi-mac.cc.

References m_ackedMpduCallback, m_droppedMpduCallback, m_edca, m_nackedMpduCallback, m_txMiddle, ns3::MakeCallback(), NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetViBlockAckInactivityTimeout()

void ns3::WifiMac::SetViBlockAckInactivityTimeout ( uint16_t timeout)
private

Set VI block ack inactivity timeout.

Parameters
timeoutthe VI block ack inactivity timeout.

Definition at line 2086 of file wifi-mac.cc.

References GetVIQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetViBlockAckThreshold()

void ns3::WifiMac::SetViBlockAckThreshold ( uint8_t threshold)
private

Set the block ack threshold for AC_VI.

Parameters
thresholdthe block ack threshold for AC_VI.

Definition at line 2046 of file wifi-mac.cc.

References GetVIQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetViQueue()

void ns3::WifiMac::SetViQueue ( Ptr< QosTxop > edca)
private

Set the AC_VI channel access function This method is private so that it is only used while constructing this object.

Parameters
edcathe QosTxop object for AC_VI

Definition at line 573 of file wifi-mac.cc.

References ns3::AC_VI, m_edca, m_qosSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetVoBlockAckInactivityTimeout()

void ns3::WifiMac::SetVoBlockAckInactivityTimeout ( uint16_t timeout)
private

Set VO block ack inactivity timeout.

Parameters
timeoutthe VO block ack inactivity timeout.

Definition at line 2076 of file wifi-mac.cc.

References GetVOQueue(), m_qosSupported, NS_LOG_FUNCTION, ns3::QosTxop::SetBlockAckInactivityTimeout(), and timeout.

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetVoBlockAckThreshold()

void ns3::WifiMac::SetVoBlockAckThreshold ( uint8_t threshold)
private

Set the block ack threshold for AC_VO.

Parameters
thresholdthe block ack threshold for AC_VO.

Definition at line 2036 of file wifi-mac.cc.

References GetVOQueue(), m_qosSupported, NS_LOG_FUNCTION, and ns3::QosTxop::SetBlockAckThreshold().

Referenced by GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetVoQueue()

void ns3::WifiMac::SetVoQueue ( Ptr< QosTxop > edca)
private

Set the AC_VO channel access function This method is private so that it is only used while constructing this object.

Parameters
edcathe QosTxop object for AC_VO

Definition at line 563 of file wifi-mac.cc.

References ns3::AC_VO, m_edca, m_qosSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetWifiPhys()

void ns3::WifiMac::SetWifiPhys ( const std::vector< Ptr< WifiPhy > > & phys)
virtual
Parameters
physthe physical layers attached to this MAC.

Reimplemented in ns3::StaWifiMac.

Definition at line 1326 of file wifi-mac.cc.

References CompleteConfig(), CreateLinksIfNeeded(), m_links, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and ResetWifiPhys().

Referenced by ns3::StaWifiMac::SetWifiPhys().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWifiRemoteStationManager()

void ns3::WifiMac::SetWifiRemoteStationManager ( Ptr< WifiRemoteStationManager > stationManager)
Parameters
stationManagerthe station manager attached to this MAC.

Definition at line 1030 of file wifi-mac.cc.

References NS_LOG_FUNCTION, and SetWifiRemoteStationManagers().

+ Here is the call graph for this function:

◆ SetWifiRemoteStationManagers()

void ns3::WifiMac::SetWifiRemoteStationManagers ( const std::vector< Ptr< WifiRemoteStationManager > > & stationManagers)
Parameters
stationManagersthe station managers attached to this MAC.

Definition at line 1037 of file wifi-mac.cc.

References CompleteConfig(), CreateLinksIfNeeded(), m_links, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

Referenced by SetWifiRemoteStationManager().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SupportsSendFrom()

bool ns3::WifiMac::SupportsSendFrom ( ) const
virtual
Returns
if this MAC supports sending from arbitrary address.

The interface may or may not support sending from arbitrary address. This function returns true if sending from arbitrary address is supported, false otherwise.

Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 1436 of file wifi-mac.cc.

Referenced by Enqueue().

+ Here is the caller graph for this function:

◆ SwapLinks()

void ns3::WifiMac::SwapLinks ( std::map< uint8_t, uint8_t > links)
protected

Swap the links based on the information included in the given map.

This method is normally called by a non-AP MLD upon completing ML setup to have its link IDs match AP MLD's link IDs.

Parameters
linksa set of pairs (from, to) each mapping a current link ID to the link ID it has to become (i.e., link 'from' becomes link 'to')

Definition at line 1149 of file wifi-mac.cc.

References m_edca, m_linkIds, m_links, m_txop, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_FUNCTION, ns3::Txop::SwapLinks(), and UpdateLinkId().

Referenced by ns3::StaWifiMac::ScanningTimeout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TidMappedOnLink()

bool ns3::WifiMac::TidMappedOnLink ( Mac48Address mldAddr,
WifiDirection dir,
uint8_t tid,
uint8_t linkId ) const

Check whether the given TID is mapped on the given link in the given direction for the given MLD.

Parameters
mldAddrthe MLD address of the given MLD
dirthe given direction (DL or UL)
tidthe given TID
linkIdthe ID of the given link
Returns
whether the given TID is mapped on the given link in the given direction for the given MLD

Definition at line 1296 of file wifi-mac.cc.

References ns3::BOTH_DIRECTIONS, dir, ns3::DOWNLINK, GetWifiRemoteStationManager(), m_dlTidLinkMappings, m_ulTidLinkMappings, and NS_ABORT_MSG_IF.

+ Here is the call graph for this function:

◆ UnblockUnicastTxOnLinks()

void ns3::WifiMac::UnblockUnicastTxOnLinks ( WifiQueueBlockedReason reason,
const Mac48Address & address,
const std::set< uint8_t > & linkIds )

Unblock the transmission on the given links of all unicast frames addressed to the station with the given address for the given reason.

The given MAC address must be the MLD address in case the addressed device is multi-link.

Parameters
reasonthe reason for unblocking transmissions
addressthe MAC address of the given device
linkIdsthe IDs of the links to unblock

Definition at line 1591 of file wifi-mac.cc.

References ns3::Txop::CHECK_MEDIUM_BUSY, GetAddress(), GetLink(), GetQosTxop(), ns3::UniformRandomBitGenerator::GetRv(), ns3::QosTxop::HasFramesToTransmit(), ns3::LOG_FUNCTION, m_scheduler, m_shuffleLinkIdsGen, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::ScheduleNow(), ns3::Shuffle(), ns3::Txop::StartAccessAfterEvent(), ns3::WIFI_CTL_QUEUE, ns3::WIFI_MGT_QUEUE, ns3::WIFI_QOSDATA_QUEUE, and ns3::wifiAcList.

Referenced by ns3::ApWifiMac::StaSwitchingToActiveModeOrDeassociated(), and ns3::StaWifiMac::UnblockTxOnLink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateLinkId()

void ns3::WifiMac::UpdateLinkId ( uint8_t id)
private

This method is intended to be called when a link changes ID in order to update the link ID stored by the Frame Exchange Manager and the Channel Access Manager operating on that link.

Parameters
idthe (new) ID of the link that has changed ID

Definition at line 1099 of file wifi-mac.cc.

References GetLink(), and NS_LOG_FUNCTION.

Referenced by SwapLinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateTidToLinkMapping()

void ns3::WifiMac::UpdateTidToLinkMapping ( const Mac48Address & mldAddr,
WifiDirection dir,
const WifiTidLinkMapping & mapping )
protected

Update the TID-to-Link Mappings for the given MLD in the given direction based on the given negotiated mappings.

An empty mapping indicates the default mapping.

Parameters
mldAddrthe MLD address of the given MLD
dirthe given direction (DL or UL)
mappingthe negotiated TID-to-Link Mapping

Definition at line 1246 of file wifi-mac.cc.

References ns3::BOTH_DIRECTIONS, dir, ns3::DOWNLINK, m_dlTidLinkMappings, m_ulTidLinkMappings, NS_ABORT_MSG_IF, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::ReceiveAssocRequest(), and ns3::StaWifiMac::ReceiveAssocResp().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ackedMpduCallback

MpduTracedCallback ns3::WifiMac::m_ackedMpduCallback
private

ack'ed MPDU callback

Definition at line 1271 of file wifi-mac.h.

Referenced by GetTypeId(), SetFrameExchangeManagers(), and SetupEdcaQueue().

◆ m_address

Mac48Address ns3::WifiMac::m_address
private

MAC address of this station.

Definition at line 1181 of file wifi-mac.h.

Referenced by DoGetLocalAddress(), GetAddress(), GetLocalAddress(), and SetAddress().

◆ m_beMaxAmpduSize

uint32_t ns3::WifiMac::m_beMaxAmpduSize
private

maximum A-MPDU size for AC_BE (in bytes)

Definition at line 1200 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_beMaxAmsduSize

uint16_t ns3::WifiMac::m_beMaxAmsduSize
private

maximum A-MSDU size for AC_BE (in bytes)

Definition at line 1195 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_bkMaxAmpduSize

uint32_t ns3::WifiMac::m_bkMaxAmpduSize
private

maximum A-MPDU size for AC_BK (in bytes)

Definition at line 1201 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_bkMaxAmsduSize

uint16_t ns3::WifiMac::m_bkMaxAmsduSize
private

maximum A-MSDU size for AC_BK (in bytes)

Definition at line 1196 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_ctsToSelfSupported

bool ns3::WifiMac::m_ctsToSelfSupported
private

flag indicating whether CTS-To-Self is supported

Definition at line 1173 of file wifi-mac.h.

Referenced by SetCtsToSelfSupported().

◆ m_device

Ptr<WifiNetDevice> ns3::WifiMac::m_device
private

Pointer to the device.

Definition at line 1177 of file wifi-mac.h.

Referenced by DoDispose(), GetDevice(), GetLinkForPhy(), SetDevice(), and SetMpduBufferSize().

◆ m_dlTidLinkMappings

std::unordered_map<Mac48Address, WifiTidLinkMapping, WifiAddressHash> ns3::WifiMac::m_dlTidLinkMappings
private

DL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)

Definition at line 1208 of file wifi-mac.h.

Referenced by ApplyTidLinkMapping(), GetTidToLinkMapping(), TidMappedOnLink(), and UpdateTidToLinkMapping().

◆ m_droppedMpduCallback

DroppedMpduTracedCallback ns3::WifiMac::m_droppedMpduCallback
private

This trace indicates that an MPDU was dropped for the given reason.

Definition at line 1266 of file wifi-mac.h.

Referenced by GetTypeId(), SetFrameExchangeManagers(), SetupDcfQueue(), and SetupEdcaQueue().

◆ m_edca

EdcaQueues ns3::WifiMac::m_edca
private

This is a map from Access Category index to the corresponding channel access function.

Definition at line 1191 of file wifi-mac.h.

Referenced by ConfigureContentionWindow(), DoDispose(), DoInitialize(), GetQosTxop(), HasFramesToTransmit(), SetBeQueue(), SetBkQueue(), SetupEdcaQueue(), SetViQueue(), SetVoQueue(), and SwapLinks().

◆ m_forwardUp

ForwardUpCallback ns3::WifiMac::m_forwardUp
private

Callback to forward packet up the stack.

Definition at line 1212 of file wifi-mac.h.

Referenced by ForwardUp(), and SetForwardUpCallback().

◆ m_icfDropCallback

IcfDropTracedCallback ns3::WifiMac::m_icfDropCallback
private

traced callback for ICF drop events

Definition at line 1350 of file wifi-mac.h.

Referenced by GetTypeId(), and SetFrameExchangeManagers().

◆ m_linkDown

Callback<void> ns3::WifiMac::m_linkDown
protected

Callback when a link is down.

Definition at line 942 of file wifi-mac.h.

Referenced by SetLinkDownCallback(), and ns3::StaWifiMac::TryToEnsureAssociated().

◆ m_linkIds

std::set<uint8_t> ns3::WifiMac::m_linkIds
private

IDs of the links in use.

Definition at line 1179 of file wifi-mac.h.

Referenced by CreateLinksIfNeeded(), GetLinkIds(), and SwapLinks().

◆ m_links

◆ m_linkUp

Callback<void> ns3::WifiMac::m_linkUp
protected

Callback when a link is up.

Definition at line 941 of file wifi-mac.h.

Referenced by ns3::StaWifiMac::ReceiveAssocResp(), and SetLinkUpCallback().

◆ m_macPromiscRxTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macPromiscRxTrace
private

The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).

This is a promiscuous trace.

See also
class CallBackTraceSource

Definition at line 1235 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyPromiscRx().

◆ m_macRxDropTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macRxDropTrace
private

The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer during reception.

See also
class CallBackTraceSource

Definition at line 1250 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyRxDrop().

◆ m_macRxTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macRxTrace
private

The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition).

This is a non- promiscuous trace.

See also
class CallBackTraceSource

Definition at line 1243 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyRx().

◆ m_macTxDropTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macTxDropTrace
private

The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer before being queued for transmission.

See also
class CallBackTraceSource

Definition at line 1227 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyTxDrop().

◆ m_macTxTrace

TracedCallback<Ptr<const Packet> > ns3::WifiMac::m_macTxTrace
private

The trace source fired when packets come into the "top" of the device at the L3/L2 transition, before being queued for transmission.

See also
class CallBackTraceSource

Definition at line 1220 of file wifi-mac.h.

Referenced by GetTypeId(), and NotifyTx().

◆ m_mpduBufferSize

uint16_t ns3::WifiMac::m_mpduBufferSize
private

BlockAck buffer size (in number of MPDUs)

Definition at line 1203 of file wifi-mac.h.

Referenced by GetMpduBufferSize(), SetDevice(), and SetMpduBufferSize().

◆ m_mpduResponseTimeoutCallback

MpduResponseTimeoutTracedCallback ns3::WifiMac::m_mpduResponseTimeoutCallback
private

MPDU response timeout traced callback.

This trace source is fed by a WifiTxTimer object.

Definition at line 1293 of file wifi-mac.h.

Referenced by GetTypeId(), and SetFrameExchangeManagers().

◆ m_nackedMpduCallback

MpduTracedCallback ns3::WifiMac::m_nackedMpduCallback
private

nack'ed MPDU callback

Definition at line 1272 of file wifi-mac.h.

Referenced by GetTypeId(), and SetupEdcaQueue().

◆ m_psduMapResponseTimeoutCallback

PsduMapResponseTimeoutTracedCallback ns3::WifiMac::m_psduMapResponseTimeoutCallback
private

PSDU map response timeout traced callback.

This trace source is fed by a WifiTxTimer object.

Definition at line 1337 of file wifi-mac.h.

Referenced by GetTypeId(), and SetFrameExchangeManagers().

◆ m_psduResponseTimeoutCallback

PsduResponseTimeoutTracedCallback ns3::WifiMac::m_psduResponseTimeoutCallback
private

PSDU response timeout traced callback.

This trace source is fed by a WifiTxTimer object.

Definition at line 1314 of file wifi-mac.h.

Referenced by GetTypeId(), and SetFrameExchangeManagers().

◆ m_qosSupported

bool ns3::WifiMac::m_qosSupported
private

This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.

It is exposed through the attribute system.

At the moment, this flag is the sole selection between QoS and non-QoS operation for the STA (whether IBSS, AP, or non-AP). Ultimately, we will want a QoS-enabled STA to be able to fall back to non-QoS operation with a non-QoS peer. This'll require further intelligence - i.e., per-association QoS state. Having a big switch seems like a good intermediate stage, however.

Definition at line 1170 of file wifi-mac.h.

Referenced by GetBEQueue(), GetBKQueue(), GetQosSupported(), GetVIQueue(), GetVOQueue(), NotifyConstructionCompleted(), SetBeBlockAckInactivityTimeout(), SetBeBlockAckThreshold(), SetBeQueue(), SetBkBlockAckInactivityTimeout(), SetBkBlockAckThreshold(), SetBkQueue(), SetQosSupported(), SetTxop(), SetViBlockAckInactivityTimeout(), SetViBlockAckThreshold(), SetViQueue(), SetVoBlockAckInactivityTimeout(), SetVoBlockAckThreshold(), and SetVoQueue().

◆ m_rxMiddle

Ptr<MacRxMiddle> ns3::WifiMac::m_rxMiddle
protected

RX middle (defragmentation etc.)

Definition at line 936 of file wifi-mac.h.

Referenced by WifiMac(), and DoDispose().

◆ m_scheduler

◆ m_shortSlotTimeSupported

bool ns3::WifiMac::m_shortSlotTimeSupported
private

flag whether short slot time is supported

Definition at line 1172 of file wifi-mac.h.

Referenced by GetShortSlotTimeSupported(), and SetShortSlotTimeSupported().

◆ m_shuffleLinkIdsGen

UniformRandomBitGenerator ns3::WifiMac::m_shuffleLinkIdsGen
private

random number generator to shuffle link IDs

Definition at line 1205 of file wifi-mac.h.

Referenced by AssignStreams(), and UnblockUnicastTxOnLinks().

◆ m_ssid

Ssid ns3::WifiMac::m_ssid
private

Service Set ID (SSID)

Definition at line 1182 of file wifi-mac.h.

Referenced by GetSsid(), and SetSsid().

◆ m_txMiddle

Ptr<MacTxMiddle> ns3::WifiMac::m_txMiddle
protected

◆ m_txop

◆ m_typeOfStation

TypeOfStation ns3::WifiMac::m_typeOfStation
private

the type of station

Definition at line 1175 of file wifi-mac.h.

Referenced by GetTypeOfStation(), and SetTypeOfStation().

◆ m_ulTidLinkMappings

std::unordered_map<Mac48Address, WifiTidLinkMapping, WifiAddressHash> ns3::WifiMac::m_ulTidLinkMappings
private

UL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)

Definition at line 1210 of file wifi-mac.h.

Referenced by ApplyTidLinkMapping(), GetTidToLinkMapping(), TidMappedOnLink(), and UpdateTidToLinkMapping().

◆ m_viMaxAmpduSize

uint32_t ns3::WifiMac::m_viMaxAmpduSize
private

maximum A-MPDU size for AC_VI (in bytes)

Definition at line 1199 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_viMaxAmsduSize

uint16_t ns3::WifiMac::m_viMaxAmsduSize
private

maximum A-MSDU size for AC_VI (in bytes)

Definition at line 1194 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_voMaxAmpduSize

uint32_t ns3::WifiMac::m_voMaxAmpduSize
private

maximum A-MPDU size for AC_VO (in bytes)

Definition at line 1198 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHeCapabilities(), GetHtCapabilities(), GetMaxAmpduSize(), GetTypeId(), and GetVhtCapabilities().

◆ m_voMaxAmsduSize

uint16_t ns3::WifiMac::m_voMaxAmsduSize
private

maximum A-MSDU size for AC_VO (in bytes)

Definition at line 1193 of file wifi-mac.h.

Referenced by GetEhtCapabilities(), GetHe6GhzBandCapabilities(), GetHtCapabilities(), GetMaxAmsduSize(), GetTypeId(), and GetVhtCapabilities().


The documentation for this class was generated from the following files: