A Discrete-Event Network Simulator
API
tcp-hybla.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Natale Patriciello <natale.patriciello@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 #ifndef TCPHYBLA_H
20 #define TCPHYBLA_H
21 
22 #include "ns3/tcp-congestion-ops.h"
23 #include "ns3/tcp-recovery-ops.h"
24 #include "ns3/traced-value.h"
25 
26 namespace ns3 {
27 
45 class TcpHybla : public TcpNewReno
46 {
47 public:
52  static TypeId GetTypeId (void);
53 
57  TcpHybla (void);
58 
63  TcpHybla (const TcpHybla& sock);
64 
65  virtual ~TcpHybla (void) override;
66 
67  // Inherited
68  virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
69  const Time& rtt) override;
70  virtual std::string GetName () const override;
71  virtual Ptr<TcpCongestionOps> Fork () override;
72 
73 protected:
74  virtual uint32_t SlowStart (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
75  virtual void CongestionAvoidance (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
76 
77 private:
80  double m_cWndCnt;
81 
82 private:
87  void RecalcParam (const Ptr<TcpSocketState> &tcb);
88 };
89 
90 } // namespace ns3
91 
92 #endif // TCPHYBLA_H
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition: tcp-hybla.cc:70
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
Definition: tcp-hybla.cc:124
The NewReno implementation.
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition: tcp-hybla.cc:81
TcpHybla(void)
Create an unbound tcp socket.
Definition: tcp-hybla.cc:48
virtual std::string GetName() const override
Get the name of the congestion control algorithm.
Definition: tcp-hybla.cc:172
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm
Definition: tcp-hybla.cc:94
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across socket.
Definition: tcp-hybla.cc:166
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-hybla.cc:30
Implementation of the TCP Hybla algorithm.
Definition: tcp-hybla.h:45
a unique identifier for an interface.
Definition: type-id.h:58
double m_cWndCnt
cWnd integer-to-float counter
Definition: tcp-hybla.h:80
virtual ~TcpHybla(void) override
Definition: tcp-hybla.cc:64
Time m_rRtt
Reference RTT.
Definition: tcp-hybla.h:79
TracedValue< double > m_rho
Rho parameter.
Definition: tcp-hybla.h:78