#include <TCPBaseAlg.h>
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 |
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 }
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 }
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().
simtime_t TCPBaseAlgStateVariables::rexmit_timeout |
current retransmission timeout (aka RTO)
Referenced by detailedInfo(), info(), TCPBaseAlg::processRexmitTimer(), TCPBaseAlg::rttMeasurementComplete(), TCPBaseAlg::startRexmitTimer(), and TCPBaseAlgStateVariables().
congestion window
congestion window
Referenced by detailedInfo(), TCPBaseAlg::established(), info(), TCPNoCongestionControl::initialize(), TCPTahoe::processRexmitTimer(), TCPReno::processRexmitTimer(), TCPTahoe::recalculateSlowStartThreshold(), TCPReno::recalculateSlowStartThreshold(), TCPTahoe::receivedDataAck(), TCPReno::receivedDataAck(), TCPTahoe::receivedDuplicateAck(), TCPReno::receivedDuplicateAck(), TCPBaseAlg::sendData(), and TCPBaseAlgStateVariables().
round-trip time measurements
starting sequence number of timed data
Referenced by TCPBaseAlg::dataSent(), TCPBaseAlg::receivedDataAck(), and TCPBaseAlgStateVariables().
simtime_t TCPBaseAlgStateVariables::rtseq_sendtime |
time when rtseq was sent (0 if RTT measurement is not running)
Referenced by TCPBaseAlg::dataSent(), TCPBaseAlg::processRexmitTimer(), TCPBaseAlg::receivedDataAck(), TCPTahoe::receivedDuplicateAck(), TCPReno::receivedDuplicateAck(), and TCPBaseAlgStateVariables().
simtime_t TCPBaseAlgStateVariables::srtt |
round-trip time estimation (Jacobson's algorithm)
smoothed round-trip time
Referenced by TCPBaseAlg::rttMeasurementComplete(), and TCPBaseAlgStateVariables().
simtime_t TCPBaseAlgStateVariables::rttvar |
variance of round-trip time
Referenced by TCPBaseAlg::rttMeasurementComplete(), and TCPBaseAlgStateVariables().