A Discrete-Event Network Simulator
API
ns3::OriginatorRxStatus Class Reference

A class to keep track of the packet originator status. More...

+ Collaboration diagram for ns3::OriginatorRxStatus:

Public Member Functions

 OriginatorRxStatus ()
 
 ~OriginatorRxStatus ()
 
void AccumulateFirstFragment (Ptr< const Packet > packet)
 We have received a first fragmented packet. More...
 
void AccumulateFragment (Ptr< const Packet > packet)
 We received a fragmented packet (not first and not last). More...
 
Ptr< PacketAccumulateLastFragment (Ptr< const Packet > packet)
 We have received a last fragment of the fragmented packets (indicated by the no more fragment field). More...
 
uint16_t GetLastSequenceControl (void) const
 Return the last sequence control we received. More...
 
bool IsDeFragmenting (void) const
 Check if we are de-fragmenting packets. More...
 
bool IsNextFragment (uint16_t sequenceControl) const
 Check if the sequence control (i.e. More...
 
void SetSequenceControl (uint16_t sequenceControl)
 Set the last sequence control we received. More...
 

Private Types

typedef std::list< Ptr< const Packet > > Fragments
 typedef for a list of fragments (i.e. More...
 
typedef std::list< Ptr< const Packet > >::const_iterator FragmentsCI
 typedef for a const iterator for Fragments More...
 

Private Attributes

bool m_defragmenting
 flag to indicate whether we are defragmenting More...
 
Fragments m_fragments
 fragments More...
 
uint16_t m_lastSequenceControl
 last sequence control More...
 

Detailed Description

A class to keep track of the packet originator status.

It recomposes the packet from multiple fragments.

Definition at line 34 of file mac-rx-middle.cc.

Member Typedef Documentation

typedef for a list of fragments (i.e.

incomplete Packet).

Definition at line 40 of file mac-rx-middle.cc.

typedef std::list<Ptr<const Packet> >::const_iterator ns3::OriginatorRxStatus::FragmentsCI
private

typedef for a const iterator for Fragments

Definition at line 44 of file mac-rx-middle.cc.

Constructor & Destructor Documentation

ns3::OriginatorRxStatus::OriginatorRxStatus ( )
inline

Definition at line 52 of file mac-rx-middle.cc.

ns3::OriginatorRxStatus::~OriginatorRxStatus ( )
inline

Definition at line 58 of file mac-rx-middle.cc.

Member Function Documentation

void ns3::OriginatorRxStatus::AccumulateFirstFragment ( Ptr< const Packet packet)
inline

We have received a first fragmented packet.

We start the deframentation by saving the first fragment.

Parameters
packetthe first fragmented packet

Definition at line 78 of file mac-rx-middle.cc.

References NS_ASSERT.

Referenced by ns3::MacRxMiddle::HandleFragments().

+ Here is the caller graph for this function:

void ns3::OriginatorRxStatus::AccumulateFragment ( Ptr< const Packet packet)
inline

We received a fragmented packet (not first and not last).

We simply save it into our internal list.

Parameters
packetthe received fragment

Definition at line 113 of file mac-rx-middle.cc.

References NS_ASSERT.

Referenced by ns3::MacRxMiddle::HandleFragments().

+ Here is the caller graph for this function:

Ptr<Packet> ns3::OriginatorRxStatus::AccumulateLastFragment ( Ptr< const Packet packet)
inline

We have received a last fragment of the fragmented packets (indicated by the no more fragment field).

We re-construct the packet from the fragments we saved and return the full packet.

Parameters
packetthe last fragment
Returns
the fully reconstructed packet

Definition at line 94 of file mac-rx-middle.cc.

References ns3::Packet::AddAtEnd(), and NS_ASSERT.

Referenced by ns3::MacRxMiddle::HandleFragments().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint16_t ns3::OriginatorRxStatus::GetLastSequenceControl ( void  ) const
inline

Return the last sequence control we received.

Returns
the last sequence control

Definition at line 144 of file mac-rx-middle.cc.

References m_lastSequenceControl.

Referenced by ns3::MacRxMiddle::IsDuplicate().

+ Here is the caller graph for this function:

bool ns3::OriginatorRxStatus::IsDeFragmenting ( void  ) const
inline

Check if we are de-fragmenting packets.

Returns
true if we are de-fragmenting packets, false otherwise

Definition at line 68 of file mac-rx-middle.cc.

References m_defragmenting.

Referenced by ns3::MacRxMiddle::HandleFragments().

+ Here is the caller graph for this function:

bool ns3::OriginatorRxStatus::IsNextFragment ( uint16_t  sequenceControl) const
inline

Check if the sequence control (i.e.

fragment number) is in order.

Parameters
sequenceControlthe raw sequence control
Returns
true if the sequence control is in order, false otherwise

Definition at line 127 of file mac-rx-middle.cc.

Referenced by ns3::MacRxMiddle::HandleFragments().

+ Here is the caller graph for this function:

void ns3::OriginatorRxStatus::SetSequenceControl ( uint16_t  sequenceControl)
inline

Set the last sequence control we received.

Parameters
sequenceControlthe last sequence control we received

Definition at line 153 of file mac-rx-middle.cc.

Referenced by ns3::MacRxMiddle::HandleFragments().

+ Here is the caller graph for this function:

Member Data Documentation

bool ns3::OriginatorRxStatus::m_defragmenting
private

flag to indicate whether we are defragmenting

Definition at line 46 of file mac-rx-middle.cc.

Referenced by IsDeFragmenting().

Fragments ns3::OriginatorRxStatus::m_fragments
private

fragments

Definition at line 48 of file mac-rx-middle.cc.

uint16_t ns3::OriginatorRxStatus::m_lastSequenceControl
private

last sequence control

Definition at line 47 of file mac-rx-middle.cc.

Referenced by GetLastSequenceControl().


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