class for the reordering buffer that keeps the data from lower layer, i.e. TcpL4Protocol, sent to the application More...
#include <tcp-rx-buffer.h>
Public Types | |
typedef std::map < SequenceNumber32, Ptr < Packet > >::iterator | BufIterator |
Public Member Functions | |
TcpRxBuffer (uint32_t n=0) | |
bool | Add (Ptr< Packet > p, TcpHeader const &tcph) |
uint32_t | Available () const |
Ptr< Packet > | Extract (uint32_t maxSize) |
bool | Finished (void) |
void | IncNextRxSequence (void) |
uint32_t | MaxBufferSize (void) const |
SequenceNumber32 | MaxRxSequence (void) const |
SequenceNumber32 | NextRxSequence (void) const |
void | SetFinSequence (const SequenceNumber32 &s) |
void | SetMaxBufferSize (uint32_t s) |
void | SetNextRxSequence (const SequenceNumber32 &s) |
uint32_t | Size (void) const |
![]() | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
![]() | |
static void | Cleanup (void) |
![]() | |
static TypeId | GetTypeId (void) |
Public Attributes | |
uint32_t | m_availBytes |
std::map< SequenceNumber32, Ptr< Packet > > | m_data |
SequenceNumber32 | m_finSeq |
bool | m_gotFin |
uint32_t | m_maxBuffer |
TracedValue< SequenceNumber32 > | m_nextRxSeq |
uint32_t | m_size |
Additional Inherited Members | |
![]() | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
class for the reordering buffer that keeps the data from lower layer, i.e. TcpL4Protocol, sent to the application
Definition at line 40 of file tcp-rx-buffer.h.
Insert a packet into the buffer and update the availBytes counter to reflect the number of bytes ready to send to the application. This function handles overlap by triming the head of the inputted packet and removing data from the buffer that overlaps the tail of the inputted packet
Definition at line 137 of file tcp-rx-buffer.cc.
References ns3::Packet::CreateFragment(), ns3::TcpHeader::GetSequenceNumber(), ns3::Packet::GetSize(), NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Extract data from the head of the buffer as indicated by nextRxSeq. The extracted data is going to be forwarded to the application.
Definition at line 220 of file tcp-rx-buffer.cc.
References NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ns3::TcpSocketBase::Recv().