TCPBaseAlgStateVariables Class Reference

#include <TCPBaseAlg.h>

Inheritance diagram for TCPBaseAlgStateVariables:

TCPStateVariables TCPTahoeRenoFamilyStateVariables

List of all members.


Detailed Description

State variables for TCPBaseAlg.

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
 congestion window
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

Constructor & Destructor Documentation

TCPBaseAlgStateVariables::TCPBaseAlgStateVariables (  ) 

00040 {
00041     // We disable delayed acks, since it appears that it isn't used in real-life TCPs.
00042     //
00043     // In SSFNet test suite http://www.ssfnet.org/Exchange/tcp/test/f5.html
00044     // the rule for delayed ACK is:
00045     //   An ACK must be sent immediatly when either of the following conditions exist:
00046     //    * Two full-sized packets received (to avoid too few ACKs).
00047     //    * Out of order packets received (to help trigger fast retransmission).
00048     //    * Received packet fills in all gap or part of gap of out of order data.
00049     // We do not implement this rule. In our measurements on network traffic, we
00050     // never encountered delayed ACKs.
00051     //
00052     delayed_acks_enabled = false;
00053 
00054     nagle_enabled = true; // FIXME this should be parameter eventually
00055 
00056     rexmit_count = 0;
00057     rexmit_timeout = 3.0;
00058 
00059     snd_cwnd = 0; // will be set to MSS when connection is established
00060 
00061     rtseq = 0;
00062     rtseq_sendtime = 0;
00063 
00064     // Jacobson's alg: srtt must be initialized to 0, rttvar to a value which
00065     // will yield rto = 3s initially.
00066     srtt = 0;
00067     rttvar = 3.0/4.0;
00068 }


Member Function Documentation

std::string TCPBaseAlgStateVariables::info (  )  const [virtual]

Reimplemented from TCPStateVariables.

Reimplemented in TCPTahoeRenoFamilyStateVariables.

Referenced by TCPTahoeRenoFamilyStateVariables::info().

00071 {
00072     std::stringstream out;
00073     out << TCPStateVariables::info();
00074     out << " snd_cwnd=" << snd_cwnd;
00075     out << " rto=" << rexmit_timeout;
00076     return out.str();
00077 }

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

Reimplemented from TCPStateVariables.

Reimplemented in TCPTahoeRenoFamilyStateVariables.

Referenced by TCPTahoeRenoFamilyStateVariables::detailedInfo().

00080 {
00081     std::stringstream out;
00082     out << TCPStateVariables::detailedInfo();
00083     out << "snd_cwnd = " << snd_cwnd << "\n";
00084     out << "rto = " << rexmit_timeout << "\n";
00085     // TBD add others too
00086     return out.str();
00087 }


Member Data Documentation

TCP features.

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

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

Nagle's algorithm (off = NODELAY socket option).

Referenced by TCPBaseAlg::sendData(), 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().

round-trip time estimation (Jacobson's algorithm)

smoothed round-trip time

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

variance of round-trip time

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


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

Generated on Fri Mar 20 18:51:22 2009 for INET Framework for OMNeT++/OMNEST by  doxygen 1.5.5