A Discrete-Event Network Simulator
API
ns3::SixLowPanNetDevice::Fragments Class Reference

A Set of Fragments. More...

+ Inheritance diagram for ns3::SixLowPanNetDevice::Fragments:
+ Collaboration diagram for ns3::SixLowPanNetDevice::Fragments:

Public Member Functions

 Fragments ()
 Constructor. More...
 
 ~Fragments ()
 Destructor. More...
 
void AddFirstFragment (Ptr< Packet > fragment)
 Add the first packet fragment. More...
 
void AddFragment (Ptr< Packet > fragment, uint16_t fragmentOffset)
 Add a fragment to the pool. More...
 
std::list< Ptr< Packet > > GetFraments () const
 Get a list of the current stored fragments. More...
 
Ptr< PacketGetPacket () const
 Get the entire packet. More...
 
FragmentsTimeoutsListI_t GetTimeoutIter ()
 Get the Timeout iterator. More...
 
bool IsEntire () const
 If all fragments have been added. More...
 
void SetPacketSize (uint32_t packetSize)
 Set the packet-to-be-defragmented size. More...
 
void SetTimeoutIter (FragmentsTimeoutsListI_t iter)
 Set the Timeout iterator. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Fragments >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 

Private Attributes

Ptr< Packetm_firstFragment
 The very first fragment. More...
 
std::list< std::pair< Ptr< Packet >, uint16_t > > m_fragments
 The current fragments. More...
 
uint32_t m_packetSize
 The size of the reconstructed packet (bytes). More...
 
FragmentsTimeoutsListI_t m_timeoutIter
 Timeout iterator to "event" handler. More...
 

Detailed Description

A Set of Fragments.

Definition at line 384 of file sixlowpan-net-device.h.

Constructor & Destructor Documentation

◆ Fragments()

ns3::SixLowPanNetDevice::Fragments::Fragments ( )

Constructor.

Definition at line 2086 of file sixlowpan-net-device.cc.

References m_packetSize, and NS_LOG_FUNCTION.

◆ ~Fragments()

ns3::SixLowPanNetDevice::Fragments::~Fragments ( )

Destructor.

Definition at line 2092 of file sixlowpan-net-device.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddFirstFragment()

void ns3::SixLowPanNetDevice::Fragments::AddFirstFragment ( Ptr< Packet fragment)

Add the first packet fragment.

The first fragment is needed to allow the post-defragmentation decompression.

Parameters
[in]fragmentThe fragment.

Definition at line 2123 of file sixlowpan-net-device.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the caller graph for this function:

◆ AddFragment()

void ns3::SixLowPanNetDevice::Fragments::AddFragment ( Ptr< Packet fragment,
uint16_t  fragmentOffset 
)

Add a fragment to the pool.

Parameters
[in]fragmentthe fragment.
[in]fragmentOffsetthe offset of the fragment.

Definition at line 2097 of file sixlowpan-net-device.cc.

References ns3::Packet::GetSize(), ns3::SixLowPanNetDevice::m_fragments, NS_ASSERT_MSG(), and NS_LOG_FUNCTION.

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFraments()

std::list< Ptr< Packet > > ns3::SixLowPanNetDevice::Fragments::GetFraments ( ) const

Get a list of the current stored fragments.

Returns
The current stored fragments.

Definition at line 2198 of file sixlowpan-net-device.cc.

References ns3::SixLowPanNetDevice::m_fragments.

◆ GetPacket()

Ptr< Packet > ns3::SixLowPanNetDevice::Fragments::GetPacket ( void  ) const

Get the entire packet.

Returns
The entire packet.

Definition at line 2162 of file sixlowpan-net-device.cc.

References ns3::Packet::AddAtEnd(), ns3::SixLowPanNetDevice::m_fragments, NS_ABORT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC().

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTimeoutIter()

SixLowPanNetDevice::FragmentsTimeoutsListI_t ns3::SixLowPanNetDevice::Fragments::GetTimeoutIter ( )

Get the Timeout iterator.

Returns
The iterator.

Definition at line 2217 of file sixlowpan-net-device.cc.

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the caller graph for this function:

◆ IsEntire()

bool ns3::SixLowPanNetDevice::Fragments::IsEntire ( ) const

If all fragments have been added.

Returns
True if the packet is entire.

Definition at line 2130 of file sixlowpan-net-device.cc.

References list, ns3::SixLowPanNetDevice::m_fragments, max, NS_LOG_FUNCTION, and NS_LOG_LOGIC().

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPacketSize()

void ns3::SixLowPanNetDevice::Fragments::SetPacketSize ( uint32_t  packetSize)

Set the packet-to-be-defragmented size.

Parameters
[in]packetSizeThe packet size (bytes).

Definition at line 2192 of file sixlowpan-net-device.cc.

References NS_LOG_FUNCTION, and packetSize.

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the caller graph for this function:

◆ SetTimeoutIter()

void ns3::SixLowPanNetDevice::Fragments::SetTimeoutIter ( FragmentsTimeoutsListI_t  iter)

Set the Timeout iterator.

Parameters
iterThe iterator.

Definition at line 2210 of file sixlowpan-net-device.cc.

Referenced by ns3::SixLowPanNetDevice::ProcessFragment().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_firstFragment

Ptr<Packet> ns3::SixLowPanNetDevice::Fragments::m_firstFragment
private

The very first fragment.

Definition at line 461 of file sixlowpan-net-device.h.

◆ m_fragments

std::list<std::pair<Ptr<Packet>, uint16_t> > ns3::SixLowPanNetDevice::Fragments::m_fragments
private

The current fragments.

Definition at line 456 of file sixlowpan-net-device.h.

◆ m_packetSize

uint32_t ns3::SixLowPanNetDevice::Fragments::m_packetSize
private

The size of the reconstructed packet (bytes).

Definition at line 451 of file sixlowpan-net-device.h.

Referenced by Fragments().

◆ m_timeoutIter

FragmentsTimeoutsListI_t ns3::SixLowPanNetDevice::Fragments::m_timeoutIter
private

Timeout iterator to "event" handler.

Definition at line 466 of file sixlowpan-net-device.h.


The documentation for this class was generated from the following files: