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"
26#include "wifi-standards.h"
27
28#include <list>
29#include <memory>
30#include <optional>
31#include <set>
32#include <unordered_map>
33#include <vector>
34
35namespace ns3
36{
37
38class Txop;
39class WifiNetDevice;
40class QosTxop;
41class WifiPsdu;
42class MacRxMiddle;
43class MacTxMiddle;
44class WifiMacQueue;
45class WifiMpdu;
46class HtConfiguration;
47class VhtConfiguration;
48class HeConfiguration;
49class EhtConfiguration;
50class FrameExchangeManager;
51class ChannelAccessManager;
52class ExtendedCapabilities;
53class WifiMacQueueScheduler;
54class OriginatorBlockAckAgreement;
55class RecipientBlockAckAgreement;
56
61{
66 OCB
67};
68
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 void SetMacQueueScheduler(Ptr<WifiMacQueueScheduler> scheduler);
217
232
236 void SetSsid(Ssid ssid);
244 void SetPromisc();
251 void SetCtsToSelfSupported(bool enable);
252
256 Mac48Address GetAddress() const;
260 Ssid GetSsid() const;
264 virtual void SetAddress(Mac48Address address);
269 Mac48Address GetBssid(uint8_t linkId) const;
274 void SetBssid(Mac48Address bssid, uint8_t linkId);
275
283 virtual bool CanForwardPacketsTo(Mac48Address to) const = 0;
295 virtual void Enqueue(Ptr<Packet> packet, Mac48Address to, Mac48Address from);
304 virtual void Enqueue(Ptr<Packet> packet, Mac48Address to) = 0;
312 virtual bool SupportsSendFrom() const;
313
317 virtual void SetWifiPhys(const std::vector<Ptr<WifiPhy>>& phys);
322 Ptr<WifiPhy> GetWifiPhy(uint8_t linkId = SINGLE_LINK_OP_ID) const;
326 void ResetWifiPhys();
327
336 const std::vector<Ptr<WifiRemoteStationManager>>& stationManagers);
343
353
362 virtual void SetLinkUpCallback(Callback<void> linkUp);
366 void SetLinkDownCallback(Callback<void> linkDown);
367 /* Next functions are not pure virtual so non QoS WifiMacs are not
368 * forced to implement them.
369 */
370
376 virtual void NotifyChannelSwitching(uint8_t linkId);
377
385 void NotifyTx(Ptr<const Packet> packet);
393 void NotifyTxDrop(Ptr<const Packet> packet);
399 void NotifyRx(Ptr<const Packet> packet);
411 void NotifyRxDrop(Ptr<const Packet> packet);
412
421 virtual void ConfigureStandard(WifiStandard standard);
422
439
452 HtCapabilities GetHtCapabilities(uint8_t linkId) const;
459 VhtCapabilities GetVhtCapabilities(uint8_t linkId) const;
466 HeCapabilities GetHeCapabilities(uint8_t linkId) const;
473 EhtCapabilities GetEhtCapabilities(uint8_t linkId) const;
474
480 bool GetQosSupported() const;
487 bool GetErpSupported(uint8_t linkId) const;
494 bool GetDsssSupported(uint8_t linkId) const;
500 bool GetHtSupported() const;
507 bool GetVhtSupported(uint8_t linkId) const;
513 bool GetHeSupported() const;
519 bool GetEhtSupported() const;
520
525 bool GetHtSupported(const Mac48Address& address) const;
530 bool GetVhtSupported(const Mac48Address& address) const;
535 bool GetHeSupported(const Mac48Address& address) const;
540 bool GetEhtSupported(const Mac48Address& address) const;
541
555 uint16_t GetMaxAmsduSize(AcIndex ac) const;
556
559 std::optional<std::reference_wrapper<const OriginatorBlockAckAgreement>>;
562 std::optional<std::reference_wrapper<const RecipientBlockAckAgreement>>;
563
574 uint8_t tid) const;
585 uint8_t tid) const;
586
595 BlockAckType GetBaTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
604 BlockAckReqType GetBarTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
613 BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
622 BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
623
624 protected:
625 void DoInitialize() override;
626 void DoDispose() override;
627
635 virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax);
636
644 void SetQosSupported(bool enable);
645
652 void SetShortSlotTimeSupported(bool enable);
656 bool GetShortSlotTimeSupported() const;
657
663 Ptr<QosTxop> GetVOQueue() const;
669 Ptr<QosTxop> GetVIQueue() const;
675 Ptr<QosTxop> GetBEQueue() const;
681 Ptr<QosTxop> GetBKQueue() const;
682
703 virtual void Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId);
712
720
729 {
731 virtual ~LinkEntity();
732
733 uint8_t id;
739 bool erpSupported{false};
740 bool dsssSupported{false};
741 };
742
749 LinkEntity& GetLink(uint8_t linkId) const;
750
755
758
759 private:
769 void ConfigureDcf(Ptr<Txop> dcf,
770 uint32_t cwmin,
771 uint32_t cwmax,
772 std::list<bool> isDsss,
773 AcIndex ac);
774
780 void ConfigurePhyDependentParameters(uint8_t linkId);
781
788 void SetupEdcaQueue(AcIndex ac);
789
798
804 virtual std::unique_ptr<LinkEntity> CreateLinkEntity() const;
805
815 virtual Mac48Address DoGetLocalAddress(const Mac48Address& remoteAddr) const;
816
823 void SetErpSupported(bool enable, uint8_t linkId);
830 void SetDsssSupported(bool enable, uint8_t linkId);
831
837 void SetVoBlockAckThreshold(uint8_t threshold);
843 void SetViBlockAckThreshold(uint8_t threshold);
849 void SetBeBlockAckThreshold(uint8_t threshold);
855 void SetBkBlockAckThreshold(uint8_t threshold);
856
881
896
899
901
903 std::vector<std::unique_ptr<LinkEntity>> m_links;
904
907
911 typedef std::map<AcIndex, Ptr<QosTxop>, std::greater<AcIndex>> EdcaQueues;
912
916
921
926
928
966
969
977
980
985
988
991
999 typedef void (*MpduResponseTimeoutCallback)(uint8_t reason,
1001 const WifiTxVector& txVector);
1002
1006
1012
1020 typedef void (*PsduResponseTimeoutCallback)(uint8_t reason,
1022 const WifiTxVector& txVector);
1023
1027
1033
1042 typedef void (*PsduMapResponseTimeoutCallback)(uint8_t reason,
1043 WifiPsduMap* psduMap,
1044 const std::set<Mac48Address>* missingStations,
1045 std::size_t nTotalStations);
1046
1050
1056};
1057
1058} // namespace ns3
1059
1060#endif /* WIFI_MAC_H */
Callback template class.
Definition: callback.h:443
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:60
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:1845
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:840
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
Definition: wifi-mac.cc:524
virtual void NotifyChannelSwitching(uint8_t linkId)
Notify that channel on the given link has been switched.
Definition: wifi-mac.cc:556
std::optional< Mac48Address > GetMldAddress(const Mac48Address &remoteAddr) const
Definition: wifi-mac.cc:1236
virtual void SetMacQueueScheduler(Ptr< WifiMacQueueScheduler > scheduler)
Set the wifi MAC queue scheduler.
Definition: wifi-mac.cc:543
Mac48Address GetBssid(uint8_t linkId) const
Definition: wifi-mac.cc:469
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
Definition: wifi-mac.h:1020
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition: wifi-mac.h:918
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Definition: wifi-mac.h:897
void ConfigurePhyDependentParameters(uint8_t linkId)
Configure PHY dependent parameters such as CWmin and CWmax on the given link.
Definition: wifi-mac.cc:771
Ptr< HeConfiguration > GetHeConfiguration() const
Definition: wifi-mac.cc:1353
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Definition: wifi-mac.h:984
TracedCallback< WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
Definition: wifi-mac.h:979
TypeOfStation GetTypeOfStation() const
Return the type of station.
Definition: wifi-mac.cc:418
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:895
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
Definition: wifi-mac.cc:484
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1590
Callback< void > m_linkDown
Callback when a link is down.
Definition: wifi-mac.h:757
bool GetQosSupported() const
Return whether the device supports QoS.
Definition: wifi-mac.cc:1006
std::optional< std::reference_wrapper< const RecipientBlockAckAgreement > > RecipientAgreementOptConstRef
optional const reference to RecipientBlockAckAgreement
Definition: wifi-mac.h:562
virtual void SetAddress(Mac48Address address)
Definition: wifi-mac.cc:436
Ptr< Txop > m_txop
TXOP used for transmission of frames to non-QoS peers.
Definition: wifi-mac.h:753
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Definition: wifi-mac.cc:979
Mac48Address m_address
MAC address of this station.
Definition: wifi-mac.h:905
Ptr< WifiMacQueueScheduler > GetMacQueueScheduler() const
Get the wifi MAC queue scheduler.
Definition: wifi-mac.cc:550
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Definition: wifi-mac.cc:906
BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition: wifi-mac.cc:1323
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition: wifi-mac.h:917
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition: wifi-mac.h:751
Ptr< WifiMacQueueScheduler > m_scheduler
wifi MAC queue scheduler
Definition: wifi-mac.h:754
void DoInitialize() override
Initialize() implementation.
Definition: wifi-mac.cc:353
std::vector< std::unique_ptr< LinkEntity > > m_links
vector of Link objects
Definition: wifi-mac.h:903
TypeOfStation m_typeOfStation
the type of station
Definition: wifi-mac.h:900
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition: wifi-mac.h:924
virtual void ConfigureStandard(WifiStandard standard)
Definition: wifi-mac.cc:724
Ssid GetSsid() const
Definition: wifi-mac.cc:456
void SetWifiRemoteStationManagers(const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
Definition: wifi-mac.cc:859
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:911
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition: wifi-mac.cc:1462
bool GetErpSupported(uint8_t linkId) const
Return whether the device supports ERP on the given link.
Definition: wifi-mac.cc:1012
bool GetHtSupported() const
Return whether the device supports HT.
Definition: wifi-mac.cc:1365
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)=0
void ResetWifiPhys()
Remove currently attached WifiPhy objects from this MAC.
Definition: wifi-mac.cc:961
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:935
void SetErpSupported(bool enable, uint8_t linkId)
Enable or disable ERP support for the given link.
Definition: wifi-mac.cc:1018
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Definition: wifi-mac.h:922
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
Definition: wifi-mac.h:999
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, std::list< bool > isDsss, AcIndex ac)
Definition: wifi-mac.cc:645
WifiMac(const WifiMac &)=delete
Ptr< WifiNetDevice > m_device
Pointer to the device.
Definition: wifi-mac.h:902
void SetSsid(Ssid ssid)
Definition: wifi-mac.cc:449
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
Definition: wifi-mac.cc:512
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Definition: wifi-mac.cc:411
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Definition: wifi-mac.h:989
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
Definition: wifi-mac.cc:954
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition: wifi-mac.h:990
bool GetEhtSupported() const
Return whether the device supports EHT.
Definition: wifi-mac.cc:1384
bool GetHeSupported() const
Return whether the device supports HE.
Definition: wifi-mac.cc:1378
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
Definition: wifi-mac.cc:1533
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition: wifi-mac.cc:1472
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition: wifi-mac.cc:1442
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:912
void NotifyPromiscRx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:589
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
Definition: wifi-mac.cc:852
RecipientAgreementOptConstRef GetBaAgreementEstablishedAsRecipient(Mac48Address originator, uint8_t tid) const
Definition: wifi-mac.cc:1297
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition: wifi-mac.cc:1502
Ptr< EhtConfiguration > GetEhtConfiguration() const
Definition: wifi-mac.cc:1359
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:958
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Definition: wifi-mac.cc:1371
void SetDsssSupported(bool enable, uint8_t linkId)
Enable or disable DSSS support for the given link.
Definition: wifi-mac.cc:1029
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:942
TracedCallback< Ptr< const WifiMpdu > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
Definition: wifi-mac.h:987
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition: wifi-mac.h:752
void NotifyTx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:571
static TypeId GetTypeId()
Get the type ID.
Definition: wifi-mac.cc:66
Ptr< HtConfiguration > GetHtConfiguration() const
Definition: wifi-mac.cc:1341
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Definition: wifi-mac.cc:1820
BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition: wifi-mac.cc:1332
Ssid m_ssid
Service Set ID (SSID)
Definition: wifi-mac.h:906
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:1224
Ptr< QosTxop > GetVIQueue() const
Accessor for the AC_VI channel access function.
Definition: wifi-mac.cc:518
void SetBssid(Mac48Address bssid, uint8_t linkId)
Definition: wifi-mac.cc:462
Ptr< WifiNetDevice > GetDevice() const
Return the device this PHY is associated with.
Definition: wifi-mac.cc:430
Ptr< FrameExchangeManager > SetupFrameExchangeManager(WifiStandard standard)
Create a Frame Exchange Manager depending on the supported version of the standard.
Definition: wifi-mac.cc:789
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from)
Definition: wifi-mac.cc:1089
void NotifyRx(Ptr< const Packet > packet)
Definition: wifi-mac.cc:583
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:965
BlockAckType GetBaTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition: wifi-mac.cc:1305
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
Definition: wifi-mac.h:1011
void SetForwardUpCallback(ForwardUpCallback upCallback)
Definition: wifi-mac.cc:1068
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Definition: wifi-mac.h:1055
ExtendedCapabilities GetExtendedCapabilities() const
Return the extended capabilities of the device.
Definition: wifi-mac.cc:1522
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:950
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
Definition: wifi-mac.h:920
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition: wifi-mac.cc:1512
std::optional< std::reference_wrapper< const OriginatorBlockAckAgreement > > OriginatorAgreementOptConstRef
optional const reference to OriginatorBlockAckAgreement
Definition: wifi-mac.h:559
virtual bool SupportsSendFrom() const
Definition: wifi-mac.cc:1062
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:536
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition: wifi-mac.cc:1452
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition: wifi-mac.cc:1492
bool GetShortSlotTimeSupported() const
Definition: wifi-mac.cc:1056
BlockAckReqType GetBarTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition: wifi-mac.cc:1314
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:601
void SetLinkDownCallback(Callback< void > linkDown)
Definition: wifi-mac.cc:1082
Ptr< QosTxop > GetBKQueue() const
Accessor for the AC_BK channel access function.
Definition: wifi-mac.cc:530
~WifiMac() override
Definition: wifi-mac.cc:60
void SetPromisc()
Sets the interface in promiscuous mode.
Definition: wifi-mac.cc:475
Ptr< VhtConfiguration > GetVhtConfiguration() const
Definition: wifi-mac.cc:1347
void NotifyRxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:595
virtual void SetLinkUpCallback(Callback< void > linkUp)
Definition: wifi-mac.cc:1075
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
Definition: wifi-mac.cc:886
void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
Definition: wifi-mac.cc:424
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition: wifi-mac.cc:1042
Mac48Address GetLocalAddress(const Mac48Address &remoteAddr) const
Get the local MAC address used to communicate with a remote STA.
Definition: wifi-mac.cc:1249
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
Definition: wifi-mac.h:915
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
Definition: wifi-mac.h:925
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition: wifi-mac.cc:1100
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition: wifi-mac.cc:622
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
Definition: wifi-mac.h:1026
TracedCallback< uint8_t, Ptr< const WifiMpdu >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
Definition: wifi-mac.h:1005
OriginatorAgreementOptConstRef GetBaAgreementEstablishedAsOriginator(Mac48Address recipient, uint8_t tid) const
Definition: wifi-mac.cc:1283
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:1107
Mac48Address GetAddress() const
Definition: wifi-mac.cc:443
TracedCallback< const WifiMacHeader & > m_txErrCallback
transmit error callback
Definition: wifi-mac.h:968
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
TracedCallback signature for MPDU drop events.
Definition: wifi-mac.h:976
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
Definition: wifi-mac.h:927
EhtCapabilities GetEhtCapabilities(uint8_t linkId) const
Return the EHT capabilities of the device for the given link.
Definition: wifi-mac.cc:1727
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
Definition: wifi-mac.h:1049
Callback< void > m_linkUp
Callback when a link is up.
Definition: wifi-mac.h:756
TracedCallback< const WifiMacHeader & > m_txOkCallback
transmit OK callback
Definition: wifi-mac.h:967
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition: wifi-mac.cc:898
HeCapabilities GetHeCapabilities(uint8_t linkId) const
Return the HE capabilities of the device for the given link.
Definition: wifi-mac.cc:1671
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:925
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:352
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
Definition: wifi-mac.h:1032
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition: wifi-mac.cc:490
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:1042
void NotifyTxDrop(Ptr< const Packet > packet)
Definition: wifi-mac.cc:577
void DoDispose() override
Destructor implementation.
Definition: wifi-mac.cc:369
bool GetDsssSupported(uint8_t linkId) const
Return whether the device supports DSSS on the given link.
Definition: wifi-mac.cc:1036
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:846
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition: wifi-mac.cc:1482
virtual std::unique_ptr< LinkEntity > CreateLinkEntity() const
Create a LinkEntity object.
Definition: wifi-mac.cc:892
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
Definition: wifi-mac.cc:1049
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition: wifi-mac.h:898
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
Definition: wifi-mac.h:919
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:1277
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
Definition: wifi-mac.h:923
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
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
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
Definition: qos-utils.h:72
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TypeOfStation
Enumeration for type of station.
Definition: wifi-mac.h:61
@ ADHOC_STA
Definition: wifi-mac.h:64
@ MESH
Definition: wifi-mac.h:65
@ STA
Definition: wifi-mac.h:62
@ AP
Definition: wifi-mac.h:63
@ OCB
Definition: wifi-mac.h:66
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.
@ 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
ns3::Time timeout
The different BlockAckRequest variants.
The different BlockAck variants.