A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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#include "tcp-recovery-ops.h"
37
38#include "ns3/data-rate.h"
39#include "ns3/event-id.h"
40#include "ns3/traced-value.h"
41
42namespace ns3
43{
44
45class Time;
46
68{
69 public:
74 static TypeId GetTypeId();
75
82 ~TcpWestwoodPlus() override;
83
88 {
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:
120
125};
126
127} // namespace ns3
128
129#endif /* TCP_WESTWOOD_H */
Class for representing data rates.
Definition: data-rate.h:89
An identifier for simulation events.
Definition: event-id.h:55
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
The NewReno implementation.
An implementation of TCP Westwood+.
void EstimateBW(const Time &rtt, Ptr< TcpSocketState > tcb)
Estimate the network's bandwidth.
TracedValue< DataRate > m_currentBW
Current value of the estimated BW.
DataRate m_lastBW
Last bandwidth sample after being filtered.
EventId m_bwEstimateEvent
The BW estimation event for Westwood+.
void UpdateAckedSegments(int acked)
Update the total number of acknowledged packets during the current RTT.
FilterType
Filter type (None or Tustin)
DataRate m_lastSampleBW
Last bandwidth sample.
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get the slow start threshold after a loss event.
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t packetsAcked, const Time &rtt) override
Timing information on received ACK.
bool m_IsCount
Start keeping track of m_ackedSegments for Westwood+ if TRUE.
FilterType m_fType
0 for none, 1 for Tustin
Time m_lastAck
The last ACK time.
uint32_t m_ackedSegments
The number of segments ACKed between RTTs.
static TypeId GetTypeId()
Get the type ID.
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Trace classes with value semantics.
Definition: traced-value.h:116
a unique identifier for an interface.
Definition: type-id.h:59
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:839
Every class exported by the ns3 library is enclosed in the ns3 namespace.