A Discrete-Event Network Simulator
API
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 
47 class TcpHybla : public TcpNewReno
48 {
49  public:
54  static TypeId GetTypeId();
55 
59  TcpHybla();
60 
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:
81  double m_cWndCnt;
82 
83  private:
88  void RecalcParam(const Ptr<TcpSocketState>& tcb);
89 };
90 
91 } // namespace ns3
92 
93 #endif // TCPHYBLA_H
Implementation of the TCP Hybla algorithm.
Definition: tcp-hybla.h:48
static TypeId GetTypeId()
Get the type ID.
Definition: tcp-hybla.cc:32
Time m_rRtt
Reference RTT.
Definition: tcp-hybla.h:80
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition: tcp-hybla.cc:166
TcpHybla()
Create an unbound tcp socket.
Definition: tcp-hybla.cc:50
uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm.
Definition: tcp-hybla.cc:95
TracedValue< double > m_rho
Rho parameter.
Definition: tcp-hybla.h:79
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition: tcp-hybla.cc:172
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition: tcp-hybla.cc:72
~TcpHybla() override
Definition: tcp-hybla.cc:66
double m_cWndCnt
cWnd integer-to-float counter
Definition: tcp-hybla.h:81
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition: tcp-hybla.cc:83
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
Definition: tcp-hybla.cc:125
The NewReno implementation.
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.