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