A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
tcp-htcp.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2015 ResiliNets, ITTC, University of Kansas
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
* by: Amir Modarresi <amodarresi@ittc.ku.edu>
19
*
20
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
21
* ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets
22
* Information and Telecommunication Technology Center (ITTC)
23
* and Department of Electrical Engineering and Computer Science
24
* The University of Kansas Lawrence, KS USA.
25
*/
26
27
#ifndef TCP_HTCP_H
28
#define TCP_HTCP_H
29
30
#include "
tcp-congestion-ops.h
"
31
32
namespace
ns3
{
33
34
class
TcpSocketState;
35
49
class
TcpHtcp
:
public
TcpNewReno
50
{
51
public
:
56
static
TypeId
GetTypeId
(
void
);
60
TcpHtcp
(
void
);
65
TcpHtcp
(
const
TcpHtcp
& sock);
66
virtual
~TcpHtcp
(
void
);
67
virtual
std::string
GetName
()
const
;
68
virtual
Ptr<TcpCongestionOps>
Fork
();
69
virtual
uint32_t
GetSsThresh
(
Ptr<const TcpSocketState>
tcb,
70
uint32_t bytesInFlight);
71
72
virtual
void
PktsAcked
(
Ptr<TcpSocketState>
tcb, uint32_t segmentsAcked,
73
const
Time
&rtt);
74
75
protected
:
76
virtual
void
CongestionAvoidance
(
Ptr<TcpSocketState>
tcb,
77
uint32_t segmentsAcked);
78
79
private
:
83
void
UpdateAlpha
(
void
);
84
88
void
UpdateBeta
(
void
);
89
90
// h-tcp variables
91
double
m_alpha
;
92
double
m_beta
;
93
double
m_defaultBackoff
;
94
double
m_throughputRatio
;
95
Time
m_delta
;
96
//last congestion event experienced by a flow
97
Time
m_deltaL
;
98
Time
m_lastCon
;
99
Time
m_minRtt
;
100
Time
m_maxRtt
;
101
uint32_t
m_throughput
;
102
uint32_t
m_lastThroughput
;
103
uint32_t
m_dataSent
;
104
105
};
106
107
}
// namespace ns3
108
109
#endif
/* TCP_HTCP_H */
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TcpHtcp::m_minRtt
Time m_minRtt
Minimum RTT in each congestion period.
Definition:
tcp-htcp.h:99
ns3::TcpHtcp::TcpHtcp
TcpHtcp(void)
Create an unbound tcp socket.
Definition:
tcp-htcp.cc:67
tcp-congestion-ops.h
ns3::TcpHtcp::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-htcp.cc:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TcpHtcp::m_throughputRatio
double m_throughputRatio
ratio of two consequence throughput
Definition:
tcp-htcp.h:94
ns3::TcpHtcp::GetName
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition:
tcp-htcp.cc:62
ns3::TcpHtcp::m_beta
double m_beta
AIMD multiplicative decrease factor.
Definition:
tcp-htcp.h:92
ns3::TcpHtcp::UpdateAlpha
void UpdateAlpha(void)
Updates the additive increase parameter for H-TCP.
Definition:
tcp-htcp.cc:126
ns3::TcpHtcp::m_lastCon
Time m_lastCon
Time of the last congestion for the flow.
Definition:
tcp-htcp.h:98
ns3::TcpHtcp::PktsAcked
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Definition:
tcp-htcp.cc:191
ns3::TcpHtcp::m_deltaL
Time m_deltaL
Threshold for switching between standard and new increase function.
Definition:
tcp-htcp.h:97
ns3::TcpHtcp::CongestionAvoidance
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
Definition:
tcp-htcp.cc:111
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::TcpHtcp::m_throughput
uint32_t m_throughput
Current throughput since last congestion.
Definition:
tcp-htcp.h:101
ns3::TcpHtcp::~TcpHtcp
virtual ~TcpHtcp(void)
Definition:
tcp-htcp.cc:100
ns3::TcpHtcp::m_dataSent
uint32_t m_dataSent
Current amount of data sent since last congestion.
Definition:
tcp-htcp.h:103
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:104
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:216
ns3::TcpHtcp::m_alpha
double m_alpha
AIMD additive increase parameter.
Definition:
tcp-htcp.h:91
ns3::TcpHtcp::m_delta
Time m_delta
Time in second that has elapsed since the.
Definition:
tcp-htcp.h:95
ns3::TcpHtcp::GetSsThresh
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get the slow start threshold after a loss event.
Definition:
tcp-htcp.cc:169
ns3::TcpHtcp::m_maxRtt
Time m_maxRtt
Maximum RTT in each congestion period.
Definition:
tcp-htcp.h:100
ns3::TcpHtcp::m_lastThroughput
uint32_t m_lastThroughput
Throughput in last congestion period.
Definition:
tcp-htcp.h:102
ns3::TcpHtcp::m_defaultBackoff
double m_defaultBackoff
default value when throughput ratio less than default
Definition:
tcp-htcp.h:93
ns3::TcpHtcp
An implementation of the H-TCP variant of TCP.
Definition:
tcp-htcp.h:50
ns3::TcpHtcp::UpdateBeta
void UpdateBeta(void)
Updates the multiplicative decrease factor beta for H-TCP.
Definition:
tcp-htcp.cc:151
ns3::TcpHtcp::Fork
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition:
tcp-htcp.cc:105
src
internet
model
tcp-htcp.h
Generated on Fri Oct 1 2021 17:03:09 for ns-3 by
1.8.20