21 #include "ns3/uinteger.h"
35 static TypeId tid =
TypeId (
"ns3::MsduStandardAggregator")
37 .AddConstructor<MsduStandardAggregator> ()
38 .AddAttribute (
"MaxAmsduSize",
"Max length in byte of an A-MSDU",
41 MakeUintegerChecker<uint32_t> ())
63 uint32_t actualSize = aggregatedPacket->
GetSize ();
75 currentPacket = packet->
Copy ();
78 aggregatedPacket->
AddAtEnd (currentPacket);
87 return (4 - (packet->
GetSize () % 4 )) % 4;
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
static TypeId GetTypeId(void)
#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).
virtual bool Aggregate(Ptr< const Packet > packet, Ptr< Packet > aggregatedPacket, Mac48Address src, Mac48Address dest)
void AddAtEnd(Ptr< const Packet > packet)
Concatenate the input packet at the end of the current packet.
Hold an unsigned integer type.
~MsduStandardAggregator()
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t CalculatePadding(Ptr< const Packet > packet)
Calculates how much padding must be added to the end of aggregated packet, after that a new packet is...
Abstract class that concrete msdu aggregators have to implement.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
uint32_t m_maxAmsduLength
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddHeader(const Header &header)
Add header to this packet.