A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-yeah.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 ResiliNets, ITTC, University of Kansas
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Truc Anh N. Nguyen <annguyen@ittc.ku.edu>
18 *
19 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
20 * ResiliNets Research Group https://resilinets.org/
21 * Information and Telecommunication Technology Center (ITTC)
22 * and Department of Electrical Engineering and Computer Science
23 * The University of Kansas Lawrence, KS USA.
24 */
25
26#ifndef TCPYEAH_H
27#define TCPYEAH_H
28
29#include "tcp-recovery-ops.h"
30#include "tcp-scalable.h"
31
32namespace ns3
33{
34
72class TcpYeah : public TcpNewReno
73{
74 public:
79 static TypeId GetTypeId();
80
84 TcpYeah();
85
90 TcpYeah(const TcpYeah& sock);
91 ~TcpYeah() override;
92
93 std::string GetName() const override;
94
110 void PktsAcked(Ptr<TcpSocketState> tcb, uint32_t segmentsAcked, const Time& rtt) override;
111
121 const TcpSocketState::TcpCongState_t newState) override;
122
129 void IncreaseWindow(Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
130
139 uint32_t GetSsThresh(Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight) override;
140
141 Ptr<TcpCongestionOps> Fork() override;
142
143 protected:
144 private:
156 void EnableYeah(const SequenceNumber32& nextTxSequence);
157
161 void DisableYeah();
162
163 private:
173
185};
186
187} // namespace ns3
188
189#endif // TCPYEAH_H
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
The NewReno implementation.
TcpCongState_t
Definition of the Congestion state machine.
An implementation of TCP YeAH.
Definition: tcp-yeah.h:73
Time m_minRtt
Minimum of all RTTs measured within last RTT.
Definition: tcp-yeah.h:177
uint32_t m_zeta
Minimum number of state switches to reset m_renoCount.
Definition: tcp-yeah.h:172
void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Adjust cwnd following YeAH dual-mode algorithm.
Definition: tcp-yeah.cc:204
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Compute RTTs needed to execute YeAH algorithm.
Definition: tcp-yeah.cc:149
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition: tcp-yeah.cc:143
uint32_t m_renoCount
Estimated cwnd of competing Reno flow.
Definition: tcp-yeah.h:183
bool m_doingYeahNow
If true, do YeAH for this RTT.
Definition: tcp-yeah.h:179
void CongestionStateSet(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState) override
Enable/disable YeAH algorithm depending on the congestion state.
Definition: tcp-yeah.cc:189
static TypeId GetTypeId()
Get the type ID.
Definition: tcp-yeah.cc:37
uint32_t m_cntRtt
Number of RTT measurements during last RTT.
Definition: tcp-yeah.h:178
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition: tcp-yeah.cc:315
uint32_t m_lastQ
Last number of packets in the bottleneck queue.
Definition: tcp-yeah.h:181
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get slow start threshold upon the receipt of 3 dupACKs.
Definition: tcp-yeah.cc:321
SequenceNumber32 m_begSndNxt
Right edge during last RTT.
Definition: tcp-yeah.h:180
uint32_t m_stcpAiFactor
STCP additive increase parameter.
Definition: tcp-yeah.h:174
Ptr< TcpScalable > m_stcp
TcpScalable object.
Definition: tcp-yeah.h:175
uint32_t m_alpha
Maximum backlog allowed at the bottleneck queue; Q_max in the paper.
Definition: tcp-yeah.h:164
uint32_t m_phy
Maximum delta from base.
Definition: tcp-yeah.h:169
uint32_t m_epsilon
Log maximum fraction to be removed on early decongestion.
Definition: tcp-yeah.h:168
void EnableYeah(const SequenceNumber32 &nextTxSequence)
Enable YeAH algorithm to start taking YeAH samples.
Definition: tcp-yeah.cc:170
uint32_t m_doingRenoNow
Number of RTTs in "Slow" mode.
Definition: tcp-yeah.h:182
uint32_t m_rho
Minimum number of consecutive RTT to consider competition with Reno flows on loss.
Definition: tcp-yeah.h:170
TcpYeah()
Create an unbound tcp socket.
Definition: tcp-yeah.cc:87
void DisableYeah()
Stop taking YeAH samples.
Definition: tcp-yeah.cc:181
uint32_t m_fastCount
Number of RTTs in "Fast" mode.
Definition: tcp-yeah.h:184
Time m_baseRtt
Minimum of all YeAH RTT measurements seen during connection.
Definition: tcp-yeah.h:176
uint32_t m_gamma
Fraction of queue to be removed per RTT when precautionary decongestion executed.
Definition: tcp-yeah.h:165
uint32_t m_delta
Log minimum fraction of cwnd to be removed on loss.
Definition: tcp-yeah.h:167
~TcpYeah() override
Definition: tcp-yeah.cc:137
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.