A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
tcp-test.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007 Georgia Tech Research Corporation
3 * Copyright (c) 2009 INRIA
4 *
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
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19 * Raj Bhattacharjea <raj.b@gatech.edu>
20 */
21
22#include "ns3/arp-l3-protocol.h"
23#include "ns3/config.h"
24#include "ns3/icmpv4-l4-protocol.h"
25#include "ns3/icmpv6-l4-protocol.h"
26#include "ns3/inet-socket-address.h"
27#include "ns3/inet6-socket-address.h"
28#include "ns3/ipv4-l3-protocol.h"
29#include "ns3/ipv4-list-routing.h"
30#include "ns3/ipv4-static-routing.h"
31#include "ns3/ipv6-l3-protocol.h"
32#include "ns3/ipv6-list-routing.h"
33#include "ns3/ipv6-static-routing.h"
34#include "ns3/log.h"
35#include "ns3/node.h"
36#include "ns3/simple-channel.h"
37#include "ns3/simple-net-device.h"
38#include "ns3/simulator.h"
39#include "ns3/socket-factory.h"
40#include "ns3/tcp-l4-protocol.h"
41#include "ns3/tcp-socket-factory.h"
42#include "ns3/test.h"
43#include "ns3/traffic-control-layer.h"
44#include "ns3/udp-l4-protocol.h"
45#include "ns3/uinteger.h"
46
47#include <string>
48
49using namespace ns3;
50
51NS_LOG_COMPONENT_DEFINE("TcpTestSuite");
52
58class TcpTestCase : public TestCase
59{
60 public:
70 TcpTestCase(uint32_t totalStreamSize,
71 uint32_t sourceWriteSize,
72 uint32_t sourceReadSize,
73 uint32_t serverWriteSize,
74 uint32_t serverReadSize,
75 bool useIpv6);
76
77 private:
78 void DoRun() override;
79 void DoTeardown() override;
80
84 void SetupDefaultSim();
88 void SetupDefaultSim6();
89
100
109 const char* ipaddr,
110 const char* netmask);
119
130 void ServerHandleRecv(Ptr<Socket> sock);
136 void ServerHandleSend(Ptr<Socket> sock, uint32_t available);
142 void SourceHandleSend(Ptr<Socket> sock, uint32_t available);
147 void SourceHandleRecv(Ptr<Socket> sock);
148
161
163};
164
165static std::string
166Name(std::string str,
167 uint32_t totalStreamSize,
168 uint32_t sourceWriteSize,
169 uint32_t serverReadSize,
170 uint32_t serverWriteSize,
171 uint32_t sourceReadSize,
172 bool useIpv6)
173{
174 std::ostringstream oss;
175 oss << str << " total=" << totalStreamSize << " sourceWrite=" << sourceWriteSize
176 << " sourceRead=" << sourceReadSize << " serverRead=" << serverReadSize
177 << " serverWrite=" << serverWriteSize << " useIpv6=" << useIpv6;
178 return oss.str();
179}
180
181static inline std::string
183{
184 std::ostringstream oss;
185 p->CopyData(&oss, p->GetSize());
186 return oss.str();
187}
188
190 uint32_t sourceWriteSize,
191 uint32_t sourceReadSize,
192 uint32_t serverWriteSize,
193 uint32_t serverReadSize,
194 bool useIpv6)
195 : TestCase(Name("Send string data from client to server and back",
196 totalStreamSize,
197 sourceWriteSize,
198 serverReadSize,
199 serverWriteSize,
200 sourceReadSize,
201 useIpv6)),
202 m_totalBytes(totalStreamSize),
203 m_sourceWriteSize(sourceWriteSize),
204 m_sourceReadSize(sourceReadSize),
205 m_serverWriteSize(serverWriteSize),
206 m_serverReadSize(serverReadSize),
207 m_useIpv6(useIpv6)
208{
209}
210
211void
213{
218 m_sourceTxPayload = new uint8_t[m_totalBytes];
219 m_sourceRxPayload = new uint8_t[m_totalBytes];
220 m_serverRxPayload = new uint8_t[m_totalBytes];
221 for (uint32_t i = 0; i < m_totalBytes; ++i)
222 {
223 auto m = (uint8_t)(97 + (i % 26));
224 m_sourceTxPayload[i] = m;
225 }
228
229 if (m_useIpv6)
230 {
232 }
233 else
234 {
236 }
237
239
241 NS_TEST_EXPECT_MSG_EQ(m_currentServerRxBytes, m_totalBytes, "Server received all bytes");
242 NS_TEST_EXPECT_MSG_EQ(m_currentSourceRxBytes, m_totalBytes, "Source received all bytes");
244 0,
245 "Server received expected data buffers");
247 0,
248 "Source received back expected data buffers");
249}
250
251void
253{
254 delete[] m_sourceTxPayload;
255 delete[] m_sourceRxPayload;
256 delete[] m_serverRxPayload;
258}
259
260void
262{
263 s->SetRecvCallback(MakeCallback(&TcpTestCase::ServerHandleRecv, this));
264 s->SetSendCallback(MakeCallback(&TcpTestCase::ServerHandleSend, this));
265}
266
267void
269{
270 while (sock->GetRxAvailable() > 0)
271 {
272 uint32_t toRead = std::min(m_serverReadSize, sock->GetRxAvailable());
273 Ptr<Packet> p = sock->Recv(toRead, 0);
274 if (!p && sock->GetErrno() != Socket::ERROR_NOTERROR)
275 {
276 NS_FATAL_ERROR("Server could not read stream at byte " << m_currentServerRxBytes);
277 }
279 true,
280 "Server received too many bytes");
281 NS_LOG_DEBUG("Server recv data=\"" << GetString(p) << "\"");
282 p->CopyData(&m_serverRxPayload[m_currentServerRxBytes], p->GetSize());
283 m_currentServerRxBytes += p->GetSize();
284 ServerHandleSend(sock, sock->GetTxAvailable());
285 }
286}
287
288void
290{
291 while (sock->GetTxAvailable() > 0 && m_currentServerTxBytes < m_currentServerRxBytes)
292 {
294 uint32_t toSend = std::min(left, sock->GetTxAvailable());
295 toSend = std::min(toSend, m_serverWriteSize);
296 Ptr<Packet> p = Create<Packet>(&m_serverRxPayload[m_currentServerTxBytes], toSend);
297 NS_LOG_DEBUG("Server send data=\"" << GetString(p) << "\"");
298 int sent = sock->Send(p);
299 NS_TEST_EXPECT_MSG_EQ((sent != -1), true, "Server error during send ?");
301 }
303 {
304 sock->Close();
305 }
306}
307
308void
310{
311 while (sock->GetTxAvailable() > 0 && m_currentSourceTxBytes < m_totalBytes)
312 {
314 uint32_t toSend = std::min(left, sock->GetTxAvailable());
315 toSend = std::min(toSend, m_sourceWriteSize);
316 Ptr<Packet> p = Create<Packet>(&m_sourceTxPayload[m_currentSourceTxBytes], toSend);
317 NS_LOG_DEBUG("Source send data=\"" << GetString(p) << "\"");
318 int sent = sock->Send(p);
319 NS_TEST_EXPECT_MSG_EQ((sent != -1), true, "Error during send ?");
321 }
322}
323
324void
326{
327 while (sock->GetRxAvailable() > 0 && m_currentSourceRxBytes < m_totalBytes)
328 {
329 uint32_t toRead = std::min(m_sourceReadSize, sock->GetRxAvailable());
330 Ptr<Packet> p = sock->Recv(toRead, 0);
331 if (!p && sock->GetErrno() != Socket::ERROR_NOTERROR)
332 {
333 NS_FATAL_ERROR("Source could not read stream at byte " << m_currentSourceRxBytes);
334 }
336 true,
337 "Source received too many bytes");
338 NS_LOG_DEBUG("Source recv data=\"" << GetString(p) << "\"");
339 p->CopyData(&m_sourceRxPayload[m_currentSourceRxBytes], p->GetSize());
340 m_currentSourceRxBytes += p->GetSize();
341 }
343 {
344 sock->Close();
345 }
346}
347
350{
351 Ptr<Node> node = CreateObject<Node>();
352 // Traffic Control
353 Ptr<TrafficControlLayer> tc = CreateObject<TrafficControlLayer>();
354 node->AggregateObject(tc);
355 // ARP
356 Ptr<ArpL3Protocol> arp = CreateObject<ArpL3Protocol>();
357 node->AggregateObject(arp);
358 arp->SetTrafficControl(tc);
359 // IPV4
360 Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol>();
361 // Routing for Ipv4
362 Ptr<Ipv4ListRouting> ipv4Routing = CreateObject<Ipv4ListRouting>();
363 ipv4->SetRoutingProtocol(ipv4Routing);
364 Ptr<Ipv4StaticRouting> ipv4staticRouting = CreateObject<Ipv4StaticRouting>();
365 ipv4Routing->AddRoutingProtocol(ipv4staticRouting, 0);
366 node->AggregateObject(ipv4);
367 // ICMP
368 Ptr<Icmpv4L4Protocol> icmp = CreateObject<Icmpv4L4Protocol>();
369 node->AggregateObject(icmp);
370 // UDP
371 Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol>();
372 node->AggregateObject(udp);
373 // TCP
374 Ptr<TcpL4Protocol> tcp = CreateObject<TcpL4Protocol>();
375 node->AggregateObject(tcp);
376 return node;
377}
378
380TcpTestCase::AddSimpleNetDevice(Ptr<Node> node, const char* ipaddr, const char* netmask)
381{
382 Ptr<SimpleNetDevice> dev = CreateObject<SimpleNetDevice>();
384 node->AddDevice(dev);
385 Ptr<Ipv4> ipv4 = node->GetObject<Ipv4>();
386 uint32_t ndid = ipv4->AddInterface(dev);
388 ipv4->AddAddress(ndid, ipv4Addr);
389 ipv4->SetUp(ndid);
390 return dev;
391}
392
393void
395{
396 const char* netmask = "255.255.255.0";
397 const char* ipaddr0 = "192.168.1.1";
398 const char* ipaddr1 = "192.168.1.2";
401 Ptr<SimpleNetDevice> dev0 = AddSimpleNetDevice(node0, ipaddr0, netmask);
402 Ptr<SimpleNetDevice> dev1 = AddSimpleNetDevice(node1, ipaddr1, netmask);
403
404 Ptr<SimpleChannel> channel = CreateObject<SimpleChannel>();
405 dev0->SetChannel(channel);
406 dev1->SetChannel(channel);
407
408 Ptr<SocketFactory> sockFactory0 = node0->GetObject<TcpSocketFactory>();
409 Ptr<SocketFactory> sockFactory1 = node1->GetObject<TcpSocketFactory>();
410
411 Ptr<Socket> server = sockFactory0->CreateSocket();
412 Ptr<Socket> source = sockFactory1->CreateSocket();
413
414 uint16_t port = 50000;
415 InetSocketAddress serverlocaladdr(Ipv4Address::GetAny(), port);
416 InetSocketAddress serverremoteaddr(Ipv4Address(ipaddr0), port);
417
418 server->Bind(serverlocaladdr);
419 server->Listen();
420 server->SetAcceptCallback(MakeNullCallback<bool, Ptr<Socket>, const Address&>(),
422
423 source->SetRecvCallback(MakeCallback(&TcpTestCase::SourceHandleRecv, this));
424 source->SetSendCallback(MakeCallback(&TcpTestCase::SourceHandleSend, this));
425
426 Address peerAddress;
427 int err = source->GetPeerName(peerAddress);
428 NS_TEST_EXPECT_MSG_EQ(err, -1, "socket GetPeerName() should fail when socket is not connected");
429 NS_TEST_EXPECT_MSG_EQ(source->GetErrno(),
431 "socket error code should be ERROR_NOTCONN");
432
433 err = source->Connect(serverremoteaddr);
434 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket Connect() should succeed");
435
436 err = source->GetPeerName(peerAddress);
437 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket GetPeerName() should succeed when socket is connected");
438 NS_TEST_EXPECT_MSG_EQ(peerAddress,
439 serverremoteaddr,
440 "address from socket GetPeerName() should equal the connected address");
441}
442
443void
445{
446 Ipv6Prefix prefix = Ipv6Prefix(64);
447 Ipv6Address ipaddr0 = Ipv6Address("2001:0100:f00d:cafe::1");
448 Ipv6Address ipaddr1 = Ipv6Address("2001:0100:f00d:cafe::2");
451 Ptr<SimpleNetDevice> dev0 = AddSimpleNetDevice6(node0, ipaddr0, prefix);
452 Ptr<SimpleNetDevice> dev1 = AddSimpleNetDevice6(node1, ipaddr1, prefix);
453
454 Ptr<SimpleChannel> channel = CreateObject<SimpleChannel>();
455 dev0->SetChannel(channel);
456 dev1->SetChannel(channel);
457
458 Ptr<SocketFactory> sockFactory0 = node0->GetObject<TcpSocketFactory>();
459 Ptr<SocketFactory> sockFactory1 = node1->GetObject<TcpSocketFactory>();
460
461 Ptr<Socket> server = sockFactory0->CreateSocket();
462 Ptr<Socket> source = sockFactory1->CreateSocket();
463
464 uint16_t port = 50000;
465 Inet6SocketAddress serverlocaladdr(Ipv6Address::GetAny(), port);
466 Inet6SocketAddress serverremoteaddr(ipaddr0, port);
467
468 server->Bind(serverlocaladdr);
469 server->Listen();
470 server->SetAcceptCallback(MakeNullCallback<bool, Ptr<Socket>, const Address&>(),
472
473 source->SetRecvCallback(MakeCallback(&TcpTestCase::SourceHandleRecv, this));
474 source->SetSendCallback(MakeCallback(&TcpTestCase::SourceHandleSend, this));
475
476 Address peerAddress;
477 int err = source->GetPeerName(peerAddress);
478 NS_TEST_EXPECT_MSG_EQ(err, -1, "socket GetPeerName() should fail when socket is not connected");
479 NS_TEST_EXPECT_MSG_EQ(source->GetErrno(),
481 "socket error code should be ERROR_NOTCONN");
482
483 err = source->Connect(serverremoteaddr);
484 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket Connect() should succeed");
485
486 err = source->GetPeerName(peerAddress);
487 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket GetPeerName() should succeed when socket is connected");
488 NS_TEST_EXPECT_MSG_EQ(peerAddress,
489 serverremoteaddr,
490 "address from socket GetPeerName() should equal the connected address");
491}
492
495{
496 Ptr<Node> node = CreateObject<Node>();
497 // IPV6
498 Ptr<Ipv6L3Protocol> ipv6 = CreateObject<Ipv6L3Protocol>();
499 // Routing for Ipv6
500 Ptr<Ipv6ListRouting> ipv6Routing = CreateObject<Ipv6ListRouting>();
501 ipv6->SetRoutingProtocol(ipv6Routing);
502 Ptr<Ipv6StaticRouting> ipv6staticRouting = CreateObject<Ipv6StaticRouting>();
503 ipv6Routing->AddRoutingProtocol(ipv6staticRouting, 0);
504 node->AggregateObject(ipv6);
505 // ICMP
506 Ptr<Icmpv6L4Protocol> icmp = CreateObject<Icmpv6L4Protocol>();
507 node->AggregateObject(icmp);
508 // Ipv6 Extensions
509 ipv6->RegisterExtensions();
510 ipv6->RegisterOptions();
511 // UDP
512 Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol>();
513 node->AggregateObject(udp);
514 // TCP
515 Ptr<TcpL4Protocol> tcp = CreateObject<TcpL4Protocol>();
516 node->AggregateObject(tcp);
517 // Traffic Control
518 Ptr<TrafficControlLayer> tc = CreateObject<TrafficControlLayer>();
519 node->AggregateObject(tc);
520 return node;
521}
522
525{
526 Ptr<SimpleNetDevice> dev = CreateObject<SimpleNetDevice>();
528 node->AddDevice(dev);
529 Ptr<Ipv6> ipv6 = node->GetObject<Ipv6>();
530 uint32_t ndid = ipv6->AddInterface(dev);
531 Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress(ipaddr, prefix);
532 ipv6->AddAddress(ndid, ipv6Addr);
533 ipv6->SetUp(ndid);
534 return dev;
535}
536
543{
544 public:
546 : TestSuite("tcp", Type::UNIT)
547 {
548 // Arguments to these test cases are 1) totalStreamSize,
549 // 2) source write size, 3) source read size
550 // 4) server write size, and 5) server read size
551 // with units of bytes
552 AddTestCase(new TcpTestCase(13, 200, 200, 200, 200, false), TestCase::Duration::QUICK);
553 AddTestCase(new TcpTestCase(13, 1, 1, 1, 1, false), TestCase::Duration::QUICK);
554 AddTestCase(new TcpTestCase(100000, 100, 50, 100, 20, false), TestCase::Duration::QUICK);
555
556 AddTestCase(new TcpTestCase(13, 200, 200, 200, 200, true), TestCase::Duration::QUICK);
557 AddTestCase(new TcpTestCase(13, 1, 1, 1, 1, true), TestCase::Duration::QUICK);
558 AddTestCase(new TcpTestCase(100000, 100, 50, 100, 20, true), TestCase::Duration::QUICK);
559 }
560};
561
TCP Test - send string data from client to server and back.
Definition: tcp-test.cc:59
uint32_t m_serverReadSize
Server data size when receiving.
Definition: tcp-test.cc:153
uint8_t * m_sourceTxPayload
Client Tx payload.
Definition: tcp-test.cc:158
Ptr< SimpleNetDevice > AddSimpleNetDevice(Ptr< Node > node, const char *ipaddr, const char *netmask)
Add a SimpleNetDevice to a node (IPv4 version).
Definition: tcp-test.cc:380
bool m_useIpv6
Use IPv6 instead of IPv4.
Definition: tcp-test.cc:162
void ServerHandleSend(Ptr< Socket > sock, uint32_t available)
Server: Send data.
Definition: tcp-test.cc:289
uint32_t m_currentServerTxBytes
Server Rx bytes.
Definition: tcp-test.cc:157
void DoRun() override
Implementation to actually run this TestCase.
Definition: tcp-test.cc:212
uint32_t m_currentSourceTxBytes
Client Tx bytes.
Definition: tcp-test.cc:154
void ServerHandleRecv(Ptr< Socket > sock)
Server: Receive data.
Definition: tcp-test.cc:268
Ptr< SimpleNetDevice > AddSimpleNetDevice6(Ptr< Node > node, Ipv6Address ipaddr, Ipv6Prefix prefix)
Add a SimpleNetDevice to a node (IPv6 version).
Definition: tcp-test.cc:524
Ptr< Node > CreateInternetNode()
Create a node with the Internet stack (IPv4 version).
Definition: tcp-test.cc:349
Ptr< Node > CreateInternetNode6()
Create a node with the Internet stack (IPv6 version).
Definition: tcp-test.cc:494
void SourceHandleRecv(Ptr< Socket > sock)
Client: Receive data.
Definition: tcp-test.cc:325
void ServerHandleConnectionCreated(Ptr< Socket > s, const Address &addr)
Server: Handle connection created.
Definition: tcp-test.cc:261
TcpTestCase(uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t sourceReadSize, uint32_t serverWriteSize, uint32_t serverReadSize, bool useIpv6)
Constructor.
Definition: tcp-test.cc:189
uint32_t m_currentSourceRxBytes
Client Rx bytes.
Definition: tcp-test.cc:155
uint32_t m_totalBytes
Total stream size (in bytes).
Definition: tcp-test.cc:149
uint32_t m_sourceReadSize
Client data size when receiving.
Definition: tcp-test.cc:151
void SetupDefaultSim6()
Setup the test (IPv6 version).
Definition: tcp-test.cc:444
uint8_t * m_sourceRxPayload
Client Rx payload.
Definition: tcp-test.cc:159
uint32_t m_serverWriteSize
Server data size when sending.
Definition: tcp-test.cc:152
void SourceHandleSend(Ptr< Socket > sock, uint32_t available)
Client: Send data.
Definition: tcp-test.cc:309
void SetupDefaultSim()
Setup the test (IPv4 version).
Definition: tcp-test.cc:394
uint32_t m_currentServerRxBytes
Server Tx bytes.
Definition: tcp-test.cc:156
uint8_t * m_serverRxPayload
Server Rx payload.
Definition: tcp-test.cc:160
uint32_t m_sourceWriteSize
Client data size when sending.
Definition: tcp-test.cc:150
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Definition: tcp-test.cc:252
TCP TestSuite - send string data from client to server and back.
Definition: tcp-test.cc:543
a polymophic address class
Definition: address.h:101
An Inet6 address class.
an Inet address class
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
static Ipv4Address GetAny()
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:80
a class to store IPv4 address information on an interface
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:257
Describes an IPv6 address.
Definition: ipv6-address.h:49
static Ipv6Address GetAny()
Get the "any" (::) Ipv6Address.
Access to the IPv6 forwarding table, interfaces, and configuration.
Definition: ipv6.h:82
IPv6 address associated with an interface.
Describes an IPv6 prefix.
Definition: ipv6-address.h:455
static Mac48Address ConvertFrom(const Address &address)
static Mac48Address Allocate()
Allocate a new Mac48Address.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition: simulator.cc:142
static void Run()
Run the simulation.
Definition: simulator.cc:178
@ ERROR_NOTERROR
Definition: socket.h:85
@ ERROR_NOTCONN
Definition: socket.h:87
API to create TCP socket instances.
encapsulates test code
Definition: test.h:1061
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
A suite of tests to run.
Definition: test.h:1268
Type
Type of test.
Definition: test.h:1275
static constexpr auto UNIT
Definition: test.h:1286
uint16_t port
Definition: dsdv-manet.cc:44
Callback< R, Args... > MakeNullCallback()
Definition: callback.h:747
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Definition: test.h:252
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:704
static TcpTestSuite g_tcpTestSuite
Static variable for test initialization.
Definition: tcp-test.cc:562
static std::string Name(std::string str, uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t serverReadSize, uint32_t serverWriteSize, uint32_t sourceReadSize, bool useIpv6)
Definition: tcp-test.cc:166
static std::string GetString(Ptr< Packet > p)
Definition: tcp-test.cc:182