A Discrete-Event Network Simulator
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
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  */
27 #ifndef TCP_HTCP_H
28 #define TCP_HTCP_H
30 #include "tcp-congestion-ops.h"
32 namespace ns3 {
34 class TcpSocketState;
49 class TcpHtcp : public TcpNewReno
50 {
51 public:
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 ();
69  virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
70  uint32_t bytesInFlight);
72  virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
73  const Time &rtt);
75 protected:
76  virtual void CongestionAvoidance (Ptr<TcpSocketState> tcb,
77  uint32_t segmentsAcked);
79 private:
83  void UpdateAlpha (void);
88  void UpdateBeta (void);
90  // h-tcp variables
91  double m_alpha;
92  double m_beta;
96  //last congestion event experienced by a flow
101  uint32_t m_throughput;
102  uint32_t m_lastThroughput;
103  uint32_t m_dataSent;
105 };
107 } // namespace ns3
109 #endif /* TCP_HTCP_H */
Time m_delta
Time in second that has elapsed since the.
Definition: tcp-htcp.h:95
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
Definition: tcp-htcp.cc:111
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
double m_alpha
AIMD additive increase parameter.
Definition: tcp-htcp.h:91
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
void UpdateAlpha(void)
Updates the additive increase parameter for H-TCP.
Definition: tcp-htcp.cc:126
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Definition: tcp-htcp.cc:191
Time m_maxRtt
Maximum RTT in each congestion period.
Definition: tcp-htcp.h:100
The NewReno implementation.
An implementation of the H-TCP variant of TCP.
Definition: tcp-htcp.h:49
void UpdateBeta(void)
Updates the multiplicative decrease factor beta for H-TCP.
Definition: tcp-htcp.cc:151
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-htcp.cc:37
virtual ~TcpHtcp(void)
Definition: tcp-htcp.cc:100
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time m_minRtt
Minimum RTT in each congestion period.
Definition: tcp-htcp.h:99
uint32_t m_lastThroughput
Throughput in last congestion period.
Definition: tcp-htcp.h:102
uint32_t m_throughput
Current throughput since last congestion.
Definition: tcp-htcp.h:101
Time m_deltaL
Threshold for switching between standard and new increase function.
Definition: tcp-htcp.h:97
double m_defaultBackoff
default value when throughput ratio less than default
Definition: tcp-htcp.h:93
double m_throughputRatio
ratio of two consequence throughput
Definition: tcp-htcp.h:94
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 std::string GetName() const
Get the name of the congestion control algorithm.
Definition: tcp-htcp.cc:62
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition: tcp-htcp.cc:105
Create an unbound tcp socket.
Definition: tcp-htcp.cc:67
Time m_lastCon
Time of the last congestion for the flow.
Definition: tcp-htcp.h:98
a unique identifier for an interface.
Definition: type-id.h:58
uint32_t m_dataSent
Current amount of data sent since last congestion.
Definition: tcp-htcp.h:103
double m_beta
AIMD multiplicative decrease factor.
Definition: tcp-htcp.h:92