INET Framework for OMNeT++/OMNEST
TCP_NSC_ReceiveQueue Class Reference

#include <TCP_NSC_Queues.h>

Inheritance diagram for TCP_NSC_ReceiveQueue:
TCP_NSC_VirtualDataReceiveQueue

List of all members.

Public Member Functions

 TCP_NSC_ReceiveQueue ()
virtual ~TCP_NSC_ReceiveQueue ()
virtual void setConnection (TCP_NSC_Connection *connP)
virtual uint32 insertBytesFromSegment (const TCPSegment *tcpsegP, void *bufferP, size_t bufferLengthP)=0
virtual void enqueueNscData (void *dataP, int dataLengthP)=0
virtual cPacket * extractBytesUpTo ()=0
virtual uint32 getAmountOfBufferedBytes ()=0
virtual uint32 getQueueLength ()=0
virtual void getQueueStatus ()=0
virtual void notifyAboutSending (const TCPSegment *tcpsegP)=0

Protected Attributes

TCP_NSC_ConnectionconnM

Constructor & Destructor Documentation

TCP_NSC_ReceiveQueue::TCP_NSC_ReceiveQueue ( ) [inline]

Ctor.

: connM(NULL) {};
virtual TCP_NSC_ReceiveQueue::~TCP_NSC_ReceiveQueue ( ) [inline, virtual]

Virtual dtor.

{}

Member Function Documentation

virtual void TCP_NSC_ReceiveQueue::enqueueNscData ( void *  dataP,
int  dataLengthP 
) [pure virtual]

The method called when data received from NSC The method should set status of the data in queue to received called after socket->read_data() successfull

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual cPacket* TCP_NSC_ReceiveQueue::extractBytesUpTo ( ) [pure virtual]

Should create a packet to be passed up to the app, up to (but NOT including) the given sequence no (usually rcv_nxt). It should return NULL if there's no more data to be passed up -- this method is called several times until it returns NULL.

called after socket->read_data() successfull

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual uint32 TCP_NSC_ReceiveQueue::getAmountOfBufferedBytes ( ) [pure virtual]

Returns the number of bytes (out-of-order-segments) currently buffered in queue.

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual uint32 TCP_NSC_ReceiveQueue::getQueueLength ( ) [pure virtual]

Returns the number of blocks currently buffered in queue.

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual void TCP_NSC_ReceiveQueue::getQueueStatus ( ) [pure virtual]

Shows current queue status.

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual uint32 TCP_NSC_ReceiveQueue::insertBytesFromSegment ( const TCPSegment tcpsegP,
void *  bufferP,
size_t  bufferLengthP 
) [pure virtual]

Called when a TCP segment arrives, it should extract the payload from the segment and store it in the receive queue. The segment object should *not* be deleted.

The method should return the number of bytes to copied to buffer.

The method should fill the bufferP for data sending to NSC stack

called before nsc_stack->if_receive_packet() called

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual void TCP_NSC_ReceiveQueue::notifyAboutSending ( const TCPSegment tcpsegP) [pure virtual]

notify the queue about output messages

called when connM send out a packet. for read AckNo, if have

Implemented in TCP_NSC_VirtualDataReceiveQueue.

virtual void TCP_NSC_ReceiveQueue::setConnection ( TCP_NSC_Connection connP) [inline, virtual]

Add a connection queue.

Reimplemented in TCP_NSC_VirtualDataReceiveQueue.

{ connM = connP; }

Member Data Documentation


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