class for managing I/O between applications and TCP More...
#include <pending-data.h>
Public Member Functions | |
PendingData (uint32_t s, uint8_t *d=NULL, uint32_t msg=0, uint32_t resp=0) | |
PendingData (const std::string &) | |
PendingData (uint8_t *, uint32_t &, Packet *) | |
PendingData (const PendingData &) | |
virtual void | Add (uint32_t s, const uint8_t *d=0) |
virtual void | Add (Ptr< Packet > p) |
virtual void | Clear () |
uint8_t * | Construct (uint8_t *, uint32_t &) |
PendingData * | Copy () const |
virtual Ptr< Packet > | CopyFromOffset (uint32_t, uint32_t) |
virtual Ptr< Packet > | CopyFromSeq (uint32_t, const SequenceNumber32 &, const SequenceNumber32 &) |
PendingData * | CopyS (uint32_t) |
PendingData * | CopySD (uint32_t, uint8_t *) |
virtual uint32_t | OffsetFromSeq (const SequenceNumber32 &seqFront, const SequenceNumber32 &seqOffset) |
virtual uint32_t | RemoveToSeq (const SequenceNumber32 &seqFront, const SequenceNumber32 &seqOffset) |
uint8_t * | Serialize (uint8_t *, uint32_t &) |
uint32_t | Size () const |
virtual uint32_t | SizeFromOffset (uint32_t offset) |
virtual uint32_t | SizeFromSeq (const SequenceNumber32 &seqFront, const SequenceNumber32 &seqOffset) |
Public Attributes | |
std::vector< Ptr< Packet > > | data |
uint32_t | msgSize |
uint32_t | responseSize |
uint32_t | size |
class for managing I/O between applications and TCP
Definition at line 41 of file pending-data.h.
|
virtual |
Subtracts seqFront from seqOffset after enforcing seqFront is less than seqOffset
seqFront | sequence number to be subtracted from seqOffset |
seqOffset | higher sequence number |
Definition at line 139 of file pending-data.cc.
References NS_LOG_FUNCTION.
Referenced by RemoveToSeq(), and SizeFromSeq().
|
virtual |
Permits object to clear any pending data between seqFront and seqOffset - 1). Callers should check the return value to determine whether any data was removed from the front.
seqFront | sequence number to start to try to remove from |
seqOffset | first sequence number in buffer that should be retained |
Definition at line 227 of file pending-data.cc.
References NS_ASSERT_MSG, NS_LOG_FUNCTION, and OffsetFromSeq().
|
virtual |
offset | offset (from zero) |
Definition at line 131 of file pending-data.cc.
References NS_LOG_FUNCTION.
Referenced by SizeFromSeq().
|
virtual |
This method returns the number of bytes in the PendingData buffer beyond the sequence number specified by seqOffset.
The variables seqFront and seqOffset correspond to a sequence number space in use by the user. What is significant in this method is the difference between them; i.e. the quantity (seqOffset - seqFront). This difference is subtracted from Size(), yielding the number of bytes beyond seqOffset, from the user perspective, in the PendingData buffer.
If the first number specified is not a sequence number that corresponds to the first data byte in the PendingData buffer, the computation returned will be in error.
seqFront | sequence number of assumed first byte in the PendingData |
seqOffset | sequence number of offset |
Definition at line 124 of file pending-data.cc.
References NS_LOG_FUNCTION, OffsetFromSeq(), and SizeFromOffset().