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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 */
7
8#ifndef TCPHIGHSPEED_H
9#define TCPHIGHSPEED_H
10
11#include "tcp-congestion-ops.h"
12
13namespace ns3
14{
15
16class TcpSocketState;
17
18/**
19 * @ingroup congestionOps
20 *
21 * @brief An implementation of TCP HighSpeed
22 *
23 * TCP HighSpeed is designed for high-capacity channels or, in general, for
24 * TCP connections with large congestion windows.
25 * Conceptually, with respect to the standard TCP, HighSpeed makes the
26 * cWnd grow faster during the probing phases and accelerates the
27 * cWnd recovery from losses.
28 * This behavior is executed only when the window grows beyond a
29 * certain threshold, which allows TCP Highspeed to be friendly with standard
30 * TCP in environments with heavy congestion, without introducing new dangers
31 * of congestion collapse.
32 * At the core of TCP HighSpeed there are two functions, a(w) and b(w), which respectively
33 * specify the cWnd growth addendum and the cWnd reduction factor when
34 * given an actual cWnd value w.
35 *
36 * More information: http://dl.acm.org/citation.cfm?id=2756518
37 */
39{
40 public:
41 /**
42 * @brief Get the type ID.
43 * @return the object TypeId
44 */
45 static TypeId GetTypeId();
46
47 /**
48 * Create an unbound tcp socket.
49 */
51
52 /**
53 * @brief Copy constructor
54 * @param sock the object to copy
55 */
56 TcpHighSpeed(const TcpHighSpeed& sock);
57 ~TcpHighSpeed() override;
58
59 std::string GetName() const override;
60
61 uint32_t GetSsThresh(Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight) override;
62
63 Ptr<TcpCongestionOps> Fork() override;
64
65 /**
66 * @brief Lookup table for the coefficient a (from RFC 3649)
67 *
68 * @param w Window value (in packets)
69 *
70 * @return the coefficient a
71 */
73
74 /**
75 * @brief Lookup table for the coefficient b (from RFC 3649)
76 *
77 * @param w Window value (in packets)
78 *
79 * @return the coefficient b
80 */
81 static double TableLookupB(uint32_t w);
82
83 protected:
84 void CongestionAvoidance(Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
85
86 private:
87 uint32_t m_ackCnt; //!< Number of received ACK, corrected with the coefficient a
88};
89
90} // namespace ns3
91
92#endif // TCPHIGHSPEED_H
Smart pointer class similar to boost::intrusive_ptr.
An implementation of TCP HighSpeed.
~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.
The NewReno implementation.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.