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) 2016 Natale Patriciello <natale.patriciello@gmail.com> | 3 * Copyright (c) 2016 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 * \param test The callback. | 98 * \param test The callback. |
99 */ | 99 */ |
100 void SetCallback (Callback<void, uint32_t> test) | 100 void SetCallback (Callback<void, uint32_t> test) |
101 { | 101 { |
102 m_test = test; | 102 m_test = test; |
103 } | 103 } |
104 | 104 |
105 void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked, | 105 void PktsAcked (Ptr<TcpSocketState> tcb, uint32_t segmentsAcked, |
106 const Time& rtt) | 106 const Time& rtt) |
107 { | 107 { |
108 NS_UNUSED(rtt); | 108 NS_UNUSED (rtt); |
109 m_test (segmentsAcked); | 109 m_test (segmentsAcked); |
110 } | 110 } |
111 | 111 |
112 private: | 112 private: |
113 Callback<void, uint32_t> m_test; //!< Callback to be used when an ACK is recei
ved. | 113 Callback<void, uint32_t> m_test; //!< Callback to be used when an ACK is recei
ved. |
114 }; | 114 }; |
115 | 115 |
116 TypeId | 116 TypeId |
117 DummyCongControl::GetTypeId (void) | 117 DummyCongControl::GetTypeId (void) |
118 { | 118 { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 TcpPktsAckedTestSuite () : TestSuite ("tcp-pkts-acked-test", UNIT) | 186 TcpPktsAckedTestSuite () : TestSuite ("tcp-pkts-acked-test", UNIT) |
187 { | 187 { |
188 AddTestCase (new TcpPktsAckedOpenTest ("PktsAcked check while in OPEN state"
), | 188 AddTestCase (new TcpPktsAckedOpenTest ("PktsAcked check while in OPEN state"
), |
189 TestCase::QUICK); | 189 TestCase::QUICK); |
190 // Add DISORDER, RECOVERY and LOSS state check | 190 // Add DISORDER, RECOVERY and LOSS state check |
191 } | 191 } |
192 }; | 192 }; |
193 | 193 |
194 static TcpPktsAckedTestSuite g_TcpPktsAckedTestSuite; //!< Static variable for t
est initialization | 194 static TcpPktsAckedTestSuite g_TcpPktsAckedTestSuite; //!< Static variable for t
est initialization |
195 | 195 |
LEFT | RIGHT |