A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-highspeed.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014 Natale Patriciello, <natale.patriciello@gmail.com>
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 */
18
19#ifndef TCPHIGHSPEED_H
20#define TCPHIGHSPEED_H
21
22#include "tcp-congestion-ops.h"
23
24namespace ns3
25{
26
27class TcpSocketState;
28
29/**
30 * \ingroup congestionOps
31 *
32 * \brief An implementation of TCP HighSpeed
33 *
34 * TCP HighSpeed is designed for high-capacity channels or, in general, for
35 * TCP connections with large congestion windows.
36 * Conceptually, with respect to the standard TCP, HighSpeed makes the
37 * cWnd grow faster during the probing phases and accelerates the
38 * cWnd recovery from losses.
39 * This behavior is executed only when the window grows beyond a
40 * certain threshold, which allows TCP Highspeed to be friendly with standard
41 * TCP in environments with heavy congestion, without introducing new dangers
42 * of congestion collapse.
43 * At the core of TCP HighSpeed there are two functions, a(w) and b(w), which respectively
44 * specify the cWnd growth addendum and the cWnd reduction factor when
45 * given an actual cWnd value w.
46 *
47 * More information: http://dl.acm.org/citation.cfm?id=2756518
48 */
50{
51 public:
52 /**
53 * \brief Get the type ID.
54 * \return the object TypeId
55 */
56 static TypeId GetTypeId();
57
58 /**
59 * Create an unbound tcp socket.
60 */
62
63 /**
64 * \brief Copy constructor
65 * \param sock the object to copy
66 */
67 TcpHighSpeed(const TcpHighSpeed& sock);
68 ~TcpHighSpeed() override;
69
70 std::string GetName() const override;
71
72 uint32_t GetSsThresh(Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight) override;
73
74 Ptr<TcpCongestionOps> Fork() override;
75
76 /**
77 * \brief Lookup table for the coefficient a (from RFC 3649)
78 *
79 * \param w Window value (in packets)
80 *
81 * \return the coefficient a
82 */
84
85 /**
86 * \brief Lookup table for the coefficient b (from RFC 3649)
87 *
88 * \param w Window value (in packets)
89 *
90 * \return the coefficient b
91 */
92 static double TableLookupB(uint32_t w);
93
94 protected:
95 void CongestionAvoidance(Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
96
97 private:
98 uint32_t m_ackCnt; //!< Number of received ACK, corrected with the coefficient a
99};
100
101} // namespace ns3
102
103#endif // TCPHIGHSPEED_H
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
An implementation of TCP HighSpeed.
Definition: tcp-highspeed.h:50
~TcpHighSpeed() override
static double TableLookupB(uint32_t w)
Lookup table for the coefficient b (from RFC 3649)
static uint32_t TableLookupA(uint32_t w)
Lookup table for the coefficient a (from RFC 3649)
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get slow start threshold following HighSpeed principles.
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Congestion avoidance of TcpHighSpeed.
std::string GetName() const override
Get the name of the congestion control algorithm.
static TypeId GetTypeId()
Get the type ID.
TcpHighSpeed()
Create an unbound tcp socket.
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
uint32_t m_ackCnt
Number of received ACK, corrected with the coefficient a.
Definition: tcp-highspeed.h:98
The NewReno implementation.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.