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/traced-value.h"
24 
25 namespace ns3 {
26 
44 class TcpHybla : public TcpNewReno
45 {
46 public:
51  static TypeId GetTypeId (void);
52 
56  TcpHybla (void);
57 
62  TcpHybla (const TcpHybla& sock);
63 
64  virtual ~TcpHybla (void);
65 
66  virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
67  const Time& rtt);
68 
69  virtual std::string GetName () const;
70 
71  virtual Ptr<TcpCongestionOps> Fork ();
72 
73 protected:
74  virtual uint32_t SlowStart (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked);
75  virtual void CongestionAvoidance (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked);
76 
77 private:
81  double m_cWndCnt;
82 
83 private:
87  void RecalcParam (Ptr<TcpSocketState> tcb, const Time& rtt);
88 };
89 
90 } // namespace ns3
91 
92 #endif // TCPHYBLA_H
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Definition: tcp-hybla.cc:83
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition: tcp-hybla.cc:175
The NewReno implementation.
TcpHybla(void)
Create an unbound tcp socket.
Definition: tcp-hybla.cc:48
Time m_minRtt
Minimum smoothed round trip time value seen.
Definition: tcp-hybla.h:79
virtual ~TcpHybla(void)
Definition: tcp-hybla.cc:66
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void RecalcParam(Ptr< TcpSocketState > tcb, const Time &rtt)
Recalculate algorithm paramenters.
Definition: tcp-hybla.cc:72
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-hybla.cc:30
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across socket.
Definition: tcp-hybla.cc:169
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Tcp NewReno slow start algorithm.
Definition: tcp-hybla.cc:97
Implementation of the TCP Hybla algorithm.
Definition: tcp-hybla.h:44
a unique identifier for an interface.
Definition: type-id.h:58
double m_cWndCnt
cWnd integer-to-float counter
Definition: tcp-hybla.h:81
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
Definition: tcp-hybla.cc:127
Time m_rRtt
Reference RTT.
Definition: tcp-hybla.h:80
TracedValue< double > m_rho
Rho parameter.
Definition: tcp-hybla.h:78