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 Alexander Krotov <ilabdsf@yandex.ru> | 3 * Copyright (c) 2015 Alexander Krotov <ilabdsf@yandex.ru> |
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 { | 85 { |
86 if (socket->GetRxAvailable() == 536 * 2) | 86 if (socket->GetRxAvailable() == 536 * 2) |
87 { | 87 { |
88 socket->Close(); | 88 socket->Close(); |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 void | 92 void |
93 TcpEndPointBug2211Test::HandleAccept (Ptr<Socket> s, const Address &from) | 93 TcpEndPointBug2211Test::HandleAccept (Ptr<Socket> s, const Address &from) |
94 { | 94 { |
95 NS_UNUSED(from); | 95 NS_UNUSED (from); |
96 s->SetRecvCallback (MakeCallback (&TcpEndPointBug2211Test::Recv, this)); | 96 s->SetRecvCallback (MakeCallback (&TcpEndPointBug2211Test::Recv, this)); |
97 } | 97 } |
98 | 98 |
99 void | 99 void |
100 TcpEndPointBug2211Test::HandleConnect (Ptr<Socket> socket) | 100 TcpEndPointBug2211Test::HandleConnect (Ptr<Socket> socket) |
101 { | 101 { |
102 socket->Send (Create<Packet> (536)); | 102 socket->Send (Create<Packet> (536)); |
103 socket->Send (Create<Packet> (536)); | 103 socket->Send (Create<Packet> (536)); |
104 socket->Send (Create<Packet> (536)); | 104 socket->Send (Create<Packet> (536)); |
105 socket->Close (); | 105 socket->Close (); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 { | 162 { |
163 AddTestCase (new TcpEndPointBug2211Test ("Bug 2211 testcase IPv4", false), T
estCase::QUICK); | 163 AddTestCase (new TcpEndPointBug2211Test ("Bug 2211 testcase IPv4", false), T
estCase::QUICK); |
164 AddTestCase (new TcpEndPointBug2211Test ("Bug 2211 testcase IPv6", true), Te
stCase::QUICK); | 164 AddTestCase (new TcpEndPointBug2211Test ("Bug 2211 testcase IPv6", true), Te
stCase::QUICK); |
165 } | 165 } |
166 }; | 166 }; |
167 | 167 |
168 static TcpEndpointBug2211TestSuite g_TcpEndPoint2211TestSuite; //!< Static varia
ble for test initialization | 168 static TcpEndpointBug2211TestSuite g_TcpEndPoint2211TestSuite; //!< Static varia
ble for test initialization |
169 | 169 |
170 | 170 |
171 | 171 |
LEFT | RIGHT |