INET Framework for OMNeT++/OMNEST
inet::tcp::TCPNoCongestionControl Class Reference

TCP with no congestion control (i.e. More...

#include <TCPNoCongestionControl.h>

Inheritance diagram for inet::tcp::TCPNoCongestionControl:
inet::tcp::TCPBaseAlg inet::tcp::TCPAlgorithm

Public Member Functions

 TCPNoCongestionControl ()
 Ctor. More...
 
virtual void initialize () override
 Initialize state vars. More...
 
virtual void receivedDataAck (uint32 firstSeqAcked) override
 Redefine what should happen when data got acked, to add congestion window management. More...
 
- Public Member Functions inherited from inet::tcp::TCPBaseAlg
 TCPBaseAlg ()
 Ctor. More...
 
virtual ~TCPBaseAlg ()
 Virtual dtor. More...
 
virtual void established (bool active) override
 Called when the connection is going to ESTABLISHED from SYN_SENT or SYN_RCVD. More...
 
virtual void connectionClosed () override
 Called when the connection closes, it should cancel all running timers. More...
 
virtual void processTimer (cMessage *timer, TCPEventCode &event) override
 Process REXMIT, PERSIST, DELAYED-ACK and KEEP-ALIVE timers. More...
 
virtual void sendCommandInvoked () override
 Called after user sent TCP_C_SEND command to us. More...
 
virtual void receivedOutOfOrderSegment () override
 Called after receiving data which are in the window, but not at its left edge (seq != rcv_nxt). More...
 
virtual void receiveSeqChanged () override
 Called after rcv_nxt got advanced, either because we received in-sequence data ("text" in RFC 793 lingo) or a FIN. More...
 
virtual void receivedDuplicateAck () override
 Called after we received a duplicate ACK (that is: ackNo == snd_una, no data in segment, segment doesn't carry window update, and also, we have unacked data). More...
 
virtual void receivedAckForDataNotYetSent (uint32 seq) override
 Called after we received an ACK for data not yet sent. More...
 
virtual void ackSent () override
 Called after we sent an ACK. More...
 
virtual void dataSent (uint32 fromseq) override
 Called after we sent data. More...
 
virtual void segmentRetransmitted (uint32 fromseq, uint32 toseq) override
 Called after we retransmitted segment. More...
 
virtual void restartRexmitTimer () override
 Restart REXMIT timer. More...
 
- Public Member Functions inherited from inet::tcp::TCPAlgorithm
 TCPAlgorithm ()
 Ctor. More...
 
virtual ~TCPAlgorithm ()
 Virtual dtor. More...
 
void setConnection (TCPConnection *_conn)
 Assign this object to a TCPConnection. More...
 
TCPStateVariablesgetStateVariables ()
 Creates and returns the TCP state variables. More...
 

Protected Member Functions

virtual TCPStateVariablescreateStateVariables () override
 Create and return a TCPNoCongestionControlStateVariables object. More...
 
virtual void processRexmitTimer (TCPEventCode &event) override
 Redefine what should happen on retransmission. More...
 
- Protected Member Functions inherited from inet::tcp::TCPBaseAlg
virtual void startRexmitTimer ()
 Start REXMIT timer and initialize retransmission variables. More...
 
virtual void rttMeasurementComplete (simtime_t tSent, simtime_t tAcked)
 Update state vars with new measured RTT value. More...
 
virtual void rttMeasurementCompleteUsingTS (uint32 echoedTS) override
 Converting uint32 echoedTS to simtime_t and calling rttMeasurementComplete() to update state vars with new measured RTT value. More...
 
virtual bool sendData (bool sendCommandInvoked)
 Send data, observing Nagle's algorithm and congestion window. More...
 
cMessage * cancelEvent (cMessage *msg)
 Utility function. More...
 
virtual void processPersistTimer (TCPEventCode &event)
 
virtual void processDelayedAckTimer (TCPEventCode &event)
 
virtual void processKeepAliveTimer (TCPEventCode &event)
 

Protected Attributes

TCPNoCongestionControlStateVariables *& state
 
- Protected Attributes inherited from inet::tcp::TCPBaseAlg
TCPBaseAlgStateVariables *& state
 
cMessage * rexmitTimer
 
cMessage * persistTimer
 
cMessage * delayedAckTimer
 
cMessage * keepAliveTimer
 
cOutVector * cwndVector
 
cOutVector * ssthreshVector
 
cOutVector * rttVector
 
cOutVector * srttVector
 
cOutVector * rttvarVector
 
cOutVector * rtoVector
 
cOutVector * numRtosVector
 
- Protected Attributes inherited from inet::tcp::TCPAlgorithm
TCPConnectionconn
 
TCPStateVariablesstate
 

Detailed Description

TCP with no congestion control (i.e.

congestion window kept very large). Can be used to demonstrate effect of lack of congestion control.

Constructor & Destructor Documentation

inet::tcp::TCPNoCongestionControl::TCPNoCongestionControl ( )

Ctor.

27  : TCPBaseAlg(),
29 {
30 }
TCPStateVariables * state
Definition: TCPAlgorithm.h:41
TCPBaseAlg()
Ctor.
Definition: TCPBaseAlg.cc:98
TCPNoCongestionControlStateVariables *& state
Definition: TCPNoCongestionControl.h:41
TCPBaseAlgStateVariables TCPNoCongestionControlStateVariables
State variables for TCPNoCongestionControl.
Definition: TCPNoCongestionControl.h:32

Member Function Documentation

virtual TCPStateVariables* inet::tcp::TCPNoCongestionControl::createStateVariables ( )
inlineoverrideprotectedvirtual

Create and return a TCPNoCongestionControlStateVariables object.

Implements inet::tcp::TCPAlgorithm.

45  {
47  }
TCPBaseAlgStateVariables TCPNoCongestionControlStateVariables
State variables for TCPNoCongestionControl.
Definition: TCPNoCongestionControl.h:32
void inet::tcp::TCPNoCongestionControl::initialize ( )
overridevirtual

Initialize state vars.

Reimplemented from inet::tcp::TCPBaseAlg.

33 {
35 
36  // set congestion window to a practically infinite value
37  state->snd_cwnd = 0x7fffffff;
38 }
virtual void initialize() override
Create timers, etc.
Definition: TCPBaseAlg.cc:129
TCPNoCongestionControlStateVariables *& state
Definition: TCPNoCongestionControl.h:41
uint32 snd_cwnd
congestion window
Definition: TCPBaseAlg.h:54
void inet::tcp::TCPNoCongestionControl::processRexmitTimer ( TCPEventCode event)
overrideprotectedvirtual

Redefine what should happen on retransmission.

Reimplemented from inet::tcp::TCPBaseAlg.

41 {
43 
44  if (event == TCP_E_ABORT)
45  return;
46 
47  // Tahoe-style retransmission: only one segment
49 }
virtual void retransmitOneSegment(bool called_at_rto)
Utility: retransmit one segment from snd_una.
Definition: TCPConnectionUtil.cc:802
virtual void processRexmitTimer(TCPEventCode &event)
Definition: TCPBaseAlg.cc:231
Definition: TCPConnection.h:90
TCPConnection * conn
Definition: TCPAlgorithm.h:40
void inet::tcp::TCPNoCongestionControl::receivedDataAck ( uint32  firstSeqAcked)
overridevirtual

Redefine what should happen when data got acked, to add congestion window management.

Reimplemented from inet::tcp::TCPBaseAlg.

52 {
53  TCPBaseAlg::receivedDataAck(firstSeqAcked);
54 
55  // ack may have freed up some room in the window, try sending
56  sendData(false);
57 }
virtual void receivedDataAck(uint32 firstSeqAcked) override
Called after we received an ACK which acked some data (that is, we could advance snd_una).
Definition: TCPBaseAlg.cc:529
virtual bool sendData(bool sendCommandInvoked)
Send data, observing Nagle&#39;s algorithm and congestion window.
Definition: TCPBaseAlg.cc:429

Member Data Documentation

TCPNoCongestionControlStateVariables*& inet::tcp::TCPNoCongestionControl::state
protected

Referenced by initialize().


The documentation for this class was generated from the following files: