|
INET Framework for OMNeT++/OMNEST
|
#include <TCPBaseAlg_old.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 |
| 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 | |
State variables for TCPBaseAlg.
| 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;
}
| 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();
}
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().
retransmit count
number of retransmissions (=1 after first rexmit)
Referenced by tcp_old::TCPBaseAlg::processRexmitTimer(), tcp_old::TCPBaseAlg::startRexmitTimer(), and TCPBaseAlgStateVariables().
current retransmission timeout (aka RTO)
Referenced by detailedInfo(), info(), tcp_old::TCPBaseAlg::processRexmitTimer(), tcp_old::TCPBaseAlg::rttMeasurementComplete(), tcp_old::TCPBaseAlg::startRexmitTimer(), and TCPBaseAlgStateVariables().
round-trip time measurements
starting sequence number of timed data
Referenced by tcp_old::TCPBaseAlg::dataSent(), tcp_old::TCPBaseAlg::receivedDataAck(), and TCPBaseAlgStateVariables().
time when rtseq was sent (0 if RTT measurement is not running)
Referenced by tcp_old::TCPBaseAlg::dataSent(), tcp_old::TCPBaseAlg::processRexmitTimer(), tcp_old::TCPBaseAlg::receivedDataAck(), and TCPBaseAlgStateVariables().
variance of round-trip time
Referenced by tcp_old::TCPBaseAlg::rttMeasurementComplete(), and TCPBaseAlgStateVariables().
congestion window
Referenced by detailedInfo(), tcp_old::TCPBaseAlg::established(), info(), tcp_old::TCPNoCongestionControl::initialize(), tcp_old::TCPTahoe::processRexmitTimer(), tcp_old::TCPReno::processRexmitTimer(), tcp_old::TCPTahoe::recalculateSlowStartThreshold(), tcp_old::TCPReno::recalculateSlowStartThreshold(), tcp_old::TCPTahoe::receivedDataAck(), tcp_old::TCPReno::receivedDataAck(), tcp_old::TCPTahoe::receivedDuplicateAck(), tcp_old::TCPReno::receivedDuplicateAck(), tcp_old::TCPBaseAlg::sendData(), and TCPBaseAlgStateVariables().
| simtime_t tcp_old::TCPBaseAlgStateVariables::srtt |
round-trip time estimation (Jacobson's algorithm)
smoothed round-trip time
Referenced by tcp_old::TCPBaseAlg::rttMeasurementComplete(), and TCPBaseAlgStateVariables().