A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-mac.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18 */
19
20#ifndef WIFI_MAC_H
21#define WIFI_MAC_H
22
23#include "qos-utils.h"
24#include "ssid.h"
27#include "wifi-standards.h"
28
29#include <list>
30#include <memory>
31#include <optional>
32#include <set>
33#include <unordered_map>
34#include <vector>
35
36namespace ns3
37{
38
39class Txop;
40class WifiNetDevice;
41class QosTxop;
42class WifiPsdu;
43class MacRxMiddle;
44class MacTxMiddle;
45class WifiMacQueue;
46class WifiMpdu;
47class HtConfiguration;
48class VhtConfiguration;
49class HeConfiguration;
50class EhtConfiguration;
51class FrameExchangeManager;
52class ChannelAccessManager;
53class ExtendedCapabilities;
54class OriginatorBlockAckAgreement;
55class RecipientBlockAckAgreement;
56
62{
67 OCB
68};
69
74enum WifiMacDropReason : uint8_t
75{
80};
81
82typedef std::unordered_map<uint16_t /* staId */, Ptr<WifiPsdu> /* PSDU */> WifiPsduMap;
83
93class WifiMac : public Object
94{
95 public:
100 static TypeId GetTypeId();
101
102 WifiMac();
103 ~WifiMac() override;
104
105 // Delete copy constructor and assignment operator to avoid misuse
106 WifiMac(const WifiMac&) = delete;
107 WifiMac& operator=(const WifiMac&) = delete;
108
114 void SetDevice(const Ptr<WifiNetDevice> device);
121
129
137
143 uint8_t GetNLinks() const;
150 virtual std::optional<uint8_t> GetLinkIdByAddress(const Mac48Address& address) const;
151
157 std::optional<Mac48Address> GetMldAddress(const Mac48Address& remoteAddr) const;
158
173 Mac48Address GetLocalAddress(const Mac48Address& remoteAddr) const;
174
180 Ptr<Txop> GetTxop() const;
194 Ptr<QosTxop> GetQosTxop(uint8_t tid) const;
203 virtual Ptr<WifiMacQueue> GetTxopQueue(AcIndex ac) const;
204
210 virtual bool HasFramesToTransmit(uint8_t linkId);
211
217 virtual void SetMacQueueScheduler(Ptr<WifiMacQueueScheduler> scheduler);
224
239
243 void SetSsid(Ssid ssid);
251 void SetPromisc();
258 void SetCtsToSelfSupported(bool enable);
259
263 Mac48Address GetAddress() const;
267 Ssid GetSsid() const;
271 virtual void SetAddress(Mac48Address address);
276 Mac48Address GetBssid(uint8_t linkId) const;
281 void SetBssid(Mac48Address bssid, uint8_t linkId);
282
293 const Mac48Address& address,
294 const std::set<uint8_t>& linkIds);
295
306 const Mac48Address& address,
307 const std::set<uint8_t>& linkIds);
308
316 virtual bool CanForwardPacketsTo(Mac48Address to) const = 0;
328 virtual void Enqueue(Ptr<Packet> packet, Mac48Address to, Mac48Address from);
337 virtual void Enqueue(Ptr<Packet> packet, Mac48Address to) = 0;
345 virtual bool SupportsSendFrom() const;
346
350 virtual void SetWifiPhys(const std::vector<Ptr<WifiPhy>>& phys);
355 Ptr<WifiPhy> GetWifiPhy(uint8_t linkId = SINGLE_LINK_OP_ID) const;
359 void ResetWifiPhys();
360
369 const std::vector<Ptr<WifiRemoteStationManager>>& stationManagers);
376
386
395 virtual void SetLinkUpCallback(Callback<void> linkUp);
399 void SetLinkDownCallback(Callback<void> linkDown);
400 /* Next functions are not pure virtual so non QoS WifiMacs are not
401 * forced to implement them.
402 */
403
409 virtual void NotifyChannelSwitching(uint8_t linkId);
410
418 void NotifyTx(Ptr<const Packet> packet);
426 void NotifyTxDrop(Ptr<const Packet> packet);
432 void NotifyRx(Ptr<const Packet> packet);
444 void NotifyRxDrop(Ptr<const Packet> packet);
445
454 virtual void ConfigureStandard(WifiStandard standard);
455
472
485 HtCapabilities GetHtCapabilities(uint8_t linkId) const;
492 VhtCapabilities GetVhtCapabilities(uint8_t linkId) const;
499 HeCapabilities GetHeCapabilities(uint8_t linkId) const;
506 EhtCapabilities GetEhtCapabilities(uint8_t linkId) const;
507
513 bool GetQosSupported() const;
520 bool GetErpSupported(uint8_t linkId) const;
527 bool GetDsssSupported(uint8_t linkId) const;
533 bool GetHtSupported() const;
540 bool GetVhtSupported(uint8_t linkId) const;
546 bool GetHeSupported() const;
552 bool GetEhtSupported() const;
553
558 bool GetHtSupported(const Mac48Address& address) const;
563 bool GetVhtSupported(const Mac48Address& address) const;
568 bool GetHeSupported(const Mac48Address& address) const;
573 bool GetEhtSupported(const Mac48Address& address) const;
574
588 uint16_t GetMaxAmsduSize(AcIndex ac) const;
589
592 std::optional<std::reference_wrapper<const OriginatorBlockAckAgreement>>;
595 std::optional<std::reference_wrapper<const RecipientBlockAckAgreement>>;
596
607 uint8_t tid) const;
618 uint8_t tid) const;
619
628 BlockAckType GetBaTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
637 BlockAckReqType GetBarTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
646 BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
655 BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
656
657 protected:
658 void DoInitialize() override;
659 void DoDispose() override;
660
668 virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax);
669
677 void SetQosSupported(bool enable);
678
685 void SetShortSlotTimeSupported(bool enable);
689 bool GetShortSlotTimeSupported() const;
690
696 Ptr<QosTxop> GetVOQueue() const;
702 Ptr<QosTxop> GetVIQueue() const;
708 Ptr<QosTxop> GetBEQueue() const;
714 Ptr<QosTxop> GetBKQueue() const;
715
736 virtual void Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId);
745
753
762 {
764 virtual ~LinkEntity();
765
766 uint8_t id;
772 bool erpSupported{false};
773 bool dsssSupported{false};
774 };
775
782 LinkEntity& GetLink(uint8_t linkId) const;
783
788
791
792 private:
802 void ConfigureDcf(Ptr<Txop> dcf,
803 uint32_t cwmin,
804 uint32_t cwmax,
805 std::list<bool> isDsss,
806 AcIndex ac);
807
813 void ConfigurePhyDependentParameters(uint8_t linkId);
814
821 void SetupEdcaQueue(AcIndex ac);
822
831
837 virtual std::unique_ptr<LinkEntity> CreateLinkEntity() const;
838
848 virtual Mac48Address DoGetLocalAddress(const Mac48Address& remoteAddr) const;
849
856 void SetErpSupported(bool enable, uint8_t linkId);
863 void SetDsssSupported(bool enable, uint8_t linkId);
864
870 void SetVoBlockAckThreshold(uint8_t threshold);
876 void SetViBlockAckThreshold(uint8_t threshold);
882 void SetBeBlockAckThreshold(uint8_t threshold);
888 void SetBkBlockAckThreshold(uint8_t threshold);
889
914
929
932
934
936 std::vector<std::unique_ptr<LinkEntity>> m_links;
937
940
944 typedef std::map<AcIndex, Ptr<QosTxop>, std::greater<AcIndex>> EdcaQueues;
945
949
954
959
961
999
1002
1010
1013
1018
1021
1024
1032 typedef void (*MpduResponseTimeoutCallback)(uint8_t reason,
1034 const WifiTxVector& txVector);
1035
1039
1045
1053 typedef void (*PsduResponseTimeoutCallback)(uint8_t reason,
1055 const WifiTxVector& txVector);
1056
1060
1066
1075 typedef void (*PsduMapResponseTimeoutCallback)(uint8_t reason,
1076 WifiPsduMap* psduMap,
1077 const std::set<Mac48Address>* missingStations,
1078 std::size_t nTotalStations);
1079
1083
1089};
1090
1091} // namespace ns3
1092
1093#endif /* WIFI_MAC_H */
Callback template class.
Definition: callback.h:438
The IEEE 802.11be EHT Capabilities.
The Extended Capabilities Information Element.
The IEEE 802.11ax HE Capabilities.
The HT Capabilities Information Element.
an EUI-48 address
Definition: mac48-address.h:46
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:36
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
The IEEE 802.11ac VHT Capabilities.
base class for all MAC-level wifi objects.
Definition: wifi-mac.h:94
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
Definition: wifi-mac.cc:1967
Ptr< FrameExchangeManager > GetFrameExchangeManager(uint8_t linkId=SINGLE_LINK_OP_ID) const
Get the Frame Exchange Manager associated with the given link.
Definition: wifi-mac.cc:864
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
Definition: wifi-mac.cc:531
virtual void NotifyChannelSwitching(uint8_t linkId)
Notify that channel on the given link has been switched.
Definition: wifi-mac.cc:580
std::optional< Mac48Address > GetMldAddress(const Mac48Address &remoteAddr) const
Definition: wifi-mac.cc:1358
virtual void SetMacQueueScheduler(Ptr< WifiMacQueueScheduler > scheduler)
Set the wifi MAC queue scheduler.
Definition: wifi-mac.cc:567
Mac48Address GetBssid(uint8_t linkId) const
Definition: wifi-mac.cc:476
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
Definition: wifi-mac.h:1053
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition: wifi-mac.h:951
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Definition: wifi-mac.h:930
void ConfigurePhyDependentParameters(uint8_t linkId)
Configure PHY dependent parameters such as CWmin and CWmax on the given link.
Definition: wifi-mac.cc:795
Ptr< HeConfiguration > GetHeConfiguration() const
Definition: wifi-mac.cc:1475
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Definition: wifi-mac.h:1017
TracedCallback< WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
Definition: wifi-mac.h:1012
TypeOfStation GetTypeOfStation() const
Return the type of station.
Definition: wifi-mac.cc:425
bool m_qosSupported
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service.
Definition: wifi-mac.h:928
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
Definition: wifi-mac.cc:491
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1712
Callback< void > m_linkDown
Callback when a link is down.
Definition: wifi-mac.h:790
bool GetQosSupported() const
Return whether the device supports QoS.
Definition: wifi-mac.cc:1030
std::optional< std::reference_wrapper< const RecipientBlockAckAgreement > > RecipientAgreementOptConstRef
optional const reference to RecipientBlockAckAgreement
Definition: wifi-mac.h:595
virtual void SetAddress(Mac48Address address)
Definition: wifi-mac.cc:443
Ptr< Txop > m_txop
TXOP used for transmission of frames to non-QoS peers.
Definition: wifi-mac.h:786
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Definition: wifi-mac.cc:1003
Mac48Address m_address
MAC address of this station.
Definition: wifi-mac.h:938
Ptr< WifiMacQueueScheduler > GetMacQueueScheduler() const
Get the wifi MAC queue scheduler.
Definition: wifi-mac.cc:574
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Definition: wifi-mac.cc:930
BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition: wifi-mac.cc:1445
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition: wifi-mac.h:950
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition: wifi-mac.h:784
Ptr< WifiMacQueueScheduler > m_scheduler
wifi MAC queue scheduler
Definition: wifi-mac.h:787
void DoInitialize() override
Initialize() implementation.
Definition: wifi-mac.cc:352
std::vector< std::unique_ptr< LinkEntity > > m_links
vector of Link objects
Definition: wifi-mac.h:936
TypeOfStation m_typeOfStation
the type of station
Definition: wifi-mac.h:933
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition: wifi-mac.h:957
virtual void ConfigureStandard(WifiStandard standard)
Definition: wifi-mac.cc:748
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 g...
Definition: wifi-mac.cc:1154
Ssid GetSsid() const
Definition: wifi-mac.cc:463
void SetWifiRemoteStationManagers(const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
Definition: wifi-mac.cc:883
std::map< AcIndex, Ptr< QosTxop >, std::greater< AcIndex > > EdcaQueues
This type defines a mapping between an Access Category index, and a pointer to the corresponding chan...
Definition: wifi-mac.h:944
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition: wifi-mac.cc:1584
bool GetErpSupported(uint8_t linkId) const
Return whether the device supports ERP on the given link.
Definition: wifi-mac.cc:1036
bool GetHtSupported() const
Return whether the device supports HT.
Definition: wifi-mac.cc:1487
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)=0
void ResetWifiPhys()
Remove currently attached WifiPhy objects from this MAC.
Definition: wifi-mac.cc:985
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Definition: wifi-mac.h:968
void SetErpSupported(bool enable, uint8_t linkId)
Enable or disable ERP support for the given link.
Definition: wifi-mac.cc:1042
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Definition: wifi-mac.h:955
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
Definition: wifi-mac.h:1032
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, std::list< bool > isDsss, AcIndex ac)
Definition: wifi-mac.cc:669
WifiMac(const WifiMac &)=delete
Ptr< WifiNetDevice > m_device
Pointer to the device.
Definition: wifi-mac.h:935
void SetSsid(Ssid ssid)
Definition: wifi-mac.cc:456
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
Definition: wifi-mac.cc:519
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Definition: wifi-mac.cc:418
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Definition: wifi-mac.h:1022
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
Definition: wifi-mac.cc:978
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 giv...
Definition: wifi-mac.cc:1113
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition: wifi-mac.h:1023
bool GetEhtSupported() const
Return whether the device supports EHT.
Definition: wifi-mac.cc:1506
bool GetHeSupported() const
Return whether the device supports HE.
Definition: wifi-mac.cc:1500
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
Definition: wifi-mac.cc:1655
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition: wifi-mac.cc:1594
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition: wifi-mac.cc:1564
virtual std::optional< uint8_t > GetLinkIdByAddress(const Mac48Address &address) const
Get the ID of the link having the given MAC address, if any.
Definition: wifi-mac.cc:936
void NotifyPromiscRx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:613
virtual bool HasFramesToTransmit(uint8_t linkId)
Check if the MAC has frames to transmit over the given link.
Definition: wifi-mac.cc:550
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
Definition: wifi-mac.cc:876
RecipientAgreementOptConstRef GetBaAgreementEstablishedAsRecipient(Mac48Address originator, uint8_t tid) const
Definition: wifi-mac.cc:1419
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition: wifi-mac.cc:1624
Ptr< EhtConfiguration > GetEhtConfiguration() const
Definition: wifi-mac.cc:1481
TracedCallback< Ptr< const Packet > > m_macRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: wifi-mac.h:991
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Definition: wifi-mac.cc:1493
void SetDsssSupported(bool enable, uint8_t linkId)
Enable or disable DSSS support for the given link.
Definition: wifi-mac.cc:1053
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 ...
Definition: wifi-mac.h:975
TracedCallback< Ptr< const WifiMpdu > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
Definition: wifi-mac.h:1020
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition: wifi-mac.h:785
void NotifyTx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:595
static TypeId GetTypeId()
Get the type ID.
Definition: wifi-mac.cc:65
Ptr< HtConfiguration > GetHtConfiguration() const
Definition: wifi-mac.cc:1463
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Definition: wifi-mac.cc:1942
BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition: wifi-mac.cc:1454
Ssid m_ssid
Service Set ID (SSID)
Definition: wifi-mac.h:939
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.
Definition: wifi-mac.cc:1346
Ptr< QosTxop > GetVIQueue() const
Accessor for the AC_VI channel access function.
Definition: wifi-mac.cc:525
void SetBssid(Mac48Address bssid, uint8_t linkId)
Definition: wifi-mac.cc:469
Ptr< WifiNetDevice > GetDevice() const
Return the device this PHY is associated with.
Definition: wifi-mac.cc:437
Ptr< FrameExchangeManager > SetupFrameExchangeManager(WifiStandard standard)
Create a Frame Exchange Manager depending on the supported version of the standard.
Definition: wifi-mac.cc:813
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from)
Definition: wifi-mac.cc:1205
void NotifyRx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:607
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 ...
Definition: wifi-mac.h:998
BlockAckType GetBaTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition: wifi-mac.cc:1427
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
Definition: wifi-mac.h:1044
void SetForwardUpCallback(ForwardUpCallback upCallback)
Definition: wifi-mac.cc:1092
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Definition: wifi-mac.h:1088
ExtendedCapabilities GetExtendedCapabilities() const
Return the extended capabilities of the device.
Definition: wifi-mac.cc:1644
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
Definition: wifi-mac.h:983
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
Definition: wifi-mac.h:953
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition: wifi-mac.cc:1634
std::optional< std::reference_wrapper< const OriginatorBlockAckAgreement > > OriginatorAgreementOptConstRef
optional const reference to OriginatorBlockAckAgreement
Definition: wifi-mac.h:592
virtual bool SupportsSendFrom() const
Definition: wifi-mac.cc:1086
virtual Ptr< WifiMacQueue > GetTxopQueue(AcIndex ac) const
Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed,...
Definition: wifi-mac.cc:543
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition: wifi-mac.cc:1574
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition: wifi-mac.cc:1614
bool GetShortSlotTimeSupported() const
Definition: wifi-mac.cc:1080
BlockAckReqType GetBarTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition: wifi-mac.cc:1436
void SetupEdcaQueue(AcIndex ac)
This method is a private utility invoked to configure the channel access function for the specified A...
Definition: wifi-mac.cc:625
void SetLinkDownCallback(Callback< void > linkDown)
Definition: wifi-mac.cc:1106
Ptr< QosTxop > GetBKQueue() const
Accessor for the AC_BK channel access function.
Definition: wifi-mac.cc:537
~WifiMac() override
Definition: wifi-mac.cc:59
void SetPromisc()
Sets the interface in promiscuous mode.
Definition: wifi-mac.cc:482
Ptr< VhtConfiguration > GetVhtConfiguration() const
Definition: wifi-mac.cc:1469
void NotifyRxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:619
virtual void SetLinkUpCallback(Callback< void > linkUp)
Definition: wifi-mac.cc:1099
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
Definition: wifi-mac.cc:910
void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-mac.cc:431
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition: wifi-mac.cc:1066
Mac48Address GetLocalAddress(const Mac48Address &remoteAddr) const
Get the local MAC address used to communicate with a remote STA.
Definition: wifi-mac.cc:1371
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
Definition: wifi-mac.h:948
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
Definition: wifi-mac.h:958
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition: wifi-mac.cc:1216
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition: wifi-mac.cc:646
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
Definition: wifi-mac.h:1059
TracedCallback< uint8_t, Ptr< const WifiMpdu >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
Definition: wifi-mac.h:1038
OriginatorAgreementOptConstRef GetBaAgreementEstablishedAsOriginator(Mac48Address recipient, uint8_t tid) const
Definition: wifi-mac.cc:1405
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 bee...
Definition: wifi-mac.cc:1223
Mac48Address GetAddress() const
Definition: wifi-mac.cc:450
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
Definition: wifi-mac.h:1001
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
TracedCallback signature for MPDU drop events.
Definition: wifi-mac.h:1009
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
Definition: wifi-mac.h:960
EhtCapabilities GetEhtCapabilities(uint8_t linkId) const
Return the EHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1849
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
Definition: wifi-mac.h:1082
Callback< void > m_linkUp
Callback when a link is up.
Definition: wifi-mac.h:789
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
Definition: wifi-mac.h:1000
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition: wifi-mac.cc:922
HeCapabilities GetHeCapabilities(uint8_t linkId) const
Return the HE capabilities of the device for the given link.
Definition: wifi-mac.cc:1793
WifiMac & operator=(const WifiMac &)=delete
virtual bool CanForwardPacketsTo(Mac48Address to) const =0
Return true if packets can be forwarded to the given destination, false otherwise.
virtual void SetWifiPhys(const std::vector< Ptr< WifiPhy > > &phys)
Definition: wifi-mac.cc:949
Callback< void, Ptr< const Packet >, Mac48Address, Mac48Address > ForwardUpCallback
This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a pa...
Definition: wifi-mac.h:385
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
Definition: wifi-mac.h:1065
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition: wifi-mac.cc:497
void(* PsduMapResponseTimeoutCallback)(uint8_t reason, WifiPsduMap *psduMap, const std::set< Mac48Address > *missingStations, std::size_t nTotalStations)
TracedCallback signature for PSDU map response timeout events.
Definition: wifi-mac.h:1075
void NotifyTxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:601
void DoDispose() override
Destructor implementation.
Definition: wifi-mac.cc:376
bool GetDsssSupported(uint8_t linkId) const
Return whether the device supports DSSS on the given link.
Definition: wifi-mac.cc:1060
Ptr< ChannelAccessManager > GetChannelAccessManager(uint8_t linkId=SINGLE_LINK_OP_ID) const
Get the Channel Access Manager associated with the given link.
Definition: wifi-mac.cc:870
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition: wifi-mac.cc:1604
virtual std::unique_ptr< LinkEntity > CreateLinkEntity() const
Create a LinkEntity object.
Definition: wifi-mac.cc:916
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
Definition: wifi-mac.cc:1073
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition: wifi-mac.h:931
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
Definition: wifi-mac.h:952
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 use...
Definition: wifi-mac.cc:1399
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
Definition: wifi-mac.h:956
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
TypeOfStation
Enumeration for type of WiFi station.
Definition: wifi-mac.h:62
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
WifiMacDropReason
The reason why an MPDU was dropped.
Definition: wifi-mac.h:75
WifiQueueBlockedReason
Enumeration of the reasons to block container queues.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:72
@ ADHOC_STA
Definition: wifi-mac.h:65
@ MESH
Definition: wifi-mac.h:66
@ STA
Definition: wifi-mac.h:63
@ AP
Definition: wifi-mac.h:64
@ OCB
Definition: wifi-mac.h:67
@ WIFI_MAC_DROP_QOS_OLD_PACKET
Definition: wifi-mac.h:79
@ WIFI_MAC_DROP_FAILED_ENQUEUE
Definition: wifi-mac.h:76
@ WIFI_MAC_DROP_EXPIRED_LIFETIME
Definition: wifi-mac.h:77
@ WIFI_MAC_DROP_REACHED_RETRY_LIMIT
Definition: wifi-mac.h:78
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static constexpr uint8_t SINGLE_LINK_OP_ID
Link ID for single link operations (helps tracking places where correct link ID is to be used to supp...
Definition: wifi-utils.h:140
std::unordered_map< uint16_t, Ptr< WifiPsdu > > WifiPsduMap
Map of PSDUs indexed by STA-ID.
ns3::Time timeout
The different BlockAckRequest variants.
The different BlockAck variants.