INET Framework for OMNeT++/OMNEST
|
Retransmission data for SACK. More...
#include <TCPSACKRexmitQueue.h>
Classes | |
struct | Region |
Public Types | |
typedef std::list< Region > | RexmitQueue |
Public Member Functions | |
TCPSACKRexmitQueue () | |
Ctor. More... | |
virtual | ~TCPSACKRexmitQueue () |
Virtual dtor. More... | |
virtual void | setConnection (TCPConnection *_conn) |
Set the connection that owns this queue. More... | |
virtual void | init (uint32 seqNum) |
Initialize the object. More... | |
virtual std::string | str () const |
Returns a string for debug purposes. More... | |
virtual void | info () const |
Prints the current rexmitQueue status for debug purposes. More... | |
virtual uint32 | getBufferStartSeq () const |
Returns the sequence number of the first byte stored in the buffer. More... | |
virtual uint32 | getBufferEndSeq () const |
Returns the sequence number of the last byte stored in the buffer plus one. More... | |
virtual void | discardUpTo (uint32 seqNum) |
Tells the queue that bytes up to (but NOT including) seqNum have been transmitted and ACKed, so they can be removed from the queue. More... | |
virtual void | enqueueSentData (uint32 fromSeqNum, uint32 toSeqNum) |
Inserts sent data to the rexmit queue. More... | |
virtual void | setSackedBit (uint32 fromSeqNum, uint32 toSeqNum) |
Called when data sender received selective acknowledgments. More... | |
virtual bool | getSackedBit (uint32 seqNum) const |
Returns SackedBit value of seqNum. More... | |
virtual uint32 | getQueueLength () const |
Returns the number of blocks currently buffered in queue. More... | |
virtual uint32 | getHighestSackedSeqNum () const |
Returns the highest sequence number sacked by data receiver. More... | |
virtual uint32 | getHighestRexmittedSeqNum () const |
Returns the highest sequence number rexmitted by data sender. More... | |
virtual uint32 | checkRexmitQueueForSackedOrRexmittedSegments (uint32 fromSeq) const |
Checks rexmit queue for sacked of rexmitted segments and returns a certain offset (contiguous sacked or rexmitted region) to forward snd->nxt. More... | |
virtual void | resetSackedBit () |
Called when REXMIT timer expired. More... | |
virtual void | resetRexmittedBit () |
Called when REXMIT timer expired. More... | |
virtual uint32 | getTotalAmountOfSackedBytes () const |
Returns total amount of sacked bytes. More... | |
virtual uint32 | getAmountOfSackedBytes (uint32 seqNum) const |
Returns amount of sacked bytes above seqNum. More... | |
virtual uint32 | getNumOfDiscontiguousSacks (uint32 seqNum) const |
Returns the number of discontiguous sacked regions (SACKed sequences) above seqNum. More... | |
virtual void | checkSackBlock (uint32 seqNum, uint32 &length, bool &sacked, bool &rexmitted) const |
Public Attributes | |
TCPConnection * | conn |
RexmitQueue | rexmitQueue |
uint32 | begin |
uint32 | end |
Protected Member Functions | |
bool | checkQueue () const |
Retransmission data for SACK.
typedef std::list<Region> inet::tcp::TCPSACKRexmitQueue::RexmitQueue |
inet::tcp::TCPSACKRexmitQueue::TCPSACKRexmitQueue | ( | ) |
Ctor.
|
virtual |
Virtual dtor.
|
protected |
Referenced by discardUpTo(), enqueueSentData(), and setSackedBit().
|
virtual |
Checks rexmit queue for sacked of rexmitted segments and returns a certain offset (contiguous sacked or rexmitted region) to forward snd->nxt.
It is called before retransmitting data.
Referenced by inet::tcp::TCPConnection::sendSegment().
|
virtual |
Referenced by inet::tcp::TCPConnection::nextSeg(), and inet::tcp::TCPConnection::setPipe().
|
virtual |
Tells the queue that bytes up to (but NOT including) seqNum have been transmitted and ACKed, so they can be removed from the queue.
Referenced by inet::tcp::TCPConnection::processAckInEstabEtc(), inet::tcp::TCPConnection::processRstInSynReceived(), and inet::tcp::TCPConnection::processSegmentInSynSent().
Inserts sent data to the rexmit queue.
Referenced by inet::tcp::TCPConnection::sendSegment().
Returns amount of sacked bytes above seqNum.
Referenced by inet::tcp::TCPConnection::isLost().
|
inlinevirtual |
Returns the sequence number of the last byte stored in the buffer plus one.
(The first byte of the next send operation would get this sequence number.)
Referenced by inet::tcp::TCPConnection::processRstInSynReceived().
|
inlinevirtual |
Returns the sequence number of the first byte stored in the buffer.
|
virtual |
Returns the highest sequence number rexmitted by data sender.
Referenced by inet::tcp::TCPConnection::nextSeg(), inet::tcp::TCPConnection::retransmitOneSegment(), inet::tcp::TCPConnection::sendData(), inet::tcp::TCPConnection::sendSegmentDuringLossRecoveryPhase(), and inet::tcp::TCPConnection::setPipe().
|
virtual |
Returns the highest sequence number sacked by data receiver.
Referenced by inet::tcp::TCPConnection::nextSeg().
Returns the number of discontiguous sacked regions (SACKed sequences) above seqNum.
Referenced by inet::tcp::TCPConnection::isLost().
|
inlinevirtual |
Returns the number of blocks currently buffered in queue.
|
virtual |
Returns SackedBit value of seqNum.
|
virtual |
Returns total amount of sacked bytes.
Corresponds to update() function from RFC 3517.
Referenced by inet::tcp::TCPConnection::processSACKOption().
|
virtual |
Prints the current rexmitQueue status for debug purposes.
Referenced by checkQueue(), enqueueSentData(), and inet::tcp::TCPConnection::sendSegment().
|
virtual |
Initialize the object.
The startSeq parameter tells what sequence number the first byte of app data should get. This is usually ISS + 1 because SYN consumes one byte in the sequence number space.
init() may be called more than once; every call flushes the existing contents of the queue.
Referenced by inet::tcp::TCPConnection::selectInitialSeqNum().
|
virtual |
Called when REXMIT timer expired.
Resets rexmitted bit of all segments in rexmit queue.
Referenced by inet::tcp::TCPBaseAlg::processRexmitTimer().
|
virtual |
Called when REXMIT timer expired.
Resets sacked bit of all segments in rexmit queue.
Referenced by inet::tcp::TCPBaseAlg::processRexmitTimer().
|
inlinevirtual |
Set the connection that owns this queue.
Referenced by inet::tcp::TCPConnection::cloneListeningConnection(), and inet::tcp::TCPConnection::initConnection().
Called when data sender received selective acknowledgments.
Tells the queue which bytes have been transmitted and SACKed, so they can be skipped if retransmitting segments as long as REXMIT timer did not expired.
Referenced by inet::tcp::TCPConnection::processSACKOption().
|
virtual |
uint32 inet::tcp::TCPSACKRexmitQueue::begin |
Referenced by checkQueue(), checkRexmitQueueForSackedOrRexmittedSegments(), checkSackBlock(), discardUpTo(), enqueueSentData(), getAmountOfSackedBytes(), getHighestRexmittedSeqNum(), getHighestSackedSeqNum(), getNumOfDiscontiguousSacks(), getSackedBit(), init(), setSackedBit(), str(), and TCPSACKRexmitQueue().
TCPConnection* inet::tcp::TCPSACKRexmitQueue::conn |
Referenced by TCPSACKRexmitQueue().
uint32 inet::tcp::TCPSACKRexmitQueue::end |
RexmitQueue inet::tcp::TCPSACKRexmitQueue::rexmitQueue |
Referenced by checkQueue(), checkRexmitQueueForSackedOrRexmittedSegments(), checkSackBlock(), discardUpTo(), enqueueSentData(), getAmountOfSackedBytes(), getHighestRexmittedSeqNum(), getHighestSackedSeqNum(), getNumOfDiscontiguousSacks(), getSackedBit(), getTotalAmountOfSackedBytes(), info(), resetRexmittedBit(), resetSackedBit(), setSackedBit(), and ~TCPSACKRexmitQueue().