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 "ns3/tcp-congestion-ops.h"
31 #include "ns3/traced-value.h"
32 #include "ns3/sequence-number.h"
34 namespace ns3 {
50 class TcpHtcp : public TcpNewReno
51 {
52 public:
57  static TypeId GetTypeId (void);
61  TcpHtcp (void);
66  TcpHtcp (const TcpHtcp& sock);
67  virtual ~TcpHtcp (void);
68  virtual std::string GetName () const;
69  virtual Ptr<TcpCongestionOps> Fork ();
70  virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
71  uint32_t bytesInFlight);
73  virtual void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked,
74  const Time &rtt);
76 protected:
77  virtual void CongestionAvoidance (Ptr<TcpSocketState> tcb,
78  uint32_t segmentsAcked);
80 private:
84  void UpdateAlpha (void);
89  void UpdateBeta (void);
91  // h-tcp variables
92  double m_alpha;
93  double m_beta;
97  //last congestion event experienced by a flow
102  uint32_t m_throughput;
103  uint32_t m_lastThroughput;
104  uint32_t m_dataSent;
106 };
108 } // namespace ns3
110 #endif /* TCP_HTCP_H */
Time m_delta
Time in second that has elapsed since the.
Definition: tcp-htcp.h:96
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
Definition: tcp-htcp.cc:120
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
double m_alpha
AIMD additive increase parameter.
Definition: tcp-htcp.h:92
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:135
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Definition: tcp-htcp.cc:203
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition: tcp-htcp.cc:71
Time m_maxRtt
Maximum RTT in each congestion period.
Definition: tcp-htcp.h:101
The NewReno implementation.
An implementation of the H-TCP variant of TCP.
Definition: tcp-htcp.h:50
void UpdateBeta(void)
Updates the multiplicative decrease factor beta for H-TCP.
Definition: tcp-htcp.cc:160
static TypeId GetTypeId(void)
Get the type ID.
Definition: tcp-htcp.cc:46
virtual ~TcpHtcp(void)
Definition: tcp-htcp.cc:109
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:100
uint32_t m_lastThroughput
Throughput in last congestion period.
Definition: tcp-htcp.h:103
uint32_t m_throughput
Current throughput since last congestion.
Definition: tcp-htcp.h:102
Time m_deltaL
Threshold for switching between standard and new increase function.
Definition: tcp-htcp.h:98
double m_defaultBackoff
default value when throughput ratio less than default
Definition: tcp-htcp.h:94
double m_throughputRatio
ratio of two consequence throughput
Definition: tcp-htcp.h:95
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get the slow start threshold after a loss event.
Definition: tcp-htcp.cc:181
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across socket.
Definition: tcp-htcp.cc:114
Create an unbound tcp socket.
Definition: tcp-htcp.cc:76
Time m_lastCon
Time of the last congestion for the flow.
Definition: tcp-htcp.h:99
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:104
double m_beta
AIMD multiplicative decrease factor.
Definition: tcp-htcp.h:93