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) 2015 Natale Patriciello <natale.patriciello@gmail.com> | 3 * Copyright (c) 2015 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 : TcpGeneralTest (desc), | 92 : TcpGeneralTest (desc), |
93 m_ackedBytes (0), | 93 m_ackedBytes (0), |
94 m_sentBytes (0), | 94 m_sentBytes (0), |
95 m_totalAckedBytes (0), | 95 m_totalAckedBytes (0), |
96 m_allowedIncrease (0), | 96 m_allowedIncrease (0), |
97 m_initial (true), | 97 m_initial (true), |
98 m_segmentSize (segmentSize), | 98 m_segmentSize (segmentSize), |
99 m_packetSize (packetSize), | 99 m_packetSize (packetSize), |
100 m_packets (packets) | 100 m_packets (packets) |
101 { | 101 { |
102 NS_UNUSED(initSsTh); | 102 NS_UNUSED (initSsTh); |
103 m_congControlTypeId = typeId; | 103 m_congControlTypeId = typeId; |
104 } | 104 } |
105 | 105 |
106 void | 106 void |
107 TcpSlowStartNormalTest::ConfigureEnvironment () | 107 TcpSlowStartNormalTest::ConfigureEnvironment () |
108 { | 108 { |
109 TcpGeneralTest::ConfigureEnvironment (); | 109 TcpGeneralTest::ConfigureEnvironment (); |
110 SetAppPktCount (m_packets); | 110 SetAppPktCount (m_packets); |
111 SetAppPktSize (m_packetSize); | 111 SetAppPktSize (m_packetSize); |
112 } | 112 } |
113 | 113 |
114 void | 114 void |
115 TcpSlowStartNormalTest::ConfigureProperties () | 115 TcpSlowStartNormalTest::ConfigureProperties () |
116 { | 116 { |
117 TcpGeneralTest::ConfigureProperties (); | 117 TcpGeneralTest::ConfigureProperties (); |
118 SetInitialSsThresh (SENDER, 400000); | 118 SetInitialSsThresh (SENDER, 400000); |
119 SetSegmentSize (SENDER, m_segmentSize); | 119 SetSegmentSize (SENDER, m_segmentSize); |
120 SetSegmentSize (RECEIVER, m_segmentSize); | 120 SetSegmentSize (RECEIVER, m_segmentSize); |
121 } | 121 } |
122 | 122 |
123 void | 123 void |
124 TcpSlowStartNormalTest::QueueDrop (SocketWho who) | 124 TcpSlowStartNormalTest::QueueDrop (SocketWho who) |
125 { | 125 { |
126 NS_FATAL_ERROR ("Drop on the queue; cannot validate slow start"); | 126 NS_FATAL_ERROR ("Drop on the queue; cannot validate slow start"); |
127 NS_UNUSED(who); | 127 NS_UNUSED (who); |
128 } | 128 } |
129 | 129 |
130 void | 130 void |
131 TcpSlowStartNormalTest::PhyDrop (SocketWho who) | 131 TcpSlowStartNormalTest::PhyDrop (SocketWho who) |
132 { | 132 { |
133 NS_FATAL_ERROR ("Drop on the phy: cannot validate slow start"); | 133 NS_FATAL_ERROR ("Drop on the phy: cannot validate slow start"); |
134 NS_UNUSED(who); | 134 NS_UNUSED (who); |
135 } | 135 } |
136 | 136 |
137 /** | 137 /** |
138 * \brief Trace the cWnd over the slow start | 138 * \brief Trace the cWnd over the slow start |
139 * | 139 * |
140 * This method is called each time the cWnd changes. It should be updated only | 140 * This method is called each time the cWnd changes. It should be updated only |
141 * by MSS bytes at time. Since the size doubles each RTT, a timing test is also | 141 * by MSS bytes at time. Since the size doubles each RTT, a timing test is also |
142 * performed: the doubling should be made in 0.5s from the first (0.5s is | 142 * performed: the doubling should be made in 0.5s from the first (0.5s is |
143 * the delay of the SimpleChannel which connect the two socket). | 143 * the delay of the SimpleChannel which connect the two socket). |
144 * | 144 * |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 TestCase::QUICK); | 295 TestCase::QUICK); |
296 AddTestCase (new TcpSlowStartAttackerTest (1000, 1000, 10000, 9, (*it), | 296 AddTestCase (new TcpSlowStartAttackerTest (1000, 1000, 10000, 9, (*it), |
297 "slow start ack attacker, 100
0 byte, " + (*it).GetName ()), | 297 "slow start ack attacker, 100
0 byte, " + (*it).GetName ()), |
298 TestCase::QUICK); | 298 TestCase::QUICK); |
299 } | 299 } |
300 } | 300 } |
301 }; | 301 }; |
302 | 302 |
303 static TcpSlowStartTestSuite g_tcpSlowStartTestSuite; //!< Static variable for t
est initialization | 303 static TcpSlowStartTestSuite g_tcpSlowStartTestSuite; //!< Static variable for t
est initialization |
304 | 304 |
LEFT | RIGHT |