10#define MAC_RX_MIDDLE_H
12#include "ns3/callback.h"
13#include "ns3/simple-ref-count.h"
21class OriginatorRxStatus;
103 using Originators = std::map<Mac48Address, OriginatorRxStatus, std::less<>>;
114 using OriginatorsI = std::map<Mac48Address, OriginatorRxStatus, std::less<>>::iterator;
120 std::map<std::pair<Mac48Address, uint8_t>,
OriginatorRxStatus, std::less<>>::iterator;
This class handles duplicate detection and recomposition of fragments.
friend class MacRxMiddleTest
allow MacRxMiddleTest associated class access
void SetForwardCallback(ForwardUpCallback callback)
Set a callback to forward the packet up.
bool IsDuplicate(const WifiMacHeader &hdr, const OriginatorRxStatus &originator) const
Check if we have already received the packet from the sender before (by looking at the sequence contr...
std::map< Mac48Address, OriginatorRxStatus, std::less<> >::iterator OriginatorsI
typedef for an iterator for Originators
Originators m_originatorStatus
originator status
std::map< std::pair< Mac48Address, uint8_t >, OriginatorRxStatus, std::less<> > QosOriginators
typedef for a map between address, OriginatorRxStatus, and Traffic ID
Ptr< const Packet > HandleFragments(Ptr< const Packet > packet, const WifiMacHeader &hdr, OriginatorRxStatus &originator)
Check if the received packet is a fragment and handle it appropriately.
std::map< std::pair< Mac48Address, uint8_t >, OriginatorRxStatus, std::less<> >::iterator QosOriginatorsI
typedef for an iterator for QosOriginators
void Receive(Ptr< const WifiMpdu > mpdu, uint8_t linkId)
Receive an MPDU on the given link.
QosOriginators m_qosOriginatorStatus
QOS originator status.
std::map< Mac48Address, OriginatorRxStatus, std::less<> > Originators
typedef for a map between address and OriginatorRxStatus
ForwardUpCallback m_callback
forward up callback
OriginatorRxStatus & Lookup(const WifiMacHeader &hdr)
Look up for OriginatorRxStatus associated with the sender address (by looking at ADDR2 field in the h...
A class to keep track of the packet originator status.
Smart pointer class similar to boost::intrusive_ptr.
A template-based reference counting class.
Every class exported by the ns3 library is enclosed in the ns3 namespace.