23 #include "ns3/assert.h"
24 #include "ns3/packet.h"
25 #include "ns3/simulator.h"
29 #include "ns3/socket.h"
30 #include "ns3/double.h"
41 #undef NS_LOG_APPEND_CONTEXT
42 #define NS_LOG_APPEND_CONTEXT std::clog << "[mac=" << m_self << "] "
138 m_waitAck (ACK_NONE),
140 m_overrideDurationId (
Seconds (0))
274 <<
"send rts=" << params.
m_sendRts <<
", "
293 os <<
"basic-block-ack";
296 os <<
"compressed-block-ack";
299 os <<
"multi-tid-block-ack";
357 : m_normalAckTimeoutEvent (),
358 m_fastAckTimeoutEvent (),
359 m_superFastAckTimeoutEvent (),
360 m_fastAckFailedTimeoutEvent (),
361 m_blockAckTimeoutEvent (),
362 m_ctsTimeoutEvent (),
367 m_endTxNoAckEvent (),
370 m_phyMacLowListener (0),
371 m_ctsToSelfSupported (false),
394 .SetGroupName (
"Wifi")
395 .AddConstructor<
MacLow> ()
450 bool oneRunning =
false;
707 uint32_t size, actualSize;
712 if (actualSize > size)
861 NS_LOG_DEBUG (
"switching channel. Cancelling MAC pending events");
877 NS_LOG_DEBUG (
"Device in sleep mode. Cancelling MAC pending events");
920 && hdr.GetAddr1 () ==
m_self)
922 NS_LOG_DEBUG (
"rx RTS from=" << hdr.GetAddr2 () <<
", schedule CTS");
935 NS_LOG_DEBUG (
"rx RTS from=" << hdr.GetAddr2 () <<
", cannot schedule CTS");
939 else if (hdr.IsCts ()
940 && hdr.GetAddr1 () ==
m_self
956 rxSnr, txVector.
GetMode (), tag.Get ());
967 else if (hdr.IsAck ()
968 && hdr.GetAddr1 () ==
m_self
980 rxSnr, txVector.
GetMode (), tag.Get ());
1015 else if (hdr.IsBlockAck () && hdr.GetAddr1 () ==
m_self
1019 NS_LOG_DEBUG (
"got block ack from " << hdr.GetAddr2 ());
1031 else if (hdr.IsBlockAckReq () && hdr.GetAddr1 () ==
m_self)
1050 if ((*it).second.first.IsImmediateBlockAck ())
1052 NS_LOG_DEBUG (
"rx blockAckRequest/sendImmediateBlockAck from=" << hdr.GetAddr2 ());
1068 NS_LOG_DEBUG (
"There's not a valid agreement for this block ack request.");
1076 else if (hdr.IsCtl ())
1080 else if (hdr.GetAddr1 () ==
m_self)
1084 if (hdr.IsQosData () &&
ReceiveMpdu (packet, hdr))
1091 if (hdr.IsQosAck () && !ampduSubframe)
1093 NS_LOG_DEBUG (
"rx QoS unicast/sendAck from=" << hdr.GetAddr2 ());
1097 hdr.GetAddr2 (), hdr.GetQosTid ());
1107 else if (hdr.IsQosBlockAck ())
1115 else if (hdr.IsQosData () && hdr.IsQosBlockAck ())
1126 m_edcaListeners[ac]->BlockAckInactivityTimeout (hdr.GetAddr2 (), hdr.GetQosTid ());
1129 else if (hdr.IsQosData () && hdr.IsQosNoAck ())
1133 NS_LOG_DEBUG (
"rx Ampdu with No Ack Policy from=" << hdr.GetAddr2 ());
1137 NS_LOG_DEBUG (
"rx unicast/noAck from=" << hdr.GetAddr2 ());
1140 else if (hdr.IsData () || hdr.IsMgt ())
1142 if (hdr.IsProbeResp ())
1149 if (hdr.IsMgt () && ampduSubframe)
1151 NS_FATAL_ERROR (
"Received management packet as part of an A-MPDU");
1155 NS_LOG_DEBUG (
"rx unicast/sendAck from=" << hdr.GetAddr2 ());
1167 else if (hdr.GetAddr1 ().IsGroup ())
1171 NS_FATAL_ERROR (
"Received group addressed packet as part of an A-MPDU");
1175 if (hdr.IsData () || hdr.IsMgt ())
1178 if (hdr.IsBeacon ())
1466 uint32_t dataSize =
GetSize (packet, hdr);
1531 if (hdr.
IsRts () && navUpdated)
1544 Time navCounterResetCtsMissedDelay =
1568 (*i)->NavReset (duration);
1579 (*i)->NavStart (duration);
1583 if (newNavEnd > oldNavEnd)
1586 m_lastNavDuration = duration;
1597 (*i)->AckTimeoutStart (duration);
1606 (*i)->AckTimeoutReset ();
1615 (*i)->CtsTimeoutStart (duration);
1624 (*i)->CtsTimeoutReset ();
1635 ", size=" << packet->
GetSize () <<
1636 ", mode=" << txVector.
GetMode () <<
1651 bool vhtSingleMpdu =
false;
1655 uint8_t tid =
GetTid (packet, *hdr);
1657 std::map<AcIndex, MacLowAggregationCapableTransmissionListener*>::const_iterator listenerIt =
m_edcaListeners.find (ac);
1661 vhtSingleMpdu =
true;
1669 if (queueSize > 1 || vhtSingleMpdu)
1673 for (; queueSize > 0; queueSize--)
1676 newPacket = dequeuedPacket->
Copy ();
1686 listenerIt->second->GetMpduAggregator ()->AddHeaderAndPad (newPacket, last, vhtSingleMpdu);
1702 remainingAmpduDuration -= mpduDuration;
1726 delay = delay + mpduDuration;
1911 ForwardDown (packet, &rts, rtsTxVector, preamble);
2197 cts.SetDsNotFrom ();
2199 cts.SetNoMoreFragments ();
2201 cts.SetAddr1 (source);
2205 cts.SetDuration (duration);
2227 ForwardDown (packet, &cts, ctsTxVector, preamble);
2241 for (std::vector<Item>::size_type i = 0; i !=
m_txPackets.size (); i++)
2245 std::map<AcIndex, MacLowAggregationCapableTransmissionListener*>::const_iterator listenerIt =
m_edcaListeners.find (ac);
2312 duration -= txDuration;
2315 duration =
std::max (duration, newDuration);
2400 ForwardDown (packet, &ack, ackTxVector, preamble);
2406 return ((seq - winstart + 4096) % 4096) < winsize;
2430 uint16_t delta = (seqNumber - (*it).second.first.GetWinEnd () + 4096) % 4096;
2433 (*it).second.first.SetWinEnd (seqNumber);
2434 int16_t winEnd = (*it).second.first.GetWinEnd ();
2435 int16_t bufferSize = (*it).second.first.GetBufferSize ();
2436 uint16_t sum = ((uint16_t)(std::abs (winEnd - bufferSize + 1))) % 4096;
2437 (*it).second.first.SetStartingSequence (sum);
2442 (*it).second.first.SetWinEnd (((*it).second.first.GetStartingSequence () + (*it).second.first.GetBufferSize () - 1) % 4096);
2464 uint16_t endSequence = ((*it).second.first.GetStartingSequence () + 2047) % 4096;
2468 for (; i != (*it).second.second.end ()
2472 (*it).second.second.insert (i, bufferedPacket);
2477 (*j).second.UpdateWithMpdu (&hdr);
2485 uint16_t startingSeq)
2487 uint8_t tid = respHdr->
GetTid ();
2502 std::list<BufferedPacket> buffer (0);
2547 uint16_t endSequence = ((*it).second.first.GetStartingSequence () + 2047) % 4096;
2551 if (last != (*it).second.second.end ())
2553 guard = (*it).second.second.begin ()->second.GetSequenceControl ();
2556 for (; i != (*it).second.second.end ()
2559 if (guard == (*i).second.GetSequenceControl ())
2561 if (!(*i).second.IsMoreFragments ())
2571 while (i != (*it).second.second.end () && guard == (*i).second.GetSequenceControl ())
2575 if (i != (*it).second.second.end ())
2577 guard = (*i).second.GetSequenceControl ();
2589 while (i != (*it).second.second.end () && guard == (*i).second.GetSequenceControl ())
2593 if (i != (*it).second.second.end ())
2595 guard = (*i).second.GetSequenceControl ();
2600 (*it).second.second.erase ((*it).second.second.begin (), i);
2610 uint16_t guard = (*it).second.first.GetStartingSequenceControl ();
2613 for (; i != (*it).second.second.end () && guard == (*i).second.GetSequenceControl (); i++)
2615 if (!(*i).second.IsMoreFragments ())
2617 while (lastComplete != i)
2619 m_rxCallback ((*lastComplete).first, &(*lastComplete).second);
2622 m_rxCallback ((*lastComplete).first, &(*lastComplete).second);
2625 guard = (*i).second.IsMoreFragments () ? (guard + 1) : ((guard + 16) & 0xfff0);
2627 (*it).second.first.SetStartingSequenceControl (guard);
2630 (*it).second.second.erase ((*it).second.second.begin (), lastComplete);
2635 Time duration,
WifiMode blockAckReqTxMode,
double rxSnr)
2706 ForwardDown (packet, &hdr, blockAckReqTxVector, preamble);
2715 uint16_t seqNumber = 0;
2718 seqNumber = (*i).second.GetWinStart ();
2720 bool immediate =
true;
2722 blockAck.SetStartingSequence (seqNumber);
2723 blockAck.SetTidInfo (tid);
2724 immediate = (*it).second.first.IsImmediateBlockAck ();
2726 NS_LOG_DEBUG (
"Got Implicit block Ack Req with seq " << seqNumber);
2727 (*i).second.FillBlockAckBitmap (&blockAck);
2734 Time duration,
WifiMode blockAckReqTxMode,
double rxSnr)
2739 bool immediate =
false;
2748 immediate = (*it).second.first.IsImmediateBlockAck ();
2759 (*i).second.FillBlockAckBitmap (&blockAck);
2775 (*it).second.first.SetWinEnd (((*it).second.first.GetStartingSequence () + (*it).second.first.GetBufferSize () - 1) % 4096);
2778 (*it).second.first.SetWinEnd (((*it).second.first.GetStartingSequence () + (*it).second.first.GetBufferSize () - 1) % 4096);
2784 NS_LOG_DEBUG (
"there's not a valid block ack agreement with " << originator);
2823 bool normalAck =
false;
2824 bool ampduSubframe =
false;
2827 ampduSubframe =
true;
2832 (*n).first->PeekHeader (firsthdr);
2834 NotifyNav ((*n).first, firsthdr, preamble);
2838 bool vhtSingleMpdu = (*n).second.GetEof ();
2843 ampduSubframe =
false;
2858 ReceiveOk ((*n).first, rxSnr, txVector, preamble, ampduSubframe);
2863 ReceiveOk ((*n).first, rxSnr, txVector, preamble, ampduSubframe);
2882 NS_FATAL_ERROR (
"Sending a BlockAckReq with QosPolicy equal to Normal Ack");
2895 NS_LOG_DEBUG (
"There's not a valid agreement for this block ack request.");
2903 ReceiveOk (aggregatedPacket, rxSnr, txVector, preamble, ampduSubframe);
2910 if (peekedPacket == 0)
2919 uint8_t tid =
GetTid (peekedPacket, peekedHdr);
2921 std::map<AcIndex, MacLowAggregationCapableTransmissionListener*>::const_iterator listenerIt =
m_edcaListeners.find (ac);
2948 NS_LOG_DEBUG (
"no more packets can be aggregated to satisfy PPDU <= aPPDUMaxTime");
2954 NS_LOG_DEBUG (
"no more packets can be aggregated because the maximum A-MPDU size has been reached");
2965 bool isAmpdu =
false;
2968 newPacket = packet->
Copy ();
2986 uint8_t tid =
GetTid (packet, hdr);
2990 std::map<AcIndex, MacLowAggregationCapableTransmissionListener*>::const_iterator listenerIt =
m_edcaListeners.find (ac);
2992 queue = listenerIt->second->GetQueue ();
2997 if (listenerIt->second->GetBlockAckAgreementExists (hdr.
GetAddr1 (), tid))
3001 currentAggregatedPacket = Create<Packet> ();
3003 uint16_t startingSequenceNumber = 0;
3004 uint16_t currentSequenceNumber = 0;
3005 uint8_t qosPolicy = 0;
3006 uint16_t blockAckSize = 0;
3007 bool aggregated =
false;
3015 startingSequenceNumber = peekedHdr.GetSequenceNumber ();
3018 currentSequenceNumber = peekedHdr.GetSequenceNumber ();
3023 aggregated = listenerIt->second->GetMpduAggregator ()->Aggregate (newPacket, currentAggregatedPacket);
3027 NS_LOG_DEBUG (
"Adding packet with Sequence number " << peekedHdr.GetSequenceNumber () <<
" to A-MPDU, packet size = " << newPacket->
GetSize () <<
", A-MPDU size = " << currentAggregatedPacket->
GetSize ());
3044 Ptr<const Packet> peekedPacket = listenerIt->second->PeekNextPacketInBaQueue (peekedHdr, peekedHdr.GetAddr1 (), tid, &tstamp);
3045 if (peekedPacket == 0)
3047 peekedPacket = queue->PeekByTidAndAddress (&peekedHdr, tid,
3050 currentSequenceNumber = listenerIt->second->PeekNextSequenceNumberfor (&peekedHdr);
3053 if (peekedPacket != 0 && listenerIt->second->GetMsduAggregator () != 0)
3055 tempPacket =
PerformMsduAggregation (peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize);
3056 if (tempPacket != 0)
3058 peekedPacket = tempPacket->
Copy ();
3065 currentSequenceNumber = peekedHdr.GetSequenceNumber ();
3068 while (
IsInWindow (currentSequenceNumber, startingSequenceNumber, 64) && !
StopMpduAggregation (peekedPacket, peekedHdr, currentAggregatedPacket, blockAckSize))
3073 currentSequenceNumber = listenerIt->second->GetNextSequenceNumberfor (&peekedHdr);
3074 peekedHdr.SetSequenceNumber (currentSequenceNumber);
3075 peekedHdr.SetFragmentNumber (0);
3076 peekedHdr.SetNoMoreFragments ();
3077 peekedHdr.SetNoRetry ();
3088 newPacket = peekedPacket->
Copy ();
3094 aggregated = listenerIt->second->GetMpduAggregator ()->Aggregate (newPacket, currentAggregatedPacket);
3102 listenerIt->second->CompleteMpduTx (packet, hdr, tstamp);
3109 NS_LOG_DEBUG (
"Adding packet with Sequence number " << peekedHdr.GetSequenceNumber () <<
" to A-MPDU, packet size = " << newPacket->
GetSize () <<
", A-MPDU size = " << currentAggregatedPacket->
GetSize ());
3115 listenerIt->second->CompleteMpduTx (peekedPacket, peekedHdr, tstamp);
3123 listenerIt->second->RemoveFromBaQueue (tid, hdr.
GetAddr1 (), peekedHdr.GetSequenceNumber ());
3127 queue->Remove (peekedPacket);
3137 peekedPacket = listenerIt->second->PeekNextPacketInBaQueue (peekedHdr, hdr.
GetAddr1 (), tid, &tstamp);
3138 if (peekedPacket == 0)
3142 peekedPacket = queue->PeekByTidAndAddress (&peekedHdr, tid,
3144 if (peekedPacket != 0)
3147 currentSequenceNumber = listenerIt->second->PeekNextSequenceNumberfor (&peekedHdr);
3149 if (listenerIt->second->GetMsduAggregator () != 0)
3151 tempPacket =
PerformMsduAggregation (peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize);
3152 if (tempPacket != 0)
3154 peekedPacket = tempPacket->
Copy ();
3161 currentSequenceNumber = peekedHdr.GetSequenceNumber ();
3166 peekedPacket = queue->PeekByTidAndAddress (&peekedHdr, tid,
3168 if (peekedPacket != 0)
3171 currentSequenceNumber = listenerIt->second->PeekNextSequenceNumberfor (&peekedHdr);
3173 if (listenerIt->second->GetMsduAggregator () != 0 &&
IsInWindow (currentSequenceNumber, startingSequenceNumber, 64))
3175 tempPacket =
PerformMsduAggregation (peekedPacket, &peekedHdr, &tstamp, currentAggregatedPacket, blockAckSize);
3176 if (tempPacket != 0)
3178 peekedPacket = tempPacket->
Copy ();
3189 newPacket = packet->
Copy ();
3196 listenerIt->second->GetMpduAggregator ()->Aggregate (newPacket, currentAggregatedPacket);
3197 currentAggregatedPacket->
AddHeader (blockAckReq);
3202 listenerIt->second->CompleteTransfer (hdr.
GetAddr1 (), tid);
3209 newPacket = currentAggregatedPacket;
3213 listenerIt->second->SetAmpdu (hdr.
GetAddr1 (),
true);
3233 currentAggregatedPacket = Create<Packet> ();
3234 listenerIt->second->GetMpduAggregator ()->AggregateVhtSingleMpdu (packet, currentAggregatedPacket);
3238 if (listenerIt->second->GetBlockAckAgreementExists (hdr.
GetAddr1 (), tid))
3240 listenerIt->second->CompleteTransfer (peekedHdr.
GetAddr1 (), tid);
3246 newPacket = currentAggregatedPacket;
3253 listenerIt->second->SetAmpdu (hdr.
GetAddr1 (),
true);
3286 bool msduAggregation =
false;
3287 bool isAmsdu =
false;
3288 Ptr<Packet> currentAmsduPacket = Create<Packet> ();
3293 std::map<AcIndex, MacLowAggregationCapableTransmissionListener*>::const_iterator listenerIt =
m_edcaListeners.find (ac);
3295 queue = listenerIt->second->GetQueue ();
3300 listenerIt->second->GetMsduAggregator ()->Aggregate (packet, currentAmsduPacket,
3301 listenerIt->second->GetSrcAddressForAggregation (*hdr),
3302 listenerIt->second->GetDestAddressForAggregation (*hdr));
3304 peekedPacket = queue->PeekByTidAndAddress (hdr, hdr->
GetQosTid (),
3306 while (peekedPacket != 0)
3308 tempPacket = currentAmsduPacket;
3310 msduAggregation = listenerIt->second->GetMsduAggregator ()->Aggregate (peekedPacket, tempPacket,
3311 listenerIt->second->GetSrcAddressForAggregation (*hdr),
3312 listenerIt->second->GetDestAddressForAggregation (*hdr));
3314 if (msduAggregation && !
StopMpduAggregation (tempPacket, *hdr, currentAmpduPacket, blockAckSize))
3317 currentAmsduPacket = tempPacket;
3318 queue->Remove (peekedPacket);
3332 return currentAmsduPacket;
3336 queue->PushFront (packet, *hdr);
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
void Set(double snr)
Set the SNR to the given value.
bool MustSendRts(void) const
Time GetPifs(void) const
Return PCF Interframe Space (PIFS) of this MacLow.
uint32_t GetAckSize(void) const
Return the total ACK size (including FCS trailer).
virtual ~MacLowDcfListener()
void SetPifs(Time pifs)
Set PCF Interframe Space (PIFS) of this MacLow.
Time m_ctsTimeout
CTS timeout duration.
uint8_t GetTid(void) const
Return the Traffic ID (TID).
virtual void SetAmpdu(Mac48Address dest, bool enableAmpdu)
Simulation virtual time values and global simulation resolution.
EventId m_navCounterResetCtsMissed
Event to reset NAV when CTS is not received.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Ptr< WifiPhy > GetPhy(void) const
void ResetBlockAckInactivityTimerIfNeeded(BlockAckAgreement &agreement)
Every time that a block ack request or a packet with ack policy equals to block ack are received...
bool GetGreenfieldSupported(Mac48Address address) const
Return whether the station supports Greenfield or not.
EventId m_blockAckTimeoutEvent
Block ACK timeout event.
Time GetBlockAckDuration(Mac48Address to, WifiTxVector blockAckReqTxVector, enum BlockAckType type) const
Return the time required to transmit the Block ACK to the specified address given the TXVECTOR of the...
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
virtual ~MacLowTransmissionListener()
uint8_t GetRemainingNbOfMpdus(void) const
uint16_t GetTimeout(void) const
Return the timeout.
Time GetAckDuration(WifiTxVector ackTxVector) const
Return the time required to transmit the ACK (including preamble and FCS).
void SendBlockAckAfterBlockAckRequest(const CtrlBAckRequestHeader reqHdr, Mac48Address originator, Time duration, WifiMode blockAckReqTxMode, double rxSnr)
Invoked after that a block ack request has been received.
virtual void GotAck(double snr, WifiMode txMode)=0
virtual Ptr< const Packet > PeekNextPacketInBaQueue(WifiMacHeader &header, Mac48Address recipient, uint8_t tid, Time *timestamp)
void SetPromisc(void)
Enable promiscuous mode.
virtual bool GetGreenfield(void) const
Return whether Greenfield is supported.
EventId m_waitSifsEvent
Wait for SIFS event.
void DoNavResetNow(Time duration)
Reset NAV with the given duration.
virtual Mac48Address GetDestAddressForAggregation(const WifiMacHeader &hdr)
void ReportDataFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the AckTimeout associated to a transmission attempt expires.
bool IsPromisc(void) const
Check if MacLow is operating in promiscuous mode.
bool GetUseNonErpProtection(void) const
Return whether the device supports protection of non-ERP stations.
void EnableBasicBlockAck(void)
Wait BASICBLOCKACKTimeout for a Basic Block Ack Response frame.
Mac48Address GetPeer(void) const
Return the peer address.
EventId m_fastAckTimeoutEvent
Fast ACK timeout event.
Time m_pifs
PCF Interframe Space (PIFS) duration.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
bool DoNavStartNow(Time duration)
Start NAV with the given duration.
void FastAckFailedTimeout(void)
Event handler when fast ACK timeout occurs (busy).
Mac48Address GetBssid(void) const
Return the Basic Service Set Identification.
void SetSifs(Time sifs)
Set Short Interframe Space (SIFS) of this MacLow.
virtual void MissedAck(void)=0
ns3::MacLow did not receive an expected ACK within AckTimeout.
std::pair< Mac48Address, uint8_t > AgreementKey
enum WifiModulationClass GetModulationClass() const
WifiTxVector GetCtsToSelfTxVector(Ptr< const Packet > packet, const WifiMacHeader *hdr) const
Return a TXVECTOR for the CTS-to-self frame.
void RegisterBlockAckListenerForAc(enum AcIndex ac, MacLowAggregationCapableTransmissionListener *listener)
void SetupPhyMacLowListener(Ptr< WifiPhy > phy)
Set up WifiPhy listener for this MacLow.
WifiTxVector GetCtsTxVector(Mac48Address address, WifiMode rtsMode)
virtual void MissedBlockAck(uint32_t nMpdus)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void Init(uint16_t winStart, uint16_t winSize)
static const uint16_t WIFI_MAC_FCS_LENGTH
The length in octects of the IEEE 802.11 MAC FCS field.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual void NotifyRxEndError(void)
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
static DeaggregatedMpdus Deaggregate(Ptr< Packet > aggregatedPacket)
Deaggregates an A-MPDU by removing the A-MPDU subframe header and padding.
bool IsBroadcast(void) const
void NotifySleepNow(void)
This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has...
uint8_t GetTid(Ptr< const Packet > packet, const WifiMacHeader hdr) const
bool HasDurationId(void) const
virtual ~MacLowAggregationCapableTransmissionListener()
std::list< std::pair< Ptr< Packet >, AmpduSubframeHeader > >::const_iterator DeaggregatedMpdusCI
A constant iterator for a list of deaggregated packets and their A-MPDU subframe headers.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
bool QosUtilsIsOldPacket(uint16_t startingSeq, uint16_t seqNumber)
This function checks if packet with sequence number seqNumber is an "old" packet. ...
DcfListeners m_dcfListeners
List of MacLowDcfListener (pass events to Dcf)
uint8_t m_sentMpdus
Number of transmitted MPDUs in an A-MPDU that have not been acknowledged yet.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
bool m_ampdu
Flag if the current transmission involves an A-MPDU.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
bool NeedRts(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, WifiTxVector txVector)
void SetRxCallback(Callback< void, Ptr< Packet >, const WifiMacHeader * > callback)
void DeaggregateAmpduAndReceive(Ptr< Packet > aggregatedPacket, double rxSnr, WifiTxVector txVector, WifiPreamble preamble)
Time GetCompressedBlockAckTimeout() const
Return Compressed Block ACK timeout of this MacLow.
Callback< R > MakeNullCallback(void)
Mac48Address m_bssid
BSSID address (Mac48Address)
virtual void BlockAckInactivityTimeout(Mac48Address originator, uint8_t tid)=0
Typically is called in order to notify EdcaTxopN that a block ack inactivity timeout occurs for the b...
BlockAckType
Enumeration for different block ACK policies.
Ptr< Packet > AggregateToAmpdu(Ptr< const Packet > packet, const WifiMacHeader hdr)
EventId m_sendCtsEvent
Event to send CTS.
MacLowRxCallback m_rxCallback
Callback to pass packet up.
Time GetCtsTimeout(void) const
Return CTS timeout of this MacLow.
EventId m_superFastAckTimeoutEvent
Super fast ACK timeout event.
EventId m_sendAckEvent
Event to send ACK.
listen to events coming from ns3::MacLow.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
virtual void StartNextFragment(void)=0
Invoked when ns3::MacLow wants to start a new transmission as configured by MacLowTransmissionParamet...
Time GetCtsDuration(WifiTxVector ctsTxVector) const
Return the time required to transmit the CTS (including preamble and FCS).
bool MustWaitFastAck(void) const
Ptr< Packet > PerformMsduAggregation(Ptr< const Packet > packet, WifiMacHeader *hdr, Time *tstamp, Ptr< Packet > currentAmpduPacket, uint16_t blockAckSize)
Perform MSDU aggregation for a given MPDU in an A-MPDU.
virtual void RegisterListener(WifiPhyListener *listener)=0
control how a packet is transmitted.
MacLowTransmissionParameters()
void WaitSifsAfterEndTx(void)
WifiTxVector GetCtsToSelfTxVector(const WifiMacHeader *header, Ptr< const Packet > packet)
MacLowTransmissionListener()
std::vector< MacLowDcfListener * >::const_iterator DcfListenersCI
typedef for an iterator for a list of MacLowDcfListener.
virtual void CompleteTransfer(Mac48Address address, uint8_t tid)
void SetCtsToSelfSupported(bool enable)
Enable or disable CTS-to-self capability.
void NormalAckTimeout(void)
Event handler when normal ACK timeout occurs.
void SetBasicBlockAckTimeout(Time blockAckTimeout)
Set Basic Block ACK timeout of this MacLow.
BlockAckCaches m_bAckCaches
void InsertInTxQueue(Ptr< const Packet > packet, const WifiMacHeader &hdr, Time tStamp)
Insert in a temporary queue.
virtual uint32_t GetNRetryNeededPackets(Mac48Address recipient, uint8_t tid) const
void RemovePhyMacLowListener(Ptr< WifiPhy > phy)
Remove current WifiPhy listener for this MacLow.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
virtual void RemoveFromBaQueue(uint8_t tid, Mac48Address recipient, uint16_t seqnumber)
Remove a packet after you peek in the retransmit queue and get it.
WifiTxVector m_currentTxVector
TXVECTOR used for the current packet transmission.
void DestroyBlockAckAgreement(Mac48Address originator, uint8_t tid)
bool PeekPacketTag(Tag &tag) const
Search a matching tag and call Tag::Deserialize if it is found.
Time m_lastNavDuration
The duration of the latest NAV.
enum ns3::MacLowTransmissionParameters::@84 m_waitAck
The MPDU is not part of an A-MPDU.
listen for block ack events.
std::pair< Ptr< Packet >, WifiMacHeader > BufferedPacket
void SendCtsToSelf(void)
Send CTS for a CTS-to-self mechanism.
bool m_ctsToSelfSupported
Flag whether CTS-to-self is supported.
void SetAmpdu(bool supported)
Set m_ampdu to 1.
virtual void SetReceiveErrorCallback(RxErrorCallback callback)=0
void SendAckAfterData(Mac48Address source, Time duration, WifiMode dataTxMode, double dataSnr)
Send ACK after receiving DATA.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
virtual Mac48Address GetSrcAddressForAggregation(const WifiMacHeader &hdr)
void CreateBlockAckAgreement(const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq)
Ptr< WifiMacQueue > m_aggregateQueue
Queue used for MPDU aggregation.
void NotifyNav(Ptr< const Packet > packet, const WifiMacHeader &hdr, WifiPreamble preamble)
virtual void NotifyTxStart(Time duration, double txPowerDbm)
uint32_t GetBlockAckSize(enum BlockAckType type) const
Return the total Block ACK size (including FCS trailer).
void ReportRtsFailed(Mac48Address address, const WifiMacHeader *header)
Should be invoked whenever the RtsTimeout associated to a transmission attempt expires.
virtual void NotifyWakeup(void)
Notify listeners that we woke up.
Time NanoSeconds(uint64_t value)
Construct a Time in the indicated unit.
receive notifications about phy events.
void CtsTimeout(void)
Event handler when CTS timeout occurs.
void EnableSuperFastAck(void)
virtual void StartNext(void)=0
Invoked when ns3::MacLow wants to continue the TXOP.
virtual bool IsStateTx(void)
void EndTxNoAck(void)
A transmission that does not require an ACK has completed.
void SendBlockAckAfterAmpdu(uint8_t tid, Mac48Address originator, Time duration, WifiTxVector blockAckReqTxVector, double rxSnr)
Invoked after an A-MPDU has been received.
std::map< AgreementKey, BlockAckCache >::iterator BlockAckCachesI
virtual void EndTxNoAck(void)=0
Invoked upon the end of the transmission of a frame that does not require an ACK (e.g., broadcast and multicast frames).
WifiTxVector GetAckTxVector(Mac48Address to, WifiMode dataTxMode) const
Return a TXVECTOR for the ACK frame given the destination and the mode of the DATA used by the sender...
void SetAckTimeout(Time ackTimeout)
Set ACK timeout of this MacLow.
static TypeId GetTypeId(void)
Register this type.
virtual uint32_t GetNOutstandingPackets(Mac48Address recipient, uint8_t tid)
virtual void GotCts(double snr, WifiMode txMode)=0
void SendDataAfterCts(Mac48Address source, Time duration)
Send DATA after receiving CTS.
indicates whether the socket has a priority set.
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
Time GetRifs(void) const
Return Reduced Interframe Space (RIFS) of this MacLow.
virtual void NotifyRxStart(Time duration)
virtual void NotifySleep(void)
Notify listeners that we went to sleep.
void NavCounterResetCtsMissed(Time rtsEndRxTime)
Reset NAV after CTS was missed when the NAV was setted with RTS.
Time CalculateTxDuration(uint32_t size, WifiTxVector txVector, enum WifiPreamble preamble, double frequency)
Ptr< WifiRemoteStationManager > m_stationManager
Pointer to WifiRemoteStationManager (rate control)
bool MustWaitMultiTidBlockAck(void) const
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
bool NeedRts(void)
Check if the current packet should be sent with a RTS protection.
Mac48Address GetAddress(void) const
Return the MAC address of this MacLow.
uint32_t GetNextPacketSize(void) const
Agreements m_bAckAgreements
virtual uint32_t GetFrequency(void) const
bool HasNextPacket(void) const
The aim of the AmpduTag is to provide means for a MAC to specify that a packet includes A-MPDU since ...
WifiTxVector GetAckTxVectorForData(Mac48Address to, WifiMode dataTxMode) const
Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA used by the ...
virtual uint16_t GetNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the given header.
void RegisterDcfListener(MacLowDcfListener *listener)
void NotifySwitchingStartNow(Time duration)
Time m_slotTime
Slot duration.
bool m_promisc
Flag if the device is operating in promiscuous mode.
The MPDU is part of an A-MPDU, but is not the last aggregate.
void CancelAllEvents(void)
Cancel all scheduled events.
virtual void StartTransmission(Ptr< const Packet > packet, const WifiMacHeader *hdr, MacLowTransmissionParameters parameters, MacLowTransmissionListener *listener)
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
void ReportDataOk(Mac48Address address, const WifiMacHeader *header, double ackSnr, WifiMode ackMode, double dataSnr)
Should be invoked whenever we receive the Ack associated to a data packet we just sent...
std::list< BufferedPacket >::iterator BufferedPacketI
void SetStartingSequence(uint16_t seq)
Set starting sequence number.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
void BlockAckTimeout(void)
Event handler when block ACK timeout occurs.
void NotifyCtsTimeoutStartNow(Time duration)
Notify DcfManager (via DcfListener) that CTS timer should be started for the given duration...
Time m_overrideDurationId
virtual void GotBlockAck(const CtrlBAckResponseHeader *blockAck, Mac48Address source, double rxSnr, WifiMode txMode, double dataSnr)
void EnableCompressedBlockAck(void)
Wait COMPRESSEDBLOCKACKTimeout for a Compressed Block Ack Response frame.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual bool IsStateIdle(void)
void SetAggregation(bool aggregation)
Sets if PSDU contains A-MPDU.
void SuperFastAckTimeout(void)
Event handler when super fast ACK timeout occurs.
void SetBssid(Mac48Address ad)
Set the Basic Service Set Identification.
virtual void UnregisterListener(WifiPhyListener *listener)=0
uint32_t GetRtsSize(void) const
Return the total RTS size (including FCS trailer).
void EnableAck(void)
Wait ACKTimeout for an ACK.
Time CalculateTransmissionTime(Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters ¶meters) const
EventId m_normalAckTimeoutEvent
Normal ACK timeout event.
void StartDataTxTimers(WifiTxVector dataTxVector)
Start a DATA timer by scheduling appropriate ACK timeout.
void AddTrailer(const Trailer &trailer)
Add trailer to this packet.
void NotifyCtsTimeoutResetNow()
Notify DcfManager (via DcfListener) that CTS timer should be resetted.
bool MustWaitBasicBlockAck(void) const
bool MustWaitCompressedBlockAck(void) const
uint32_t RemoveTrailer(Trailer &trailer)
Remove a deserialized trailer from the internal buffer.
bool NeedCtsToSelf(void)
Check if CTS-to-self mechanism should be used for the current packet.
Ptr< const Packet > packet
virtual Time GetLastRxStartTime(void) const
Return the start time of the last received packet.
bool HasVhtSupported(void) const
Return whether the device has VHT capability support enabled.
virtual void Cancel(void)=0
Invoked if this transmission was canceled one way or another.
void SendBlockAckResponse(const CtrlBAckResponseHeader *blockAck, Mac48Address originator, bool immediate, Time duration, WifiMode blockAckReqTxMode, double rxSnr)
This method creates block ack frame with header equals to blockAck and start its transmission.
Time m_ackTimeout
ACK timeout duration.
bool IsInWindow(uint16_t seq, uint16_t winstart, uint16_t winsize)
listen to NAV eventsThis class is typically connected to an instance of ns3::Dcf and calls to its met...
void FastAckTimeout(void)
Event handler when fast ACK timeout occurs (idle).
void DisableRts(void)
Do not send rts and wait for cts before sending data.
void EnableMultiTidBlockAck(void)
NOT IMPLEMENTED FOR NOW.
static Time Now(void)
Return the current simulation virtual time.
void ReportRtsOk(Mac48Address address, const WifiMacHeader *header, double ctsSnr, WifiMode ctsMode, double rtsSnr)
Should be invoked whenever we receive the Cts associated to an RTS we just sent.
EventId m_ctsTimeoutEvent
CTS timeout event.
void RxCompleteBufferedPacketsWithSmallerSequence(uint16_t seq, Mac48Address originator, uint8_t tid)
void SendCtsAfterRts(Mac48Address source, Time duration, WifiTxVector rtsTxVector, double rtsSnr)
Send CTS after receiving RTS.
void SetPhy(Ptr< WifiPhy > phy)
Set up WifiPhy associated with this MacLow.
Time m_basicBlockAckTimeout
Basic block ACK timeout duration.
void SendMpdu(Ptr< const Packet > packet, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype)
Forward the MPDU down to WifiPhy for transmission.
Time GetDurationId(void) const
virtual void CompleteMpduTx(Ptr< const Packet > packet, WifiMacHeader hdr, Time tstamp)
This function stores an MPDU (part of an A-MPDU) in blockackagreement (i.e.
Time m_sifs
Short Interframe Space (SIFS) duration.
bool HasHtSupported(void) const
Return whether the device has HT capability support enabled.
Time GetSlotTime(void) const
Return slot duration of this MacLow.
WifiMacHeader m_lastReceivedHdr
Header of the last received packet.
void SetDelayedBlockAck(void)
Set Block ACK policy to delayed ACK.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Time m_lastNavStart
The time when the latest NAV started.
EventId m_inactivityEvent
bool NeedCtsToSelf(WifiTxVector txVector)
Return if we need to do Cts-to-self before sending a DATA.
void ReceiveError(Ptr< Packet > packet, double rxSnr)
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
virtual void NotifyMaybeCcaBusyStart(Time duration)
WifiTxVector GetRtsTxVector(Ptr< const Packet > packet, const WifiMacHeader *hdr) const
Return a TXVECTOR for the RTS frame given the destination.
virtual WifiTxVector GetDataTxVector(Ptr< const Packet > packet, const WifiMacHeader *hdr) const
Return a TXVECTOR for the DATA frame given the destination.
handle RTS/CTS/DATA/ACK transactions.
virtual void MissedCts(void)=0
ns3::MacLow did not receive an expected CTS within CtsTimeout.
std::vector< Item > m_txPackets
Contain temporary items to be sent with the next A-MPDU transmission, once RTS/CTS exchange has succe...
EventId m_sendDataEvent
Event to send DATA.
bool ReceiveMpdu(Ptr< Packet > packet, WifiMacHeader hdr)
This method updates the reorder buffer and the scoreboard when an MPDU is received in an HT station a...
MacLowTransmissionParameters m_txParams
Transmission parameters of the current packet.
void SetRifs(Time rifs)
Set Reduced Interframe Space (RIFS) of this MacLow.
virtual void DoDispose(void)
Destructor implementation.
void NotifyAckTimeoutResetNow()
Notify DcfManager (via DcfListener) that ACK timer should be resetted.
WifiTxVector GetDataTxVector(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
bool MustWaitSuperFastAck(void) const
bool GetShortPreambleEnabled(void) const
Return whether the device uses short PLCP preambles.
TimeWithUnit As(const enum Unit unit) const
Attach a unit to a Time, to facilitate output in a specific unit.
Time CalculateOverallTxTime(Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters ¶ms) const
QueueListeners m_edcaListeners
WifiTxVector GetBlockAckTxVector(Mac48Address to, WifiMode dataTxMode) const
Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA used by the ...
Mac48Address m_self
Address of this MacLow (Mac48Address)
Maintains information for a block ack agreement.
EventId m_fastAckFailedTimeoutEvent
Fast ACK failed timeout event.
uint32_t QosUtilsMapSeqControlToUniqueInteger(uint16_t seqControl, uint16_t endSequence)
Next function is useful to correctly sort buffered packets under block ack.
bool IsNavZero(void) const
Check if NAV is zero.
void EnableRts(void)
Send a RTS, and wait CTSTimeout for a CTS.
void NotifyAckTimeoutStartNow(Time duration)
Notify DcfManager (via DcfListener) that ACK timer should be started for the given duration...
void SetSlotTime(Time slotTime)
Set slot duration of this MacLow.
Ptr< Packet > m_currentPacket
Current packet transmitted/to be transmitted.
Time GetSifs(void) const
Return Short Interframe Space (SIFS) of this MacLow.
void Reset(void)
Reset the station, invoked in a STA upon dis-association or in an AP upon reboot. ...
bool RemovePacketTag(Tag &tag)
Remove a packet tag.
bool StopMpduAggregation(Ptr< const Packet > peekedPacket, WifiMacHeader peekedHdr, Ptr< Packet > aggregatedPacket, uint16_t size) const
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
std::map< AgreementKey, AgreementValue >::iterator AgreementsI
EventId m_endTxNoAckEvent
Event for finishing transmission that does not require ACK.
void EnableOverrideDurationId(Time durationId)
virtual void SetReceiveOkCallback(RxOkCallback callback)=0
uint32_t m_nTxMpdus
Holds the number of transmitted MPDUs in the last A-MPDU transmission.
bool GetCtsToSelfSupported() const
Return whether CTS-to-self capability is supported.
void ReportRxOk(Mac48Address address, const WifiMacHeader *header, double rxSnr, WifiMode txMode)
void ReceiveOk(Ptr< Packet > packet, double rxSnr, WifiTxVector txVector, WifiPreamble preamble, bool ampduSubframe)
std::list< std::pair< Ptr< Packet >, AmpduSubframeHeader > > DeaggregatedMpdus
A list of deaggregated packets and their A-MPDU subframe headers.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
void SetCtsTimeout(Time ctsTimeout)
Set CTS timeout of this MacLow.
void EnableNextData(uint32_t size)
void SetImmediateBlockAck(void)
Set Block ACK policy to immediate ACK.
MacLowAggregationCapableTransmissionListener()
void DisableOverrideDurationId(void)
Do not force the duration/id field of the packet: its value is automatically calculated by the MacLow...
Time GetAckTimeout(void) const
Return ACK timeout of this MacLow.
virtual Ptr< MsduAggregator > GetMsduAggregator(void) const
virtual uint16_t PeekNextSequenceNumberfor(WifiMacHeader *hdr)
Return the next sequence number for the Traffic ID and destination, but do not pick it (i...
EventId m_waitRifsEvent
Wait for RIFS event.
void DisableNextData(void)
Do not attempt to send data burst after current transmission.
void SendDataPacket(void)
Send DATA packet, which can be DATA-ACK or RTS-CTS-DATA-ACK transaction.
virtual void SendPacket(Ptr< const Packet > packet, WifiTxVector txVector, enum WifiPreamble preamble)=0
void SetTimeout(uint16_t timeout)
Set timeout.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint32_t GetCtsSize(void) const
Return the total CTS size (including FCS trailer).
WifiMacHeader m_currentHdr
Header of the current transmitted packet.
void SetAddress(Mac48Address ad)
Set MAC address of this MacLow.
void WaitSifsAfterEndTxFragment(void)
Event handler that is usually scheduled to fired at the appropriate time after completing transmissio...
WifiTxVector GetRtsTxVector(Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
A base class which provides memory management and object aggregation.
void ForwardDown(Ptr< const Packet > packet, const WifiMacHeader *hdr, WifiTxVector txVector, WifiPreamble preamble)
Forward the packet down to WifiPhy for transmission.
PhyMacLowListener(ns3::MacLow *macLow)
Create a PhyMacLowListener for the given MacLow.
Time m_compressedBlockAckTimeout
Compressed block ACK timeout duration.
WifiMode GetMode(void) const
void SetRemainingNbOfMpdus(uint8_t nbofmpdus)
WifiTxVector GetBlockAckTxVector(Mac48Address address, WifiMode dataMode)
bool MustWaitAck(void) const
bool IsAmpdu(Ptr< const Packet > packet, const WifiMacHeader hdr)
Checks if the given packet will be aggregated to an A-MPDU or not.
void FlushAggregateQueue(void)
This function is called to flush the aggregate queue, which is used for A-MPDU.
virtual ~PhyMacLowListener()
void ResetPhy(void)
Remove WifiPhy associated with this MacLow.
void DisableAck(void)
Do not wait for Ack after data transmission.
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
std::pair< BlockAckAgreement, std::list< BufferedPacket > > AgreementValue
virtual void NotifySwitchingStart(Time duration)
WifiTxVector GetCtsTxVectorForRts(Mac48Address to, WifiMode rtsTxMode) const
Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender...
void SetBufferSize(uint16_t bufferSize)
Set buffer size.
Time GetBasicBlockAckTimeout() const
Return Basic Block ACK timeout of this MacLow.
a unique identifier for an interface.
WifiTxVector GetAckTxVector(Mac48Address address, WifiMode dataMode)
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Time GetRemainingAmpduDuration(void) const
Time m_rifs
Reduced Interframe Space (RIFS) duration.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
WifiTxVector GetCtsTxVector(Mac48Address to, WifiMode rtsTxMode) const
Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender...
Introspection did not find any typical Config paths.
bool StoreMpduIfNeeded(Ptr< Packet > packet, WifiMacHeader hdr)
This method checks if exists a valid established block ack agreement.
bool MustWaitNormalAck(void) const
A struct for packet, Wifi header, and timestamp.
Ptr< WifiPhy > m_phy
Pointer to WifiPhy (actually send/receives frames)
void AddHeader(const Header &header)
Add header to this packet.
void SetCompressedBlockAckTimeout(Time blockAckTimeout)
Set Compressed Block ACK timeout of this MacLow.
Implements the IEEE 802.11 MAC trailer.
virtual void NotifyRxEndOk(void)
We have received the last bit of a packet for which NotifyRxStart was invoked first and...
virtual Ptr< MpduAggregator > GetMpduAggregator(void) const
void SetWifiRemoteStationManager(Ptr< WifiRemoteStationManager > manager)
Set up WifiRemoteStationManager associated with this MacLow.
class PhyMacLowListener * m_phyMacLowListener
Listener needed to monitor when a channel switching occurs.
virtual uint32_t GetSerializedSize(void) const
mpduType
This enumeration defines the type of an MPDU.
uint32_t GetSize(Ptr< const Packet > packet, const WifiMacHeader *hdr) const
Return the total size of the packet after WifiMacHeader and FCS trailer have been added...
MacLowTransmissionListener * m_listener
Transmission listener for the current packet.
void SendRtsForPacket(void)
Send RTS to begin RTS-CTS-DATA-ACK transaction.
The MPDU is the last aggregate in an A-MPDU.
void RxCompleteBufferedPacketsUntilFirstLost(Mac48Address originator, uint8_t tid)
void SetRemainingAmpduDuration(Time duration)