A Discrete-Event Network Simulator
API
tcp-htcp.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2015 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 * by: Amir Modarresi <amodarresi@ittc.ku.edu>
19 *
20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
21 * ResiliNets Research Group http://wiki.ittc.ku.edu/resilinets
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
27#ifndef TCP_HTCP_H
28#define TCP_HTCP_H
29
30#include "tcp-congestion-ops.h"
31
32namespace ns3 {
33
34class TcpSocketState;
35
49class TcpHtcp : public TcpNewReno
50{
51public:
56 static TypeId GetTypeId (void);
60 TcpHtcp (void);
65 TcpHtcp (const TcpHtcp& sock);
66 virtual ~TcpHtcp (void);
67 virtual std::string GetName () const;
68 virtual Ptr<TcpCongestionOps> Fork ();
70 uint32_t bytesInFlight);
71
72 virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
73 const Time &rtt);
74
75protected:
77 uint32_t segmentsAcked);
78
79private:
83 void UpdateAlpha (void);
84
88 void UpdateBeta (void);
89
90 // h-tcp variables
91 double m_alpha;
92 double m_beta;
96 //last congestion event experienced by a flow
104
105};
106
107} // namespace ns3
108
109#endif /* TCP_HTCP_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
An implementation of the H-TCP variant of TCP.
Definition: tcp-htcp.h:50
Time m_minRtt
Minimum RTT in each congestion period.
Definition: tcp-htcp.h:99
Time m_lastCon
Time of the last congestion for the flow.
Definition: tcp-htcp.h:98
double m_defaultBackoff
default value when throughput ratio less than default
Definition: tcp-htcp.h:93
uint32_t m_dataSent
Current amount of data sent since last congestion.
Definition: tcp-htcp.h:103
void UpdateAlpha(void)
Updates the additive increase parameter for H-TCP.
Definition: tcp-htcp.cc:126
double m_throughputRatio
ratio of two consequence throughput
Definition: tcp-htcp.h:94
Time m_delta
Time in second that has elapsed since the.
Definition: tcp-htcp.h:95
uint32_t m_lastThroughput
Throughput in last congestion period.
Definition: tcp-htcp.h:102
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-htcp.cc:37
double m_alpha
AIMD additive increase parameter.
Definition: tcp-htcp.h:91
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
Definition: tcp-htcp.cc:111
double m_beta
AIMD multiplicative decrease factor.
Definition: tcp-htcp.h:92
Time m_deltaL
Threshold for switching between standard and new increase function.
Definition: tcp-htcp.h:97
void UpdateBeta(void)
Updates the multiplicative decrease factor beta for H-TCP.
Definition: tcp-htcp.cc:151
Time m_maxRtt
Maximum RTT in each congestion period.
Definition: tcp-htcp.h:100
TcpHtcp(void)
Create an unbound tcp socket.
Definition: tcp-htcp.cc:67
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition: tcp-htcp.cc:105
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Definition: tcp-htcp.cc:191
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition: tcp-htcp.cc:62
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get the slow start threshold after a loss event.
Definition: tcp-htcp.cc:169
virtual ~TcpHtcp(void)
Definition: tcp-htcp.cc:100
uint32_t m_throughput
Current throughput since last congestion.
Definition: tcp-htcp.h:101
The NewReno implementation.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.