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 "tcp-congestion-ops.h"
23#include "ns3/traced-value.h"
24
25namespace ns3 {
26
27class TcpSocketState;
28
46class TcpHybla : public TcpNewReno
47{
48public:
53 static TypeId GetTypeId (void);
54
58 TcpHybla (void);
59
64 TcpHybla (const TcpHybla& sock);
65
66 virtual ~TcpHybla (void) override;
67
68 // Inherited
69 virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
70 const Time& rtt) override;
71 virtual std::string GetName () const override;
72 virtual Ptr<TcpCongestionOps> Fork () override;
73
74protected:
75 virtual uint32_t SlowStart (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
76 virtual void CongestionAvoidance (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
77
78private:
81 double m_cWndCnt;
82
83private:
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:47
virtual ~TcpHybla(void) override
Definition: tcp-hybla.cc:65
Time m_rRtt
Reference RTT.
Definition: tcp-hybla.h:80
virtual Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition: tcp-hybla.cc:167
virtual 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
virtual std::string GetName() const override
Get the name of the congestion control algorithm.
Definition: tcp-hybla.cc:173
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition: tcp-hybla.cc:71
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-hybla.cc:31
double m_cWndCnt
cWnd integer-to-float counter
Definition: tcp-hybla.h:81
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition: tcp-hybla.cc:82
TcpHybla(void)
Create an unbound tcp socket.
Definition: tcp-hybla.cc:49
virtual 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:103
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.