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-hybla.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 Natale Patriciello <natale.patriciello@gmail.com>
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
*/
18
#ifndef TCPHYBLA_H
19
#define TCPHYBLA_H
20
21
#include "
tcp-congestion-ops.h
"
22
23
#include "ns3/traced-value.h"
24
25
namespace
ns3
26
{
27
28
class
TcpSocketState;
29
30
/**
31
* \ingroup congestionOps
32
*
33
* \brief Implementation of the TCP Hybla algorithm
34
*
35
* The key idea behind TCP Hybla is to obtain for long RTT connections the same
36
* instantaneous transmission rate of a reference TCP connection with lower RTT.
37
* With analytical steps, it is shown that this goal can be achieved by
38
* modifying the time scale, in order for the throughput to be independent from
39
* the RTT. This independence is obtained through the use of a coefficient rho.
40
*
41
* This coefficient is used to calculate both the slow start threshold
42
* and the congestion window when in slow start and in congestion avoidance,
43
* respectively.
44
*
45
* More information: http://dl.acm.org/citation.cfm?id=2756518
46
*/
47
class
TcpHybla
:
public
TcpNewReno
48
{
49
public
:
50
/**
51
* \brief Get the type ID.
52
* \return the object TypeId
53
*/
54
static
TypeId
GetTypeId
();
55
56
/**
57
* Create an unbound tcp socket.
58
*/
59
TcpHybla
();
60
61
/**
62
* \brief Copy constructor
63
* \param sock the object to copy
64
*/
65
TcpHybla
(
const
TcpHybla
& sock);
66
67
~TcpHybla
()
override
;
68
69
// Inherited
70
void
PktsAcked
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked,
const
Time
& rtt)
override
;
71
std::string
GetName
()
const override
;
72
Ptr<TcpCongestionOps>
Fork
()
override
;
73
74
protected
:
75
uint32_t
SlowStart
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked)
override
;
76
void
CongestionAvoidance
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked)
override
;
77
78
private
:
79
TracedValue<double>
m_rho
;
//!< Rho parameter
80
Time
m_rRtt
;
//!< Reference RTT
81
double
m_cWndCnt
;
//!< cWnd integer-to-float counter
82
83
private
:
84
/**
85
* \brief Recalculate algorithm parameters
86
* \param tcb the socket state.
87
*/
88
void
RecalcParam
(
const
Ptr<TcpSocketState>
& tcb);
89
};
90
91
}
// namespace ns3
92
93
#endif
// TCPHYBLA_H
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::TcpHybla
Implementation of the TCP Hybla algorithm.
Definition:
tcp-hybla.h:48
ns3::TcpHybla::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
tcp-hybla.cc:32
ns3::TcpHybla::m_rRtt
Time m_rRtt
Reference RTT.
Definition:
tcp-hybla.h:80
ns3::TcpHybla::Fork
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition:
tcp-hybla.cc:166
ns3::TcpHybla::TcpHybla
TcpHybla()
Create an unbound tcp socket.
Definition:
tcp-hybla.cc:50
ns3::TcpHybla::SlowStart
uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm.
Definition:
tcp-hybla.cc:95
ns3::TcpHybla::m_rho
TracedValue< double > m_rho
Rho parameter.
Definition:
tcp-hybla.h:79
ns3::TcpHybla::GetName
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition:
tcp-hybla.cc:172
ns3::TcpHybla::RecalcParam
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition:
tcp-hybla.cc:72
ns3::TcpHybla::~TcpHybla
~TcpHybla() override
Definition:
tcp-hybla.cc:66
ns3::TcpHybla::m_cWndCnt
double m_cWndCnt
cWnd integer-to-float counter
Definition:
tcp-hybla.h:81
ns3::TcpHybla::PktsAcked
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition:
tcp-hybla.cc:83
ns3::TcpHybla::CongestionAvoidance
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
Definition:
tcp-hybla.cc:125
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:212
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TracedValue
Trace classes with value semantics.
Definition:
traced-value.h:116
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-congestion-ops.h
src
internet
model
tcp-hybla.h
Generated on Tue May 28 2024 23:36:11 for ns-3 by
1.9.6