INET Framework for OMNeT++/OMNEST
|
#include <TCP_NSC_VirtualDataQueues.h>
Public Member Functions | |
TCP_NSC_VirtualDataReceiveQueue () | |
virtual | ~TCP_NSC_VirtualDataReceiveQueue () |
virtual void | setConnection (TCP_NSC_Connection *connP) |
virtual uint32 | insertBytesFromSegment (const TCPSegment *tcpsegP, void *bufferP, size_t bufferLengthP) |
virtual void | enqueueNscData (void *dataP, int dataLengthP) |
virtual cPacket * | extractBytesUpTo () |
virtual uint32 | getAmountOfBufferedBytes () |
virtual uint32 | getQueueLength () |
virtual void | getQueueStatus () |
virtual void | notifyAboutSending (const TCPSegment *tcpsegP) |
Protected Attributes | |
long int | bytesInQueueM |
TCP_NSC_VirtualDataReceiveQueue::TCP_NSC_VirtualDataReceiveQueue | ( | ) |
Ctor.
virtual TCP_NSC_VirtualDataReceiveQueue::~TCP_NSC_VirtualDataReceiveQueue | ( | ) | [virtual] |
Virtual dtor.
virtual void TCP_NSC_VirtualDataReceiveQueue::enqueueNscData | ( | void * | dataP, |
int | dataLengthP | ||
) | [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
Implements TCP_NSC_ReceiveQueue.
virtual cPacket* TCP_NSC_VirtualDataReceiveQueue::extractBytesUpTo | ( | ) | [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
Implements TCP_NSC_ReceiveQueue.
virtual uint32 TCP_NSC_VirtualDataReceiveQueue::getAmountOfBufferedBytes | ( | ) | [virtual] |
Returns the number of bytes (out-of-order-segments) currently buffered in queue.
Implements TCP_NSC_ReceiveQueue.
virtual uint32 TCP_NSC_VirtualDataReceiveQueue::getQueueLength | ( | ) | [virtual] |
Returns the number of blocks currently buffered in queue.
Implements TCP_NSC_ReceiveQueue.
virtual void TCP_NSC_VirtualDataReceiveQueue::getQueueStatus | ( | ) | [virtual] |
Shows current queue status.
Implements TCP_NSC_ReceiveQueue.
virtual uint32 TCP_NSC_VirtualDataReceiveQueue::insertBytesFromSegment | ( | const TCPSegment * | tcpsegP, |
void * | bufferP, | ||
size_t | bufferLengthP | ||
) | [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 be deleted by queue.
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
Implements TCP_NSC_ReceiveQueue.
virtual void TCP_NSC_VirtualDataReceiveQueue::notifyAboutSending | ( | const TCPSegment * | tcpsegP | ) | [virtual] |
notify the queue about output messages
called when connM send out a packet. for read AckNo, if have
Implements TCP_NSC_ReceiveQueue.
virtual void TCP_NSC_VirtualDataReceiveQueue::setConnection | ( | TCP_NSC_Connection * | connP | ) | [virtual] |
Set the connection.
Reimplemented from TCP_NSC_ReceiveQueue.
long int TCP_NSC_VirtualDataReceiveQueue::bytesInQueueM [protected] |