LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2014 Natale Patriciello <natale.patriciello@gmail.com> | 3 * Copyright (c) 2014 Natale Patriciello <natale.patriciello@gmail.com> |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 */ | 18 */ |
19 #ifndef TCPHYBLA_H | 19 #ifndef TCPHYBLA_H |
20 #define TCPHYBLA_H | 20 #define TCPHYBLA_H |
21 | 21 |
22 #include "ns3/tcp-newreno.h" | 22 #include "ns3/tcp-newreno.h" |
23 | 23 |
24 namespace ns3 { | 24 namespace ns3 { |
25 | 25 |
26 /** | 26 /** |
27 * \brief Implementation of the Tcp Hybla algorithm | 27 * \brief Implementation of the TCP Hybla algorithm |
28 * | 28 * |
29 * TCP Hybla aims to eliminate penalization of TCP connections that | 29 * The key idea behind TCP Hybla is to obtain for long RTT connections the same |
30 * incorporate a high-latency terrestrial or satellite radio link, due | 30 * instantaneous transmission rate of a reference TCP connection with lower RTT. |
31 * to their longer round trip times. It stems from an analytical evaluation | 31 * With analytical steps, it is shown that this goal can be achieved by |
32 * of the congestion window dynamics, which suggests the necessary | 32 * modifying the time scale, in order for the throughput to be independent from |
33 * modifications to remove the performance dependence on RTT. | 33 * the RTT. This independence is |
| 34 * obtained through the use of a coefficient rho. |
| 35 * |
| 36 * This coefficient is used to calculate both the slow start threshold |
| 37 * and the congestion window when in slow start and |
| 38 * in congestion avoidance, respectively. |
| 39 * |
| 40 * More information: http://dl.acm.org/citation.cfm?id=2756518 |
34 */ | 41 */ |
35 class TcpHybla : public TcpNewReno | 42 class TcpHybla : public TcpNewReno |
36 { | 43 { |
37 public: | 44 public: |
38 /** | 45 /** |
39 * \brief Get the type ID. | 46 * \brief Get the type ID. |
40 * \return the object TypeId | 47 * \return the object TypeId |
41 */ | 48 */ |
42 static TypeId GetTypeId (void); | 49 static TypeId GetTypeId (void); |
43 | 50 |
44 TcpHybla (); | 51 TcpHybla (); |
45 | 52 |
46 protected: | 53 protected: |
47 virtual Ptr<TcpSocketBase> Fork (void); | 54 virtual Ptr<TcpSocketBase> Fork (void); |
48 virtual void NewAck (SequenceNumber32 const& seq); | 55 virtual void NewAck (SequenceNumber32 const& seq); |
49 | 56 void DupAck (const TcpHeader& t, uint32_t count); |
50 virtual void InitializeCwnd (void); | 57 virtual void InitializeCwnd (void); |
51 | 58 |
52 protected: | 59 private: |
53 double m_rho; //!< Rho parameter | 60 double m_rho; //!< Rho parameter |
54 Time m_minRtt; //!< Minimum smoothed round trip time value seen | 61 Time m_minRtt; //!< Minimum smoothed round trip time value seen |
55 Time m_rRtt; //!< Reference RTT | 62 Time m_rRtt; //!< Reference RTT |
| 63 double m_cWndCnt; //!< cWnd integer-to-float counter |
56 | 64 |
57 private: | 65 private: |
58 /** | |
59 * \brief Initialize the algorithm | |
60 */ | |
61 void Init (void); | |
62 | |
63 /** | 66 /** |
64 * \brief Recalculate algorithm paramenters | 67 * \brief Recalculate algorithm paramenters |
65 */ | 68 */ |
66 void RecalcParam (void); | 69 void RecalcParam (void); |
67 }; | 70 }; |
68 | 71 |
69 } // namespace ns3 | 72 } // namespace ns3 |
70 | 73 |
71 #endif // TCPHYBLA_H | 74 #endif // TCPHYBLA_H |
LEFT | RIGHT |