INET Framework for OMNeT++/OMNEST
tcp_old::TCPBaseAlgStateVariables Class Reference

#include <TCPBaseAlg_old.h>

Inheritance diagram for tcp_old::TCPBaseAlgStateVariables:
tcp_old::TCPStateVariables tcp_old::TCPTahoeRenoFamilyStateVariables

List of all members.

Public Member Functions

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

Public Attributes

bool delayed_acks_enabled
 TCP features.
bool nagle_enabled
 Nagle's algorithm (off = NODELAY socket option)
int rexmit_count
 retransmit count
simtime_t rexmit_timeout
 current retransmission timeout (aka RTO)
uint 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

Detailed Description

State variables for TCPBaseAlg.


Constructor & Destructor Documentation

TCPBaseAlgStateVariables::TCPBaseAlgStateVariables ( )
{
    // We disable delayed acks, since it appears that it isn't used in real-life TCPs.
    //
    // In SSFNet test suite http://www.ssfnet.org/Exchange/tcp/test/f5.html
    // the rule for delayed ACK is:
    //   An ACK must be sent immediatly when either of the following conditions exist:
    //    * Two full-sized packets received (to avoid too few ACKs).
    //    * Out of order packets received (to help trigger fast retransmission).
    //    * Received packet fills in all gap or part of gap of out of order data.
    // We do not implement this rule. In our measurements on network traffic, we
    // never encountered delayed ACKs.
    //
    delayed_acks_enabled = false;

    nagle_enabled = true; // FIXME this should be parameter eventually

    rexmit_count = 0;
    rexmit_timeout = 3.0;

    snd_cwnd = 0; // will be set to MSS 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;
}

Member Function Documentation

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

Reimplemented from tcp_old::TCPStateVariables.

Reimplemented in tcp_old::TCPTahoeRenoFamilyStateVariables.

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

Reimplemented from tcp_old::TCPStateVariables.

Reimplemented in tcp_old::TCPTahoeRenoFamilyStateVariables.

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

Member Data Documentation

TCP features.

delayed ACKs enabled/disabled; FIXME make this a socket option

Referenced by tcp_old::TCPBaseAlg::receiveSeqChanged(), and TCPBaseAlgStateVariables().

Nagle's algorithm (off = NODELAY socket option)

Referenced by tcp_old::TCPBaseAlg::sendData(), and TCPBaseAlgStateVariables().

round-trip time measurements

starting sequence number of timed data

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

round-trip time estimation (Jacobson's algorithm)

smoothed round-trip time

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


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