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
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
*/
7
#ifndef TCPHYBLA_H
8
#define TCPHYBLA_H
9
10
#include "
tcp-congestion-ops.h
"
11
12
#include "ns3/traced-value.h"
13
14
namespace
ns3
15
{
16
17
class
TcpSocketState;
18
19
/**
20
* \ingroup congestionOps
21
*
22
* \brief Implementation of the TCP Hybla algorithm
23
*
24
* The key idea behind TCP Hybla is to obtain for long RTT connections the same
25
* instantaneous transmission rate of a reference TCP connection with lower RTT.
26
* With analytical steps, it is shown that this goal can be achieved by
27
* modifying the time scale, in order for the throughput to be independent from
28
* the RTT. This independence is obtained through the use of a coefficient rho.
29
*
30
* This coefficient is used to calculate both the slow start threshold
31
* and the congestion window when in slow start and in congestion avoidance,
32
* respectively.
33
*
34
* More information: http://dl.acm.org/citation.cfm?id=2756518
35
*/
36
class
TcpHybla
:
public
TcpNewReno
37
{
38
public
:
39
/**
40
* \brief Get the type ID.
41
* \return the object TypeId
42
*/
43
static
TypeId
GetTypeId
();
44
45
/**
46
* Create an unbound tcp socket.
47
*/
48
TcpHybla
();
49
50
/**
51
* \brief Copy constructor
52
* \param sock the object to copy
53
*/
54
TcpHybla
(
const
TcpHybla
& sock);
55
56
~TcpHybla
()
override
;
57
58
// Inherited
59
void
PktsAcked
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked,
const
Time
& rtt)
override
;
60
std::string
GetName
()
const override
;
61
Ptr<TcpCongestionOps>
Fork
()
override
;
62
63
protected
:
64
uint32_t
SlowStart
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked)
override
;
65
void
CongestionAvoidance
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked)
override
;
66
67
private
:
68
TracedValue<double>
m_rho
;
//!< Rho parameter
69
Time
m_rRtt
;
//!< Reference RTT
70
double
m_cWndCnt
;
//!< cWnd integer-to-float counter
71
72
private
:
73
/**
74
* \brief Recalculate algorithm parameters
75
* \param tcb the socket state.
76
*/
77
void
RecalcParam
(
const
Ptr<TcpSocketState>
& tcb);
78
};
79
80
}
// namespace ns3
81
82
#endif
// TCPHYBLA_H
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TcpHybla
Implementation of the TCP Hybla algorithm.
Definition
tcp-hybla.h:37
ns3::TcpHybla::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-hybla.cc:21
ns3::TcpHybla::m_rRtt
Time m_rRtt
Reference RTT.
Definition
tcp-hybla.h:69
ns3::TcpHybla::Fork
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition
tcp-hybla.cc:155
ns3::TcpHybla::TcpHybla
TcpHybla()
Create an unbound tcp socket.
Definition
tcp-hybla.cc:39
ns3::TcpHybla::SlowStart
uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm.
Definition
tcp-hybla.cc:84
ns3::TcpHybla::m_rho
TracedValue< double > m_rho
Rho parameter.
Definition
tcp-hybla.h:68
ns3::TcpHybla::GetName
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition
tcp-hybla.cc:161
ns3::TcpHybla::RecalcParam
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition
tcp-hybla.cc:61
ns3::TcpHybla::~TcpHybla
~TcpHybla() override
Definition
tcp-hybla.cc:55
ns3::TcpHybla::m_cWndCnt
double m_cWndCnt
cWnd integer-to-float counter
Definition
tcp-hybla.h:70
ns3::TcpHybla::PktsAcked
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition
tcp-hybla.cc:72
ns3::TcpHybla::CongestionAvoidance
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
Definition
tcp-hybla.cc:114
ns3::TcpNewReno
The NewReno implementation.
Definition
tcp-congestion-ops.h:201
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::TracedValue
Trace classes with value semantics.
Definition
traced-value.h:105
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-hybla.h
Generated on Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0