A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
tcp-vegas.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 TCPVEGAS_H
28
#define TCPVEGAS_H
29
30
#include "
tcp-congestion-ops.h
"
31
32
namespace
ns3
{
33
34
class
TcpSocketState;
35
65
class
TcpVegas
:
public
TcpNewReno
66
{
67
public
:
72
static
TypeId
GetTypeId
(
void
);
73
77
TcpVegas
(
void
);
78
83
TcpVegas
(
const
TcpVegas
& sock);
84
virtual
~TcpVegas
(
void
);
85
86
virtual
std::string
GetName
()
const
;
87
103
virtual
void
PktsAcked
(
Ptr<TcpSocketState>
tcb, uint32_t segmentsAcked,
104
const
Time
& rtt);
105
114
virtual
void
CongestionStateSet
(
Ptr<TcpSocketState>
tcb,
115
const
TcpSocketState::TcpCongState_t
newState);
116
123
virtual
void
IncreaseWindow
(
Ptr<TcpSocketState>
tcb, uint32_t segmentsAcked);
124
133
virtual
uint32_t
GetSsThresh
(
Ptr<const TcpSocketState>
tcb,
134
uint32_t bytesInFlight);
135
136
virtual
Ptr<TcpCongestionOps>
Fork
();
137
138
protected
:
139
private
:
151
void
EnableVegas
(
Ptr<TcpSocketState>
tcb);
152
156
void
DisableVegas
();
157
158
private
:
159
uint32_t
m_alpha
;
160
uint32_t
m_beta
;
161
uint32_t
m_gamma
;
162
Time
m_baseRtt
;
163
Time
m_minRtt
;
164
uint32_t
m_cntRtt
;
165
bool
m_doingVegasNow
;
166
SequenceNumber32
m_begSndNxt
;
167
};
168
169
}
// namespace ns3
170
171
#endif // TCPVEGAS_H
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TcpVegas::Fork
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition:
tcp-vegas.cc:94
ns3::TcpVegas::PktsAcked
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Compute RTTs needed to execute Vegas algorithm.
Definition:
tcp-vegas.cc:100
tcp-congestion-ops.h
ns3::TcpVegas::m_beta
uint32_t m_beta
Beta threshold, upper bound of packets in network.
Definition:
tcp-vegas.h:160
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TcpVegas::m_gamma
uint32_t m_gamma
Gamma threshold, limit on increase.
Definition:
tcp-vegas.h:161
ns3::TcpSocketState::TcpCongState_t
TcpCongState_t
Definition of the Congestion state machine.
Definition:
tcp-socket-state.h:77
ns3::TcpVegas::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-vegas.cc:38
ns3::TcpVegas::~TcpVegas
virtual ~TcpVegas(void)
Definition:
tcp-vegas.cc:88
ns3::Ptr< TcpSocketState >
ns3::TcpVegas::EnableVegas
void EnableVegas(Ptr< TcpSocketState > tcb)
Enable Vegas algorithm to start taking Vegas samples.
Definition:
tcp-vegas.cc:122
ns3::TcpVegas::GetSsThresh
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get slow start threshold following Vegas principle.
Definition:
tcp-vegas.cc:289
ns3::TcpVegas::GetName
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition:
tcp-vegas.cc:283
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:104
ns3::TcpVegas::TcpVegas
TcpVegas(void)
Create an unbound tcp socket.
Definition:
tcp-vegas.cc:60
ns3::TcpVegas
An implementation of TCP Vegas.
Definition:
tcp-vegas.h:66
ns3::TcpVegas::IncreaseWindow
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Adjust cwnd following Vegas linear increase/decrease algorithm.
Definition:
tcp-vegas.cc:156
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:216
ns3::TcpVegas::m_minRtt
Time m_minRtt
Minimum of all RTT measurements within last RTT.
Definition:
tcp-vegas.h:163
ns3::TcpVegas::m_begSndNxt
SequenceNumber32 m_begSndNxt
Right edge during last RTT.
Definition:
tcp-vegas.h:166
ns3::TcpVegas::CongestionStateSet
virtual void CongestionStateSet(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState)
Enable/disable Vegas algorithm depending on the congestion state.
Definition:
tcp-vegas.cc:141
ns3::TcpVegas::m_baseRtt
Time m_baseRtt
Minimum of all Vegas RTT measurements seen during connection.
Definition:
tcp-vegas.h:162
ns3::TcpVegas::DisableVegas
void DisableVegas()
Stop taking Vegas samples.
Definition:
tcp-vegas.cc:133
ns3::TcpVegas::m_doingVegasNow
bool m_doingVegasNow
If true, do Vegas for this RTT.
Definition:
tcp-vegas.h:165
ns3::SequenceNumber< uint32_t, int32_t >
ns3::TcpVegas::m_alpha
uint32_t m_alpha
Alpha threshold, lower bound of packets in network.
Definition:
tcp-vegas.h:159
ns3::TcpVegas::m_cntRtt
uint32_t m_cntRtt
Number of RTT measurements during last RTT.
Definition:
tcp-vegas.h:164
src
internet
model
tcp-vegas.h
Generated on Fri Oct 1 2021 17:03:11 for ns-3 by
1.8.20