A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-bic.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 TCPBIC_H
20#define TCPBIC_H
21
22#include "tcp-congestion-ops.h"
23#include "tcp-recovery-ops.h"
24
27
28namespace ns3
29{
30
82{
83 public:
88 static TypeId GetTypeId();
89
93 TcpBic();
94
99 TcpBic(const TcpBic& sock);
100
101 std::string GetName() const override;
102 void IncreaseWindow(Ptr<TcpSocketState> tcb, uint32_t segmentsAcked) override;
103 uint32_t GetSsThresh(Ptr<const TcpSocketState> tcb, uint32_t bytesInFlight) override;
104
105 Ptr<TcpCongestionOps> Fork() override;
106
107 protected:
114
115 private:
120 friend class ::TcpBicIncrementTest;
125 friend class ::TcpBicDecrementTest;
126
127 // User parameters
129 double m_beta;
133
134 // Bic parameters
139 uint8_t m_b;
140};
141
142} // namespace ns3
143#endif // TCPBIC_H
Testing the congestion avoidance decrement on TcpBic.
Testing the congestion avoidance increment on TcpBic.
Definition: tcp-bic-test.cc:35
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
BIC congestion control algorithm.
Definition: tcp-bic.h:82
bool m_fastConvergence
Enable or disable fast convergence algorithm.
Definition: tcp-bic.h:128
uint32_t m_lastMaxCwnd
Last maximum cWnd.
Definition: tcp-bic.h:136
uint32_t m_lowWnd
Lower bound on congestion window.
Definition: tcp-bic.h:131
static TypeId GetTypeId()
Get the type ID.
Definition: tcp-bic.cc:30
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get the slow start threshold after a loss event.
Definition: tcp-bic.cc:243
uint8_t m_b
Binary search coefficient.
Definition: tcp-bic.h:139
uint32_t m_lastCwnd
Last cWnd.
Definition: tcp-bic.h:137
uint32_t m_maxIncr
Maximum window increment.
Definition: tcp-bic.h:130
double m_beta
Beta for cubic multiplicative increase.
Definition: tcp-bic.h:129
virtual uint32_t Update(Ptr< TcpSocketState > tcb)
Bic window update after a new ack received.
Definition: tcp-bic.cc:140
TcpBic()
Constructor.
Definition: tcp-bic.cc:74
uint32_t m_smoothPart
Number of RTT needed to reach Wmax from Wmax-B.
Definition: tcp-bic.h:132
void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Congestion avoidance algorithm implementation.
Definition: tcp-bic.cc:101
Time m_epochStart
Beginning of an epoch.
Definition: tcp-bic.h:138
uint32_t m_cWndCnt
cWnd integer-to-float counter
Definition: tcp-bic.h:135
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
Definition: tcp-bic.cc:280
std::string GetName() const override
Get the name of the congestion control algorithm.
Definition: tcp-bic.cc:237
Congestion control abstract class.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.