A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-westwood-plus.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 ResiliNets, ITTC, University of Kansas
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Siddharth Gangadhar <siddharth@ittc.ku.edu>, Truc Anh N. Nguyen <annguyen@ittc.ku.edu>,
18
* and Greeshma Umapathi
19
*
20
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
21
* ResiliNets Research Group https://resilinets.org/
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
* Work supported in part by NSF FIND (Future Internet Design) Program
27
* under grant CNS-0626918 (Postmodern Internet Architecture),
28
* NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
29
* US Department of Defense (DoD), and ITTC at The University of Kansas.
30
*/
31
32
#ifndef TCP_WESTWOOD_H
33
#define TCP_WESTWOOD_H
34
35
#include "
tcp-congestion-ops.h
"
36
37
#include "ns3/data-rate.h"
38
#include "ns3/event-id.h"
39
#include "ns3/tcp-recovery-ops.h"
40
#include "ns3/traced-value.h"
41
42
namespace
ns3
43
{
44
45
class
Time
;
46
67
class
TcpWestwoodPlus
:
public
TcpNewReno
68
{
69
public
:
74
static
TypeId
GetTypeId
();
75
76
TcpWestwoodPlus
();
81
TcpWestwoodPlus
(
const
TcpWestwoodPlus
& sock);
82
~TcpWestwoodPlus
()
override
;
83
87
enum
FilterType
88
{
89
NONE
,
90
TUSTIN
91
};
92
93
uint32_t
GetSsThresh
(
Ptr<const TcpSocketState>
tcb, uint32_t bytesInFlight)
override
;
94
95
void
PktsAcked
(
Ptr<TcpSocketState>
tcb, uint32_t packetsAcked,
const
Time
& rtt)
override
;
96
97
Ptr<TcpCongestionOps>
Fork
()
override
;
98
99
private
:
105
void
UpdateAckedSegments
(
int
acked);
106
113
void
EstimateBW
(
const
Time
& rtt,
Ptr<TcpSocketState>
tcb);
114
115
protected
:
116
TracedValue<DataRate>
m_currentBW
;
117
DataRate
m_lastSampleBW
;
118
DataRate
m_lastBW
;
119
FilterType
m_fType
;
120
121
uint32_t
m_ackedSegments
;
122
bool
m_IsCount
;
123
EventId
m_bwEstimateEvent
;
124
Time
m_lastAck
;
125
};
126
127
}
// namespace ns3
128
129
#endif
/* TCP_WESTWOOD_H */
ns3::DataRate
Class for representing data rates.
Definition:
data-rate.h:90
ns3::EventId
An identifier for simulation events.
Definition:
event-id.h:55
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:212
ns3::TcpWestwoodPlus
An implementation of TCP Westwood+.
Definition:
tcp-westwood-plus.h:68
ns3::TcpWestwoodPlus::EstimateBW
void EstimateBW(const Time &rtt, Ptr< TcpSocketState > tcb)
Estimate the network's bandwidth.
Definition:
tcp-westwood-plus.cc:119
ns3::TcpWestwoodPlus::m_currentBW
TracedValue< DataRate > m_currentBW
Current value of the estimated BW.
Definition:
tcp-westwood-plus.h:116
ns3::TcpWestwoodPlus::m_lastBW
DataRate m_lastBW
Last bandwidth sample after being filtered.
Definition:
tcp-westwood-plus.h:118
ns3::TcpWestwoodPlus::m_bwEstimateEvent
EventId m_bwEstimateEvent
The BW estimation event for Westwood+.
Definition:
tcp-westwood-plus.h:123
ns3::TcpWestwoodPlus::UpdateAckedSegments
void UpdateAckedSegments(int acked)
Update the total number of acknowledged packets during the current RTT.
ns3::TcpWestwoodPlus::FilterType
FilterType
Filter type (None or Tustin)
Definition:
tcp-westwood-plus.h:88
ns3::TcpWestwoodPlus::TUSTIN
@ TUSTIN
Definition:
tcp-westwood-plus.h:90
ns3::TcpWestwoodPlus::NONE
@ NONE
Definition:
tcp-westwood-plus.h:89
ns3::TcpWestwoodPlus::m_lastSampleBW
DataRate m_lastSampleBW
Last bandwidth sample.
Definition:
tcp-westwood-plus.h:117
ns3::TcpWestwoodPlus::GetSsThresh
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get the slow start threshold after a loss event.
Definition:
tcp-westwood-plus.cc:148
ns3::TcpWestwoodPlus::PktsAcked
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t packetsAcked, const Time &rtt) override
Timing information on received ACK.
Definition:
tcp-westwood-plus.cc:98
ns3::TcpWestwoodPlus::m_IsCount
bool m_IsCount
Start keeping track of m_ackedSegments for Westwood+ if TRUE.
Definition:
tcp-westwood-plus.h:122
ns3::TcpWestwoodPlus::m_fType
FilterType m_fType
0 for none, 1 for Tustin
Definition:
tcp-westwood-plus.h:119
ns3::TcpWestwoodPlus::m_lastAck
Time m_lastAck
The last ACK time.
Definition:
tcp-westwood-plus.h:124
ns3::TcpWestwoodPlus::m_ackedSegments
uint32_t m_ackedSegments
The number of segments ACKed between RTTs.
Definition:
tcp-westwood-plus.h:121
ns3::TcpWestwoodPlus::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
tcp-westwood-plus.cc:49
ns3::TcpWestwoodPlus::TcpWestwoodPlus
TcpWestwoodPlus()
Definition:
tcp-westwood-plus.cc:69
ns3::TcpWestwoodPlus::Fork
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition:
tcp-westwood-plus.cc:159
ns3::TcpWestwoodPlus::~TcpWestwoodPlus
~TcpWestwoodPlus() override
Definition:
tcp-westwood-plus.cc:93
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::TracedValue
Trace classes with value semantics.
Definition:
traced-value.h:116
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition:
nstime.h:848
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-congestion-ops.h
src
internet
model
tcp-westwood-plus.h
Generated on Fri Mar 31 2023 13:30:43 for ns-3 by
1.9.1