A Discrete-Event Network Simulator
API
tcp-highspeed.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Natale Patriciello, <natale.patriciello@gmail.com>
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  */
19 
20 #ifndef TCPHIGHSPEED_H
21 #define TCPHIGHSPEED_H
22 
23 #include "ns3/tcp-congestion-ops.h"
24 #include "ns3/tcp-recovery-ops.h"
25 
26 namespace ns3 {
27 
48 class TcpHighSpeed : public TcpNewReno
49 {
50 public:
55  static TypeId GetTypeId (void);
56 
60  TcpHighSpeed (void);
61 
66  TcpHighSpeed (const TcpHighSpeed& sock);
67  virtual ~TcpHighSpeed (void);
68 
69  virtual std::string GetName () const;
70 
71  virtual uint32_t GetSsThresh (Ptr<const TcpSocketState> tcb,
72  uint32_t bytesInFlight);
73 
74  virtual Ptr<TcpCongestionOps> Fork ();
75 
83  static uint32_t TableLookupA (uint32_t w);
84 
92  static double TableLookupB (uint32_t w);
93 
94 protected:
95  virtual void CongestionAvoidance (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked);
96 
97 private:
98  uint32_t m_ackCnt;
99 };
100 
101 } // namespace ns3
102 
103 #endif // TCPHIGHSPEED_H
An implementation of TCP HighSpeed.
Definition: tcp-highspeed.h:48
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get slow start threshold following HighSpeed principles.
The NewReno implementation.
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)
virtual std::string GetName() const
Get the name of the congestion control algorithm.
virtual ~TcpHighSpeed(void)
static TypeId GetTypeId(void)
Get the type ID.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TcpHighSpeed(void)
Create an unbound tcp socket.
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across socket.
a unique identifier for an interface.
Definition: type-id.h:58
uint32_t m_ackCnt
Number of received ACK, corrected with the coefficient a.
Definition: tcp-highspeed.h:98
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Congestion avoidance of TcpHighSpeed.