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) 2010 Adrian Sai-wah Tam | 3 * Copyright (c) 2010 Adrian Sai-wah Tam |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 * m_segmentSize are set by the attribute system in ns3::TcpSocket. | 77 * m_segmentSize are set by the attribute system in ns3::TcpSocket. |
78 */ | 78 */ |
79 m_cWnd = m_initialCWnd * m_segmentSize; | 79 m_cWnd = m_initialCWnd * m_segmentSize; |
80 } | 80 } |
81 | 81 |
82 /** Limit the size of in-flight data by cwnd and receiver's rxwin */ | 82 /** Limit the size of in-flight data by cwnd and receiver's rxwin */ |
83 uint32_t | 83 uint32_t |
84 TcpReno::Window (void) | 84 TcpReno::Window (void) |
85 { | 85 { |
86 NS_LOG_FUNCTION (this); | 86 NS_LOG_FUNCTION (this); |
87 return std::min (m_rxWindowSize, m_cWnd.Get ()); | 87 return std::min (m_rWnd.Get (), m_cWnd.Get ()); |
88 } | 88 } |
89 | 89 |
90 Ptr<TcpSocketBase> | 90 Ptr<TcpSocketBase> |
91 TcpReno::Fork (void) | 91 TcpReno::Fork (void) |
92 { | 92 { |
93 return CopyObject<TcpReno> (this); | 93 return CopyObject<TcpReno> (this); |
94 } | 94 } |
95 | 95 |
96 /** New ACK (up to seqnum seq) received. Increase cwnd and call TcpSocketBase::N
ewAck() */ | 96 /** New ACK (up to seqnum seq) received. Increase cwnd and call TcpSocketBase::N
ewAck() */ |
97 void | 97 void |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 m_cWnd = m_initialCWnd * m_segmentSize; | 203 m_cWnd = m_initialCWnd * m_segmentSize; |
204 } | 204 } |
205 | 205 |
206 uint32_t | 206 uint32_t |
207 TcpReno::GetInitialCwnd (void) const | 207 TcpReno::GetInitialCwnd (void) const |
208 { | 208 { |
209 return m_initialCWnd; | 209 return m_initialCWnd; |
210 } | 210 } |
211 | 211 |
212 } // namespace ns3 | 212 } // namespace ns3 |
LEFT | RIGHT |