A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
tcp-scalable.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 ResiliNets, ITTC, University of Kansas
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Truc Anh N. Nguyen <annguyen@ittc.ku.edu>
7
* Keerthi Ganta <keerthig@ittc.ku.edu>
8
* Md Moshfequr Rahman <moshfequr@ittc.ku.edu>
9
* Amir Modarresi <amodarresi@ittc.ku.edu>
10
*
11
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
12
* ResiliNets Research Group https://resilinets.org/
13
* Information and Telecommunication Technology Center (ITTC)
14
* and Department of Electrical Engineering and Computer Science
15
* The University of Kansas Lawrence, KS USA.
16
*/
17
18
#ifndef TCPSCALABLE_H
19
#define TCPSCALABLE_H
20
21
#include "
tcp-congestion-ops.h
"
22
23
namespace
ns3
24
{
25
26
class
TcpSocketState;
27
28
/**
29
* \ingroup congestionOps
30
*
31
* \brief An implementation of TCP Scalable
32
*
33
* Scalable improves TCP performance to better utilize the available bandwidth
34
* of a highspeed wide area network by altering NewReno congestion window
35
* adjustment algorithm.
36
*
37
* When congestion has not been detected, for each ACK received in an RTT,
38
* Scalable increases its cwnd per:
39
*
40
* cwnd = cwnd + 0.01 (1)
41
*
42
* Following Linux implementation of Scalable, we use 50 instead of 100 to
43
* account for delayed ACK.
44
*
45
* On the first detection of congestion in a given RTT, cwnd is reduced based
46
* on the following equation:
47
*
48
* cwnd = cwnd - ceil(0.125 * cwnd) (2)
49
*
50
* More information: http://doi.acm.org/10.1145/956981.956989
51
*/
52
53
class
TcpScalable
:
public
TcpNewReno
54
{
55
public
:
56
/**
57
* \brief Get the type ID.
58
* \return the object TypeId
59
*/
60
static
TypeId
GetTypeId
();
61
62
/**
63
* Create an unbound tcp socket.
64
*/
65
TcpScalable
();
66
67
/**
68
* \brief Copy constructor
69
* \param sock the object to copy
70
*/
71
TcpScalable
(
const
TcpScalable
& sock);
72
~TcpScalable
()
override
;
73
74
std::string
GetName
()
const override
;
75
76
/**
77
* \brief Get slow start threshold following Scalable principle (Equation 2)
78
*
79
* \param tcb internal congestion state
80
* \param bytesInFlight bytes in flight
81
*
82
* \return the slow start threshold value
83
*/
84
uint32_t
GetSsThresh
(
Ptr<const TcpSocketState>
tcb,
uint32_t
bytesInFlight)
override
;
85
86
Ptr<TcpCongestionOps>
Fork
()
override
;
87
88
protected
:
89
/**
90
* \brief Congestion avoidance of TcpScalable (Equation 1)
91
*
92
* \param tcb internal congestion state
93
* \param segmentsAcked count of segments acked
94
*/
95
void
CongestionAvoidance
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked)
override
;
96
97
private
:
98
uint32_t
m_ackCnt
;
//!< Number of received ACK
99
uint32_t
m_aiFactor
;
//!< Additive increase factor
100
double
m_mdFactor
;
//!< Multiplicative decrease factor
101
};
102
103
}
// namespace ns3
104
105
#endif
// TCPSCALABLE_H
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TcpNewReno
The NewReno implementation.
Definition
tcp-congestion-ops.h:201
ns3::TcpScalable
An implementation of TCP Scalable.
Definition
tcp-scalable.h:54
ns3::TcpScalable::Fork
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition
tcp-scalable.cc:74
ns3::TcpScalable::GetSsThresh
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get slow start threshold following Scalable principle (Equation 2)
Definition
tcp-scalable.cc:119
ns3::TcpScalable::~TcpScalable
~TcpScalable() override
Definition
tcp-scalable.cc:68
ns3::TcpScalable::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-scalable.cc:31
ns3::TcpScalable::m_ackCnt
uint32_t m_ackCnt
Number of received ACK.
Definition
tcp-scalable.h:98
ns3::TcpScalable::CongestionAvoidance
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Congestion avoidance of TcpScalable (Equation 1)
Definition
tcp-scalable.cc:80
ns3::TcpScalable::TcpScalable
TcpScalable()
Create an unbound tcp socket.
Definition
tcp-scalable.cc:50
ns3::TcpScalable::m_aiFactor
uint32_t m_aiFactor
Additive increase factor.
Definition
tcp-scalable.h:99
ns3::TcpScalable::GetName
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition
tcp-scalable.cc:113
ns3::TcpScalable::m_mdFactor
double m_mdFactor
Multiplicative decrease factor.
Definition
tcp-scalable.h:100
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-congestion-ops.h
src
internet
model
tcp-scalable.h
Generated on Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0