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

A Set of Fragment belonging to the same packet (src, dst, identification and proto) More...

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

Public Member Functions

 Fragments ()
 Constructor. More...
 
 ~Fragments ()
 Destructor. More...
 
void AddFragment (Ptr< Packet > fragment, uint16_t fragmentOffset, bool moreFragment)
 Add a fragment. More...
 
Ptr< PacketGetPacket () const
 Get the entire packet. More...
 
Ptr< PacketGetPartialPacket () const
 Get the complete part of the packet. More...
 
bool IsEntire () const
 If all fragments have been added. 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

std::list< std::pair< Ptr< Packet >, uint16_t > > m_fragments
 The current fragments. More...
 
bool m_moreFragment
 True if other fragments will be sent. More...
 

Detailed Description

A Set of Fragment belonging to the same packet (src, dst, identification and proto)

Definition at line 499 of file ipv4-l3-protocol.h.

Constructor & Destructor Documentation

◆ Fragments()

ns3::Ipv4L3Protocol::Fragments::Fragments ( )

Constructor.

Definition at line 1571 of file ipv4-l3-protocol.cc.

References NS_LOG_FUNCTION.

◆ ~Fragments()

ns3::Ipv4L3Protocol::Fragments::~Fragments ( )

Destructor.

Definition at line 1577 of file ipv4-l3-protocol.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddFragment()

void ns3::Ipv4L3Protocol::Fragments::AddFragment ( Ptr< Packet fragment,
uint16_t  fragmentOffset,
bool  moreFragment 
)

Add a fragment.

Parameters
fragmentthe fragment
fragmentOffsetthe offset of the fragment
moreFragmentthe bit "More Fragment"

Definition at line 1583 of file ipv4-l3-protocol.cc.

References ns3::Ipv4L3Protocol::m_fragments, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

◆ GetPacket()

Ptr< Packet > ns3::Ipv4L3Protocol::Fragments::GetPacket ( ) const

Get the entire packet.

Returns
the entire packet

Definition at line 1636 of file ipv4-l3-protocol.cc.

References ns3::Packet::AddAtEnd(), ns3::Packet::GetSize(), ns3::Ipv4L3Protocol::m_fragments, NS_LOG_FUNCTION, and NS_LOG_LOGIC().

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

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

◆ GetPartialPacket()

Ptr< Packet > ns3::Ipv4L3Protocol::Fragments::GetPartialPacket ( ) const

Get the complete part of the packet.

Returns
the part we have comeplete

Definition at line 1674 of file ipv4-l3-protocol.cc.

References ns3::Packet::AddAtEnd(), ns3::Packet::GetSize(), ns3::Ipv4L3Protocol::m_fragments, NS_LOG_FUNCTION, and NS_LOG_LOGIC().

+ Here is the call graph for this function:

◆ IsEntire()

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

If all fragments have been added.

Returns
true if the packet is entire

Definition at line 1606 of file ipv4-l3-protocol.cc.

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

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

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

Member Data Documentation

◆ m_fragments

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

The current fragments.

Definition at line 547 of file ipv4-l3-protocol.h.

◆ m_moreFragment

bool ns3::Ipv4L3Protocol::Fragments::m_moreFragment
private

True if other fragments will be sent.

Definition at line 542 of file ipv4-l3-protocol.h.


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