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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#ifndef WIFI_MAC_H
10#define WIFI_MAC_H
11
12#include "mgt-headers.h"
13#include "qos-utils.h"
14#include "ssid.h"
17#include "wifi-standards.h"
18
19#include "ns3/uniform-random-bit-generator.h"
20
21#include <functional>
22#include <list>
23#include <map>
24#include <memory>
25#include <optional>
26#include <set>
27#include <unordered_map>
28#include <vector>
29
30namespace ns3
31{
32
33class Txop;
34class WifiNetDevice;
35class QosTxop;
36class WifiPsdu;
37class MacRxMiddle;
38class MacTxMiddle;
39class WifiMacQueue;
40class WifiMpdu;
41class HtConfiguration;
42class VhtConfiguration;
43class HeConfiguration;
44class EhtConfiguration;
45class FrameExchangeManager;
46class ChannelAccessManager;
47class ExtendedCapabilities;
48class OriginatorBlockAckAgreement;
49class RecipientBlockAckAgreement;
50class UniformRandomVariable;
51enum class WifiIcfDrop : uint8_t; // opaque enum declaration
52
53/**
54 * @ingroup wifi
55 * Enumeration for type of WiFi station
56 */
65
66/**
67 * @ingroup wifi
68 * @brief The reason why an MPDU was dropped
69 */
77
78typedef std::unordered_map<uint16_t /* staId */, Ptr<WifiPsdu> /* PSDU */> WifiPsduMap;
79
80/**
81 * @brief base class for all MAC-level wifi objects.
82 * @ingroup wifi
83 *
84 * This class encapsulates all the low-level MAC functionality
85 * DCA, EDCA, etc) and all the high-level MAC functionality
86 * (association/disassociation state machines).
87 *
88 */
89class WifiMac : public Object
90{
91 public:
92 /**
93 * @brief Get the type ID.
94 * @return the object TypeId
95 */
96 static TypeId GetTypeId();
97
98 WifiMac();
99 ~WifiMac() override;
100
101 // Delete copy constructor and assignment operator to avoid misuse
102 WifiMac(const WifiMac&) = delete;
103 WifiMac& operator=(const WifiMac&) = delete;
104
105 /// type of the management frames
107 std::variant<MgtBeaconHeader, MgtProbeResponseHeader, MgtAssocResponseHeader>;
108
109 /**
110 * Assign a fixed random variable stream number to the random variables
111 * used by this model. Return the number of streams (possibly zero) that
112 * have been assigned.
113 *
114 * @param stream first stream index to use
115 *
116 * @return the number of stream indices assigned by this model
117 */
118 virtual int64_t AssignStreams(int64_t stream);
119
120 /**
121 * Sets the device this PHY is associated with.
122 *
123 * @param device the device this PHY is associated with
124 */
125 void SetDevice(const Ptr<WifiNetDevice> device);
126 /**
127 * Return the device this PHY is associated with
128 *
129 * @return the device this PHY is associated with
130 */
132
133 /**
134 * Get the Frame Exchange Manager associated with the given link
135 *
136 * @param linkId the ID of the given link
137 * @return the Frame Exchange Manager
138 */
140
141 /**
142 * @param feManagers the frame exchange managers attached to this MAC.
143 */
144 void SetFrameExchangeManagers(const std::vector<Ptr<FrameExchangeManager>>& feManagers);
145
146 /**
147 * Get the Channel Access Manager associated with the given link
148 *
149 * @param linkId the ID of the given link
150 * @return the Channel Access Manager
151 */
153
154 /**
155 * @param caManagers the channel access managers attached to this MAC.
156 */
157 void SetChannelAccessManagers(const std::vector<Ptr<ChannelAccessManager>>& caManagers);
158
159 /**
160 * Get the number of links (can be greater than 1 for 11be devices only).
161 *
162 * @return the number of links used by this MAC
163 */
164 uint8_t GetNLinks() const;
165
166 /**
167 * @return the set of link IDs in use by this device
168 */
169 const std::set<uint8_t>& GetLinkIds() const;
170
171 /**
172 * Get the ID of the link having the given MAC address, if any.
173 *
174 * @param address the given MAC address
175 * @return the ID of the link having the given MAC address, if any
176 */
177 virtual std::optional<uint8_t> GetLinkIdByAddress(const Mac48Address& address) const;
178
179 /**
180 * Get the ID of the link (if any) on which the given PHY is operating.
181 *
182 * @param phy the given PHY
183 * @return the ID of the link (if any) on which the given PHY is operating
184 */
185 std::optional<uint8_t> GetLinkForPhy(Ptr<const WifiPhy> phy) const;
186
187 /**
188 * Get the ID of the link (if any) on which the given PHY is operating.
189 *
190 * @param phyId the index of the given PHY in the vector of PHYs held by WifiNetDevice
191 * @return the ID of the link (if any) on which the given PHY is operating
192 */
193 std::optional<uint8_t> GetLinkForPhy(std::size_t phyId) const;
194
195 /**
196 * Indicate if a given link is on the 6 GHz band.
197 *
198 * @param linkId the ID of the given link
199 * @return whether the given link is on the 6 GHz band
200 */
201 bool Is6GhzBand(uint8_t linkId) const;
202
203 /**
204 * @param remoteAddr the (MLD or link) address of a remote device
205 * @return the MLD address of the remote device having the given (MLD or link) address, if
206 * the remote device is an MLD.
207 */
208 std::optional<Mac48Address> GetMldAddress(const Mac48Address& remoteAddr) const;
209
210 /**
211 * Get the local MAC address used to communicate with a remote STA. Specifically:
212 * - If the given remote address is the address of a STA affiliated with a remote MLD
213 * and operating on a setup link, the address of the local STA operating on such a link
214 * is returned.
215 * - If the given remote address is the MLD address of a remote MLD (with which some link
216 * has been setup), the MLD address of this device is returned.
217 * - If this is a single link device, the unique MAC address of this device is returned.
218 * - Otherwise, return the MAC address of the affiliated STA (which must exists) that
219 * can be used to communicate with the remote device.
220 *
221 * @param remoteAddr the MAC address of the remote device
222 * @return the local MAC address used to communicate with the remote device
223 */
224 Mac48Address GetLocalAddress(const Mac48Address& remoteAddr) const;
225
226 /**
227 * Accessor for the Txop object
228 *
229 * @return a smart pointer to Txop
230 */
231 Ptr<Txop> GetTxop() const;
232 /**
233 * Accessor for a specified EDCA object
234 *
235 * @param ac the Access Category
236 * @return a smart pointer to a QosTxop
237 */
239 /**
240 * Accessor for a specified EDCA object
241 *
242 * @param tid the Traffic ID
243 * @return a smart pointer to a QosTxop
244 */
245 Ptr<QosTxop> GetQosTxop(uint8_t tid) const;
246 /**
247 * Get the wifi MAC queue of the (Qos)Txop associated with the given AC,
248 * if such (Qos)Txop is installed, or a null pointer, otherwise.
249 *
250 * @param ac the given Access Category
251 * @return the wifi MAC queue of the (Qos)Txop associated with the given AC,
252 * if such (Qos)Txop is installed, or a null pointer, otherwise
253 */
254 virtual Ptr<WifiMacQueue> GetTxopQueue(AcIndex ac) const;
255
256 /**
257 * Check if the MAC has frames to transmit over the given link
258 * @param linkId the ID of the given link.
259 * @return whether the MAC has frames to transmit.
260 */
261 virtual bool HasFramesToTransmit(uint8_t linkId);
262
263 /**
264 * Set the wifi MAC queue scheduler
265 *
266 * @param scheduler the wifi MAC queue scheduler
267 */
268 virtual void SetMacQueueScheduler(Ptr<WifiMacQueueScheduler> scheduler);
269 /**
270 * Get the wifi MAC queue scheduler
271 *
272 * @return the wifi MAC queue scheduler
273 */
275
276 /**
277 * This method is invoked by a subclass to specify what type of
278 * station it is implementing. This is something that the channel
279 * access functions need to know.
280 *
281 * @param type the type of station.
282 */
284 /**
285 * Return the type of station.
286 *
287 * @return the type of station.
288 */
290
291 /**
292 * @param ssid the current SSID of this MAC layer.
293 */
294 void SetSsid(Ssid ssid);
295 /**
296 * @brief Sets the interface in promiscuous mode.
297 *
298 * Enables promiscuous mode on the interface. Note that any further
299 * filtering on the incoming frame path may affect the overall
300 * behavior.
301 */
302 void SetPromisc();
303 /**
304 * Enable or disable CTS-to-self feature.
305 *
306 * @param enable true if CTS-to-self is to be supported,
307 * false otherwise
308 */
309 void SetCtsToSelfSupported(bool enable);
310
311 /**
312 * @return the MAC address associated to this MAC layer.
313 */
314 Mac48Address GetAddress() const;
315 /**
316 * @return the SSID which this MAC layer is going to try to stay in.
317 */
318 Ssid GetSsid() const;
319 /**
320 * @param address the current address of this MAC layer.
321 */
322 virtual void SetAddress(Mac48Address address);
323 /**
324 * @return the BSSID of the network the given link belongs to.
325 * @param linkId the ID of the given link
326 */
327 Mac48Address GetBssid(uint8_t linkId) const;
328 /**
329 * @param bssid the BSSID of the network that the given link belongs to.
330 * @param linkId the ID of the given link
331 */
332 void SetBssid(Mac48Address bssid, uint8_t linkId);
333
334 /**
335 * Block the transmission on the given links of all unicast frames addressed to
336 * the station with the given address for the given reason. The given MAC address
337 * must be the MLD address in case the addressed device is multi-link.
338 *
339 * @param reason the reason for blocking transmissions
340 * @param address the MAC address of the given device
341 * @param linkIds the IDs of the links to block
342 */
344 Mac48Address address,
345 const std::set<uint8_t>& linkIds);
346
347 /**
348 * Unblock the transmission on the given links of all unicast frames addressed to
349 * the station with the given address for the given reason. The given MAC address
350 * must be the MLD address in case the addressed device is multi-link.
351 *
352 * @param reason the reason for unblocking transmissions
353 * @param address the MAC address of the given device
354 * @param linkIds the IDs of the links to unblock
355 */
357 Mac48Address address,
358 const std::set<uint8_t>& linkIds);
359
360 /**
361 * Check whether the transmission of the packets in the given container queue of the given
362 * Access Category are blocked on the given link for the given reason (if any).
363 *
364 * @param ac the given Access Category
365 * @param queueId the given container queue
366 * @param linkId the ID of the given link
367 * @param reason the reason to block transmissions (REASONS_COUNT indicate no reason)
368 * @return whether transmission is blocked
369 */
371 AcIndex ac,
372 const WifiContainerQueueId& queueId,
373 uint8_t linkId,
375
376 /**
377 * Return true if packets can be forwarded to the given destination,
378 * false otherwise.
379 *
380 * @param to the address to which the packet should be sent
381 * @return whether packets can be forwarded to the given destination
382 */
383 virtual bool CanForwardPacketsTo(Mac48Address to) const = 0;
384
385 /**
386 * @param packet the packet to send.
387 * @param to the address to which the packet should be sent.
388 *
389 * The packet should be enqueued in a TX queue, and should be
390 * dequeued as soon as the DCF/EDCA function determines that
391 * access is granted to this MAC.
392 */
393 void Enqueue(Ptr<Packet> packet, Mac48Address to);
394
395 /**
396 * @param packet the packet to send.
397 * @param to the address to which the packet should be sent.
398 * @param from the address from which the packet should be sent.
399 *
400 * The packet should be enqueued in a TX queue, and should be
401 * dequeued as soon as the DCF/EDCA function determines that
402 * access is granted to this MAC. The extra parameter "from" allows
403 * this device to operate in a bridged mode, forwarding received
404 * frames without altering the source address.
405 */
406 void Enqueue(Ptr<Packet> packet, Mac48Address to, Mac48Address from);
407
408 /**
409 * @param packet the packet to send.
410 * @param to the address to which the packet should be sent.
411 * @param from the address from which the packet should be sent.
412 * @param tid the TID to use to send this packet
413 *
414 * The packet should be enqueued in a TX queue, and should be
415 * dequeued as soon as the DCF/EDCA function determines that
416 * access is granted to this MAC. The extra parameter "tid" allows
417 * to specify the TID to use in case QoS is supported.
418 */
419 void Enqueue(Ptr<Packet> packet, Mac48Address to, Mac48Address from, uint8_t tid);
420
421 /**
422 * @return if this MAC supports sending from arbitrary address.
423 *
424 * The interface may or may not support sending from arbitrary address.
425 * This function returns true if sending from arbitrary address is supported,
426 * false otherwise.
427 */
428 virtual bool SupportsSendFrom() const;
429
430 /**
431 * @param phys the physical layers attached to this MAC.
432 */
433 virtual void SetWifiPhys(const std::vector<Ptr<WifiPhy>>& phys);
434 /**
435 * @param linkId the index (starting at 0) of the PHY object to retrieve
436 * @return the physical layer attached to this MAC
437 */
438 Ptr<WifiPhy> GetWifiPhy(uint8_t linkId = SINGLE_LINK_OP_ID) const;
439 /**
440 * Remove currently attached WifiPhy objects from this MAC.
441 */
442 void ResetWifiPhys();
443
444 /**
445 * @param stationManager the station manager attached to this MAC.
446 */
448 /**
449 * @param stationManagers the station managers attached to this MAC.
450 */
452 const std::vector<Ptr<WifiRemoteStationManager>>& stationManagers);
453 /**
454 * @param linkId the ID (starting at 0) of the link of the RemoteStationManager object
455 * to retrieve
456 * @return the remote station manager operating on the given link
457 */
459
460 /**
461 * This type defines the callback of a higher layer that a
462 * WifiMac(-derived) object invokes to pass a packet up the stack.
463 *
464 * @param packet the packet that has been received.
465 * @param from the MAC address of the device that sent the packet.
466 * @param to the MAC address of the device that the packet is destined for.
467 */
469
470 /**
471 * @param upCallback the callback to invoke when a packet must be
472 * forwarded up the stack.
473 */
475 /**
476 * @param linkUp the callback to invoke when the link becomes up.
477 */
478 virtual void SetLinkUpCallback(Callback<void> linkUp);
479 /**
480 * @param linkDown the callback to invoke when the link becomes down.
481 */
482 void SetLinkDownCallback(Callback<void> linkDown);
483 /* Next functions are not pure virtual so non QoS WifiMacs are not
484 * forced to implement them.
485 */
486
487 /**
488 * Notify that channel on the given link has been switched.
489 *
490 * @param linkId the ID of the given link
491 */
492 virtual void NotifyChannelSwitching(uint8_t linkId);
493
494 /**
495 * @param packet the packet being enqueued
496 *
497 * Public method used to fire a MacTx trace. Implemented for encapsulation purposes.
498 * Note this trace indicates that the packet was accepted by the device only.
499 * The packet may be dropped later (e.g. if the queue is full).
500 */
501 void NotifyTx(Ptr<const Packet> packet);
502 /**
503 * @param packet the packet being dropped
504 *
505 * Public method used to fire a MacTxDrop trace.
506 * This trace indicates that the packet was dropped before it was queued for
507 * transmission (e.g. when a STA is not associated with an AP).
508 */
509 void NotifyTxDrop(Ptr<const Packet> packet);
510 /**
511 * @param packet the packet we received
512 *
513 * Public method used to fire a MacRx trace. Implemented for encapsulation purposes.
514 */
515 void NotifyRx(Ptr<const Packet> packet);
516 /**
517 * @param packet the packet we received promiscuously
518 *
519 * Public method used to fire a MacPromiscRx trace. Implemented for encapsulation purposes.
520 */
522 /**
523 * @param packet the packet we received but is not destined for us
524 *
525 * Public method used to fire a MacRxDrop trace. Implemented for encapsulation purposes.
526 */
527 void NotifyRxDrop(Ptr<const Packet> packet);
528
529 /**
530 * @return pointer to HtConfiguration if it exists
531 */
533 /**
534 * @return pointer to VhtConfiguration if it exists
535 */
537 /**
538 * @return pointer to HeConfiguration if it exists
539 */
541 /**
542 * @return pointer to EhtConfiguration if it exists
543 */
545
546 /**
547 * Return the extended capabilities of the device.
548 *
549 * @return the extended capabilities that we support
550 */
552 /**
553 * Return the HT capabilities of the device for the given link.
554 *
555 * @param linkId the ID of the given link
556 * @return the HT capabilities that we support
557 */
558 HtCapabilities GetHtCapabilities(uint8_t linkId) const;
559 /**
560 * Return the VHT capabilities of the device for the given link.
561 *
562 * @param linkId the ID of the given link
563 * @return the VHT capabilities that we support
564 */
565 VhtCapabilities GetVhtCapabilities(uint8_t linkId) const;
566 /**
567 * Return the HE capabilities of the device for the given link.
568 *
569 * @param linkId the ID of the given link
570 * @return the HE capabilities that we support
571 */
572 HeCapabilities GetHeCapabilities(uint8_t linkId) const;
573 /**
574 * Return the HE 6GHz band capabilities of the device for the given 6 GHz link.
575 *
576 * @param linkId the ID of the given 6 GHz link
577 * @return the HE 6GHz band capabilities that we support
578 */
580 /**
581 * Return the EHT capabilities of the device for the given link.
582 *
583 * @param linkId the ID of the given link
584 * @return the EHT capabilities that we support
585 */
586 EhtCapabilities GetEhtCapabilities(uint8_t linkId) const;
587
588 /**
589 * Return whether the device supports QoS.
590 *
591 * @return true if QoS is supported, false otherwise
592 */
593 bool GetQosSupported() const;
594 /**
595 * Return whether the device supports ERP on the given link.
596 *
597 * @param linkId the ID of the given link
598 * @return true if ERP is supported, false otherwise
599 */
600 bool GetErpSupported(uint8_t linkId) const;
601 /**
602 * Return whether the device supports DSSS on the given link.
603 *
604 * @param linkId the ID of the given link
605 * @return true if DSSS is supported, false otherwise
606 */
607 bool GetDsssSupported(uint8_t linkId) const;
608 /**
609 * Return whether the device supports HT on the given link.
610 *
611 * @param linkId the ID of the given link.
612 * @return true if HT is supported, false otherwise
613 */
614 bool GetHtSupported(uint8_t linkId) const;
615 /**
616 * Return whether the device supports VHT on the given link.
617 *
618 * @param linkId the ID of the given link.
619 * @return true if VHT is supported, false otherwise
620 */
621 bool GetVhtSupported(uint8_t linkId) const;
622 /**
623 * Return whether the device supports HE.
624 *
625 * @return true if HE is supported, false otherwise
626 */
627 bool GetHeSupported() const;
628 /**
629 * Return whether the device supports EHT.
630 *
631 * @return true if EHT is supported, false otherwise
632 */
633 bool GetEhtSupported() const;
634
635 /**
636 * @param address the (link or MLD) address of a remote station
637 * @return true if the remote station with the given address supports HT
638 */
639 bool GetHtSupported(const Mac48Address& address) const;
640 /**
641 * @param address the (link or MLD) address of a remote station
642 * @return true if the remote station with the given address supports VHT
643 */
644 bool GetVhtSupported(const Mac48Address& address) const;
645 /**
646 * @param address the (link or MLD) address of a remote station
647 * @return true if the remote station with the given address supports HE
648 */
649 bool GetHeSupported(const Mac48Address& address) const;
650 /**
651 * @param address the (link or MLD) address of a remote station
652 * @return true if the remote station with the given address supports EHT
653 */
654 bool GetEhtSupported(const Mac48Address& address) const;
655
656 /**
657 * Enable or disable Robust AV Streaming support for the device.
658 *
659 * @param enable whether Robust AV Streaming is supported
660 */
661 void SetRobustAVStreamingSupported(bool enable);
662 /**
663 * Return whether the device supports Robust AV Streaming.
664 *
665 * @return true if Robust AV Streaming is supported, false otherwise
666 */
668
669 /**
670 * Return the maximum A-MPDU size of the given Access Category.
671 *
672 * @param ac Access Category index
673 * @return the maximum A-MPDU size
674 */
676 /**
677 * Return the maximum A-MSDU size of the given Access Category.
678 *
679 * @param ac Access Category index
680 * @return the maximum A-MSDU size
681 */
682 uint16_t GetMaxAmsduSize(AcIndex ac) const;
683
684 /// optional const reference to OriginatorBlockAckAgreement
686 std::optional<std::reference_wrapper<const OriginatorBlockAckAgreement>>;
687 /// optional const reference to RecipientBlockAckAgreement
689 std::optional<std::reference_wrapper<const RecipientBlockAckAgreement>>;
690
691 /**
692 * @param recipient (link or device) MAC address of the recipient
693 * @param tid traffic ID
694 * @param gcrGroupAddr the GCR Group Address (only if it is a GCR Block Ack agreement)
695 *
696 * @return the originator block ack agreement, if one has been established
697 *
698 * Checks if an originator block ack agreement is established with station addressed by
699 * <i>recipient</i> for TID <i>tid</i>.
700 */
702 Mac48Address recipient,
703 uint8_t tid,
704 std::optional<Mac48Address> gcrGroupAddr = std::nullopt) const;
705 /**
706 * @param originator (link or device) MAC address of the originator
707 * @param tid traffic ID
708 * @param gcrGroupAddr the GCR Group Address (only if it is a GCR Block Ack agreement)
709 *
710 * @return the recipient block ack agreement, if one has been established
711 *
712 * Checks if a recipient block ack agreement is established with station addressed by
713 * <i>originator</i> for TID <i>tid</i>.
714 */
716 Mac48Address originator,
717 uint8_t tid,
718 std::optional<Mac48Address> gcrGroupAddr = std::nullopt) const;
719
720 /**
721 * @param recipient MAC address
722 * @param tid traffic ID
723 *
724 * @return the type of Block Acks sent by the recipient
725 *
726 * This function returns the type of Block Acks sent by the recipient.
727 */
728 BlockAckType GetBaTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
729 /**
730 * @param recipient MAC address of recipient
731 * @param tid traffic ID
732 *
733 * @return the type of Block Ack Requests sent to the recipient
734 *
735 * This function returns the type of Block Ack Requests sent to the recipient.
736 */
737 BlockAckReqType GetBarTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
738 /**
739 * @param originator MAC address of originator
740 * @param tid traffic ID
741 *
742 * @return the type of Block Acks sent to the originator
743 *
744 * This function returns the type of Block Acks sent to the originator.
745 */
746 BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
747 /**
748 * @param originator MAC address of originator
749 * @param tid traffic ID
750 *
751 * @return the type of Block Ack Requests sent by the originator
752 *
753 * This function returns the type of Block Ack Requests sent by the originator.
754 */
755 BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
756
757 /**
758 * Get the maximum Block Ack buffer size (in number of MPDUs) supported by the given device,
759 * if any, or by this device, otherwise, based on the supported standard.
760 *
761 * @param address the (MLD or link) address of the given device
762 * @return the maximum supported Block Ack buffer size (in number of MPDUs)
763 */
764 uint16_t GetMaxBaBufferSize(std::optional<Mac48Address> address = std::nullopt) const;
765
766 /**
767 * @param size the size (in number of MPDUs) of the buffer used for each BlockAck
768 * agreement in which this node is a recipient
769 */
770 void SetMpduBufferSize(uint16_t size);
771
772 /**
773 * @return the size (in number of MPDUs) of the buffer used for each BlockAck
774 * agreement in which this node is a recipient
775 */
776 uint16_t GetMpduBufferSize() const;
777
778 /**
779 * Set the frame retry limit.
780 *
781 * @param limit the frame retry limit
782 */
783 void SetFrameRetryLimit(uint32_t limit);
784
785 /**
786 * @return the frame retry limit
787 */
789
790 /**
791 * Get the TID-to-Link Mapping negotiated with the given MLD (if any) for the given direction.
792 * An empty mapping indicates the default mapping.
793 *
794 * @param mldAddr the MLD address of the given MLD
795 * @param dir the given direction (DL or UL)
796 * @return the negotiated TID-to-Link Mapping
797 */
798 std::optional<std::reference_wrapper<const WifiTidLinkMapping>> GetTidToLinkMapping(
799 Mac48Address mldAddr,
800 WifiDirection dir) const;
801
802 /**
803 * Check whether the given TID is mapped on the given link in the given direction for the
804 * given MLD.
805 *
806 * @param mldAddr the MLD address of the given MLD
807 * @param dir the given direction (DL or UL)
808 * @param tid the given TID
809 * @param linkId the ID of the given link
810 * @return whether the given TID is mapped on the given link in the given direction for the
811 * given MLD
812 */
813 bool TidMappedOnLink(Mac48Address mldAddr,
815 uint8_t tid,
816 uint8_t linkId) const;
817
818 /// Information reported by ICF drop trace
820 {
821 WifiIcfDrop reason{}; ///< the reason why the ICF was dropped by the EMLSR client
822 uint8_t linkId{}; ///< the ID of the link on which the ICF was dropped
823 Mac48Address sender; ///< the sender of the ICF
824 };
825
826 /**
827 * TracedCallback signature for ICF drop events.
828 *
829 * @param info information reported by ICF drop trace
830 */
831 typedef void (*IcfDropCallback)(const IcfDropInfo& info);
832
833 /// TracedCallback for ICF drop events typedef
835
836 protected:
837 void DoInitialize() override;
838 void DoDispose() override;
839 void NotifyConstructionCompleted() override;
840
841 /**
842 * @param cwMin the minimum contention window size
843 * @param cwMax the maximum contention window size
844 *
845 * This method is called to set the minimum and the maximum
846 * contention window size.
847 */
848 virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax);
849
850 /**
851 * Enable or disable short slot time feature.
852 *
853 * @param enable true if short slot time is to be supported,
854 * false otherwise
855 */
856 void SetShortSlotTimeSupported(bool enable);
857 /**
858 * @return whether the device supports short slot time capability.
859 */
860 bool GetShortSlotTimeSupported() const;
861
862 /**
863 * Accessor for the AC_VO channel access function
864 *
865 * @return a smart pointer to QosTxop
866 */
867 Ptr<QosTxop> GetVOQueue() const;
868 /**
869 * Accessor for the AC_VI channel access function
870 *
871 * @return a smart pointer to QosTxop
872 */
873 Ptr<QosTxop> GetVIQueue() const;
874 /**
875 * Accessor for the AC_BE channel access function
876 *
877 * @return a smart pointer to QosTxop
878 */
879 Ptr<QosTxop> GetBEQueue() const;
880 /**
881 * Accessor for the AC_BK channel access function
882 *
883 * @return a smart pointer to QosTxop
884 */
885 Ptr<QosTxop> GetBKQueue() const;
886
887 /**
888 * This method acts as the MacRxMiddle receive callback and is
889 * invoked to notify us that a frame has been received on the given link.
890 * The implementation is intended to capture logic that is going to be
891 * common to all (or most) derived classes. Specifically, handling
892 * of Block Ack management frames is dealt with here.
893 *
894 * This method will need, however, to be overridden by derived
895 * classes so that they can perform their data handling before
896 * invoking the base version.
897 *
898 * The given link may be undefined in some cases (e.g., in case of
899 * QoS Data frames received in the context of a Block Ack agreement --
900 * because the BlockAckManager does not have to record the link each
901 * buffered MPDU has been received on); in such a cases, the value
902 * of <i>linkId</i> should be WIFI_LINKID_UNDEFINED.
903 *
904 * @param mpdu the MPDU that has been received.
905 * @param linkId the ID of the given link
906 */
907 virtual void Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId);
908 /**
909 * Forward the packet up to the device.
910 *
911 * @param packet the packet that we are forwarding up to the device
912 * @param from the address of the source
913 * @param to the address of the destination
914 */
916
917 /**
918 * This method can be called to de-aggregate an A-MSDU and forward
919 * the constituent packets up the stack.
920 *
921 * @param mpdu the MPDU containing the A-MSDU.
922 */
924
925 /**
926 * Apply the TID-to-Link Mapping negotiated with the given MLD for the given direction
927 * by properly configuring the queue scheduler.
928 *
929 * @param mldAddr the MLD MAC address of the given MLD
930 * @param dir the given direction (DL or UL)
931 */
933
934 /**
935 * Swap the links based on the information included in the given map. This method
936 * is normally called by a non-AP MLD upon completing ML setup to have its link IDs
937 * match AP MLD's link IDs.
938 *
939 * @param links a set of pairs (from, to) each mapping a current link ID to the
940 * link ID it has to become (i.e., link 'from' becomes link 'to')
941 */
942 void SwapLinks(std::map<uint8_t, uint8_t> links);
943
944 /**
945 * Structure holding information specific to a single link. Here, the meaning of
946 * "link" is that of the 11be amendment which introduced multi-link devices. For
947 * previous amendments, only one link can be created. Therefore, "link" has not
948 * to be confused with the general concept of link for a NetDevice (used by the
949 * m_linkUp and m_linkDown callbacks).
950 */
952 {
953 /// Destructor (a virtual method is needed to make this struct polymorphic)
954 virtual ~LinkEntity();
955
956 Ptr<WifiPhy> phy; //!< Wifi PHY object
957 Ptr<ChannelAccessManager> channelAccessManager; //!< channel access manager object
958 Ptr<FrameExchangeManager> feManager; //!< Frame Exchange Manager object
959 Ptr<WifiRemoteStationManager> stationManager; //!< Remote station manager (rate control,
960 //!< RTS/CTS/fragmentation thresholds etc.)
961 bool erpSupported{false}; //!< set to \c true iff this WifiMac is to model 802.11g
962 bool dsssSupported{false}; //!< set to \c true iff this WifiMac is to model 802.11b
963 };
964
965 /**
966 * @return a const reference to the map of link entities
967 */
968 const std::map<uint8_t, std::unique_ptr<LinkEntity>>& GetLinks() const;
969
970 /**
971 * Get a reference to the link associated with the given ID.
972 *
973 * @param linkId the given link ID
974 * @return a reference to the link associated with the given ID
975 */
976 LinkEntity& GetLink(uint8_t linkId) const;
977
978 /**
979 * Update the TID-to-Link Mappings for the given MLD in the given direction based on the
980 * given negotiated mappings. An empty mapping indicates the default mapping.
981 *
982 * @param mldAddr the MLD address of the given MLD
983 * @param dir the given direction (DL or UL)
984 * @param mapping the negotiated TID-to-Link Mapping
985 */
986 void UpdateTidToLinkMapping(const Mac48Address& mldAddr,
988 const WifiTidLinkMapping& mapping);
989
990 /**
991 * Update capabilities information from the given management frame.
992 *
993 * @param frame the body of the given management frame
994 * @param addr MAC address of the sender
995 * @param linkId ID of the link the management frame was received over
996 */
997 void RecordCapabilities(const MgtFrameType& frame, const Mac48Address& addr, uint8_t linkId);
998
999 UniformRandomBitGenerator m_shuffleLinkIdsGen; //!< random number generator to shuffle link IDs
1000
1001 Ptr<MacRxMiddle> m_rxMiddle; //!< RX middle (defragmentation etc.)
1002 Ptr<MacTxMiddle> m_txMiddle; //!< TX middle (aggregation etc.)
1003 Ptr<Txop> m_txop; //!< TXOP used for transmission of frames to non-QoS peers.
1004 Ptr<WifiMacQueueScheduler> m_scheduler; //!< wifi MAC queue scheduler
1005
1006 Callback<void> m_linkUp; //!< Callback when a link is up
1007 Callback<void> m_linkDown; //!< Callback when a link is down
1008
1009 private:
1010 /**
1011 * Complete the configuration of the MAC layer components.
1012 */
1013 void CompleteConfig();
1014
1015 /**
1016 * Allow subclasses to complete the configuration of the MAC layer components.
1017 */
1018 virtual void DoCompleteConfig() = 0;
1019
1020 /**
1021 * @param dcf the DCF to be configured
1022 * @param cwmin the minimum contention window for the DCF
1023 * @param cwmax the maximum contention window for the DCF
1024 * @param isDsss vector of flags to indicate whether PHY is DSSS or HR/DSSS for every link
1025 * @param ac the access category for the DCF
1026 *
1027 * Configure the DCF with appropriate values depending on the given access category.
1028 */
1029 void ConfigureDcf(Ptr<Txop> dcf,
1030 uint32_t cwmin,
1031 uint32_t cwmax,
1032 std::list<bool> isDsss,
1033 AcIndex ac);
1034
1035 /**
1036 * Configure PHY dependent parameters such as CWmin and CWmax on the given link.
1037 *
1038 * @param linkId the ID of the given link
1039 */
1040 void ConfigurePhyDependentParameters(uint8_t linkId);
1041
1042 /**
1043 * Enable or disable QoS support for the device. Construct a Txop object or QosTxop objects
1044 * accordingly. This method is private so that it is only used while constructing this object.
1045 *
1046 * @param enable whether QoS is supported
1047 */
1048 void SetQosSupported(bool enable);
1049
1050 /**
1051 * Set the Txop object.
1052 * This method is private so that it is only used while constructing this object.
1053 *
1054 * @param dcf the Txop object
1055 */
1056 void SetTxop(Ptr<Txop> dcf);
1057
1058 /**
1059 * Set the AC_VO channel access function
1060 * This method is private so that it is only used while constructing this object.
1061 *
1062 * @param edca the QosTxop object for AC_VO
1063 */
1064 void SetVoQueue(Ptr<QosTxop> edca);
1065
1066 /**
1067 * Set the AC_VI channel access function
1068 * This method is private so that it is only used while constructing this object.
1069 *
1070 * @param edca the QosTxop object for AC_VI
1071 */
1072 void SetViQueue(Ptr<QosTxop> edca);
1073
1074 /**
1075 * Set the AC_BE channel access function
1076 * This method is private so that it is only used while constructing this object.
1077 *
1078 * @param edca the QosTxop object for AC_BE
1079 */
1080 void SetBeQueue(Ptr<QosTxop> edca);
1081
1082 /**
1083 * Set the AC_BK channel access function
1084 * This method is private so that it is only used while constructing this object.
1085 *
1086 * @param edca the QosTxop object for AC_BK
1087 */
1088 void SetBkQueue(Ptr<QosTxop> edca);
1089
1090 /**
1091 * This method is a private utility invoked to configure the channel
1092 * access function for devices that do not support QoS.
1093 */
1094 void SetupDcfQueue();
1095
1096 /**
1097 * This method is a private utility invoked to configure the channel
1098 * access function for the specified Access Category.
1099 *
1100 * @param ac the Access Category of the queue to initialise.
1101 */
1102 void SetupEdcaQueue(AcIndex ac);
1103
1104 /**
1105 * If no link has been already created, create the given number links; otherwise, do nothing.
1106 *
1107 * @param nLinks the given number of links
1108 * @return whether the given number of links have been created
1109 */
1110 bool CreateLinksIfNeeded(std::size_t nLinks);
1111
1112 /**
1113 * Create a LinkEntity object.
1114 *
1115 * @return a unique pointer to the created LinkEntity object
1116 */
1117 virtual std::unique_ptr<LinkEntity> CreateLinkEntity() const;
1118
1119 /**
1120 * This method is intended to be called when a link changes ID in order to update the
1121 * link ID stored by the Frame Exchange Manager and the Channel Access Manager operating
1122 * on that link.
1123 *
1124 * @param id the (new) ID of the link that has changed ID
1125 */
1126 void UpdateLinkId(uint8_t id);
1127
1128 /**
1129 * This method is called if this device is an MLD to determine the MAC address of
1130 * the affiliated STA used to communicate with the single link device having the
1131 * given MAC address. This method is overridden because its implementation depends
1132 * on the type of station.
1133 *
1134 * @param remoteAddr the MAC address of the remote single link device
1135 * @return the MAC address of the affiliated STA used to communicate with the remote device
1136 */
1137 virtual Mac48Address DoGetLocalAddress(const Mac48Address& remoteAddr) const;
1138
1139 /**
1140 * Enable or disable ERP support for the given link.
1141 *
1142 * @param enable whether ERP is supported
1143 * @param linkId the ID of the given link
1144 */
1145 void SetErpSupported(bool enable, uint8_t linkId);
1146 /**
1147 * Enable or disable DSSS support for the given link.
1148 *
1149 * @param enable whether DSSS is supported
1150 * @param linkId the ID of the given link
1151 */
1152 void SetDsssSupported(bool enable, uint8_t linkId);
1153
1154 /**
1155 * Set the block ack threshold for AC_VO.
1156 *
1157 * @param threshold the block ack threshold for AC_VO.
1158 */
1159 void SetVoBlockAckThreshold(uint8_t threshold);
1160 /**
1161 * Set the block ack threshold for AC_VI.
1162 *
1163 * @param threshold the block ack threshold for AC_VI.
1164 */
1165 void SetViBlockAckThreshold(uint8_t threshold);
1166 /**
1167 * Set the block ack threshold for AC_BE.
1168 *
1169 * @param threshold the block ack threshold for AC_BE.
1170 */
1171 void SetBeBlockAckThreshold(uint8_t threshold);
1172 /**
1173 * Set the block ack threshold for AC_BK.
1174 *
1175 * @param threshold the block ack threshold for AC_BK.
1176 */
1177 void SetBkBlockAckThreshold(uint8_t threshold);
1178
1179 /**
1180 * Set VO block ack inactivity timeout.
1181 *
1182 * @param timeout the VO block ack inactivity timeout.
1183 */
1185 /**
1186 * Set VI block ack inactivity timeout.
1187 *
1188 * @param timeout the VI block ack inactivity timeout.
1189 */
1191 /**
1192 * Set BE block ack inactivity timeout.
1193 *
1194 * @param timeout the BE block ack inactivity timeout.
1195 */
1197 /**
1198 * Set BK block ack inactivity timeout.
1199 *
1200 * @param timeout the BK block ack inactivity timeout.
1201 */
1203
1204 /**
1205 * @param mpdu the MPDU to send.
1206 * @param to the address to which the packet should be sent.
1207 * @param from the address from which the packet should be sent.
1208 *
1209 * Subclasses need to implement this method to finalize the MAC header of the MPDU
1210 * (MAC addresses and ToDS/FromDS flags) and enqueue the MPDU in a TX queue.
1211 */
1212 virtual void Enqueue(Ptr<WifiMpdu> mpdu, Mac48Address to, Mac48Address from) = 0;
1213
1214 /**
1215 * Allow subclasses to take actions when a packet to enqueue has been dropped.
1216 *
1217 * @param packet the dropped packet
1218 * @param to the address to which the packet should have been sent
1219 */
1220 virtual void NotifyDropPacketToEnqueue(Ptr<Packet> packet, Mac48Address to);
1221
1222 /**
1223 * Notify the remote station manager if the given expired (hence dropped) MPDU is a management
1224 * or data frame (with a unicast receiver address) that has been already transmitted and is not
1225 * in flight (otherwise, it is handled when the ack is received or the TX timeout expires).
1226 *
1227 * @param mpdu the expired MPDU
1228 */
1230
1231 /**
1232 * This Boolean is set \c true iff this WifiMac is to model
1233 * 802.11e/WMM style Quality of Service. It is exposed through the
1234 * attribute system.
1235 *
1236 * At the moment, this flag is the sole selection between QoS and
1237 * non-QoS operation for the STA (whether IBSS, AP, or
1238 * non-AP). Ultimately, we will want a QoS-enabled STA to be able to
1239 * fall back to non-QoS operation with a non-QoS peer. This'll
1240 * require further intelligence - i.e., per-association QoS
1241 * state. Having a big switch seems like a good intermediate stage,
1242 * however.
1243 */
1245
1246 bool m_shortSlotTimeSupported; ///< flag whether short slot time is supported
1247 bool m_ctsToSelfSupported; ///< flag indicating whether CTS-To-Self is supported
1248
1249 TypeOfStation m_typeOfStation; //!< the type of station
1250
1251 Ptr<WifiNetDevice> m_device; //!< Pointer to the device
1252 std::map<uint8_t, std::unique_ptr<LinkEntity>> m_links; //!< ID-indexed map of Link objects
1253 std::set<uint8_t> m_linkIds; //!< IDs of the links in use
1254
1255 Mac48Address m_address; //!< MAC address of this station
1256 Ssid m_ssid; //!< Service Set ID (SSID)
1257
1258 /** This type defines a mapping between an Access Category index,
1259 and a pointer to the corresponding channel access function.
1260 Access Categories are sorted in decreasing order of priority. */
1261 typedef std::map<AcIndex, Ptr<QosTxop>, std::greater<>> EdcaQueues;
1262
1263 /** This is a map from Access Category index to the corresponding
1264 channel access function */
1266
1267 uint16_t m_voMaxAmsduSize; ///< maximum A-MSDU size for AC_VO (in bytes)
1268 uint16_t m_viMaxAmsduSize; ///< maximum A-MSDU size for AC_VI (in bytes)
1269 uint16_t m_beMaxAmsduSize; ///< maximum A-MSDU size for AC_BE (in bytes)
1270 uint16_t m_bkMaxAmsduSize; ///< maximum A-MSDU size for AC_BK (in bytes)
1271
1272 uint32_t m_voMaxAmpduSize; ///< maximum A-MPDU size for AC_VO (in bytes)
1273 uint32_t m_viMaxAmpduSize; ///< maximum A-MPDU size for AC_VI (in bytes)
1274 uint32_t m_beMaxAmpduSize; ///< maximum A-MPDU size for AC_BE (in bytes)
1275 uint32_t m_bkMaxAmpduSize; ///< maximum A-MPDU size for AC_BK (in bytes)
1276
1277 uint16_t m_mpduBufferSize; //!< BlockAck buffer size (in number of MPDUs)
1278 uint32_t m_frameRetryLimit; //!< the frame retry limit
1279
1280 bool m_robustAVStreamingSupported; ///< flag whether robust AV streaming is supported
1281
1282 /// @brief DL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
1283 std::unordered_map<Mac48Address, WifiTidLinkMapping, WifiAddressHash> m_dlTidLinkMappings;
1284 /// @brief UL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
1285 std::unordered_map<Mac48Address, WifiTidLinkMapping, WifiAddressHash> m_ulTidLinkMappings;
1286
1287 ForwardUpCallback m_forwardUp; //!< Callback to forward packet up the stack
1288
1289 /**
1290 * The trace source fired when packets come into the "top" of the device
1291 * at the L3/L2 transition, before being queued for transmission.
1292 *
1293 * @see class CallBackTraceSource
1294 */
1296 /**
1297 * The trace source fired when packets coming into the "top" of the device
1298 * are dropped at the MAC layer before being queued for transmission.
1299 *
1300 * @see class CallBackTraceSource
1301 */
1303 /**
1304 * The trace source fired for packets successfully received by the device
1305 * immediately before being forwarded up to higher layers (at the L2/L3
1306 * transition). This is a promiscuous trace.
1307 *
1308 * @see class CallBackTraceSource
1309 */
1311 /**
1312 * The trace source fired for packets successfully received by the device
1313 * immediately before being forwarded up to higher layers (at the L2/L3
1314 * transition). This is a non- promiscuous trace.
1315 *
1316 * @see class CallBackTraceSource
1317 */
1319 /**
1320 * The trace source fired when packets coming into the "top" of the device
1321 * are dropped at the MAC layer during reception.
1322 *
1323 * @see class CallBackTraceSource
1324 */
1326
1327 /**
1328 * TracedCallback signature for MPDU drop events.
1329 *
1330 * @param reason the reason why the MPDU was dropped (\see WifiMacDropReason)
1331 * @param mpdu the dropped MPDU
1332 */
1334
1335 /// TracedCallback for MPDU drop events typedef
1337
1338 /**
1339 * This trace indicates that an MPDU was dropped for the given reason.
1340 */
1342
1343 /// TracedCallback for acked/nacked MPDUs typedef
1345
1346 MpduTracedCallback m_ackedMpduCallback; ///< ack'ed MPDU callback
1347 MpduTracedCallback m_nackedMpduCallback; ///< nack'ed MPDU callback
1348
1349 /**
1350 * TracedCallback signature for MPDU response timeout events.
1351 *
1352 * @param reason the reason why the timer was started
1353 * @param mpdu the MPDU whose response was not received before the timeout
1354 * @param txVector the TXVECTOR used to transmit the MPDU
1355 */
1356 typedef void (*MpduResponseTimeoutCallback)(uint8_t reason,
1358 const WifiTxVector& txVector);
1359
1360 /// TracedCallback for MPDU response timeout events typedef
1363
1364 /**
1365 * MPDU response timeout traced callback.
1366 * This trace source is fed by a WifiTxTimer object.
1367 */
1369
1370 /**
1371 * TracedCallback signature for PSDU response timeout events.
1372 *
1373 * @param reason the reason why the timer was started
1374 * @param psdu the PSDU whose response was not received before the timeout
1375 * @param txVector the TXVECTOR used to transmit the PSDU
1376 */
1377 typedef void (*PsduResponseTimeoutCallback)(uint8_t reason,
1379 const WifiTxVector& txVector);
1380
1381 /// TracedCallback for PSDU response timeout events typedef
1384
1385 /**
1386 * PSDU response timeout traced callback.
1387 * This trace source is fed by a WifiTxTimer object.
1388 */
1390
1391 /**
1392 * TracedCallback signature for PSDU map response timeout events.
1393 *
1394 * @param reason the reason why the timer was started
1395 * @param psduMap the PSDU map for which not all responses were received before the timeout
1396 * @param missingStations the MAC addresses of the stations that did not respond
1397 * @param nTotalStations the total number of stations that had to respond
1398 */
1399 typedef void (*PsduMapResponseTimeoutCallback)(uint8_t reason,
1400 WifiPsduMap* psduMap,
1401 const std::set<Mac48Address>* missingStations,
1402 std::size_t nTotalStations);
1403
1404 /// TracedCallback for PSDU map response timeout events typedef
1407
1408 /**
1409 * PSDU map response timeout traced callback.
1410 * This trace source is fed by a WifiTxTimer object.
1411 */
1413
1414 IcfDropTracedCallback m_icfDropCallback; //!< traced callback for ICF drop events
1415};
1416
1417} // namespace ns3
1418
1419#endif /* WIFI_MAC_H */
Callback template class.
Definition callback.h:422
The IEEE 802.11be EHT Capabilities.
The Extended Capabilities Information Element.
The HE 6 GHz Band Capabilities (IEEE 802.11ax-2021 9.4.2.263)
The IEEE 802.11ax HE Capabilities.
The HT Capabilities Information Element.
an EUI-48 address
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
The IEEE 802.11 SSID Information Element.
Definition ssid.h:25
a unique identifier for an interface.
Definition type-id.h:49
Wraps a UniformRandomVariable into a class that meets the requirements of a UniformRandomBitGenerator...
The IEEE 802.11ac VHT Capabilities.
base class for all MAC-level wifi objects.
Definition wifi-mac.h:90
virtual void DoCompleteConfig()=0
Allow subclasses to complete the configuration of the MAC layer components.
RecipientAgreementOptConstRef GetBaAgreementEstablishedAsRecipient(Mac48Address originator, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const
Definition wifi-mac.cc:1922
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
Definition wifi-mac.cc:2554
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:1014
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
Definition wifi-mac.cc:652
virtual void NotifyChannelSwitching(uint8_t linkId)
Notify that channel on the given link has been switched.
Definition wifi-mac.cc:701
std::optional< Mac48Address > GetMldAddress(const Mac48Address &remoteAddr) const
Definition wifi-mac.cc:1858
virtual void SetMacQueueScheduler(Ptr< WifiMacQueueScheduler > scheduler)
Set the wifi MAC queue scheduler.
Definition wifi-mac.cc:688
Mac48Address GetBssid(uint8_t linkId) const
Definition wifi-mac.cc:547
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
Definition wifi-mac.h:1377
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition wifi-mac.h:1268
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Definition wifi-mac.h:1246
virtual void Enqueue(Ptr< WifiMpdu > mpdu, Mac48Address to, Mac48Address from)=0
void ConfigurePhyDependentParameters(uint8_t linkId)
Configure PHY dependent parameters such as CWmin and CWmax on the given link.
Definition wifi-mac.cc:938
Ptr< HeConfiguration > GetHeConfiguration() const
Definition wifi-mac.cc:1980
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Definition wifi-mac.h:1341
TracedCallback< WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
Definition wifi-mac.h:1336
TypeOfStation GetTypeOfStation() const
Return the type of station.
Definition wifi-mac.cc:491
uint32_t GetFrameRetryLimit() const
Definition wifi-mac.cc:2108
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:1244
void SetBkQueue(Ptr< QosTxop > edca)
Set the AC_BK channel access function This method is private so that it is only used while constructi...
Definition wifi-mac.cc:608
const std::map< uint8_t, std::unique_ptr< LinkEntity > > & GetLinks() const
Definition wifi-mac.cc:1091
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
Definition wifi-mac.cc:572
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
Definition wifi-mac.cc:2260
Callback< void > m_linkDown
Callback when a link is down.
Definition wifi-mac.h:1007
bool GetQosSupported() const
Return whether the device supports QoS.
Definition wifi-mac.cc:1409
virtual void SetAddress(Mac48Address address)
Definition wifi-mac.cc:514
void SetFrameExchangeManagers(const std::vector< Ptr< FrameExchangeManager > > &feManagers)
Definition wifi-mac.cc:972
bool CreateLinksIfNeeded(std::size_t nLinks)
If no link has been already created, create the given number links; otherwise, do nothing.
Definition wifi-mac.cc:956
Ptr< Txop > m_txop
TXOP used for transmission of frames to non-QoS peers.
Definition wifi-mac.h:1003
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Definition wifi-mac.cc:1401
Mac48Address m_address
MAC address of this station.
Definition wifi-mac.h:1255
std::set< uint8_t > m_linkIds
IDs of the links in use.
Definition wifi-mac.h:1253
Ptr< WifiMacQueueScheduler > GetMacQueueScheduler() const
Get the wifi MAC queue scheduler.
Definition wifi-mac.cc:695
uint16_t GetMpduBufferSize() const
Definition wifi-mac.cc:2095
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Definition wifi-mac.cc:1106
BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition wifi-mac.cc:1950
void SwapLinks(std::map< uint8_t, uint8_t > links)
Swap the links based on the information included in the given map.
Definition wifi-mac.cc:1172
void Enqueue(Ptr< Packet > packet, Mac48Address to)
Definition wifi-mac.cc:1733
void UnblockUnicastTxOnLinks(WifiQueueBlockedReason reason, 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:1620
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition wifi-mac.h:1267
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition wifi-mac.h:1001
Ptr< WifiMacQueueScheduler > m_scheduler
wifi MAC queue scheduler
Definition wifi-mac.h:1004
void DoInitialize() override
Initialize() implementation.
Definition wifi-mac.cc:418
TypeOfStation m_typeOfStation
the type of station
Definition wifi-mac.h:1249
uint16_t m_mpduBufferSize
BlockAck buffer size (in number of MPDUs)
Definition wifi-mac.h:1277
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition wifi-mac.h:1274
void SetChannelAccessManagers(const std::vector< Ptr< ChannelAccessManager > > &caManagers)
Definition wifi-mac.cc:1020
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.
Definition wifi-mac.cc:1319
std::variant< MgtBeaconHeader, MgtProbeResponseHeader, MgtAssocResponseHeader > MgtFrameType
type of the management frames
Definition wifi-mac.h:106
Ssid GetSsid() const
Definition wifi-mac.cc:534
void SetWifiRemoteStationManagers(const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
Definition wifi-mac.cc:1055
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition wifi-mac.cc:2134
bool GetErpSupported(uint8_t linkId) const
Return whether the device supports ERP on the given link.
Definition wifi-mac.cc:1415
void ResetWifiPhys()
Remove currently attached WifiPhy objects from this MAC.
Definition wifi-mac.cc:1383
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:1295
void SetErpSupported(bool enable, uint8_t linkId)
Enable or disable ERP support for the given link.
Definition wifi-mac.cc:1421
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 Catego...
Definition wifi-mac.cc:1683
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Definition wifi-mac.h:1272
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
Definition wifi-mac.h:1356
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, std::list< bool > isDsss, AcIndex ac)
Definition wifi-mac.cc:798
WifiMac(const WifiMac &)=delete
Ptr< WifiNetDevice > m_device
Pointer to the device.
Definition wifi-mac.h:1251
bool GetRobustAVStreamingSupported() const
Return whether the device supports Robust AV Streaming.
Definition wifi-mac.cc:2586
void SetSsid(Ssid ssid)
Definition wifi-mac.cc:527
virtual void NotifyDropPacketToEnqueue(Ptr< Packet > packet, Mac48Address to)
Allow subclasses to take actions when a packet to enqueue has been dropped.
Definition wifi-mac.cc:1803
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 ...
Definition wifi-mac.cc:1118
IcfDropTracedCallback m_icfDropCallback
traced callback for ICF drop events
Definition wifi-mac.h:1414
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
Definition wifi-mac.cc:640
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Definition wifi-mac.cc:484
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Definition wifi-mac.h:1346
void NotifyRsmOfExpiredMpdu(Ptr< const WifiMpdu > mpdu)
Notify the remote station manager if the given expired (hence dropped) MPDU is a management or data f...
Definition wifi-mac.cc:1702
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
Definition wifi-mac.cc:1377
void SetMpduBufferSize(uint16_t size)
Definition wifi-mac.cc:2086
void RecordCapabilities(const MgtFrameType &frame, const Mac48Address &addr, uint8_t linkId)
Update capabilities information from the given management frame.
Definition wifi-mac.cc:2594
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition wifi-mac.h:1347
bool GetEhtSupported() const
Return whether the device supports EHT.
Definition wifi-mac.cc:2013
void SetTxop(Ptr< Txop > dcf)
Set the Txop object.
Definition wifi-mac.cc:562
bool GetHeSupported() const
Return whether the device supports HE.
Definition wifi-mac.cc:2007
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
Definition wifi-mac.cc:2202
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition wifi-mac.cc:2144
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition wifi-mac.cc:2114
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:1138
void(* IcfDropCallback)(const IcfDropInfo &info)
TracedCallback signature for ICF drop events.
Definition wifi-mac.h:831
std::optional< std::reference_wrapper< const RecipientBlockAckAgreement > > RecipientAgreementOptConstRef
optional const reference to RecipientBlockAckAgreement
Definition wifi-mac.h:688
void NotifyPromiscRx(Ptr< const Packet > packet)
Definition wifi-mac.cc:732
std::unordered_map< Mac48Address, WifiTidLinkMapping, WifiAddressHash > m_dlTidLinkMappings
DL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
Definition wifi-mac.h:1283
void SetVoQueue(Ptr< QosTxop > edca)
Set the AC_VO channel access function This method is private so that it is only used while constructi...
Definition wifi-mac.cc:578
virtual bool HasFramesToTransmit(uint8_t linkId)
Check if the MAC has frames to transmit over the given link.
Definition wifi-mac.cc:671
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
Definition wifi-mac.cc:1048
UniformRandomBitGenerator m_shuffleLinkIdsGen
random number generator to shuffle link IDs
Definition wifi-mac.h:999
void ApplyTidLinkMapping(const Mac48Address &mldAddr, WifiDirection dir)
Apply the TID-to-Link Mapping negotiated with the given MLD for the given direction by properly confi...
Definition wifi-mac.cc:1492
void CompleteConfig()
Complete the configuration of the MAC layer components.
Definition wifi-mac.cc:887
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition wifi-mac.cc:2174
Ptr< EhtConfiguration > GetEhtConfiguration() const
Definition wifi-mac.cc:1986
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:1318
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Definition wifi-mac.cc:1999
void SetDsssSupported(bool enable, uint8_t linkId)
Enable or disable DSSS support for the given link.
Definition wifi-mac.cc:1432
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:1302
void BlockUnicastTxOnLinks(WifiQueueBlockedReason reason, 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:1574
TracedCallback< Ptr< const WifiMpdu > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
Definition wifi-mac.h:1344
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition wifi-mac.h:1002
void NotifyTx(Ptr< const Packet > packet)
Definition wifi-mac.cc:714
virtual int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition wifi-mac.cc:389
static TypeId GetTypeId()
Get the type ID.
Definition wifi-mac.cc:63
Ptr< HtConfiguration > GetHtConfiguration() const
Definition wifi-mac.cc:1968
void SetFrameRetryLimit(uint32_t limit)
Set the frame retry limit.
Definition wifi-mac.cc:2101
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.
Definition wifi-mac.cc:1303
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Definition wifi-mac.cc:2529
BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition wifi-mac.cc:1959
Ssid m_ssid
Service Set ID (SSID)
Definition wifi-mac.h:1256
std::map< uint8_t, std::unique_ptr< LinkEntity > > m_links
ID-indexed map of Link objects.
Definition wifi-mac.h:1252
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:1846
Ptr< QosTxop > GetVIQueue() const
Accessor for the AC_VI channel access function.
Definition wifi-mac.cc:646
void SetBssid(Mac48Address bssid, uint8_t linkId)
Definition wifi-mac.cc:540
Ptr< WifiNetDevice > GetDevice() const
Return the device this PHY is associated with.
Definition wifi-mac.cc:508
void NotifyRx(Ptr< const Packet > packet)
Definition wifi-mac.cc:726
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:1325
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 negotiate...
Definition wifi-mac.cc:1269
BlockAckType GetBaTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition wifi-mac.cc:1932
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
Definition wifi-mac.h:1368
void SetForwardUpCallback(ForwardUpCallback upCallback)
Definition wifi-mac.cc:1471
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Definition wifi-mac.h:1412
OriginatorAgreementOptConstRef GetBaAgreementEstablishedAsOriginator(Mac48Address recipient, uint8_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt) const
Definition wifi-mac.cc:1905
ExtendedCapabilities GetExtendedCapabilities() const
Return the extended capabilities of the device.
Definition wifi-mac.cc:2194
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:1310
std::map< AcIndex, Ptr< QosTxop >, std::greater<> > EdcaQueues
This type defines a mapping between an Access Category index, and a pointer to the corresponding chan...
Definition wifi-mac.h:1261
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
Definition wifi-mac.h:1270
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition wifi-mac.cc:2184
std::unordered_map< Mac48Address, WifiTidLinkMapping, WifiAddressHash > m_ulTidLinkMappings
UL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
Definition wifi-mac.h:1285
virtual bool SupportsSendFrom() const
Definition wifi-mac.cc:1465
He6GhzBandCapabilities GetHe6GhzBandCapabilities(uint8_t linkId) const
Return the HE 6GHz band capabilities of the device for the given 6 GHz link.
Definition wifi-mac.cc:2401
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,...
Definition wifi-mac.cc:2071
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:664
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.
Definition wifi-mac.cc:1151
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition wifi-mac.cc:2124
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition wifi-mac.cc:2164
bool GetShortSlotTimeSupported() const
Definition wifi-mac.cc:1459
BlockAckReqType GetBarTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition wifi-mac.cc:1941
void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
Definition wifi-mac.cc:401
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:755
void SetLinkDownCallback(Callback< void > linkDown)
Definition wifi-mac.cc:1485
bool m_robustAVStreamingSupported
flag whether robust AV streaming is supported
Definition wifi-mac.h:1280
Ptr< QosTxop > GetBKQueue() const
Accessor for the AC_BK channel access function.
Definition wifi-mac.cc:658
~WifiMac() override
Definition wifi-mac.cc:57
void SetPromisc()
Sets the interface in promiscuous mode.
Definition wifi-mac.cc:553
Ptr< VhtConfiguration > GetVhtConfiguration() const
Definition wifi-mac.cc:1974
void NotifyRxDrop(Ptr< const Packet > packet)
Definition wifi-mac.cc:738
virtual void SetLinkUpCallback(Callback< void > linkUp)
Definition wifi-mac.cc:1478
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
Definition wifi-mac.cc:1079
const std::set< uint8_t > & GetLinkIds() const
Definition wifi-mac.cc:1112
void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
Definition wifi-mac.cc:497
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition wifi-mac.cc:1445
Mac48Address GetLocalAddress(const Mac48Address &remoteAddr) const
Get the local MAC address used to communicate with a remote STA.
Definition wifi-mac.cc:1871
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
Definition wifi-mac.h:1265
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
Definition wifi-mac.h:1275
bool GetHtSupported(uint8_t linkId) const
Return whether the device supports HT on the given link.
Definition wifi-mac.cc:1992
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition wifi-mac.cc:1809
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition wifi-mac.cc:775
bool Is6GhzBand(uint8_t linkId) const
Indicate if a given link is on the 6 GHz band.
Definition wifi-mac.cc:1261
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
Definition wifi-mac.h:1383
TracedCallback< uint8_t, Ptr< const WifiMpdu >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
Definition wifi-mac.h:1362
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:1816
std::optional< std::reference_wrapper< const OriginatorBlockAckAgreement > > OriginatorAgreementOptConstRef
optional const reference to OriginatorBlockAckAgreement
Definition wifi-mac.h:685
Mac48Address GetAddress() const
Definition wifi-mac.cc:521
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
TracedCallback signature for MPDU drop events.
Definition wifi-mac.h:1333
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
Definition wifi-mac.h:1287
EhtCapabilities GetEhtCapabilities(uint8_t linkId) const
Return the EHT capabilities of the device for the given link.
Definition wifi-mac.cc:2436
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
Definition wifi-mac.h:1406
Callback< void > m_linkUp
Callback when a link is up.
Definition wifi-mac.h:1006
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition wifi-mac.cc:1097
void SetupDcfQueue()
This method is a private utility invoked to configure the channel access function for devices that do...
Definition wifi-mac.cc:744
void SetBeQueue(Ptr< QosTxop > edca)
Set the AC_BE channel access function This method is private so that it is only used while constructi...
Definition wifi-mac.cc:598
HeCapabilities GetHeCapabilities(uint8_t linkId) const
Return the HE capabilities of the device for the given link.
Definition wifi-mac.cc:2337
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:1355
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:468
PsduResponseTimeoutTracedCallback m_psduResponseTimeoutCallback
PSDU response timeout traced callback.
Definition wifi-mac.h:1389
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition wifi-mac.cc:618
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:1399
void NotifyTxDrop(Ptr< const Packet > packet)
Definition wifi-mac.cc:720
void DoDispose() override
Destructor implementation.
Definition wifi-mac.cc:442
void SetRobustAVStreamingSupported(bool enable)
Enable or disable Robust AV Streaming support for the device.
Definition wifi-mac.cc:2579
uint32_t m_frameRetryLimit
the frame retry limit
Definition wifi-mac.h:1278
bool GetDsssSupported(uint8_t linkId) const
Return whether the device supports DSSS on the given link.
Definition wifi-mac.cc:1439
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:1042
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition wifi-mac.cc:2154
virtual std::unique_ptr< LinkEntity > CreateLinkEntity() const
Create a LinkEntity object.
Definition wifi-mac.cc:1085
void SetViQueue(Ptr< QosTxop > edca)
Set the AC_VI channel access function This method is private so that it is only used while constructi...
Definition wifi-mac.cc:588
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
Definition wifi-mac.cc:1452
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition wifi-mac.h:1247
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
Definition wifi-mac.h:1269
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:1899
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
Definition wifi-mac.h:1273
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiIcfDrop
Reasons for an EMLSR client to drop an ICF.
TypeOfStation
Enumeration for type of WiFi station.
Definition wifi-mac.h:58
WifiMacDropReason
The reason why an MPDU was dropped.
Definition wifi-mac.h:71
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:62
@ ADHOC_STA
Definition wifi-mac.h:61
@ MESH
Definition wifi-mac.h:62
@ STA
Definition wifi-mac.h:59
@ AP
Definition wifi-mac.h:60
@ OCB
Definition wifi-mac.h:63
@ WIFI_MAC_DROP_QOS_OLD_PACKET
Definition wifi-mac.h:75
@ WIFI_MAC_DROP_FAILED_ENQUEUE
Definition wifi-mac.h:72
@ WIFI_MAC_DROP_EXPIRED_LIFETIME
Definition wifi-mac.h:73
@ WIFI_MAC_DROP_REACHED_RETRY_LIMIT
Definition wifi-mac.h:74
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std:: tuple< WifiContainerQueueType, WifiReceiverAddressType, Mac48Address, std::optional< uint8_t > > WifiContainerQueueId
Tuple (queue type, receiver address type, Address, TID) identifying a container queue.
std::unordered_map< uint16_t, Ptr< WifiPsdu > > WifiPsduMap
Map of PSDUs indexed by STA-ID.
Definition wifi-mac.h:78
std::map< uint8_t, std::set< uint8_t > > WifiTidLinkMapping
TID-indexed map of the link set to which the TID is mapped.
Definition wifi-utils.h:68
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:280
WifiDirection
Wifi direction.
Definition wifi-utils.h:37
ns3::Time timeout
The different BlockAckRequest variants.
The different BlockAck variants.
Information reported by ICF drop trace.
Definition wifi-mac.h:820
Mac48Address sender
the sender of the ICF
Definition wifi-mac.h:823
uint8_t linkId
the ID of the link on which the ICF was dropped
Definition wifi-mac.h:822
WifiIcfDrop reason
the reason why the ICF was dropped by the EMLSR client
Definition wifi-mac.h:821
std::string dir