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) 2007 Georgia Tech Research Corporation | 3 * Copyright (c) 2012 US Army Research Laboratory |
4 * Copyright (c) 2009 INRIA | |
5 *· | 4 *· |
6 * 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 |
7 * 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 |
8 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
9 * | 8 * |
10 * 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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
14 * | 13 * |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 uint16_t port2 = 5001; | 236 uint16_t port2 = 5001; |
238 uint16_t port3 = 5002; | 237 uint16_t port3 = 5002; |
239 uint16_t port4 = 5003; | 238 uint16_t port4 = 5003; |
240 | 239 |
241 /* Server 1: listen on 0.0.0.0 for IPv4 connection */ | 240 /* Server 1: listen on 0.0.0.0 for IPv4 connection */ |
242 server1->Bind (InetSocketAddress(Ipv4Address::GetAny(), port1)); | 241 server1->Bind (InetSocketAddress(Ipv4Address::GetAny(), port1)); |
243 server1->Listen (); | 242 server1->Listen (); |
244 server1->SetAcceptCallback (MakeNullCallback<bool, Ptr< Socket >, const Addres
s &> (), | 243 server1->SetAcceptCallback (MakeNullCallback<bool, Ptr< Socket >, const Addres
s &> (), |
245 MakeCallback (&DualStackTestCase::ServerHandleConnectionCreated
1, this)); | 244 MakeCallback (&DualStackTestCase::ServerHandleConnectionCreated
1, this)); |
246 | 245 |
247 /* Server 2: listen on 0.0.0.0 for IPv5 connection */ | 246 /* Server 2: listen on 0.0.0.0 for IPv4 connection */ |
248 server2->Bind (InetSocketAddress(Ipv4Address::GetAny(), port2)); | 247 server2->Bind (InetSocketAddress(Ipv4Address::GetAny(), port2)); |
249 server2->Listen (); | 248 server2->Listen (); |
250 server2->SetAcceptCallback (MakeNullCallback<bool, Ptr< Socket >, const Addres
s &> (), | 249 server2->SetAcceptCallback (MakeNullCallback<bool, Ptr< Socket >, const Addres
s &> (), |
251 MakeCallback (&DualStackTestCase::ServerHandleConnectionCreated
2, this)); | 250 MakeCallback (&DualStackTestCase::ServerHandleConnectionCreated
2, this)); |
252 | 251 |
253 /* Server 3: listen on :: for IPv4 connection */ | 252 /* Server 3: listen on :: for IPv4 connection */ |
254 server3->Bind (Inet6SocketAddress(Ipv6Address::GetAny(), port3)); | 253 server3->Bind (Inet6SocketAddress(Ipv6Address::GetAny(), port3)); |
255 server3->Listen (); | 254 server3->Listen (); |
256 server3->SetAcceptCallback (MakeNullCallback<bool, Ptr< Socket >, const Addres
s &> (), | 255 server3->SetAcceptCallback (MakeNullCallback<bool, Ptr< Socket >, const Addres
s &> (), |
257 MakeCallback (&DualStackTestCase::ServerHandleConnectionCreated
3, this)); | 256 MakeCallback (&DualStackTestCase::ServerHandleConnectionCreated
3, this)); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 { | 302 { |
304 public: | 303 public: |
305 Ipv6DualStackTestSuite () | 304 Ipv6DualStackTestSuite () |
306 : TestSuite ("ipv6-dual-stack", UNIT) | 305 : TestSuite ("ipv6-dual-stack", UNIT) |
307 { | 306 { |
308 AddTestCase (new DualStackTestCase()); | 307 AddTestCase (new DualStackTestCase()); |
309 } | 308 } |
310 } g_ipv6DualStackTestSuite; | 309 } g_ipv6DualStackTestSuite; |
311 | 310 |
312 } // namespace ns3 | 311 } // namespace ns3 |
LEFT | RIGHT |