INET Framework for OMNeT++/OMNEST
TCPBaseAlgStateVariables Class Reference

#include <TCPBaseAlg.h>

Inheritance diagram for TCPBaseAlgStateVariables:
TCPStateVariables TCPTahoeRenoFamilyStateVariables

List of all members.

Public Member Functions

 TCPBaseAlgStateVariables ()
virtual std::string info () const
virtual std::string detailedInfo () const

Public Attributes

int rexmit_count
 retransmit count
simtime_t rexmit_timeout
 current retransmission timeout (aka RTO)
uint persist_factor
 persist factor
simtime_t persist_timeout
 current persist timeout
uint32 snd_cwnd
uint32 rtseq
 round-trip time measurements
simtime_t rtseq_sendtime
 time when rtseq was sent (0 if RTT measurement is not running)
simtime_t srtt
 round-trip time estimation (Jacobson's algorithm)
simtime_t rttvar
 variance of round-trip time
uint32 numRtos
 number of RTOs
uint32 recover
 RFC 3782 variables.
bool firstPartialACK
 first partial acknowledgement (RFC 3782)

Detailed Description

State variables for TCPBaseAlg.


Constructor & Destructor Documentation

TCPBaseAlgStateVariables::TCPBaseAlgStateVariables ( )
{
    rexmit_count = 0;
    rexmit_timeout = 3.0;

    persist_factor = 0;
    persist_timeout = 5.0;

    snd_cwnd = 0; // will be set to SMSS when connection is established

    rtseq = 0;
    rtseq_sendtime = 0;

    // Jacobson's alg: srtt must be initialized to 0, rttvar to a value which
    // will yield rto = 3s initially.
    srtt = 0;
    rttvar = 3.0/4.0;

    numRtos = 0;

    // RFC 3782, page 4:
    // "The algorithm specified in this document uses a variable "recover",
    // whose initial value is the initial send sequence number."
    recover = iss;
    firstPartialACK = false;
}

Member Function Documentation

std::string TCPBaseAlgStateVariables::detailedInfo ( void  ) const [virtual]

Reimplemented from TCPStateVariables.

Reimplemented in TCPTahoeRenoFamilyStateVariables.

{
    std::stringstream out;
    out << TCPStateVariables::detailedInfo();
    out << "snd_cwnd = " << snd_cwnd << "\n";
    out << "rto = " << rexmit_timeout << "\n";
    out << "persist_timeout = " << persist_timeout << "\n";
    // TBD add others too
    return out.str();
}
std::string TCPBaseAlgStateVariables::info ( ) const [virtual]

Reimplemented from TCPStateVariables.

Reimplemented in TCPTahoeRenoFamilyStateVariables.

Referenced by TCPBaseAlg::processRexmitTimer().

{
    std::stringstream out;
    out << TCPStateVariables::info();
    out << " snd_cwnd=" << snd_cwnd;
    out << " rto=" << rexmit_timeout;
    return out.str();
}

Member Data Documentation

number of RTOs

total number of RTOs

Referenced by TCPBaseAlg::processRexmitTimer(), and TCPBaseAlgStateVariables().

persist factor

factor needed for simplified PERSIST timer calculation

Referenced by TCPBaseAlg::processPersistTimer(), TCPBaseAlg::receivedDataAck(), and TCPBaseAlgStateVariables().

retransmit count

number of retransmissions (=1 after first rexmit)

Referenced by TCPBaseAlg::processRexmitTimer(), TCPBaseAlg::startRexmitTimer(), and TCPBaseAlgStateVariables().

round-trip time measurements

starting sequence number of timed data

Referenced by TCPBaseAlg::dataSent(), TCPBaseAlg::receivedDataAck(), and TCPBaseAlgStateVariables().

time when rtseq was sent (0 if RTT measurement is not running)

Referenced by TCPBaseAlg::dataSent(), TCPBaseAlg::processRexmitTimer(), TCPBaseAlg::receivedDataAck(), and TCPBaseAlgStateVariables().

round-trip time estimation (Jacobson's algorithm)

smoothed round-trip time

Referenced by TCPBaseAlg::rttMeasurementComplete(), and TCPBaseAlgStateVariables().


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