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