diff --git a/src/devices/wifi/mac-tx-middle.cc b/src/devices/wifi/mac-tx-middle.cc index 74a5b6207..2b84d7d91 100644 --- a/src/devices/wifi/mac-tx-middle.cc +++ b/src/devices/wifi/mac-tx-middle.cc @@ -77,4 +77,17 @@ MacTxMiddle::GetNextSequenceNumberfor (const WifiMacHeader *hdr) return retval; } +uint16_t +MacTxMiddle::GetNextSeqNumberByTidAndAddress (uint8_t tid, Mac48Address addr) const +{ + NS_ASSERT (tid < 16); + uint16_t seq = 0; + std::map ::const_iterator it = m_qosSequences.find (addr); + if (it != m_qosSequences.end ()) + { + return it->second[tid]; + } + return seq; +} + } // namespace ns3 diff --git a/src/devices/wifi/mac-tx-middle.h b/src/devices/wifi/mac-tx-middle.h index a701a93eb..9bccfc779 100644 --- a/src/devices/wifi/mac-tx-middle.h +++ b/src/devices/wifi/mac-tx-middle.h @@ -37,6 +37,7 @@ public: ~MacTxMiddle (); uint16_t GetNextSequenceNumberfor (const WifiMacHeader *hdr); + uint16_t GetNextSeqNumberByTidAndAddress (uint8_t tid, Mac48Address addr) const; private: std::map m_qosSequences;