A Discrete-Event Network Simulator
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
14namespace ns3
15{
16
17class 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 */
36class 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
Smart pointer class similar to boost::intrusive_ptr.
Implementation of the TCP Hybla algorithm.
Definition tcp-hybla.h:37
static TypeId GetTypeId()
Get the type ID.
Definition tcp-hybla.cc:21
Time m_rRtt
Reference RTT.
Definition tcp-hybla.h:69
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition tcp-hybla.cc:155
TcpHybla()
Create an unbound tcp socket.
Definition tcp-hybla.cc:39
uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm.
Definition tcp-hybla.cc:84
TracedValue< double > m_rho
Rho parameter.
Definition tcp-hybla.h:68
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition tcp-hybla.cc:161
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition tcp-hybla.cc:61
~TcpHybla() override
Definition tcp-hybla.cc:55
double m_cWndCnt
cWnd integer-to-float counter
Definition tcp-hybla.h:70
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition tcp-hybla.cc:72
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
Definition tcp-hybla.cc:114
The NewReno implementation.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Trace classes with value semantics.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.