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