Left: | ||
Right: |
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) 2013 Natale Patriciello <natale.patriciello@gmail.com> | 3 * Copyright (c) 2013 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 |
(...skipping 10 matching lines...) Expand all Loading... | |
21 #define TCPNOORDWIJK_H | 21 #define TCPNOORDWIJK_H |
22 | 22 |
23 #include "ns3/tcp-socket-base.h" | 23 #include "ns3/tcp-socket-base.h" |
24 #include "ns3/timer.h" | 24 #include "ns3/timer.h" |
25 | 25 |
26 #include <deque> | 26 #include <deque> |
27 #include <map> | 27 #include <map> |
28 | 28 |
29 namespace ns3 { | 29 namespace ns3 { |
30 | 30 |
31 typedef std::pair<SequenceNumber32, SequenceNumber32> Range32; | 31 typedef std::pair<SequenceNumber32, SequenceNumber32> Range32; |
Tom Henderson
2015/01/05 15:36:18
in general, I prefer to avoid typedefs like this (
| |
32 typedef std::pair<Range32, Time> PairOfRangeAndTime; | 32 typedef std::pair<Range32, Time> PairOfRangeAndTime; |
33 typedef std::map<Range32, Time> MapOfTransmitTime; | 33 typedef std::map<Range32, Time> MapOfTransmitTime; |
34 | 34 |
35 /** \brief TcpNoordwijk implementation | 35 /** \brief TcpNoordwijk implementation |
36 * | 36 * |
37 * TCP Naordwijk is a new transport protocol designed to optimize | 37 * TCP Naordwijk is a new transport protocol designed to optimize |
38 * performance in a controlled environment whose characteristics | 38 * performance in a controlled environment whose characteristics |
39 * are fairly known and managed, such as DVB-RCS link between I-PEPs. | 39 * are fairly known and managed, such as DVB-RCS link between I-PEPs. |
40 * Main requirements in the protocol design were the optimization of | 40 * Main requirements in the protocol design were the optimization of |
41 * the web traffic performance, while keeping good performance for | 41 * the web traffic performance, while keeping good performance for |
(...skipping 10 matching lines...) Expand all Loading... | |
52 class TcpNoordwijk : public TcpSocketBase | 52 class TcpNoordwijk : public TcpSocketBase |
53 { | 53 { |
54 public: | 54 public: |
55 static TypeId GetTypeId (void); | 55 static TypeId GetTypeId (void); |
56 | 56 |
57 TcpNoordwijk (); | 57 TcpNoordwijk (); |
58 | 58 |
59 protected: | 59 protected: |
60 virtual int Connect (const Address &address); | 60 virtual int Connect (const Address &address); |
61 virtual void NewAck (SequenceNumber32 const& rAck); // Update buffers w.r.t. A CK | 61 virtual void NewAck (SequenceNumber32 const& rAck); // Update buffers w.r.t. A CK |
62 virtual Ptr<TcpSocketBase> Fork (void); // Call CopyObject<TcpReno> to clone m e | 62 virtual Ptr<TcpSocketBase> Fork (void); // Call CopyObject<TcpReno> to clone m e |
Tom Henderson
2015/01/05 15:36:18
s/TcpReno/TcpNoordwijk
| |
63 virtual void DupAck (const TcpHeader& t, uint32_t count); | 63 virtual void DupAck (const TcpHeader& t, uint32_t count); |
64 virtual void Retransmit (void); // Retransmit timeout | 64 virtual void Retransmit (void); // Retransmit timeout |
65 virtual bool SendPendingData (bool withAck = false); // Send as much as the wi ndow allows | 65 virtual bool SendPendingData (bool withAck = false); // Send as much as the wi ndow allows |
66 virtual uint32_t Window (void); // Return the max possible number of unacked b ytes | 66 virtual uint32_t Window (void); // Return the max possible number of unacked b ytes |
67 virtual uint32_t AvailableWindow (void); | 67 virtual uint32_t AvailableWindow (void); |
68 | 68 |
69 // Implementing ns3::TcpSocket -- Attribute get/set | 69 // Implementing ns3::TcpSocket -- Attribute get/set |
70 virtual void SetInitialSSThresh (uint32_t threshold); | 70 virtual void SetInitialSSThresh (uint32_t threshold); |
71 virtual uint32_t GetInitialSSThresh (void) const; | 71 virtual uint32_t GetInitialSSThresh (void) const; |
72 virtual void SetInitialCwnd (uint32_t cwnd); | 72 virtual void SetInitialCwnd (uint32_t cwnd); |
73 virtual uint32_t GetInitialCwnd (void) const; | 73 virtual uint32_t GetInitialCwnd (void) const; |
74 virtual void ScaleSsThresh(u_int8_t scaleFactor); | |
74 | 75 |
75 /** Initial burst window */ | 76 /** Initial burst window */ |
76 uint32_t m_initialBWnd; | 77 uint32_t m_initialBWnd; |
77 | 78 |
78 /** Actual burst window */ | 79 /** Actual burst window */ |
79 uint32_t m_bWnd; | 80 uint32_t m_bWnd; |
80 std::deque<uint32_t> m_historyBWnd; | 81 std::deque<uint32_t> m_historyBWnd; |
81 | 82 |
82 /** Actual congestion window */ | 83 /** Actual congestion window */ |
83 uint32_t m_cWnd; | 84 uint32_t m_cWnd; |
Tom Henderson
2015/01/05 15:36:18
why not make the window values traced values?
| |
84 | 85 |
85 /** Initial tx time */ | 86 /** Initial tx time */ |
86 Time m_initialTxTime; | 87 Time m_initialTxTime; |
87 | 88 |
88 Timer m_txTimer; | 89 Timer m_txTimer; |
89 | 90 |
90 /** Actual tx timer */ | 91 /** Actual tx timer */ |
91 TracedValue<Time> m_txTime; | 92 TracedValue<Time> m_txTime; |
92 | 93 |
93 virtual void RateTracking (uint32_t bWnd, Time ackDispersion); | 94 virtual void RateTracking (uint32_t bWnd, Time ackDispersion); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 MapOfTransmitTime m_historyTransmitTime; | 128 MapOfTransmitTime m_historyTransmitTime; |
128 | 129 |
129 Time m_firstDupAck; | 130 Time m_firstDupAck; |
130 Time m_dupAckDispersion; | 131 Time m_dupAckDispersion; |
131 Time m_dupAckTrainDispersion; | 132 Time m_dupAckTrainDispersion; |
132 }; | 133 }; |
133 | 134 |
134 } // namespace ns3 | 135 } // namespace ns3 |
135 | 136 |
136 #endif // TCPNOORDWIJK_H | 137 #endif // TCPNOORDWIJK_H |
LEFT | RIGHT |