A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-veno.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2016 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
* Author: Truc Anh N. Nguyen <annguyen@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 TCPVENO_H
28
#define TCPVENO_H
29
30
#include "
tcp-congestion-ops.h
"
31
32
namespace
ns3
{
33
34
class
TcpSocketState;
35
71
class
TcpVeno
:
public
TcpNewReno
72
{
73
public
:
78
static
TypeId
GetTypeId
(
void
);
79
83
TcpVeno
(
void
);
84
89
TcpVeno
(
const
TcpVeno
& sock);
90
virtual
~TcpVeno
(
void
);
91
92
virtual
std::string
GetName
()
const
;
93
109
virtual
void
PktsAcked
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked,
110
const
Time
& rtt);
111
120
virtual
void
CongestionStateSet
(
Ptr<TcpSocketState>
tcb,
121
const
TcpSocketState::TcpCongState_t
newState);
122
129
virtual
void
IncreaseWindow
(
Ptr<TcpSocketState>
tcb,
uint32_t
segmentsAcked);
130
139
virtual
uint32_t
GetSsThresh
(
Ptr<const TcpSocketState>
tcb,
140
uint32_t
bytesInFlight);
141
142
virtual
Ptr<TcpCongestionOps>
Fork
();
143
144
protected
:
145
private
:
156
void
EnableVeno
();
157
161
void
DisableVeno
();
162
163
private
:
164
Time
m_baseRtt
;
165
Time
m_minRtt
;
166
uint32_t
m_cntRtt
;
167
bool
m_doingVenoNow
;
168
uint32_t
m_diff
;
169
bool
m_inc
;
170
uint32_t
m_ackCnt
;
171
uint32_t
m_beta
;
172
};
173
174
}
// namespace ns3
175
176
#endif
// TCPVENO_H
ns3::Ptr< TcpSocketState >
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:215
ns3::TcpSocketState::TcpCongState_t
TcpCongState_t
Definition of the Congestion state machine.
Definition:
tcp-socket-state.h:77
ns3::TcpVeno
An implementation of TCP Veno.
Definition:
tcp-veno.h:72
ns3::TcpVeno::GetSsThresh
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get slow start threshold during Veno multiplicative-decrease phase.
Definition:
tcp-veno.cc:242
ns3::TcpVeno::m_inc
bool m_inc
If true, cwnd needs to be incremented.
Definition:
tcp-veno.h:169
ns3::TcpVeno::Fork
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition:
tcp-veno.cc:86
ns3::TcpVeno::CongestionStateSet
virtual void CongestionStateSet(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState)
Enable/disable Veno depending on the congestion state.
Definition:
tcp-veno.cc:132
ns3::TcpVeno::m_cntRtt
uint32_t m_cntRtt
Number of RTT measurements during last RTT.
Definition:
tcp-veno.h:166
ns3::TcpVeno::IncreaseWindow
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Adjust cwnd following Veno additive increase algorithm.
Definition:
tcp-veno.cc:149
ns3::TcpVeno::TcpVeno
TcpVeno(void)
Create an unbound tcp socket.
Definition:
tcp-veno.cc:52
ns3::TcpVeno::EnableVeno
void EnableVeno()
Enable Veno algorithm to start Veno sampling.
Definition:
tcp-veno.cc:115
ns3::TcpVeno::PktsAcked
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Perform RTT sampling needed to execute Veno algorithm.
Definition:
tcp-veno.cc:92
ns3::TcpVeno::m_minRtt
Time m_minRtt
Minimum of RTTs measured within last RTT.
Definition:
tcp-veno.h:165
ns3::TcpVeno::m_doingVenoNow
bool m_doingVenoNow
If true, do Veno for this RTT.
Definition:
tcp-veno.h:167
ns3::TcpVeno::m_ackCnt
uint32_t m_ackCnt
Number of received ACK.
Definition:
tcp-veno.h:170
ns3::TcpVeno::m_beta
uint32_t m_beta
Threshold for congestion detection.
Definition:
tcp-veno.h:171
ns3::TcpVeno::DisableVeno
void DisableVeno()
Turn off Veno.
Definition:
tcp-veno.cc:124
ns3::TcpVeno::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-veno.cc:38
ns3::TcpVeno::m_diff
uint32_t m_diff
Difference between expected and actual throughput.
Definition:
tcp-veno.h:168
ns3::TcpVeno::m_baseRtt
Time m_baseRtt
Minimum of all RTT measurements seen during connection.
Definition:
tcp-veno.h:164
ns3::TcpVeno::~TcpVeno
virtual ~TcpVeno(void)
Definition:
tcp-veno.cc:80
ns3::TcpVeno::GetName
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition:
tcp-veno.cc:236
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-congestion-ops.h
src
internet
model
tcp-veno.h
Generated on Sun May 1 2022 12:01:31 for ns-3 by
1.9.3