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 */
140 void SetFrameExchangeManagers(const std::vector<Ptr<FrameExchangeManager>>& feManagers);
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 */
153 void SetChannelAccessManagers(const std::vector<Ptr<ChannelAccessManager>>& caManagers);
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 */
220 Mac48Address GetLocalAddress(const Mac48Address& remoteAddr) const;
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,
368 const WifiContainerQueueId& queueId,
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 */
448 const std::vector<Ptr<WifiRemoteStationManager>>& stationManagers);
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 */
474 virtual void SetLinkUpCallback(Callback<void> linkUp);
475 /**
476 * @param linkDown the callback to invoke when the link becomes down.
477 */
478 void SetLinkDownCallback(Callback<void> linkDown);
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 * Return the maximum A-MPDU size of the given Access Category.
654 *
655 * @param ac Access Category index
656 * @return the maximum A-MPDU size
657 */
659 /**
660 * Return the maximum A-MSDU size of the given Access Category.
661 *
662 * @param ac Access Category index
663 * @return the maximum A-MSDU size
664 */
665 uint16_t GetMaxAmsduSize(AcIndex ac) const;
666
667 /// optional const reference to OriginatorBlockAckAgreement
669 std::optional<std::reference_wrapper<const OriginatorBlockAckAgreement>>;
670 /// optional const reference to RecipientBlockAckAgreement
672 std::optional<std::reference_wrapper<const RecipientBlockAckAgreement>>;
673
674 /**
675 * @param recipient (link or device) MAC address of the recipient
676 * @param tid traffic ID.
677 *
678 * @return the originator block ack agreement, if one has been established
679 *
680 * Checks if an originator block ack agreement is established with station addressed by
681 * <i>recipient</i> for TID <i>tid</i>.
682 */
684 uint8_t tid) const;
685 /**
686 * @param originator (link or device) MAC address of the originator
687 * @param tid traffic ID.
688 *
689 * @return the recipient block ack agreement, if one has been established
690 *
691 * Checks if a recipient block ack agreement is established with station addressed by
692 * <i>originator</i> for TID <i>tid</i>.
693 */
695 uint8_t tid) const;
696
697 /**
698 * @param recipient MAC address
699 * @param tid traffic ID
700 *
701 * @return the type of Block Acks sent by the recipient
702 *
703 * This function returns the type of Block Acks sent by the recipient.
704 */
705 BlockAckType GetBaTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
706 /**
707 * @param recipient MAC address of recipient
708 * @param tid traffic ID
709 *
710 * @return the type of Block Ack Requests sent to the recipient
711 *
712 * This function returns the type of Block Ack Requests sent to the recipient.
713 */
714 BlockAckReqType GetBarTypeAsOriginator(const Mac48Address& recipient, uint8_t tid) const;
715 /**
716 * @param originator MAC address of originator
717 * @param tid traffic ID
718 *
719 * @return the type of Block Acks sent to the originator
720 *
721 * This function returns the type of Block Acks sent to the originator.
722 */
723 BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
724 /**
725 * @param originator MAC address of originator
726 * @param tid traffic ID
727 *
728 * @return the type of Block Ack Requests sent by the originator
729 *
730 * This function returns the type of Block Ack Requests sent by the originator.
731 */
732 BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const;
733
734 /**
735 * Get the maximum Block Ack buffer size (in number of MPDUs) supported by the given device,
736 * if any, or by this device, otherwise, based on the supported standard.
737 *
738 * @param address the (MLD or link) address of the given device
739 * @return the maximum supported Block Ack buffer size (in number of MPDUs)
740 */
741 uint16_t GetMaxBaBufferSize(std::optional<Mac48Address> address = std::nullopt) const;
742
743 /**
744 * @param size the size (in number of MPDUs) of the buffer used for each BlockAck
745 * agreement in which this node is a recipient
746 */
747 void SetMpduBufferSize(uint16_t size);
748
749 /**
750 * @return the size (in number of MPDUs) of the buffer used for each BlockAck
751 * agreement in which this node is a recipient
752 */
753 uint16_t GetMpduBufferSize() const;
754
755 /**
756 * Set the frame retry limit.
757 *
758 * @param limit the frame retry limit
759 */
760 void SetFrameRetryLimit(uint32_t limit);
761
762 /**
763 * @return the frame retry limit
764 */
766
767 /**
768 * Get the TID-to-Link Mapping negotiated with the given MLD (if any) for the given direction.
769 * An empty mapping indicates the default mapping.
770 *
771 * @param mldAddr the MLD address of the given MLD
772 * @param dir the given direction (DL or UL)
773 * @return the negotiated TID-to-Link Mapping
774 */
775 std::optional<std::reference_wrapper<const WifiTidLinkMapping>> GetTidToLinkMapping(
776 Mac48Address mldAddr,
777 WifiDirection dir) const;
778
779 /**
780 * Check whether the given TID is mapped on the given link in the given direction for the
781 * given MLD.
782 *
783 * @param mldAddr the MLD address of the given MLD
784 * @param dir the given direction (DL or UL)
785 * @param tid the given TID
786 * @param linkId the ID of the given link
787 * @return whether the given TID is mapped on the given link in the given direction for the
788 * given MLD
789 */
790 bool TidMappedOnLink(Mac48Address mldAddr,
792 uint8_t tid,
793 uint8_t linkId) const;
794
795 protected:
796 void DoInitialize() override;
797 void DoDispose() override;
798 void NotifyConstructionCompleted() override;
799
800 /**
801 * @param cwMin the minimum contention window size
802 * @param cwMax the maximum contention window size
803 *
804 * This method is called to set the minimum and the maximum
805 * contention window size.
806 */
807 virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax);
808
809 /**
810 * Enable or disable short slot time feature.
811 *
812 * @param enable true if short slot time is to be supported,
813 * false otherwise
814 */
815 void SetShortSlotTimeSupported(bool enable);
816 /**
817 * @return whether the device supports short slot time capability.
818 */
819 bool GetShortSlotTimeSupported() const;
820
821 /**
822 * Accessor for the AC_VO channel access function
823 *
824 * @return a smart pointer to QosTxop
825 */
826 Ptr<QosTxop> GetVOQueue() const;
827 /**
828 * Accessor for the AC_VI channel access function
829 *
830 * @return a smart pointer to QosTxop
831 */
832 Ptr<QosTxop> GetVIQueue() const;
833 /**
834 * Accessor for the AC_BE channel access function
835 *
836 * @return a smart pointer to QosTxop
837 */
838 Ptr<QosTxop> GetBEQueue() const;
839 /**
840 * Accessor for the AC_BK channel access function
841 *
842 * @return a smart pointer to QosTxop
843 */
844 Ptr<QosTxop> GetBKQueue() const;
845
846 /**
847 * This method acts as the MacRxMiddle receive callback and is
848 * invoked to notify us that a frame has been received on the given link.
849 * The implementation is intended to capture logic that is going to be
850 * common to all (or most) derived classes. Specifically, handling
851 * of Block Ack management frames is dealt with here.
852 *
853 * This method will need, however, to be overridden by derived
854 * classes so that they can perform their data handling before
855 * invoking the base version.
856 *
857 * The given link may be undefined in some cases (e.g., in case of
858 * QoS Data frames received in the context of a Block Ack agreement --
859 * because the BlockAckManager does not have to record the link each
860 * buffered MPDU has been received on); in such a cases, the value
861 * of <i>linkId</i> should be WIFI_LINKID_UNDEFINED.
862 *
863 * @param mpdu the MPDU that has been received.
864 * @param linkId the ID of the given link
865 */
866 virtual void Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId);
867 /**
868 * Forward the packet up to the device.
869 *
870 * @param packet the packet that we are forwarding up to the device
871 * @param from the address of the source
872 * @param to the address of the destination
873 */
875
876 /**
877 * This method can be called to de-aggregate an A-MSDU and forward
878 * the constituent packets up the stack.
879 *
880 * @param mpdu the MPDU containing the A-MSDU.
881 */
883
884 /**
885 * Apply the TID-to-Link Mapping negotiated with the given MLD for the given direction
886 * by properly configuring the queue scheduler.
887 *
888 * @param mldAddr the MLD MAC address of the given MLD
889 * @param dir the given direction (DL or UL)
890 */
892
893 /**
894 * Swap the links based on the information included in the given map. This method
895 * is normally called by a non-AP MLD upon completing ML setup to have its link IDs
896 * match AP MLD's link IDs.
897 *
898 * @param links a set of pairs (from, to) each mapping a current link ID to the
899 * link ID it has to become (i.e., link 'from' becomes link 'to')
900 */
901 void SwapLinks(std::map<uint8_t, uint8_t> links);
902
903 /**
904 * Structure holding information specific to a single link. Here, the meaning of
905 * "link" is that of the 11be amendment which introduced multi-link devices. For
906 * previous amendments, only one link can be created. Therefore, "link" has not
907 * to be confused with the general concept of link for a NetDevice (used by the
908 * m_linkUp and m_linkDown callbacks).
909 */
911 {
912 /// Destructor (a virtual method is needed to make this struct polymorphic)
913 virtual ~LinkEntity();
914
915 Ptr<WifiPhy> phy; //!< Wifi PHY object
916 Ptr<ChannelAccessManager> channelAccessManager; //!< channel access manager object
917 Ptr<FrameExchangeManager> feManager; //!< Frame Exchange Manager object
918 Ptr<WifiRemoteStationManager> stationManager; //!< Remote station manager (rate control,
919 //!< RTS/CTS/fragmentation thresholds etc.)
920 bool erpSupported{false}; //!< set to \c true iff this WifiMac is to model 802.11g
921 bool dsssSupported{false}; //!< set to \c true iff this WifiMac is to model 802.11b
922 };
923
924 /**
925 * @return a const reference to the map of link entities
926 */
927 const std::map<uint8_t, std::unique_ptr<LinkEntity>>& GetLinks() const;
928
929 /**
930 * Get a reference to the link associated with the given ID.
931 *
932 * @param linkId the given link ID
933 * @return a reference to the link associated with the given ID
934 */
935 LinkEntity& GetLink(uint8_t linkId) const;
936
937 /**
938 * Update the TID-to-Link Mappings for the given MLD in the given direction based on the
939 * given negotiated mappings. An empty mapping indicates the default mapping.
940 *
941 * @param mldAddr the MLD address of the given MLD
942 * @param dir the given direction (DL or UL)
943 * @param mapping the negotiated TID-to-Link Mapping
944 */
945 void UpdateTidToLinkMapping(const Mac48Address& mldAddr,
947 const WifiTidLinkMapping& mapping);
948
949 Ptr<MacRxMiddle> m_rxMiddle; //!< RX middle (defragmentation etc.)
950 Ptr<MacTxMiddle> m_txMiddle; //!< TX middle (aggregation etc.)
951 Ptr<Txop> m_txop; //!< TXOP used for transmission of frames to non-QoS peers.
952 Ptr<WifiMacQueueScheduler> m_scheduler; //!< wifi MAC queue scheduler
953
954 Callback<void> m_linkUp; //!< Callback when a link is up
955 Callback<void> m_linkDown; //!< Callback when a link is down
956
957 private:
958 /**
959 * Complete the configuration of the MAC layer components.
960 */
961 void CompleteConfig();
962
963 /**
964 * Allow subclasses to complete the configuration of the MAC layer components.
965 */
966 virtual void DoCompleteConfig() = 0;
967
968 /**
969 * @param dcf the DCF to be configured
970 * @param cwmin the minimum contention window for the DCF
971 * @param cwmax the maximum contention window for the DCF
972 * @param isDsss vector of flags to indicate whether PHY is DSSS or HR/DSSS for every link
973 * @param ac the access category for the DCF
974 *
975 * Configure the DCF with appropriate values depending on the given access category.
976 */
977 void ConfigureDcf(Ptr<Txop> dcf,
978 uint32_t cwmin,
979 uint32_t cwmax,
980 std::list<bool> isDsss,
981 AcIndex ac);
982
983 /**
984 * Configure PHY dependent parameters such as CWmin and CWmax on the given link.
985 *
986 * @param linkId the ID of the given link
987 */
988 void ConfigurePhyDependentParameters(uint8_t linkId);
989
990 /**
991 * Enable or disable QoS support for the device. Construct a Txop object or QosTxop objects
992 * accordingly. This method is private so that it is only used while constructing this object.
993 *
994 * @param enable whether QoS is supported
995 */
996 void SetQosSupported(bool enable);
997
998 /**
999 * Set the Txop object.
1000 * This method is private so that it is only used while constructing this object.
1001 *
1002 * @param dcf the Txop object
1003 */
1004 void SetTxop(Ptr<Txop> dcf);
1005
1006 /**
1007 * Set the AC_VO channel access function
1008 * This method is private so that it is only used while constructing this object.
1009 *
1010 * @param edca the QosTxop object for AC_VO
1011 */
1012 void SetVoQueue(Ptr<QosTxop> edca);
1013
1014 /**
1015 * Set the AC_VI channel access function
1016 * This method is private so that it is only used while constructing this object.
1017 *
1018 * @param edca the QosTxop object for AC_VI
1019 */
1020 void SetViQueue(Ptr<QosTxop> edca);
1021
1022 /**
1023 * Set the AC_BE channel access function
1024 * This method is private so that it is only used while constructing this object.
1025 *
1026 * @param edca the QosTxop object for AC_BE
1027 */
1028 void SetBeQueue(Ptr<QosTxop> edca);
1029
1030 /**
1031 * Set the AC_BK channel access function
1032 * This method is private so that it is only used while constructing this object.
1033 *
1034 * @param edca the QosTxop object for AC_BK
1035 */
1036 void SetBkQueue(Ptr<QosTxop> edca);
1037
1038 /**
1039 * This method is a private utility invoked to configure the channel
1040 * access function for devices that do not support QoS.
1041 */
1042 void SetupDcfQueue();
1043
1044 /**
1045 * This method is a private utility invoked to configure the channel
1046 * access function for the specified Access Category.
1047 *
1048 * @param ac the Access Category of the queue to initialise.
1049 */
1050 void SetupEdcaQueue(AcIndex ac);
1051
1052 /**
1053 * If no link has been already created, create the given number links; otherwise, do nothing.
1054 *
1055 * @param nLinks the given number of links
1056 * @return whether the given number of links have been created
1057 */
1058 bool CreateLinksIfNeeded(std::size_t nLinks);
1059
1060 /**
1061 * Create a LinkEntity object.
1062 *
1063 * @return a unique pointer to the created LinkEntity object
1064 */
1065 virtual std::unique_ptr<LinkEntity> CreateLinkEntity() const;
1066
1067 /**
1068 * This method is intended to be called when a link changes ID in order to update the
1069 * link ID stored by the Frame Exchange Manager and the Channel Access Manager operating
1070 * on that link.
1071 *
1072 * @param id the (new) ID of the link that has changed ID
1073 */
1074 void UpdateLinkId(uint8_t id);
1075
1076 /**
1077 * This method is called if this device is an MLD to determine the MAC address of
1078 * the affiliated STA used to communicate with the single link device having the
1079 * given MAC address. This method is overridden because its implementation depends
1080 * on the type of station.
1081 *
1082 * @param remoteAddr the MAC address of the remote single link device
1083 * @return the MAC address of the affiliated STA used to communicate with the remote device
1084 */
1085 virtual Mac48Address DoGetLocalAddress(const Mac48Address& remoteAddr) const;
1086
1087 /**
1088 * Enable or disable ERP support for the given link.
1089 *
1090 * @param enable whether ERP is supported
1091 * @param linkId the ID of the given link
1092 */
1093 void SetErpSupported(bool enable, uint8_t linkId);
1094 /**
1095 * Enable or disable DSSS support for the given link.
1096 *
1097 * @param enable whether DSSS is supported
1098 * @param linkId the ID of the given link
1099 */
1100 void SetDsssSupported(bool enable, uint8_t linkId);
1101
1102 /**
1103 * Set the block ack threshold for AC_VO.
1104 *
1105 * @param threshold the block ack threshold for AC_VO.
1106 */
1107 void SetVoBlockAckThreshold(uint8_t threshold);
1108 /**
1109 * Set the block ack threshold for AC_VI.
1110 *
1111 * @param threshold the block ack threshold for AC_VI.
1112 */
1113 void SetViBlockAckThreshold(uint8_t threshold);
1114 /**
1115 * Set the block ack threshold for AC_BE.
1116 *
1117 * @param threshold the block ack threshold for AC_BE.
1118 */
1119 void SetBeBlockAckThreshold(uint8_t threshold);
1120 /**
1121 * Set the block ack threshold for AC_BK.
1122 *
1123 * @param threshold the block ack threshold for AC_BK.
1124 */
1125 void SetBkBlockAckThreshold(uint8_t threshold);
1126
1127 /**
1128 * Set VO block ack inactivity timeout.
1129 *
1130 * @param timeout the VO block ack inactivity timeout.
1131 */
1133 /**
1134 * Set VI block ack inactivity timeout.
1135 *
1136 * @param timeout the VI block ack inactivity timeout.
1137 */
1139 /**
1140 * Set BE block ack inactivity timeout.
1141 *
1142 * @param timeout the BE block ack inactivity timeout.
1143 */
1145 /**
1146 * Set BK block ack inactivity timeout.
1147 *
1148 * @param timeout the BK block ack inactivity timeout.
1149 */
1151
1152 /**
1153 * @param mpdu the MPDU to send.
1154 * @param to the address to which the packet should be sent.
1155 * @param from the address from which the packet should be sent.
1156 *
1157 * Subclasses need to implement this method to finalize the MAC header of the MPDU
1158 * (MAC addresses and ToDS/FromDS flags) and enqueue the MPDU in a TX queue.
1159 */
1160 virtual void Enqueue(Ptr<WifiMpdu> mpdu, Mac48Address to, Mac48Address from) = 0;
1161
1162 /**
1163 * Allow subclasses to take actions when a packet to enqueue has been dropped.
1164 *
1165 * @param packet the dropped packet
1166 * @param to the address to which the packet should have been sent
1167 */
1168 virtual void NotifyDropPacketToEnqueue(Ptr<Packet> packet, Mac48Address to);
1169
1170 /**
1171 * Notify the remote station manager if the given expired (hence dropped) MPDU is a management
1172 * or data frame (with a unicast receiver address) that has been already transmitted and is not
1173 * in flight (otherwise, it is handled when the ack is received or the TX timeout expires).
1174 *
1175 * @param mpdu the expired MPDU
1176 */
1178
1179 /**
1180 * This Boolean is set \c true iff this WifiMac is to model
1181 * 802.11e/WMM style Quality of Service. It is exposed through the
1182 * attribute system.
1183 *
1184 * At the moment, this flag is the sole selection between QoS and
1185 * non-QoS operation for the STA (whether IBSS, AP, or
1186 * non-AP). Ultimately, we will want a QoS-enabled STA to be able to
1187 * fall back to non-QoS operation with a non-QoS peer. This'll
1188 * require further intelligence - i.e., per-association QoS
1189 * state. Having a big switch seems like a good intermediate stage,
1190 * however.
1191 */
1193
1194 bool m_shortSlotTimeSupported; ///< flag whether short slot time is supported
1195 bool m_ctsToSelfSupported; ///< flag indicating whether CTS-To-Self is supported
1196
1197 TypeOfStation m_typeOfStation; //!< the type of station
1198
1199 Ptr<WifiNetDevice> m_device; //!< Pointer to the device
1200 std::map<uint8_t, std::unique_ptr<LinkEntity>> m_links; //!< ID-indexed map of Link objects
1201 std::set<uint8_t> m_linkIds; //!< IDs of the links in use
1202
1203 Mac48Address m_address; //!< MAC address of this station
1204 Ssid m_ssid; //!< Service Set ID (SSID)
1205
1206 /** This type defines a mapping between an Access Category index,
1207 and a pointer to the corresponding channel access function.
1208 Access Categories are sorted in decreasing order of priority. */
1209 typedef std::map<AcIndex, Ptr<QosTxop>, std::greater<>> EdcaQueues;
1210
1211 /** This is a map from Access Category index to the corresponding
1212 channel access function */
1214
1215 uint16_t m_voMaxAmsduSize; ///< maximum A-MSDU size for AC_VO (in bytes)
1216 uint16_t m_viMaxAmsduSize; ///< maximum A-MSDU size for AC_VI (in bytes)
1217 uint16_t m_beMaxAmsduSize; ///< maximum A-MSDU size for AC_BE (in bytes)
1218 uint16_t m_bkMaxAmsduSize; ///< maximum A-MSDU size for AC_BK (in bytes)
1219
1220 uint32_t m_voMaxAmpduSize; ///< maximum A-MPDU size for AC_VO (in bytes)
1221 uint32_t m_viMaxAmpduSize; ///< maximum A-MPDU size for AC_VI (in bytes)
1222 uint32_t m_beMaxAmpduSize; ///< maximum A-MPDU size for AC_BE (in bytes)
1223 uint32_t m_bkMaxAmpduSize; ///< maximum A-MPDU size for AC_BK (in bytes)
1224
1225 uint16_t m_mpduBufferSize; //!< BlockAck buffer size (in number of MPDUs)
1226 uint32_t m_frameRetryLimit; //!< the frame retry limit
1227
1228 UniformRandomBitGenerator m_shuffleLinkIdsGen; //!< random number generator to shuffle link IDs
1229
1230 /// @brief DL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
1231 std::unordered_map<Mac48Address, WifiTidLinkMapping, WifiAddressHash> m_dlTidLinkMappings;
1232 /// @brief UL TID-to-Link Mapping negotiated with an MLD (identified by its MLD address)
1233 std::unordered_map<Mac48Address, WifiTidLinkMapping, WifiAddressHash> m_ulTidLinkMappings;
1234
1235 ForwardUpCallback m_forwardUp; //!< Callback to forward packet up the stack
1236
1237 /**
1238 * The trace source fired when packets come into the "top" of the device
1239 * at the L3/L2 transition, before being queued for transmission.
1240 *
1241 * @see class CallBackTraceSource
1242 */
1244 /**
1245 * The trace source fired when packets coming into the "top" of the device
1246 * are dropped at the MAC layer before being queued for transmission.
1247 *
1248 * @see class CallBackTraceSource
1249 */
1251 /**
1252 * The trace source fired for packets successfully received by the device
1253 * immediately before being forwarded up to higher layers (at the L2/L3
1254 * transition). This is a promiscuous trace.
1255 *
1256 * @see class CallBackTraceSource
1257 */
1259 /**
1260 * The trace source fired for packets successfully received by the device
1261 * immediately before being forwarded up to higher layers (at the L2/L3
1262 * transition). This is a non- promiscuous trace.
1263 *
1264 * @see class CallBackTraceSource
1265 */
1267 /**
1268 * The trace source fired when packets coming into the "top" of the device
1269 * are dropped at the MAC layer during reception.
1270 *
1271 * @see class CallBackTraceSource
1272 */
1274
1275 /**
1276 * TracedCallback signature for MPDU drop events.
1277 *
1278 * @param reason the reason why the MPDU was dropped (\see WifiMacDropReason)
1279 * @param mpdu the dropped MPDU
1280 */
1282
1283 /// TracedCallback for MPDU drop events typedef
1285
1286 /**
1287 * This trace indicates that an MPDU was dropped for the given reason.
1288 */
1290
1291 /// TracedCallback for acked/nacked MPDUs typedef
1293
1294 MpduTracedCallback m_ackedMpduCallback; ///< ack'ed MPDU callback
1295 MpduTracedCallback m_nackedMpduCallback; ///< nack'ed MPDU callback
1296
1297 /**
1298 * TracedCallback signature for MPDU response timeout events.
1299 *
1300 * @param reason the reason why the timer was started
1301 * @param mpdu the MPDU whose response was not received before the timeout
1302 * @param txVector the TXVECTOR used to transmit the MPDU
1303 */
1304 typedef void (*MpduResponseTimeoutCallback)(uint8_t reason,
1306 const WifiTxVector& txVector);
1307
1308 /// TracedCallback for MPDU response timeout events typedef
1311
1312 /**
1313 * MPDU response timeout traced callback.
1314 * This trace source is fed by a WifiTxTimer object.
1315 */
1317
1318 /**
1319 * TracedCallback signature for PSDU response timeout events.
1320 *
1321 * @param reason the reason why the timer was started
1322 * @param psdu the PSDU whose response was not received before the timeout
1323 * @param txVector the TXVECTOR used to transmit the PSDU
1324 */
1325 typedef void (*PsduResponseTimeoutCallback)(uint8_t reason,
1327 const WifiTxVector& txVector);
1328
1329 /// TracedCallback for PSDU response timeout events typedef
1332
1333 /**
1334 * PSDU response timeout traced callback.
1335 * This trace source is fed by a WifiTxTimer object.
1336 */
1338
1339 /**
1340 * TracedCallback signature for PSDU map response timeout events.
1341 *
1342 * @param reason the reason why the timer was started
1343 * @param psduMap the PSDU map for which not all responses were received before the timeout
1344 * @param missingStations the MAC addresses of the stations that did not respond
1345 * @param nTotalStations the total number of stations that had to respond
1346 */
1347 typedef void (*PsduMapResponseTimeoutCallback)(uint8_t reason,
1348 WifiPsduMap* psduMap,
1349 const std::set<Mac48Address>* missingStations,
1350 std::size_t nTotalStations);
1351
1352 /// TracedCallback for PSDU map response timeout events typedef
1355
1356 /**
1357 * PSDU map response timeout traced callback.
1358 * This trace source is fed by a WifiTxTimer object.
1359 */
1361
1362 /**
1363 * TracedCallback signature for ICF drop events.
1364 *
1365 * @param reason the reason why the ICF was dropped by the EMLSR client
1366 * @param linkId the ID of the link on which the ICF was dropped
1367 */
1368 typedef void (*IcfDropCallback)(WifiIcfDrop reason, uint8_t linkId);
1369
1370 /// TracedCallback for ICF drop events typedef
1372
1373 IcfDropTracedCallback m_icfDropCallback; //!< traced callback for ICF drop events
1374};
1375
1376} // namespace ns3
1377
1378#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
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition type-id.h:48
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.
uint16_t GetMaxAmsduSize(AcIndex ac) const
Return the maximum A-MSDU size of the given Access Category.
Definition wifi-mac.cc:2536
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:1007
Ptr< QosTxop > GetBEQueue() const
Accessor for the AC_BE channel access function.
Definition wifi-mac.cc:645
virtual void NotifyChannelSwitching(uint8_t linkId)
Notify that channel on the given link has been switched.
Definition wifi-mac.cc:694
std::optional< Mac48Address > GetMldAddress(const Mac48Address &remoteAddr) const
Definition wifi-mac.cc:1851
virtual void SetMacQueueScheduler(Ptr< WifiMacQueueScheduler > scheduler)
Set the wifi MAC queue scheduler.
Definition wifi-mac.cc:681
Mac48Address GetBssid(uint8_t linkId) const
Definition wifi-mac.cc:540
void(* PsduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector)
TracedCallback signature for PSDU response timeout events.
Definition wifi-mac.h:1325
uint16_t m_viMaxAmsduSize
maximum A-MSDU size for AC_VI (in bytes)
Definition wifi-mac.h:1216
bool m_shortSlotTimeSupported
flag whether short slot time is supported
Definition wifi-mac.h:1194
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:931
Ptr< HeConfiguration > GetHeConfiguration() const
Definition wifi-mac.cc:1968
DroppedMpduTracedCallback m_droppedMpduCallback
This trace indicates that an MPDU was dropped for the given reason.
Definition wifi-mac.h:1289
TracedCallback< WifiMacDropReason, Ptr< const WifiMpdu > > DroppedMpduTracedCallback
TracedCallback for MPDU drop events typedef.
Definition wifi-mac.h:1284
TypeOfStation GetTypeOfStation() const
Return the type of station.
Definition wifi-mac.cc:484
uint32_t GetFrameRetryLimit() const
Definition wifi-mac.cc:2096
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:1192
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:601
const std::map< uint8_t, std::unique_ptr< LinkEntity > > & GetLinks() const
Definition wifi-mac.cc:1084
Ptr< Txop > GetTxop() const
Accessor for the Txop object.
Definition wifi-mac.cc:565
VhtCapabilities GetVhtCapabilities(uint8_t linkId) const
Return the VHT capabilities of the device for the given link.
Definition wifi-mac.cc:2248
Callback< void > m_linkDown
Callback when a link is down.
Definition wifi-mac.h:955
bool GetQosSupported() const
Return whether the device supports QoS.
Definition wifi-mac.cc:1402
virtual void SetAddress(Mac48Address address)
Definition wifi-mac.cc:507
void SetFrameExchangeManagers(const std::vector< Ptr< FrameExchangeManager > > &feManagers)
Definition wifi-mac.cc:965
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:949
Ptr< Txop > m_txop
TXOP used for transmission of frames to non-QoS peers.
Definition wifi-mac.h:951
void SetQosSupported(bool enable)
Enable or disable QoS support for the device.
Definition wifi-mac.cc:1394
Mac48Address m_address
MAC address of this station.
Definition wifi-mac.h:1203
std::set< uint8_t > m_linkIds
IDs of the links in use.
Definition wifi-mac.h:1201
Ptr< WifiMacQueueScheduler > GetMacQueueScheduler() const
Get the wifi MAC queue scheduler.
Definition wifi-mac.cc:688
uint16_t GetMpduBufferSize() const
Definition wifi-mac.cc:2083
uint8_t GetNLinks() const
Get the number of links (can be greater than 1 for 11be devices only).
Definition wifi-mac.cc:1099
BlockAckType GetBaTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition wifi-mac.cc:1938
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:1165
void Enqueue(Ptr< Packet > packet, Mac48Address to)
Definition wifi-mac.cc:1726
uint16_t m_voMaxAmsduSize
maximum A-MSDU size for AC_VO (in bytes)
Definition wifi-mac.h:1215
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
Definition wifi-mac.h:949
Ptr< WifiMacQueueScheduler > m_scheduler
wifi MAC queue scheduler
Definition wifi-mac.h:952
void DoInitialize() override
Initialize() implementation.
Definition wifi-mac.cc:411
TypeOfStation m_typeOfStation
the type of station
Definition wifi-mac.h:1197
uint16_t m_mpduBufferSize
BlockAck buffer size (in number of MPDUs)
Definition wifi-mac.h:1225
uint32_t m_beMaxAmpduSize
maximum A-MPDU size for AC_BE (in bytes)
Definition wifi-mac.h:1222
void SetChannelAccessManagers(const std::vector< Ptr< ChannelAccessManager > > &caManagers)
Definition wifi-mac.cc:1013
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:1312
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:1613
Ssid GetSsid() const
Definition wifi-mac.cc:527
void SetWifiRemoteStationManagers(const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
Definition wifi-mac.cc:1048
void SetBeBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BE.
Definition wifi-mac.cc:2122
bool GetErpSupported(uint8_t linkId) const
Return whether the device supports ERP on the given link.
Definition wifi-mac.cc:1408
void ResetWifiPhys()
Remove currently attached WifiPhy objects from this MAC.
Definition wifi-mac.cc:1376
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:1243
void SetErpSupported(bool enable, uint8_t linkId)
Enable or disable ERP support for the given link.
Definition wifi-mac.cc:1414
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:1676
uint32_t m_voMaxAmpduSize
maximum A-MPDU size for AC_VO (in bytes)
Definition wifi-mac.h:1220
void(* MpduResponseTimeoutCallback)(uint8_t reason, Ptr< const WifiMpdu > mpdu, const WifiTxVector &txVector)
TracedCallback signature for MPDU response timeout events.
Definition wifi-mac.h:1304
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, std::list< bool > isDsss, AcIndex ac)
Definition wifi-mac.cc:791
WifiMac(const WifiMac &)=delete
Ptr< WifiNetDevice > m_device
Pointer to the device.
Definition wifi-mac.h:1199
void SetSsid(Ssid ssid)
Definition wifi-mac.cc:520
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:1796
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:1111
IcfDropTracedCallback m_icfDropCallback
traced callback for ICF drop events
Definition wifi-mac.h:1373
Ptr< QosTxop > GetVOQueue() const
Accessor for the AC_VO channel access function.
Definition wifi-mac.cc:633
void SetTypeOfStation(TypeOfStation type)
This method is invoked by a subclass to specify what type of station it is implementing.
Definition wifi-mac.cc:477
MpduTracedCallback m_ackedMpduCallback
ack'ed MPDU callback
Definition wifi-mac.h:1294
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:1695
Ptr< WifiPhy > GetWifiPhy(uint8_t linkId=SINGLE_LINK_OP_ID) const
Definition wifi-mac.cc:1370
void SetMpduBufferSize(uint16_t size)
Definition wifi-mac.cc:2074
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:1567
MpduTracedCallback m_nackedMpduCallback
nack'ed MPDU callback
Definition wifi-mac.h:1295
bool GetEhtSupported() const
Return whether the device supports EHT.
Definition wifi-mac.cc:2001
void SetTxop(Ptr< Txop > dcf)
Set the Txop object.
Definition wifi-mac.cc:555
bool GetHeSupported() const
Return whether the device supports HE.
Definition wifi-mac.cc:1995
HtCapabilities GetHtCapabilities(uint8_t linkId) const
Return the HT capabilities of the device for the given link.
Definition wifi-mac.cc:2189
void SetBkBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_BK.
Definition wifi-mac.cc:2132
void SetVoBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VO.
Definition wifi-mac.cc:2102
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:1131
std::optional< std::reference_wrapper< const RecipientBlockAckAgreement > > RecipientAgreementOptConstRef
optional const reference to RecipientBlockAckAgreement
Definition wifi-mac.h:671
void NotifyPromiscRx(Ptr< const Packet > packet)
Definition wifi-mac.cc:725
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:1231
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:571
virtual bool HasFramesToTransmit(uint8_t linkId)
Check if the MAC has frames to transmit over the given link.
Definition wifi-mac.cc:664
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > stationManager)
Definition wifi-mac.cc:1041
UniformRandomBitGenerator m_shuffleLinkIdsGen
random number generator to shuffle link IDs
Definition wifi-mac.h:1228
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:1485
void CompleteConfig()
Complete the configuration of the MAC layer components.
Definition wifi-mac.cc:880
RecipientAgreementOptConstRef GetBaAgreementEstablishedAsRecipient(Mac48Address originator, uint8_t tid) const
Definition wifi-mac.cc:1912
void SetBeBlockAckInactivityTimeout(uint16_t timeout)
Set BE block ack inactivity timeout.
Definition wifi-mac.cc:2162
Ptr< EhtConfiguration > GetEhtConfiguration() const
Definition wifi-mac.cc:1974
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:1266
void(* IcfDropCallback)(WifiIcfDrop reason, uint8_t linkId)
TracedCallback signature for ICF drop events.
Definition wifi-mac.h:1368
bool GetVhtSupported(uint8_t linkId) const
Return whether the device supports VHT on the given link.
Definition wifi-mac.cc:1987
void SetDsssSupported(bool enable, uint8_t linkId)
Enable or disable DSSS support for the given link.
Definition wifi-mac.cc:1425
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:1250
TracedCallback< Ptr< const WifiMpdu > > MpduTracedCallback
TracedCallback for acked/nacked MPDUs typedef.
Definition wifi-mac.h:1292
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
Definition wifi-mac.h:950
void NotifyTx(Ptr< const Packet > packet)
Definition wifi-mac.cc:707
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:382
static TypeId GetTypeId()
Get the type ID.
Definition wifi-mac.cc:63
Ptr< HtConfiguration > GetHtConfiguration() const
Definition wifi-mac.cc:1956
void SetFrameRetryLimit(uint32_t limit)
Set the frame retry limit.
Definition wifi-mac.cc:2089
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:1296
uint32_t GetMaxAmpduSize(AcIndex ac) const
Return the maximum A-MPDU size of the given Access Category.
Definition wifi-mac.cc:2511
BlockAckReqType GetBarTypeAsRecipient(Mac48Address originator, uint8_t tid) const
Definition wifi-mac.cc:1947
Ssid m_ssid
Service Set ID (SSID)
Definition wifi-mac.h:1204
std::map< uint8_t, std::unique_ptr< LinkEntity > > m_links
ID-indexed map of Link objects.
Definition wifi-mac.h:1200
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:1839
Ptr< QosTxop > GetVIQueue() const
Accessor for the AC_VI channel access function.
Definition wifi-mac.cc:639
void SetBssid(Mac48Address bssid, uint8_t linkId)
Definition wifi-mac.cc:533
Ptr< WifiNetDevice > GetDevice() const
Return the device this PHY is associated with.
Definition wifi-mac.cc:501
void NotifyRx(Ptr< const Packet > packet)
Definition wifi-mac.cc:719
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:1273
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:1262
BlockAckType GetBaTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition wifi-mac.cc:1920
MpduResponseTimeoutTracedCallback m_mpduResponseTimeoutCallback
MPDU response timeout traced callback.
Definition wifi-mac.h:1316
void SetForwardUpCallback(ForwardUpCallback upCallback)
Definition wifi-mac.cc:1464
PsduMapResponseTimeoutTracedCallback m_psduMapResponseTimeoutCallback
PSDU map response timeout traced callback.
Definition wifi-mac.h:1360
ExtendedCapabilities GetExtendedCapabilities() const
Return the extended capabilities of the device.
Definition wifi-mac.cc:2182
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:1258
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:1209
uint16_t m_bkMaxAmsduSize
maximum A-MSDU size for AC_BK (in bytes)
Definition wifi-mac.h:1218
void SetBkBlockAckInactivityTimeout(uint16_t timeout)
Set BK block ack inactivity timeout.
Definition wifi-mac.cc:2172
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:1233
virtual bool SupportsSendFrom() const
Definition wifi-mac.cc:1458
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:2384
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:2059
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:657
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:1144
void SetViBlockAckThreshold(uint8_t threshold)
Set the block ack threshold for AC_VI.
Definition wifi-mac.cc:2112
void SetViBlockAckInactivityTimeout(uint16_t timeout)
Set VI block ack inactivity timeout.
Definition wifi-mac.cc:2152
bool GetShortSlotTimeSupported() const
Definition wifi-mac.cc:1452
BlockAckReqType GetBarTypeAsOriginator(const Mac48Address &recipient, uint8_t tid) const
Definition wifi-mac.cc:1929
void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
Definition wifi-mac.cc:394
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:748
void SetLinkDownCallback(Callback< void > linkDown)
Definition wifi-mac.cc:1478
Ptr< QosTxop > GetBKQueue() const
Accessor for the AC_BK channel access function.
Definition wifi-mac.cc:651
~WifiMac() override
Definition wifi-mac.cc:57
void SetPromisc()
Sets the interface in promiscuous mode.
Definition wifi-mac.cc:546
Ptr< VhtConfiguration > GetVhtConfiguration() const
Definition wifi-mac.cc:1962
void NotifyRxDrop(Ptr< const Packet > packet)
Definition wifi-mac.cc:731
virtual void SetLinkUpCallback(Callback< void > linkUp)
Definition wifi-mac.cc:1471
Ptr< WifiRemoteStationManager > GetWifiRemoteStationManager(uint8_t linkId=0) const
Definition wifi-mac.cc:1072
const std::set< uint8_t > & GetLinkIds() const
Definition wifi-mac.cc:1105
void SetDevice(const Ptr< WifiNetDevice > device)
Sets the device this PHY is associated with.
Definition wifi-mac.cc:490
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self feature.
Definition wifi-mac.cc:1438
Mac48Address GetLocalAddress(const Mac48Address &remoteAddr) const
Get the local MAC address used to communicate with a remote STA.
Definition wifi-mac.cc:1864
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
Definition wifi-mac.h:1213
uint32_t m_bkMaxAmpduSize
maximum A-MPDU size for AC_BK (in bytes)
Definition wifi-mac.h:1223
bool GetHtSupported(uint8_t linkId) const
Return whether the device supports HT on the given link.
Definition wifi-mac.cc:1980
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
Definition wifi-mac.cc:1802
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Definition wifi-mac.cc:768
bool Is6GhzBand(uint8_t linkId) const
Indicate if a given link is on the 6 GHz band.
Definition wifi-mac.cc:1254
TracedCallback< uint8_t, Ptr< const WifiPsdu >, const WifiTxVector & > PsduResponseTimeoutTracedCallback
TracedCallback for PSDU response timeout events typedef.
Definition wifi-mac.h:1331
TracedCallback< uint8_t, Ptr< const WifiMpdu >, const WifiTxVector & > MpduResponseTimeoutTracedCallback
TracedCallback for MPDU response timeout events typedef.
Definition wifi-mac.h:1310
OriginatorAgreementOptConstRef GetBaAgreementEstablishedAsOriginator(Mac48Address recipient, uint8_t tid) const
Definition wifi-mac.cc:1898
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:1809
std::optional< std::reference_wrapper< const OriginatorBlockAckAgreement > > OriginatorAgreementOptConstRef
optional const reference to OriginatorBlockAckAgreement
Definition wifi-mac.h:668
Mac48Address GetAddress() const
Definition wifi-mac.cc:514
void(* DroppedMpduCallback)(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
TracedCallback signature for MPDU drop events.
Definition wifi-mac.h:1281
ForwardUpCallback m_forwardUp
Callback to forward packet up the stack.
Definition wifi-mac.h:1235
EhtCapabilities GetEhtCapabilities(uint8_t linkId) const
Return the EHT capabilities of the device for the given link.
Definition wifi-mac.cc:2419
TracedCallback< uint8_t, WifiPsduMap *, const std::set< Mac48Address > *, std::size_t > PsduMapResponseTimeoutTracedCallback
TracedCallback for PSDU map response timeout events typedef.
Definition wifi-mac.h:1354
Callback< void > m_linkUp
Callback when a link is up.
Definition wifi-mac.h:954
LinkEntity & GetLink(uint8_t linkId) const
Get a reference to the link associated with the given ID.
Definition wifi-mac.cc:1090
void SetupDcfQueue()
This method is a private utility invoked to configure the channel access function for devices that do...
Definition wifi-mac.cc:737
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:591
HeCapabilities GetHeCapabilities(uint8_t linkId) const
Return the HE capabilities of the device for the given link.
Definition wifi-mac.cc:2328
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:1348
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:1337
Ptr< QosTxop > GetQosTxop(AcIndex ac) const
Accessor for a specified EDCA object.
Definition wifi-mac.cc:611
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:1347
void NotifyTxDrop(Ptr< const Packet > packet)
Definition wifi-mac.cc:713
void DoDispose() override
Destructor implementation.
Definition wifi-mac.cc:435
uint32_t m_frameRetryLimit
the frame retry limit
Definition wifi-mac.h:1226
bool GetDsssSupported(uint8_t linkId) const
Return whether the device supports DSSS on the given link.
Definition wifi-mac.cc:1432
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:1035
void SetVoBlockAckInactivityTimeout(uint16_t timeout)
Set VO block ack inactivity timeout.
Definition wifi-mac.cc:2142
virtual std::unique_ptr< LinkEntity > CreateLinkEntity() const
Create a LinkEntity object.
Definition wifi-mac.cc:1078
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:581
void SetShortSlotTimeSupported(bool enable)
Enable or disable short slot time feature.
Definition wifi-mac.cc:1445
bool m_ctsToSelfSupported
flag indicating whether CTS-To-Self is supported
Definition wifi-mac.h:1195
uint16_t m_beMaxAmsduSize
maximum A-MSDU size for AC_BE (in bytes)
Definition wifi-mac.h:1217
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:1892
uint32_t m_viMaxAmpduSize
maximum A-MPDU size for AC_VI (in bytes)
Definition wifi-mac.h:1221
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:66
static constexpr uint8_t SINGLE_LINK_OP_ID
Link ID for single link operations (helps tracking places where correct link ID is to be used to supp...
Definition wifi-utils.h:250
WifiDirection
Wifi direction.
Definition wifi-utils.h:35
ns3::Time timeout
The different BlockAckRequest variants.
The different BlockAck variants.
std::string dir