#include <TCPConnection.h>
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().
Public Member Functions | |
TCPStateVariables () | |
virtual std::string | info () const |
virtual std::string | detailedInfo () const |
Public Attributes | |
bool | active |
bool | fork |
uint | snd_mss |
uint32 | snd_una |
uint32 | snd_nxt |
uint32 | snd_max |
uint | snd_wnd |
uint32 | snd_up |
uint32 | snd_wl1 |
uint32 | snd_wl2 |
uint32 | iss |
uint32 | rcv_nxt |
uint32 | rcv_wnd |
uint32 | rcv_up |
uint32 | irs |
short | dupacks |
int | syn_rexmit_count |
simtime_t | syn_rexmit_timeout |
bool | fin_ack_rcvd |
bool | send_fin |
uint32 | snd_fin_seq |
bool | fin_rcvd |
uint32 | rcv_fin_seq |
TCPStateVariables::TCPStateVariables | ( | ) |
00031 { 00032 // set everything to 0 -- real init values will be set manually 00033 active = false; 00034 fork = false; 00035 snd_mss = -1; // will be set from configureStateVariables() 00036 snd_una = 0; 00037 snd_nxt = 0; 00038 snd_max = 0; 00039 snd_wnd = 0; 00040 snd_up = 0; 00041 snd_wl1 = 0; 00042 snd_wl2 = 0; 00043 iss = 0; 00044 rcv_nxt = 0; 00045 rcv_wnd = -1; // will be set from configureStateVariables() 00046 rcv_up = 0; 00047 irs = 0; 00048 00049 dupacks = 0; 00050 00051 syn_rexmit_count = 0; 00052 syn_rexmit_timeout = 0; 00053 00054 fin_ack_rcvd = false; 00055 send_fin = false; 00056 snd_fin_seq = 0; 00057 fin_rcvd = false; 00058 rcv_fin_seq = 0; 00059 00060 }
std::string TCPStateVariables::info | ( | ) | const [virtual] |
Reimplemented in TCPBaseAlgStateVariables, and TCPTahoeRenoFamilyStateVariables.
Referenced by TCPBaseAlgStateVariables::info(), and TCPConnection::process_RCV_SEGMENT().
00063 { 00064 std::stringstream out; 00065 out << "snd_una=" << snd_una; 00066 out << " snd_nxt=" << snd_nxt; 00067 out << " snd_max=" << snd_max; 00068 out << " snd_wnd=" << snd_wnd; 00069 out << " rcv_nxt=" << rcv_nxt; 00070 out << " rcv_wnd=" << rcv_wnd; 00071 return out.str(); 00072 }
std::string TCPStateVariables::detailedInfo | ( | void | ) | const [virtual] |
Reimplemented in TCPBaseAlgStateVariables, and TCPTahoeRenoFamilyStateVariables.
Referenced by TCPBaseAlgStateVariables::detailedInfo().
00075 { 00076 std::stringstream out; 00077 out << "active = " << active << "\n"; 00078 out << "snd_mss = " << snd_mss << "\n"; 00079 out << "snd_una = " << snd_una << "\n"; 00080 out << "snd_nxt = " << snd_nxt << "\n"; 00081 out << "snd_max = " << snd_max << "\n"; 00082 out << "snd_wnd = " << snd_wnd << "\n"; 00083 out << "snd_up = " << snd_up << "\n"; 00084 out << "snd_wl1 = " << snd_wl1 << "\n"; 00085 out << "snd_wl2 = " << snd_wl2 << "\n"; 00086 out << "iss = " << iss << "\n"; 00087 out << "rcv_nxt = " << rcv_nxt << "\n"; 00088 out << "rcv_wnd = " << rcv_wnd << "\n"; 00089 out << "rcv_up = " << rcv_up << "\n"; 00090 out << "irs = " << irs << "\n"; 00091 out << "fin_ack_rcvd = " << fin_ack_rcvd << "\n"; 00092 return out.str(); 00093 }
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().
Referenced by TCPConnection::configureStateVariables(), detailedInfo(), TCPBaseAlg::established(), TCPConnection::process_STATUS(), TCPTahoe::processRexmitTimer(), TCPReno::processRexmitTimer(), TCPTahoe::recalculateSlowStartThreshold(), TCPReno::recalculateSlowStartThreshold(), TCPTahoe::receivedDataAck(), TCPReno::receivedDataAck(), TCPTahoe::receivedDuplicateAck(), TCPReno::receivedDuplicateAck(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::sendData(), and TCPStateVariables().
uint32 TCPStateVariables::snd_una |
Referenced by detailedInfo(), info(), TCPConnection::process_CLOSE(), TCPConnection::process_SEND(), TCPConnection::process_STATUS(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegment1stThru8th(), TCPConnection::processSegmentInSynSent(), TCPBaseAlg::receivedDataAck(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::selectInitialSeqNum(), TCPConnection::sendData(), TCPBaseAlg::sendData(), TCPConnection::sendProbe(), and TCPStateVariables().
uint32 TCPStateVariables::snd_nxt |
Referenced by detailedInfo(), info(), 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::sendProbe(), TCPConnection::sendSegment(), TCPConnection::sendSyn(), TCPConnection::sendSynAck(), and TCPStateVariables().
uint32 TCPStateVariables::snd_max |
Referenced by detailedInfo(), info(), TCPConnection::process_CLOSE(), TCPConnection::process_SEND(), TCPConnection::process_STATUS(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegmentInSynSent(), TCPBaseAlg::receivedDataAck(), TCPConnection::retransmitData(), TCPConnection::retransmitOneSegment(), TCPConnection::selectInitialSeqNum(), TCPConnection::sendData(), TCPBaseAlg::sendData(), TCPConnection::sendProbe(), TCPConnection::sendSyn(), TCPConnection::sendSynAck(), and TCPStateVariables().
Referenced by detailedInfo(), info(), TCPConnection::process_STATUS(), TCPConnection::processAckInEstabEtc(), TCPConnection::processSegmentInListen(), TCPConnection::processSegmentInSynSent(), TCPTahoe::recalculateSlowStartThreshold(), TCPReno::recalculateSlowStartThreshold(), TCPConnection::sendData(), and TCPStateVariables().
uint32 TCPStateVariables::snd_up |
Referenced by detailedInfo(), TCPConnection::process_STATUS(), and TCPStateVariables().
uint32 TCPStateVariables::snd_wl1 |
uint32 TCPStateVariables::snd_wl2 |
uint32 TCPStateVariables::iss |
uint32 TCPStateVariables::rcv_nxt |
Referenced by 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(), and TCPStateVariables().
uint32 TCPStateVariables::rcv_wnd |
Referenced by TCPConnection::configureStateVariables(), detailedInfo(), info(), TCPConnection::isSegmentAcceptable(), TCPConnection::process_STATUS(), TCPConnection::sendAck(), TCPConnection::sendFin(), TCPConnection::sendSegment(), TCPConnection::sendSyn(), TCPConnection::sendSynAck(), and TCPStateVariables().
uint32 TCPStateVariables::rcv_up |
Referenced by detailedInfo(), TCPConnection::process_STATUS(), and TCPStateVariables().
uint32 TCPStateVariables::irs |
simtime_t TCPStateVariables::syn_rexmit_timeout |
Referenced by TCPConnection::processSegment1stThru8th(), and TCPStateVariables().
Referenced by TCPConnection::processSegment1stThru8th(), and TCPStateVariables().