A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
internet
model
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
:
78
TracedValue<double>
m_rho
;
79
Time
m_rRtt
;
80
double
m_cWndCnt
;
81
82
private
:
87
void
RecalcParam
(
const
Ptr<TcpSocketState>
&tcb);
88
};
89
90
}
// namespace ns3
91
92
#endif // TCPHYBLA_H
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::Ptr< TcpSocketState >
ns3::TcpHybla::RecalcParam
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
Definition:
tcp-hybla.cc:70
ns3::TcpHybla::CongestionAvoidance
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
Definition:
tcp-hybla.cc:124
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:180
ns3::TracedValue< double >
ns3::TcpHybla::PktsAcked
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
Definition:
tcp-hybla.cc:81
ns3::TcpHybla::TcpHybla
TcpHybla(void)
Create an unbound tcp socket.
Definition:
tcp-hybla.cc:48
ns3::TcpHybla::GetName
virtual std::string GetName() const override
Get the name of the congestion control algorithm.
Definition:
tcp-hybla.cc:172
ns3::TcpHybla::SlowStart
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm
Definition:
tcp-hybla.cc:94
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TcpHybla::Fork
virtual Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across socket.
Definition:
tcp-hybla.cc:166
ns3::TcpHybla::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-hybla.cc:30
ns3::TcpHybla
Implementation of the TCP Hybla algorithm.
Definition:
tcp-hybla.h:45
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::TcpHybla::m_cWndCnt
double m_cWndCnt
cWnd integer-to-float counter
Definition:
tcp-hybla.h:80
ns3::TcpHybla::~TcpHybla
virtual ~TcpHybla(void) override
Definition:
tcp-hybla.cc:64
ns3::TcpHybla::m_rRtt
Time m_rRtt
Reference RTT.
Definition:
tcp-hybla.h:79
ns3::TcpHybla::m_rho
TracedValue< double > m_rho
Rho parameter.
Definition:
tcp-hybla.h:78
Generated on Wed Nov 7 2018 10:01:56 for ns-3 by
1.8.14