A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
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:

Public Member Functions

 Fragments ()
 Constructor.
 
 ~Fragments ()
 Destructor.
 
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 (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 

Private Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< Fragments >
static void Cleanup (void)
 

Detailed Description

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

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

Member Function Documentation

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 1316 of file ipv4-l3-protocol.cc.

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

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

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

Get the entire packet.

Returns
the entire packet

Definition at line 1369 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().

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

Get the complete part of the packet.

Returns
the part we have comeplete

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

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

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

If all fragments have been added.

Returns
true if the packet is entire

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

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

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


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