|
INET Framework for OMNeT++/OMNEST
|
#include <TcpWestwood.h>
|
| | TcpWestwood () |
| | Ctor. More...
|
| |
| virtual void | receivedDataAck (uint32_t firstSeqAcked) override |
| | Redefine what should happen when data got acked, to add congestion window management. More...
|
| |
| virtual void | receivedDuplicateAck () override |
| | Redefine what should happen when dupAck was received, to add congestion window management. More...
|
| |
| virtual void | dataSent (uint32_t fromseq) override |
| | Called after we send data. More...
|
| |
| virtual void | segmentRetransmitted (uint32_t fromseq, uint32_t toseq) override |
| | Called after we retransmitted segment. More...
|
| |
| | TcpBaseAlg () |
| | Ctor. More...
|
| |
| virtual | ~TcpBaseAlg () |
| | Virtual dtor. More...
|
| |
| virtual void | initialize () override |
| | Create timers, etc. 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 | receivedAckForDataNotYetSent (uint32_t 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 | restartRexmitTimer () override |
| | Restart REXMIT timer. More...
|
| |
| virtual bool | shouldMarkAck () override |
| | Called before sending ACK. More...
|
| |
| virtual void | processEcnInEstablished () override |
| | Called before processing segment in established state. More...
|
| |
| | TcpAlgorithm () |
| | Ctor. More...
|
| |
| virtual | ~TcpAlgorithm () |
| | Virtual dtor. More...
|
| |
| void | setConnection (TcpConnection *_conn) |
| | Assign this object to a TcpConnection. More...
|
| |
| TcpStateVariables * | getStateVariables () |
| | Creates and returns the TCP state variables. More...
|
| |
|
| static simsignal_t | cwndSignal = cComponent::registerSignal("cwnd") |
| |
| static simsignal_t | ssthreshSignal = cComponent::registerSignal("ssthresh") |
| |
| static simsignal_t | rttSignal = cComponent::registerSignal("rtt") |
| |
| static simsignal_t | srttSignal = cComponent::registerSignal("srtt") |
| |
| static simsignal_t | rttvarSignal = cComponent::registerSignal("rttvar") |
| |
| static simsignal_t | rtoSignal = cComponent::registerSignal("rto") |
| |
| static simsignal_t | numRtosSignal = cComponent::registerSignal("numRtos") |
| |
◆ TcpWestwood()
| inet::tcp::TcpWestwood::TcpWestwood |
( |
| ) |
|
◆ createStateVariables()
|
|
inlineoverrideprotectedvirtual |
Create and return a TCPvegasStateVariables object.
Implements inet::tcp::TcpAlgorithm.
49 return new TcpWestwoodStateVariables();
◆ dataSent()
| void inet::tcp::TcpWestwood::dataSent |
( |
uint32_t |
fromseq | ) |
|
|
overridevirtual |
◆ processRexmitTimer()
| void inet::tcp::TcpWestwood::processRexmitTimer |
( |
TcpEventCode & |
event | ) |
|
|
overrideprotectedvirtual |
◆ recalculateBWE()
| void inet::tcp::TcpWestwood::recalculateBWE |
( |
uint32_t |
cumul_ack | ) |
|
|
protectedvirtual |
◆ recalculateSlowStartThreshold()
| void inet::tcp::TcpWestwood::recalculateSlowStartThreshold |
( |
| ) |
|
|
protectedvirtual |
◆ receivedDataAck()
| void inet::tcp::TcpWestwood::receivedDataAck |
( |
uint32_t |
firstSeqAcked | ) |
|
|
overridevirtual |
Redefine what should happen when data got acked, to add congestion window management.
Reimplemented from inet::tcp::TcpBaseAlg.
118 const TcpSegmentTransmitInfoList::Item *found =
state->
regions.
get(firstSeqAcked);
120 if (found !=
nullptr) {
121 simtime_t currentTime = simTime();
122 simtime_t newRTT = currentTime - found->getFirstSentTime();
125 if (newRTT < state->w_RTTmin && newRTT > 0 && found->getTransmitCount() == 1)
149 EV_DETAIL <<
"Fast Recovery: setting cwnd to ssthresh=" <<
state->
ssthresh <<
"\n";
159 EV_DETAIL <<
"cwnd <= ssthresh: Slow Start: increasing cwnd by one SMSS bytes to ";
199 EV_DETAIL <<
"cwnd > ssthresh: Congestion Avoidance: increasing cwnd linearly, to " <<
state->
snd_cwnd <<
"\n";
◆ receivedDuplicateAck()
| void inet::tcp::TcpWestwood::receivedDuplicateAck |
( |
| ) |
|
|
overridevirtual |
Redefine what should happen when dupAck was received, to add congestion window management.
Reimplemented from inet::tcp::TcpBaseAlg.
217 EV_DETAIL <<
"Westwood on dupAcks == DUPTHRESH(=" <<
state->
dupthresh <<
": Faster Retransmit \n";
269 EV_DETAIL <<
"Westwood on dupAcks > DUPTHRESH(=" <<
state->
dupthresh <<
": Fast Recovery: inflating cwnd by SMSS, new cwnd=" <<
state->
snd_cwnd <<
"\n";
◆ segmentRetransmitted()
| void inet::tcp::TcpWestwood::segmentRetransmitted |
( |
uint32_t |
fromseq, |
|
|
uint32_t |
toseq |
|
) |
| |
|
overridevirtual |
Called after we retransmitted segment.
The argument fromseq is the seqno of the first byte sent. The argument toseq is the seqno of the last byte sent+1.
Reimplemented from inet::tcp::TcpBaseAlg.
◆ state
The documentation for this class was generated from the following files:
static simsignal_t cwndSignal
Definition: TcpBaseAlg.h:101
TcpBaseAlg()
Ctor.
Definition: TcpBaseAlg.cc:95
virtual void processRexmitTimer(TcpEventCode &event)
Definition: TcpBaseAlg.cc:208
uint32_t snd_cwnd
congestion window
Definition: TcpBaseAlg.h:40
uint32_t dupacks
Definition: TcpConnection.h:236
virtual void segmentRetransmitted(uint32_t fromseq, uint32_t toseq) override
Called after we retransmitted segment.
Definition: TcpBaseAlg.cc:624
uint32_t dupthresh
Definition: TcpConnection.h:261
void clearTo(uint32_t endseg)
Definition: TcpSegmentTransmitInfoList.cc:75
virtual void receivedDuplicateAck() override
Called after we received a duplicate ACK (that is: ackNo == snd_una, no data in segment,...
Definition: TcpBaseAlg.cc:565
virtual void recalculateSlowStartThreshold()
Utility function to recalculate ssthresh.
Definition: TcpWestwood.cc:55
const Item * get(uint32_t seq) const
returns pointer to Item, or nullptr if not found
Definition: TcpSegmentTransmitInfoList.cc:64
double w_a
Definition: TcpWestwood.h:31
TcpConnection * conn
Definition: TcpAlgorithm.h:26
virtual void receivedDataAck(uint32_t firstSeqAcked) override
Called after we received an ACK which acked some data (that is, we could advance snd_una).
Definition: TcpBaseAlg.cc:483
bool afterRto
Definition: TcpConnection.h:194
virtual void recalculateBWE(uint32_t cumul_ack)
Recalculate BWE.
Definition: TcpWestwood.cc:64
uint32_t snd_mss
Definition: TcpConnection.h:142
double w_sample_bwe
Definition: TcpWestwood.h:36
TcpWestwoodStateVariables *& state
Definition: TcpWestwood.h:44
uint32_t ssthresh
slow start threshold
Definition: TcpWestwood.h:28
virtual void dataSent(uint32_t fromseq) override
Called after we sent data.
Definition: TcpBaseAlg.cc:603
void set(uint32_t beg, uint32_t end, simtime_t sentTime)
Definition: TcpSegmentTransmitInfoList.cc:16
simtime_t w_lastAckTime
Definition: TcpWestwood.h:33
@ TCP_E_ABORT
Definition: TcpConnection.h:75
virtual void restartRexmitTimer() override
Restart REXMIT timer.
Definition: TcpBaseAlg.cc:628
virtual bool sendData(bool sendCommandInvoked)
Send data, observing Nagle's algorithm and congestion window.
Definition: TcpBaseAlg.cc:398
simtime_t w_RTTmin
Definition: TcpWestwood.h:30
virtual void retransmitOneSegment(bool called_at_rto)
Utility: retransmit one segment from snd_una.
Definition: TcpConnectionUtil.cc:960
uint32_t snd_una
Definition: TcpConnection.h:147
TcpStateVariables * state
Definition: TcpAlgorithm.h:27
static simsignal_t ssthreshSignal
Definition: TcpBaseAlg.h:102
TcpSegmentTransmitInfoList regions
Definition: TcpWestwood.h:38
double w_bwe
Definition: TcpWestwood.h:35
uint32_t snd_max
Definition: TcpConnection.h:149