INET Framework for OMNeT++/OMNEST
|
Manages a TCP connection. More...
#include <TCPConnection.h>
Public Member Functions | |
virtual void | sendAck () |
Utility: send ACK. More... | |
virtual bool | sendData (bool fullSegmentsOnly, uint32 congestionWindow) |
Utility: Send data from sendQueue, at most congestionWindow. More... | |
virtual bool | sendProbe () |
Utility: sends 1 bytes as "probe", called by the "persist" mechanism. More... | |
virtual void | retransmitOneSegment (bool called_at_rto) |
Utility: retransmit one segment from snd_una. More... | |
virtual void | retransmitData () |
Utility: retransmit all from snd_una to snd_max. More... | |
virtual void | sendRst (uint32 seqNo) |
Utility: sends RST. More... | |
virtual void | sendRst (uint32 seq, L3Address src, L3Address dest, int srcPort, int destPort) |
Utility: sends RST; does not use connection state. More... | |
virtual void | sendRstAck (uint32 seq, uint32 ack, L3Address src, L3Address dest, int srcPort, int destPort) |
Utility: sends RST+ACK; does not use connection state. More... | |
virtual void | sendFin () |
Utility: sends FIN. More... | |
virtual void | sendSegment (uint32 bytes) |
Utility: sends one segment of 'bytes' bytes from snd_nxt, and advances snd_nxt. More... | |
virtual void | sendToIP (TCPSegment *tcpseg) |
Utility: adds control info to segment and sends it to IP. More... | |
virtual TCPSegment * | createTCPSegment (const char *name) |
Utility: This factory method gets invoked throughout the TCP model to create a TCPSegment. More... | |
virtual void | startSynRexmitTimer () |
Utility: start SYN-REXMIT timer. More... | |
virtual void | signalConnectionTimeout () |
Utility: signal to user that connection timed out. More... | |
void | scheduleTimeout (cMessage *msg, simtime_t timeout) |
Utility: start a timer. More... | |
virtual void | printConnBrief () const |
Utility: prints local/remote addr/port and app gate index/connId. More... | |
virtual void | updateRcvQueueVars () |
Utility: update receiver queue related variables and statistics - called before setting rcv_wnd. More... | |
virtual bool | hasEnoughSpaceForSegmentInReceiveQueue (TCPSegment *tcpseg) |
Utility: returns true when receive queue has enough space for store the tcpseg. More... | |
virtual unsigned short | updateRcvWnd () |
Utility: update receive window (rcv_wnd), and calculate scaled value if window scaling enabled. More... | |
virtual void | updateWndInfo (TCPSegment *tcpseg, bool doAlways=false) |
Utility: update window information (snd_wnd, snd_wl1, snd_wl2) More... | |
TCPConnection (TCP *mod, int appGateIndex, int connId) | |
The "normal" constructor. More... | |
TCPConnection () | |
Note: this default ctor is NOT used to create live connections, only temporary ones so that TCPMain can invoke their segmentArrivalWhileClosed(). More... | |
virtual | ~TCPConnection () |
Destructor. More... | |
int | getLocalPort () const |
L3Address | getLocalAddress () const |
int | getRemotePort () const |
L3Address | getRemoteAddress () const |
virtual void | segmentArrivalWhileClosed (TCPSegment *tcpseg, L3Address src, L3Address dest) |
This method gets invoked from TCP when a segment arrives which doesn't belong to an existing connection. More... | |
virtual bool | processTimer (cMessage *msg) |
Process self-messages (timers). More... | |
virtual bool | processTCPSegment (TCPSegment *tcpSeg, L3Address srcAddr, L3Address destAddr) |
Process incoming TCP segment. More... | |
virtual bool | processAppCommand (cMessage *msg) |
Process commands from the application. More... | |
virtual bool | isLost (uint32 seqNum) |
For SACK TCP. More... | |
virtual void | setPipe () |
For SACK TCP. More... | |
virtual bool | nextSeg (uint32 &seqNum) |
For SACK TCP. More... | |
virtual void | sendDataDuringLossRecoveryPhase (uint32 congestionWindow) |
Utility: send data during Loss Recovery phase (if SACK is enabled). More... | |
virtual void | sendSegmentDuringLossRecoveryPhase (uint32 seqNum) |
Utility: send segment during Loss Recovery phase (if SACK is enabled). More... | |
virtual void | sendOneNewSegment (bool fullSegmentsOnly, uint32 congestionWindow) |
Utility: send one new segment from snd_max if allowed (RFC 3042). More... | |
virtual bool | isSendQueueEmpty () |
Utility: checks if send queue is empty (no data to send). More... | |
Various getters | |
int | getFsmState () const |
TCPStateVariables * | getState () |
TCPSendQueue * | getSendQueue () |
TCPSACKRexmitQueue * | getRexmitQueue () |
TCPReceiveQueue * | getReceiveQueue () |
TCPAlgorithm * | getTcpAlgorithm () |
TCP * | getTcpMain () |
Static Public Member Functions | |
static void | printSegmentBrief (TCPSegment *tcpseg) |
Utility: prints important header fields. More... | |
static const char * | stateName (int state) |
Utility: returns name of TCP_S_xxx constants. More... | |
static const char * | eventName (int event) |
Utility: returns name of TCP_E_xxx constants. More... | |
static const char * | indicationName (int code) |
Utility: returns name of TCP_I_xxx constants. More... | |
static const char * | optionName (int option) |
Utility: returns name of TCPOPTION_xxx constants. More... | |
static uint32 | convertSimtimeToTS (simtime_t simtime) |
Utility: converts a given simtime to a timestamp (TS). More... | |
static simtime_t | convertTSToSimtime (uint32 timestamp) |
Utility: converts a given timestamp (TS) to a simtime. More... | |
Public Attributes | |
int | appGateIndex = -1 |
int | connId = -1 |
L3Address | localAddr |
L3Address | remoteAddr |
int | localPort = -1 |
int | remotePort = -1 |
TCPSACKRexmitQueue * | rexmitQueue = nullptr |
Protected Member Functions | |
virtual TCPConnection * | cloneListeningConnection () |
Utility: clone a listening connection. More... | |
virtual void | initConnection (TCPOpenCommand *openCmd) |
Utility: creates send/receive queues and tcpAlgorithm. More... | |
virtual void | configureStateVariables () |
Utility: set snd_mss, rcv_wnd and sack in newly created state variables block. More... | |
virtual void | selectInitialSeqNum () |
Utility: generates ISS and initializes corresponding state variables. More... | |
virtual bool | isSegmentAcceptable (TCPSegment *tcpseg) const |
Utility: check if segment is acceptable (all bytes are in receive window) More... | |
virtual void | sendSyn () |
Utility: send SYN. More... | |
virtual void | sendSynAck () |
Utility: send SYN+ACK. More... | |
virtual void | readHeaderOptions (TCPSegment *tcpseg) |
Utility: readHeaderOptions (Currently only EOL, NOP, MSS, WS, SACK_PERMITTED, SACK and TS are implemented) More... | |
virtual TCPSegment | writeHeaderOptions (TCPSegment *tcpseg) |
Utility: writeHeaderOptions (Currently only EOL, NOP, MSS, WS, SACK_PERMITTED, SACK and TS are implemented) More... | |
virtual TCPSegment | addSacks (TCPSegment *tcpseg) |
Utility: adds SACKs to segments header options field. More... | |
virtual uint32 | getTSval (TCPSegment *tcpseg) const |
Utility: get TSval from segments TS header option. More... | |
virtual uint32 | getTSecr (TCPSegment *tcpseg) const |
Utility: get TSecr from segments TS header option. More... | |
cMessage * | cancelEvent (cMessage *msg) |
Utility: cancel a timer. More... | |
virtual void | sendToApp (cMessage *msg) |
Utility: sends packet to application. More... | |
virtual void | sendIndicationToApp (int code, const int id=0) |
Utility: sends status indication (TCP_I_xxx) to application. More... | |
virtual void | sendEstabIndicationToApp () |
Utility: sends TCP_I_ESTABLISHED indication with TCPConnectInfo to application. More... | |
FSM transitions: analysing events and executing state transitions | |
virtual TCPEventCode | preanalyseAppCommandEvent (int commandCode) |
Maps app command codes (msg kind of app command msgs) to TCP_E_xxx event codes. More... | |
virtual bool | performStateTransition (const TCPEventCode &event) |
Implemements the pure TCP state machine. More... | |
virtual void | stateEntered (int state, int oldState, TCPEventCode event) |
Perform cleanup necessary when entering a new state, e.g. More... | |
Processing app commands. Invoked from processAppCommand(). | |
virtual void | process_OPEN_ACTIVE (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_OPEN_PASSIVE (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_SEND (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_CLOSE (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_ABORT (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_STATUS (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_QUEUE_BYTES_LIMIT (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
virtual void | process_READ_REQUEST (TCPEventCode &event, TCPCommand *tcpCommand, cMessage *msg) |
Processing TCP segment arrivals. Invoked from processTCPSegment(). | |
virtual bool | tryFastRoute (TCPSegment *tcpseg) |
Shortcut to process most common case as fast as possible. More... | |
virtual TCPEventCode | process_RCV_SEGMENT (TCPSegment *tcpseg, L3Address src, L3Address dest) |
Process incoming TCP segment. More... | |
virtual TCPEventCode | processSegmentInListen (TCPSegment *tcpseg, L3Address src, L3Address dest) |
virtual TCPEventCode | processSegmentInSynSent (TCPSegment *tcpseg, L3Address src, L3Address dest) |
virtual TCPEventCode | processSegment1stThru8th (TCPSegment *tcpseg) |
virtual TCPEventCode | processRstInSynReceived (TCPSegment *tcpseg) |
virtual bool | processAckInEstabEtc (TCPSegment *tcpseg) |
Processing of TCP options. Invoked from readHeaderOptions(). Return value indicates whether the option was valid. | |
virtual bool | processMSSOption (TCPSegment *tcpseg, const TCPOptionMaxSegmentSize &option) |
virtual bool | processWSOption (TCPSegment *tcpseg, const TCPOptionWindowScale &option) |
virtual bool | processSACKPermittedOption (TCPSegment *tcpseg, const TCPOptionSackPermitted &option) |
virtual bool | processSACKOption (TCPSegment *tcpseg, const TCPOptionSack &option) |
virtual bool | processTSOption (TCPSegment *tcpseg, const TCPOptionTimestamp &option) |
Processing timeouts. Invoked from processTimer(). | |
virtual void | process_TIMEOUT_2MSL () |
virtual void | process_TIMEOUT_CONN_ESTAB () |
virtual void | process_TIMEOUT_FIN_WAIT_2 () |
virtual void | process_TIMEOUT_SYN_REXMIT (TCPEventCode &event) |
Static Protected Member Functions | |
static void | sendToIP (TCPSegment *tcpseg, L3Address src, L3Address dest) |
Utility: send IP packet. More... | |
Protected Attributes | |
TCP * | tcpMain = nullptr |
cFSM | fsm |
TCPStateVariables * | state = nullptr |
TCPSendQueue * | sendQueue = nullptr |
TCPReceiveQueue * | receiveQueue = nullptr |
TCPDataTransferMode | transferMode = TCP_TRANSFER_UNDEFINED |
TCPAlgorithm * | tcpAlgorithm = nullptr |
cMessage * | the2MSLTimer = nullptr |
cMessage * | connEstabTimer = nullptr |
cMessage * | finWait2Timer = nullptr |
cMessage * | synRexmitTimer = nullptr |
cOutVector * | sndWndVector = nullptr |
cOutVector * | rcvWndVector = nullptr |
cOutVector * | rcvAdvVector = nullptr |
cOutVector * | sndNxtVector = nullptr |
cOutVector * | sndAckVector = nullptr |
cOutVector * | rcvSeqVector = nullptr |
cOutVector * | rcvAckVector = nullptr |
cOutVector * | unackedVector = nullptr |
cOutVector * | dupAcksVector = nullptr |
cOutVector * | pipeVector = nullptr |
cOutVector * | sndSacksVector = nullptr |
cOutVector * | rcvSacksVector = nullptr |
cOutVector * | rcvOooSegVector = nullptr |
cOutVector * | rcvNASegVector = nullptr |
cOutVector * | sackedBytesVector = nullptr |
cOutVector * | tcpRcvQueueBytesVector = nullptr |
cOutVector * | tcpRcvQueueDropsVector = nullptr |
Manages a TCP connection.
This class itself implements the TCP state machine as well as handling control PDUs (SYN, SYN+ACK, RST, FIN, etc.), timers (2MSL, CONN-ESTAB, FIN-WAIT-2) and events (OPEN, SEND, etc) associated with TCP state changes.
The implementation largely follows the functional specification at the end of RFC 793. Code comments extensively quote RFC 793 to make it easier to understand.
TCPConnection objects are not used alone – they are instantiated and managed by a TCP module.
TCPConnection "outsources" several tasks to objects subclassed from TCPSendQueue, TCPReceiveQueue and TCPAlgorithm; see overview of this with TCP documentation.
Connection variables (TCB) are kept in TCPStateVariables. TCPAlgorithm implementations can extend TCPStateVariables to add their own stuff (see TCPAlgorithm::createStateVariables() factory method.)
The "entry points" of TCPConnnection from TCP are:
All three methods follow a common structure:
When the CLOSED state is reached, TCP will delete the TCPConnection object.
inet::tcp::TCPConnection::TCPConnection | ( | TCP * | mod, |
int | appGateIndex, | ||
int | connId | ||
) |
The "normal" constructor.
inet::tcp::TCPConnection::TCPConnection | ( | ) |
Note: this default ctor is NOT used to create live connections, only temporary ones so that TCPMain can invoke their segmentArrivalWhileClosed().
Referenced by cloneListeningConnection().
|
virtual |
Destructor.
|
protectedvirtual |
Utility: adds SACKs to segments header options field.
Referenced by writeHeaderOptions().
|
inlineprotected |
|
protectedvirtual |
Utility: clone a listening connection.
Used for forking.
Referenced by processSegmentInListen().
|
protectedvirtual |
Utility: set snd_mss, rcv_wnd and sack in newly created state variables block.
Referenced by cloneListeningConnection(), and initConnection().
|
static |
Utility: converts a given simtime to a timestamp (TS).
Referenced by inet::tcp::TCPBaseAlg::rttMeasurementCompleteUsingTS(), and writeHeaderOptions().
|
static |
Utility: converts a given timestamp (TS) to a simtime.
Referenced by inet::tcp::TCPBaseAlg::rttMeasurementCompleteUsingTS().
|
virtual |
Utility: This factory method gets invoked throughout the TCP model to create a TCPSegment.
Override it if you need to subclass TCPSegment.
Referenced by inet::tcp::TCPVirtualDataSendQueue::createSegmentWithBytes(), sendAck(), sendFin(), sendRst(), sendRstAck(), sendSegment(), sendSyn(), and sendSynAck().
|
static |
Utility: returns name of TCP_E_xxx constants.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protectedvirtual |
Utility: get TSecr from segments TS header option.
Referenced by processAckInEstabEtc().
|
protectedvirtual |
Utility: get TSval from segments TS header option.
Referenced by processSegment1stThru8th().
|
virtual |
Utility: returns true when receive queue has enough space for store the tcpseg.
Referenced by processSegment1stThru8th(), processSegmentInListen(), and processSegmentInSynSent().
|
static |
Utility: returns name of TCP_I_xxx constants.
Referenced by sendEstabIndicationToApp(), and sendIndicationToApp().
|
protectedvirtual |
Utility: creates send/receive queues and tcpAlgorithm.
Referenced by process_OPEN_ACTIVE(), and process_OPEN_PASSIVE().
|
virtual |
For SACK TCP.
RFC 3517, page 3: "This routine returns whether the given sequence number is considered to be lost. The routine returns true when either DupThresh discontiguous SACKed sequences have arrived above 'SeqNum' or (DupThresh * SMSS) bytes with sequence numbers greater than 'SeqNum' have been SACKed. Otherwise, the routine returns false."
Referenced by nextSeg(), and setPipe().
|
protectedvirtual |
Utility: check if segment is acceptable (all bytes are in receive window)
Referenced by processSegment1stThru8th().
|
virtual |
Utility: checks if send queue is empty (no data to send).
Referenced by inet::tcp::TCPBaseAlg::sendData().
|
virtual |
For SACK TCP.
RFC 3517, page 3: "This routine uses the scoreboard data structure maintained by the Update() function to determine what to transmit based on the SACK information that has arrived from the data receiver (and hence been marked in the scoreboard). NextSeg () MUST return the sequence number range of the next segment that is to be transmitted..." Returns true if a valid sequence number (for the next segment) is found and returns false if no segment should be send.
Referenced by sendDataDuringLossRecoveryPhase().
|
static |
Utility: returns name of TCPOPTION_xxx constants.
Referenced by printSegmentBrief(), and readHeaderOptions().
|
protectedvirtual |
Implemements the pure TCP state machine.
|
protectedvirtual |
Maps app command codes (msg kind of app command msgs) to TCP_E_xxx event codes.
|
virtual |
Utility: prints local/remote addr/port and app gate index/connId.
|
static |
Utility: prints important header fields.
Referenced by process_RCV_SEGMENT(), segmentArrivalWhileClosed(), and sendToIP().
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Process incoming TCP segment.
Returns a specific event code (e.g. TCP_E_RCV_SYN) which will drive the state machine.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Referenced by processSegment1stThru8th().
|
virtual |
Process commands from the application.
Normally returns true. A return value of false means that the connection structure must be deleted by the caller (TCP).
Referenced by inet::tcp::TCP::handleMessage().
|
protectedvirtual |
Referenced by readHeaderOptions().
|
protectedvirtual |
Referenced by processSegment1stThru8th().
|
protectedvirtual |
Referenced by readHeaderOptions().
|
protectedvirtual |
Referenced by readHeaderOptions().
|
protectedvirtual |
Referenced by process_RCV_SEGMENT().
|
protectedvirtual |
Referenced by process_RCV_SEGMENT().
|
protectedvirtual |
Referenced by process_RCV_SEGMENT().
|
virtual |
Process incoming TCP segment.
Normally returns true. A return value of false means that the connection structure must be deleted by the caller (TCP).
Referenced by inet::tcp::TCP::handleMessage().
|
virtual |
Process self-messages (timers).
Normally returns true. A return value of false means that the connection structure must be deleted by the caller (TCP).
Referenced by inet::tcp::TCP::handleMessage().
|
protectedvirtual |
Referenced by readHeaderOptions().
|
protectedvirtual |
Referenced by readHeaderOptions().
|
protectedvirtual |
Utility: readHeaderOptions (Currently only EOL, NOP, MSS, WS, SACK_PERMITTED, SACK and TS are implemented)
Referenced by processSegment1stThru8th(), processSegmentInListen(), and processSegmentInSynSent().
|
virtual |
Utility: retransmit all from snd_una to snd_max.
Referenced by inet::tcp::DumbTCP::processTimer().
|
virtual |
Utility: retransmit one segment from snd_una.
Referenced by inet::tcp::TCPNoCongestionControl::processRexmitTimer(), inet::tcp::TCPNewReno::processRexmitTimer(), inet::tcp::TCPReno::processRexmitTimer(), inet::tcp::TCPTahoe::processRexmitTimer(), inet::tcp::TCPWestwood::processRexmitTimer(), inet::tcp::TCPVegas::processRexmitTimer(), inet::tcp::TCPNewReno::receivedDataAck(), inet::tcp::TCPVegas::receivedDataAck(), inet::tcp::TCPReno::receivedDuplicateAck(), inet::tcp::TCPNewReno::receivedDuplicateAck(), inet::tcp::TCPTahoe::receivedDuplicateAck(), inet::tcp::TCPWestwood::receivedDuplicateAck(), and inet::tcp::TCPVegas::receivedDuplicateAck().
|
inline |
Utility: start a timer.
Referenced by inet::tcp::DumbTCP::dataSent(), process_OPEN_ACTIVE(), process_SEND(), process_TIMEOUT_SYN_REXMIT(), inet::tcp::TCPBaseAlg::processPersistTimer(), inet::tcp::TCPBaseAlg::processRexmitTimer(), processSegment1stThru8th(), processSegmentInListen(), inet::tcp::DumbTCP::processTimer(), inet::tcp::TCPBaseAlg::receivedDataAck(), inet::tcp::TCPBaseAlg::receiveSeqChanged(), inet::tcp::TCPBaseAlg::startRexmitTimer(), and startSynRexmitTimer().
|
virtual |
This method gets invoked from TCP when a segment arrives which doesn't belong to an existing connection.
TCP creates a temporary connection object so that it can call this method, then immediately deletes it.
Referenced by inet::tcp::TCP::segmentArrivalWhileClosed().
|
protectedvirtual |
Utility: generates ISS and initializes corresponding state variables.
Referenced by process_OPEN_ACTIVE(), process_SEND(), and processSegmentInListen().
|
virtual |
Utility: send ACK.
Referenced by inet::tcp::DumbTCP::established(), inet::tcp::TCPBaseAlg::established(), inet::tcp::TCPBaseAlg::processDelayedAckTimer(), processSegment1stThru8th(), inet::tcp::DumbTCP::receivedAckForDataNotYetSent(), inet::tcp::TCPBaseAlg::receivedAckForDataNotYetSent(), inet::tcp::DumbTCP::receivedOutOfOrderSegment(), inet::tcp::TCPBaseAlg::receivedOutOfOrderSegment(), inet::tcp::DumbTCP::receiveSeqChanged(), and inet::tcp::TCPBaseAlg::receiveSeqChanged().
|
virtual |
Utility: Send data from sendQueue, at most congestionWindow.
If fullSegmentsOnly is set, don't send segments smaller than SMSS (needed for Nagle). Returns true if some data was actually sent.
Referenced by inet::tcp::DumbTCP::established(), inet::tcp::DumbTCP::receivedDataAck(), inet::tcp::DumbTCP::sendCommandInvoked(), and inet::tcp::TCPBaseAlg::sendData().
|
virtual |
Utility: send data during Loss Recovery phase (if SACK is enabled).
Referenced by inet::tcp::TCPReno::receivedDataAck(), and inet::tcp::TCPReno::receivedDuplicateAck().
|
protectedvirtual |
Utility: sends TCP_I_ESTABLISHED indication with TCPConnectInfo to application.
Referenced by processSegment1stThru8th(), and processSegmentInSynSent().
|
virtual |
Utility: sends FIN.
Referenced by process_CLOSE(), retransmitData(), and retransmitOneSegment().
|
protectedvirtual |
Utility: sends status indication (TCP_I_xxx) to application.
Referenced by process_TIMEOUT_CONN_ESTAB(), processRstInSynReceived(), processSegment1stThru8th(), processSegmentInSynSent(), sendSegment(), and signalConnectionTimeout().
|
virtual |
Utility: send one new segment from snd_max if allowed (RFC 3042).
Referenced by inet::tcp::TCPBaseAlg::receivedDuplicateAck().
|
virtual |
Utility: sends 1 bytes as "probe", called by the "persist" mechanism.
Referenced by inet::tcp::TCPBaseAlg::processPersistTimer().
|
virtual |
Utility: sends RST.
Referenced by process_ABORT(), processSegment1stThru8th(), processSegmentInListen(), processSegmentInSynSent(), and segmentArrivalWhileClosed().
|
virtual |
Utility: sends RST; does not use connection state.
|
virtual |
Utility: sends RST+ACK; does not use connection state.
Referenced by segmentArrivalWhileClosed().
|
virtual |
Utility: sends one segment of 'bytes' bytes from snd_nxt, and advances snd_nxt.
sendData(), sendProbe() and retransmitData() internally all rely on this one.
Referenced by retransmitData(), retransmitOneSegment(), sendData(), sendOneNewSegment(), sendProbe(), and sendSegmentDuringLossRecoveryPhase().
|
virtual |
Utility: send segment during Loss Recovery phase (if SACK is enabled).
Referenced by sendDataDuringLossRecoveryPhase().
|
protectedvirtual |
Utility: send SYN.
Referenced by process_OPEN_ACTIVE(), process_SEND(), and process_TIMEOUT_SYN_REXMIT().
|
protectedvirtual |
Utility: send SYN+ACK.
Referenced by process_TIMEOUT_SYN_REXMIT(), processSegmentInListen(), and processSegmentInSynSent().
|
protectedvirtual |
Utility: sends packet to application.
Referenced by process_READ_REQUEST(), process_STATUS(), processSegment1stThru8th(), sendEstabIndicationToApp(), and sendIndicationToApp().
|
virtual |
Utility: adds control info to segment and sends it to IP.
Referenced by sendAck(), sendFin(), sendRst(), sendRstAck(), sendSegment(), sendSyn(), and sendSynAck().
|
staticprotected |
Utility: send IP packet.
|
virtual |
For SACK TCP.
RFC 3517, page 3: "This routine traverses the sequence space from HighACK to HighData and MUST set the "pipe" variable to an estimate of the number of octets that are currently in transit between the TCP sender and the TCP receiver."
Referenced by inet::tcp::TCPReno::receivedDataAck(), and inet::tcp::TCPReno::receivedDuplicateAck().
|
virtual |
Utility: signal to user that connection timed out.
Referenced by inet::tcp::TCPBaseAlg::processRexmitTimer().
|
virtual |
Utility: start SYN-REXMIT timer.
Referenced by process_OPEN_ACTIVE(), process_SEND(), processSegmentInListen(), and processSegmentInSynSent().
|
protectedvirtual |
Perform cleanup necessary when entering a new state, e.g.
cancelling timers
|
static |
Utility: returns name of TCP_S_xxx constants.
Referenced by printConnBrief(), process_STATUS(), process_TIMEOUT_2MSL(), process_TIMEOUT_CONN_ESTAB(), process_TIMEOUT_FIN_WAIT_2(), process_TIMEOUT_SYN_REXMIT(), processSegment1stThru8th(), and processTSOption().
|
protectedvirtual |
|
virtual |
Utility: update receiver queue related variables and statistics - called before setting rcv_wnd.
Referenced by processSegment1stThru8th(), processSegmentInListen(), processSegmentInSynSent(), and updateRcvWnd().
|
virtual |
Utility: update receive window (rcv_wnd), and calculate scaled value if window scaling enabled.
Returns the (scaled) receive window size.
Referenced by sendAck(), sendFin(), sendSegment(), sendSyn(), and sendSynAck().
|
virtual |
Utility: update window information (snd_wnd, snd_wl1, snd_wl2)
Referenced by processAckInEstabEtc(), processSegmentInListen(), and processSegmentInSynSent().
|
protectedvirtual |
Utility: writeHeaderOptions (Currently only EOL, NOP, MSS, WS, SACK_PERMITTED, SACK and TS are implemented)
Referenced by sendAck(), sendSegment(), sendSyn(), and sendSynAck().
int inet::tcp::TCPConnection::appGateIndex = -1 |
|
protected |
Referenced by process_OPEN_ACTIVE(), process_SEND(), and processSegmentInListen().
int inet::tcp::TCPConnection::connId = -1 |
|
protected |
Referenced by processAckInEstabEtc(), and processSegment1stThru8th().
|
protected |
Referenced by processSegment1stThru8th().
|
protected |
Referenced by cloneListeningConnection(), printConnBrief(), process_ABORT(), process_CLOSE(), process_OPEN_ACTIVE(), process_OPEN_PASSIVE(), process_RCV_SEGMENT(), process_SEND(), process_STATUS(), process_TIMEOUT_2MSL(), process_TIMEOUT_CONN_ESTAB(), process_TIMEOUT_FIN_WAIT_2(), process_TIMEOUT_SYN_REXMIT(), processAckInEstabEtc(), processMSSOption(), processSACKOption(), processSACKPermittedOption(), processSegment1stThru8th(), processTSOption(), processWSOption(), and writeHeaderOptions().
L3Address inet::tcp::TCPConnection::localAddr |
Referenced by inet::tcp::TCP::addForkedConnection(), inet::tcp::TCP::addSockPair(), cloneListeningConnection(), printConnBrief(), process_OPEN_ACTIVE(), process_OPEN_PASSIVE(), process_STATUS(), inet::tcp::TCP::removeConnection(), sendEstabIndicationToApp(), sendRst(), sendToIP(), and inet::tcp::TCP::updateSockPair().
int inet::tcp::TCPConnection::localPort = -1 |
Referenced by inet::tcp::TCP::addForkedConnection(), inet::tcp::TCP::addSockPair(), cloneListeningConnection(), printConnBrief(), process_OPEN_ACTIVE(), process_OPEN_PASSIVE(), process_STATUS(), inet::tcp::TCP::removeConnection(), sendEstabIndicationToApp(), sendRst(), sendSyn(), sendToIP(), and inet::tcp::TCP::updateSockPair().
|
protected |
Referenced by setPipe().
|
protected |
Referenced by process_RCV_SEGMENT().
|
protected |
Referenced by processSegmentInListen(), processSegmentInSynSent(), and updateRcvWnd().
|
protected |
Referenced by processSegment1stThru8th().
|
protected |
Referenced by processSegment1stThru8th().
|
protected |
Referenced by processSACKOption().
|
protected |
Referenced by process_RCV_SEGMENT().
|
protected |
Referenced by updateRcvWnd().
|
protected |
L3Address inet::tcp::TCPConnection::remoteAddr |
int inet::tcp::TCPConnection::remotePort = -1 |
TCPSACKRexmitQueue* inet::tcp::TCPConnection::rexmitQueue = nullptr |
Referenced by cloneListeningConnection(), initConnection(), isLost(), nextSeg(), processAckInEstabEtc(), inet::tcp::TCPBaseAlg::processRexmitTimer(), processRstInSynReceived(), processSACKOption(), processSegmentInSynSent(), retransmitOneSegment(), selectInitialSeqNum(), sendData(), sendSegment(), sendSegmentDuringLossRecoveryPhase(), and setPipe().
|
protected |
Referenced by processSACKOption().
|
protected |
Referenced by cloneListeningConnection(), initConnection(), isSendQueueEmpty(), nextSeg(), process_CLOSE(), process_SEND(), processAckInEstabEtc(), processRstInSynReceived(), processSegmentInSynSent(), retransmitData(), retransmitOneSegment(), selectInitialSeqNum(), sendData(), sendOneNewSegment(), sendProbe(), and sendSegment().
|
protected |
Referenced by sendToIP().
|
protected |
Referenced by sendToIP().
|
protected |
Referenced by addSacks().
|
protected |
Referenced by updateWndInfo().
|
protected |
Referenced by addSacks(), cloneListeningConnection(), configureStateVariables(), hasEnoughSpaceForSegmentInReceiveQueue(), initConnection(), isLost(), isSegmentAcceptable(), isSendQueueEmpty(), nextSeg(), process_ABORT(), process_CLOSE(), process_OPEN_ACTIVE(), process_OPEN_PASSIVE(), process_QUEUE_BYTES_LIMIT(), process_RCV_SEGMENT(), process_READ_REQUEST(), process_SEND(), process_STATUS(), process_TIMEOUT_CONN_ESTAB(), process_TIMEOUT_SYN_REXMIT(), processAckInEstabEtc(), processMSSOption(), processRstInSynReceived(), processSACKOption(), processSACKPermittedOption(), processSegment1stThru8th(), processSegmentInListen(), processSegmentInSynSent(), processTSOption(), processWSOption(), retransmitData(), retransmitOneSegment(), segmentArrivalWhileClosed(), selectInitialSeqNum(), sendAck(), sendData(), sendDataDuringLossRecoveryPhase(), sendFin(), sendOneNewSegment(), sendProbe(), sendSegment(), sendSegmentDuringLossRecoveryPhase(), sendSyn(), sendSynAck(), sendToIP(), setPipe(), startSynRexmitTimer(), updateRcvQueueVars(), updateRcvWnd(), updateWndInfo(), and writeHeaderOptions().
|
protected |
Referenced by process_TIMEOUT_SYN_REXMIT(), and startSynRexmitTimer().
|
protected |
Referenced by cloneListeningConnection(), initConnection(), process_CLOSE(), process_SEND(), processAckInEstabEtc(), processSegment1stThru8th(), processSegmentInSynSent(), retransmitData(), retransmitOneSegment(), sendAck(), sendData(), sendFin(), sendOneNewSegment(), sendProbe(), sendRstAck(), sendSegmentDuringLossRecoveryPhase(), and sendSynAck().
|
protected |
Referenced by cloneListeningConnection(), configureStateVariables(), initConnection(), process_CLOSE(), process_OPEN_ACTIVE(), process_OPEN_PASSIVE(), process_SEND(), process_TIMEOUT_2MSL(), process_TIMEOUT_CONN_ESTAB(), process_TIMEOUT_FIN_WAIT_2(), process_TIMEOUT_SYN_REXMIT(), processSegment1stThru8th(), processSegmentInListen(), processSegmentInSynSent(), sendSyn(), sendToApp(), and sendToIP().
|
protected |
Referenced by updateRcvQueueVars().
|
protected |
Referenced by processSegment1stThru8th(), processSegmentInListen(), and processSegmentInSynSent().
|
protected |
Referenced by processSegment1stThru8th().
|
protected |
Referenced by cloneListeningConnection(), and initConnection().
|
protected |