A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-westwood.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013 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
* Authors: Siddharth Gangadhar <siddharth@ittc.ku.edu>, Truc Anh N. Nguyen <annguyen@ittc.ku.edu>,
19
* and Greeshma Umapathi
20
*
21
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
22
* ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets
23
* Information and Telecommunication Technology Center (ITTC)
24
* and Department of Electrical Engineering and Computer Science
25
* The University of Kansas Lawrence, KS USA.
26
*
27
* Work supported in part by NSF FIND (Future Internet Design) Program
28
* under grant CNS-0626918 (Postmodern Internet Architecture),
29
* NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
30
* US Department of Defense (DoD), and ITTC at The University of Kansas.
31
*/
32
33
#ifndef TCP_WESTWOOD_H
34
#define TCP_WESTWOOD_H
35
36
#include "
tcp-congestion-ops.h
"
37
#include "ns3/data-rate.h"
38
#include "ns3/tcp-recovery-ops.h"
39
#include "ns3/traced-value.h"
40
#include "ns3/event-id.h"
41
42
namespace
ns3
{
43
44
class
Time
;
45
66
class
TcpWestwood
:
public
TcpNewReno
67
{
68
public
:
73
static
TypeId
GetTypeId
(
void
);
74
75
TcpWestwood
(
void
);
80
TcpWestwood
(
const
TcpWestwood
& sock);
81
virtual
~TcpWestwood
(
void
);
82
86
enum
ProtocolType
87
{
88
WESTWOOD
,
89
WESTWOODPLUS
90
};
91
95
enum
FilterType
96
{
97
NONE
,
98
TUSTIN
99
};
100
101
virtual
uint32_t
GetSsThresh
(
Ptr<const TcpSocketState>
tcb,
102
uint32_t
bytesInFlight);
103
104
virtual
void
PktsAcked
(
Ptr<TcpSocketState>
tcb,
uint32_t
packetsAcked,
105
const
Time
& rtt);
106
107
virtual
Ptr<TcpCongestionOps>
Fork
();
108
109
private
:
115
void
UpdateAckedSegments
(
int
acked);
116
123
void
EstimateBW
(
const
Time
& rtt,
Ptr<TcpSocketState>
tcb);
124
125
protected
:
126
TracedValue<DataRate>
m_currentBW
;
127
DataRate
m_lastSampleBW
;
128
DataRate
m_lastBW
;
129
enum
ProtocolType
m_pType
;
130
enum
FilterType
m_fType
;
131
132
uint32_t
m_ackedSegments
;
133
bool
m_IsCount
;
134
EventId
m_bwEstimateEvent
;
135
Time
m_lastAck
;
136
};
137
138
}
// namespace ns3
139
140
#endif
/* TCP_WESTWOOD_H */
ns3::DataRate
Class for representing data rates.
Definition:
data-rate.h:89
ns3::EventId
An identifier for simulation events.
Definition:
event-id.h:54
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:215
ns3::TcpWestwood
An implementation of TCP Westwood and Westwood+.
Definition:
tcp-westwood.h:67
ns3::TcpWestwood::m_currentBW
TracedValue< DataRate > m_currentBW
Current value of the estimated BW.
Definition:
tcp-westwood.h:126
ns3::TcpWestwood::m_pType
enum ProtocolType m_pType
0 for Westwood, 1 for Westwood+
Definition:
tcp-westwood.h:129
ns3::TcpWestwood::m_fType
enum FilterType m_fType
0 for none, 1 for Tustin
Definition:
tcp-westwood.h:130
ns3::TcpWestwood::UpdateAckedSegments
void UpdateAckedSegments(int acked)
Update the total number of acknowledged packets during the current RTT.
ns3::TcpWestwood::m_IsCount
bool m_IsCount
Start keeping track of m_ackedSegments for Westwood+ if TRUE.
Definition:
tcp-westwood.h:133
ns3::TcpWestwood::m_lastSampleBW
DataRate m_lastSampleBW
Last bandwidth sample.
Definition:
tcp-westwood.h:127
ns3::TcpWestwood::EstimateBW
void EstimateBW(const Time &rtt, Ptr< TcpSocketState > tcb)
Estimate the network's bandwidth.
Definition:
tcp-westwood.cc:127
ns3::TcpWestwood::PktsAcked
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t packetsAcked, const Time &rtt)
Timing information on received ACK.
Definition:
tcp-westwood.cc:97
ns3::TcpWestwood::FilterType
FilterType
Filter type (None or Tustin)
Definition:
tcp-westwood.h:96
ns3::TcpWestwood::TUSTIN
@ TUSTIN
Definition:
tcp-westwood.h:98
ns3::TcpWestwood::NONE
@ NONE
Definition:
tcp-westwood.h:97
ns3::TcpWestwood::m_lastBW
DataRate m_lastBW
Last bandwidth sample after being filtered.
Definition:
tcp-westwood.h:128
ns3::TcpWestwood::~TcpWestwood
virtual ~TcpWestwood(void)
Definition:
tcp-westwood.cc:92
ns3::TcpWestwood::m_lastAck
Time m_lastAck
The last ACK time.
Definition:
tcp-westwood.h:135
ns3::TcpWestwood::m_ackedSegments
uint32_t m_ackedSegments
The number of segments ACKed between RTTs.
Definition:
tcp-westwood.h:132
ns3::TcpWestwood::GetSsThresh
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get the slow start threshold after a loss event.
Definition:
tcp-westwood.cc:169
ns3::TcpWestwood::ProtocolType
ProtocolType
Protocol variant (Westwood or Westwood+)
Definition:
tcp-westwood.h:87
ns3::TcpWestwood::WESTWOOD
@ WESTWOOD
Definition:
tcp-westwood.h:88
ns3::TcpWestwood::WESTWOODPLUS
@ WESTWOODPLUS
Definition:
tcp-westwood.h:89
ns3::TcpWestwood::Fork
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition:
tcp-westwood.cc:182
ns3::TcpWestwood::TcpWestwood
TcpWestwood(void)
Definition:
tcp-westwood.cc:67
ns3::TcpWestwood::m_bwEstimateEvent
EventId m_bwEstimateEvent
The BW estimation event for Westwood+.
Definition:
tcp-westwood.h:134
ns3::TcpWestwood::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-westwood.cc:47
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3::TracedValue
Trace classes with value semantics.
Definition:
traced-value.h:117
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition:
nstime.h:793
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-congestion-ops.h
src
internet
model
tcp-westwood.h
Generated on Sun May 1 2022 12:01:31 for ns-3 by
1.9.3