36 .SetGroupName (
"Wifi")
50 uint32_t maxSize = aggregatedPacket->
GetSize ();
51 uint16_t extractedLength;
53 uint32_t deserialized = 0;
55 while (deserialized < maxSize)
59 extractedMpdu = aggregatedPacket->
CreateFragment (0, static_cast<uint32_t> (extractedLength));
61 deserialized += extractedLength;
63 padding = (4 - (extractedLength % 4 )) % 4;
65 if (padding > 0 && deserialized < maxSize)
68 deserialized += padding;
72 set.push_back (packetHdr);
74 NS_LOG_INFO (
"Deaggreated A-MPDU: extracted " << set.size () <<
" MPDUs");
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
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.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Ptr< Packet > CreateFragment(uint32_t start, uint32_t length) const
Create a new packet which contains a fragment of the original packet.
void RemoveAtStart(uint32_t size)
Remove size bytes from the start of the current packet.
static TypeId GetTypeId(void)
std::list< std::pair< Ptr< Packet >, AmpduSubframeHeader > > DeaggregatedMpdus
A list of deaggregated packets and their A-MPDU subframe headers.
A base class which provides memory management and object aggregation.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.