INET Framework for OMNeT++/OMNEST
|
#include <TCPConnection.h>
Contains state variables ("TCB") for TCP.
TCPStateVariables is effectively a "struct" -- it only contains public data members. (Only declared as a class so that we can use cPolymorphic as base class and make it possible to inspect it in Tkenv.)
TCPStateVariables only contains variables needed to implement the "base" (RFC 793) TCP. More advanced TCP variants are encapsulated into TCPAlgorithm subclasses which can have their own state blocks, subclassed from TCPStateVariables. See TCPAlgorithm::createStateVariables().
TCPStateVariables::TCPStateVariables | ( | ) |
{ // set everything to 0 -- real init values will be set manually active = false; fork = false; snd_mss = 0; // will initially be set from configureStateVariables() and probably reset during connection setup snd_una = 0; snd_nxt = 0; snd_max = 0; snd_wnd = 0; snd_up = 0; snd_wl1 = 0; snd_wl2 = 0; iss = 0; rcv_nxt = 0; rcv_wnd = 0; // will be set from configureStateVariables() rcv_up = 0; irs = 0; rcv_adv = 0; // will be set from configureStateVariables() syn_rexmit_count = 0; syn_rexmit_timeout = 0; fin_ack_rcvd = false; send_fin = false; snd_fin_seq = 0; fin_rcvd = false; rcv_fin_seq = 0; sentBytes = 0; nagle_enabled = false; // will be set from configureStateVariables() delayed_acks_enabled = false; // will be set from configureStateVariables() limited_transmit_enabled = false; // will be set from configureStateVariables() increased_IW_enabled = false; // will be set from configureStateVariables() full_sized_segment_counter = 0; ack_now = false; afterRto = false; time_last_data_sent = 0; ws_support = false; // will be set from configureStateVariables() ws_enabled = false; snd_ws = false; rcv_ws = false; rcv_wnd_scale = 0; // will be set from configureStateVariables() snd_wnd_scale = 0; ts_support = false; // will be set from configureStateVariables() ts_enabled = false; snd_initial_ts = false; rcv_initial_ts = false; ts_recent = 0; last_ack_sent = 0; sack_support = false; // will be set from configureStateVariables() sack_enabled = false; snd_sack_perm = false; rcv_sack_perm = false; snd_sack = false; snd_dsack = false; start_seqno = 0; end_seqno = 0; highRxt = 0; pipe = 0; recoveryPoint = 0; sackedBytes = 0; sackedBytes_old = 0; lossRecovery = false; dupacks = 0; snd_sacks = 0; rcv_sacks = 0; rcv_oooseg = 0; maxRcvBuffer = 0; // will be set from configureStateVariables() usedRcvBuffer = 0; freeRcvBuffer = 0; tcpRcvQueueDrops = 0; }
std::string TCPStateVariables::detailedInfo | ( | void | ) | const [virtual] |
Reimplemented in TCPBaseAlgStateVariables, and TCPTahoeRenoFamilyStateVariables.
{ std::stringstream out; out << "active = " << active << "\n"; out << "snd_mss = " << snd_mss << "\n"; out << "snd_una = " << snd_una << "\n"; out << "snd_nxt = " << snd_nxt << "\n"; out << "snd_max = " << snd_max << "\n"; out << "snd_wnd = " << snd_wnd << "\n"; out << "snd_up = " << snd_up << "\n"; out << "snd_wl1 = " << snd_wl1 << "\n"; out << "snd_wl2 = " << snd_wl2 << "\n"; out << "iss = " << iss << "\n"; out << "rcv_nxt = " << rcv_nxt << "\n"; out << "rcv_wnd = " << rcv_wnd << "\n"; out << "rcv_up = " << rcv_up << "\n"; out << "irs = " << irs << "\n"; out << "rcv_adv = " << rcv_adv << "\n"; out << "fin_ack_rcvd = " << fin_ack_rcvd << "\n"; out << "nagle_enabled = " << nagle_enabled << "\n"; out << "limited_transmit_enabled = " << limited_transmit_enabled << "\n"; out << "increased_IW_enabled = " << increased_IW_enabled << "\n"; out << "delayed_acks_enabled = " << delayed_acks_enabled << "\n"; out << "ws_support = " << ws_support << "\n"; out << "ws_enabled = " << ws_enabled << "\n"; out << "ts_support = " << ts_support << "\n"; out << "ts_enabled = " << ts_enabled << "\n"; out << "sack_support = " << sack_support << "\n"; out << "sack_enabled = " << sack_enabled << "\n"; out << "snd_sack_perm = " << snd_sack_perm << "\n"; out << "snd_sacks = " << snd_sacks << "\n"; out << "rcv_sacks = " << rcv_sacks << "\n"; out << "dupacks = " << dupacks << "\n"; out << "rcv_oooseg = " << rcv_oooseg << "\n"; return out.str(); }
std::string TCPStateVariables::info | ( | ) | const [virtual] |
Reimplemented in TCPBaseAlgStateVariables, and TCPTahoeRenoFamilyStateVariables.
Referenced by TCPConnection::process_RCV_SEGMENT().
Referenced by TCPConnection::cloneListeningConnection(), detailedInfo(), TCPConnection::performStateTransition(), TCPConnection::process_OPEN_ACTIVE(), TCPConnection::process_OPEN_PASSIVE(), TCPConnection::process_SEND(), TCPConnection::process_TIMEOUT_CONN_ESTAB(), TCPConnection::processRstInSynReceived(), and TCPStateVariables().
uint32 TCPStateVariables::dupacks |
Referenced by detailedInfo(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegment1stThru8th(), TCPReno::receivedDataAck(), TCPTahoe::receivedDuplicateAck(), TCPReno::receivedDuplicateAck(), TCPNewReno::receivedDuplicateAck(), TCPBaseAlg::receivedDuplicateAck(), DumbTCP::receivedDuplicateAck(), and TCPStateVariables().
uint32 TCPStateVariables::end_seqno |
Referenced by TCPConnection::addSacks(), TCPConnection::processSegment1stThru8th(), and TCPStateVariables().
Referenced by TCPConnection::processSegment1stThru8th(), and TCPStateVariables().
uint32 TCPStateVariables::highRxt |
uint32 TCPStateVariables::irs |
uint32 TCPStateVariables::iss |
Referenced by TCPNewReno::processRexmitTimer(), TCPBaseAlg::processRexmitTimer(), TCPReno::receivedDataAck(), TCPNewReno::receivedDataAck(), TCPReno::receivedDuplicateAck(), TCPNewReno::receivedDuplicateAck(), TCPBaseAlg::receiveSeqChanged(), TCPConnection::sendData(), TCPConnection::sendDataDuringLossRecoveryPhase(), TCPConnection::sendSegmentDuringLossRecoveryPhase(), and TCPStateVariables().
uint32 TCPStateVariables::pipe |
uint32 TCPStateVariables::rcv_adv |
Referenced by TCPConnection::processSegment1stThru8th(), and TCPStateVariables().
Referenced by TCPConnection::processTSOption(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
uint32 TCPStateVariables::rcv_nxt |
Referenced by TCPBaseAlg::ackSent(), TCPConnection::addSacks(), detailedInfo(), info(), TCPConnection::isSegmentAcceptable(), TCPConnection::process_STATUS(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInSynSent(), TCPBaseAlg::receiveSeqChanged(), DumbTCP::receiveSeqChanged(), TCPConnection::sendAck(), TCPConnection::sendFin(), TCPConnection::sendSegment(), TCPConnection::sendSynAck(), TCPStateVariables(), and TCPConnection::updateRcvWnd().
Referenced by detailedInfo(), TCPConnection::processSegment1stThru8th(), and TCPStateVariables().
uint32 TCPStateVariables::rcv_sacks |
Referenced by detailedInfo(), TCPConnection::processSACKOption(), and TCPStateVariables().
uint32 TCPStateVariables::rcv_up |
Referenced by detailedInfo(), TCPConnection::process_STATUS(), and TCPStateVariables().
uint32 TCPStateVariables::rcv_wnd |
Referenced by TCPConnection::configureStateVariables(), detailedInfo(), info(), TCPConnection::isSegmentAcceptable(), TCPConnection::process_STATUS(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInSynSent(), TCPConnection::sendSyn(), TCPConnection::sendSynAck(), TCPStateVariables(), and TCPConnection::updateRcvWnd().
Referenced by TCPStateVariables(), TCPConnection::updateRcvWnd(), and TCPConnection::writeHeaderOptions().
Referenced by TCPConnection::processWSOption(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
Referenced by detailedInfo(), TCPConnection::isLost(), TCPConnection::nextSeg(), TCPConnection::processAckInEstabEtc(), TCPBaseAlg::processRexmitTimer(), TCPConnection::processRstInSynReceived(), TCPConnection::processSACKOption(), TCPConnection::processSACKPermittedOption(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInSynSent(), TCPReno::receivedDataAck(), TCPReno::receivedDuplicateAck(), TCPConnection::retransmitOneSegment(), TCPConnection::sendData(), TCPConnection::sendDataDuringLossRecoveryPhase(), TCPConnection::sendOneNewSegment(), TCPConnection::sendSegment(), TCPConnection::sendSegmentDuringLossRecoveryPhase(), TCPConnection::setPipe(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
Referenced by TCPConnection::processSACKOption(), TCPConnection::sendOneNewSegment(), and TCPStateVariables().
Referenced by TCPConnection::processSACKOption(), TCPConnection::sendOneNewSegment(), and TCPStateVariables().
Sack TCPStateVariables::sacks_array[MAX_SACK_BLOCKS] |
Referenced by TCPConnection::addSacks().
uint32 TCPStateVariables::sentBytes |
Referenced by TCPConnection::processTSOption(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
uint32 TCPStateVariables::snd_max |
Referenced by detailedInfo(), info(), TCPConnection::nextSeg(), TCPConnection::process_CLOSE(), TCPConnection::process_SEND(), TCPConnection::process_STATUS(), TCPConnection::processAckInEstabEtc(), TCPNewReno::processRexmitTimer(), TCPBaseAlg::processRexmitTimer(), TCPConnection::processSegmentInSynSent(), TCPNewReno::receivedDataAck(), TCPBaseAlg::receivedDataAck(), TCPReno::receivedDuplicateAck(), TCPNewReno::receivedDuplicateAck(), TCPBaseAlg::receivedDuplicateAck(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::selectInitialSeqNum(), TCPConnection::sendData(), TCPBaseAlg::sendData(), TCPConnection::sendOneNewSegment(), TCPConnection::sendProbe(), TCPConnection::sendSegment(), TCPConnection::sendSegmentDuringLossRecoveryPhase(), TCPConnection::sendSyn(), TCPConnection::sendSynAck(), and TCPStateVariables().
uint32 TCPStateVariables::snd_mss |
Referenced by TCPConnection::configureStateVariables(), detailedInfo(), TCPBaseAlg::established(), TCPConnection::isLost(), TCPConnection::nextSeg(), TCPConnection::process_STATUS(), TCPConnection::processMSSOption(), TCPTahoe::processRexmitTimer(), TCPReno::processRexmitTimer(), TCPNewReno::processRexmitTimer(), TCPConnection::processSegment1stThru8th(), TCPTahoe::recalculateSlowStartThreshold(), TCPReno::recalculateSlowStartThreshold(), TCPNewReno::recalculateSlowStartThreshold(), TCPTahoe::receivedDataAck(), TCPReno::receivedDataAck(), TCPNewReno::receivedDataAck(), TCPTahoe::receivedDuplicateAck(), TCPReno::receivedDuplicateAck(), TCPNewReno::receivedDuplicateAck(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::sendData(), TCPBaseAlg::sendData(), TCPConnection::sendDataDuringLossRecoveryPhase(), TCPConnection::sendOneNewSegment(), TCPConnection::sendSegment(), TCPConnection::sendSegmentDuringLossRecoveryPhase(), TCPConnection::setPipe(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
uint32 TCPStateVariables::snd_nxt |
Referenced by detailedInfo(), info(), TCPConnection::isSendQueueEmpty(), TCPConnection::process_ABORT(), TCPConnection::process_CLOSE(), TCPConnection::process_STATUS(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInSynSent(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::selectInitialSeqNum(), TCPConnection::sendAck(), TCPConnection::sendData(), TCPConnection::sendFin(), TCPConnection::sendOneNewSegment(), TCPConnection::sendProbe(), TCPConnection::sendSegment(), TCPConnection::sendSegmentDuringLossRecoveryPhase(), TCPConnection::sendSyn(), TCPConnection::sendSynAck(), and TCPStateVariables().
uint32 TCPStateVariables::snd_sacks |
Referenced by TCPConnection::addSacks(), detailedInfo(), and TCPStateVariables().
uint32 TCPStateVariables::snd_una |
Referenced by detailedInfo(), info(), TCPConnection::isLost(), TCPConnection::nextSeg(), TCPConnection::process_CLOSE(), TCPConnection::process_SEND(), TCPConnection::process_STATUS(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInSynSent(), TCPReno::receivedDataAck(), TCPNewReno::receivedDataAck(), TCPBaseAlg::receivedDataAck(), TCPReno::receivedDuplicateAck(), TCPNewReno::receivedDuplicateAck(), TCPBaseAlg::receivedDuplicateAck(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::selectInitialSeqNum(), TCPConnection::sendData(), TCPBaseAlg::sendData(), TCPConnection::sendOneNewSegment(), TCPConnection::sendProbe(), TCPConnection::sendSegmentDuringLossRecoveryPhase(), TCPConnection::setPipe(), and TCPStateVariables().
uint32 TCPStateVariables::snd_up |
Referenced by detailedInfo(), TCPConnection::process_STATUS(), and TCPStateVariables().
uint32 TCPStateVariables::snd_wl1 |
Referenced by detailedInfo(), TCPConnection::process_STATUS(), TCPStateVariables(), and TCPConnection::updateWndInfo().
uint32 TCPStateVariables::snd_wl2 |
Referenced by detailedInfo(), TCPConnection::process_STATUS(), TCPStateVariables(), and TCPConnection::updateWndInfo().
uint32 TCPStateVariables::snd_wnd |
Referenced by detailedInfo(), info(), TCPConnection::nextSeg(), TCPConnection::process_STATUS(), TCPTahoe::recalculateSlowStartThreshold(), TCPReno::recalculateSlowStartThreshold(), TCPNewReno::recalculateSlowStartThreshold(), TCPBaseAlg::receivedDataAck(), TCPConnection::sendData(), TCPConnection::sendOneNewSegment(), TCPStateVariables(), and TCPConnection::updateWndInfo().
Referenced by TCPConnection::processWSOption(), TCPStateVariables(), and TCPConnection::updateWndInfo().
Referenced by TCPConnection::processWSOption(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
Referenced by TCPConnection::addSacks(), TCPConnection::processSegment1stThru8th(), and TCPStateVariables().
simtime_t TCPStateVariables::syn_rexmit_timeout |
simtime_t TCPStateVariables::time_last_data_sent |
Referenced by TCPBaseAlg::dataSent(), detailedInfo(), TCPConnection::nextSeg(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegment1stThru8th(), TCPConnection::processTSOption(), TCPBaseAlg::receivedDataAck(), TCPBaseAlg::rttMeasurementCompleteUsingTS(), TCPConnection::sendData(), TCPConnection::setPipe(), TCPStateVariables(), and TCPConnection::writeHeaderOptions().
uint32 TCPStateVariables::ts_recent |