A Discrete-Event Network Simulator
API
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
59class TcpTestCase : public TestCase
60{
61 public:
71 TcpTestCase(uint32_t totalStreamSize,
72 uint32_t sourceWriteSize,
73 uint32_t sourceReadSize,
74 uint32_t serverWriteSize,
75 uint32_t serverReadSize,
76 bool useIpv6);
77
78 private:
79 void DoRun() override;
80 void DoTeardown() override;
81
85 void SetupDefaultSim();
89 void SetupDefaultSim6();
90
101
110 const char* ipaddr,
111 const char* netmask);
120
131 void ServerHandleRecv(Ptr<Socket> sock);
137 void ServerHandleSend(Ptr<Socket> sock, uint32_t available);
143 void SourceHandleSend(Ptr<Socket> sock, uint32_t available);
148 void SourceHandleRecv(Ptr<Socket> sock);
149
162
164};
165
166static std::string
167Name(std::string str,
168 uint32_t totalStreamSize,
169 uint32_t sourceWriteSize,
170 uint32_t serverReadSize,
171 uint32_t serverWriteSize,
172 uint32_t sourceReadSize,
173 bool useIpv6)
174{
175 std::ostringstream oss;
176 oss << str << " total=" << totalStreamSize << " sourceWrite=" << sourceWriteSize
177 << " sourceRead=" << sourceReadSize << " serverRead=" << serverReadSize
178 << " serverWrite=" << serverWriteSize << " useIpv6=" << useIpv6;
179 return oss.str();
180}
181
182static inline std::string
184{
185 std::ostringstream oss;
186 p->CopyData(&oss, p->GetSize());
187 return oss.str();
188}
189
191 uint32_t sourceWriteSize,
192 uint32_t sourceReadSize,
193 uint32_t serverWriteSize,
194 uint32_t serverReadSize,
195 bool useIpv6)
196 : TestCase(Name("Send string data from client to server and back",
197 totalStreamSize,
198 sourceWriteSize,
199 serverReadSize,
200 serverWriteSize,
201 sourceReadSize,
202 useIpv6)),
203 m_totalBytes(totalStreamSize),
204 m_sourceWriteSize(sourceWriteSize),
205 m_sourceReadSize(sourceReadSize),
206 m_serverWriteSize(serverWriteSize),
207 m_serverReadSize(serverReadSize),
208 m_useIpv6(useIpv6)
209{
210}
211
212void
214{
219 m_sourceTxPayload = new uint8_t[m_totalBytes];
220 m_sourceRxPayload = new uint8_t[m_totalBytes];
221 m_serverRxPayload = new uint8_t[m_totalBytes];
222 for (uint32_t i = 0; i < m_totalBytes; ++i)
223 {
224 uint8_t m = (uint8_t)(97 + (i % 26));
225 m_sourceTxPayload[i] = m;
226 }
229
230 if (m_useIpv6 == true)
231 {
233 }
234 else
235 {
237 }
238
239 Simulator::Run();
240
242 NS_TEST_EXPECT_MSG_EQ(m_currentServerRxBytes, m_totalBytes, "Server received all bytes");
243 NS_TEST_EXPECT_MSG_EQ(m_currentSourceRxBytes, m_totalBytes, "Source received all bytes");
245 0,
246 "Server received expected data buffers");
248 0,
249 "Source received back expected data buffers");
250}
251
252void
254{
255 delete[] m_sourceTxPayload;
256 delete[] m_sourceRxPayload;
257 delete[] m_serverRxPayload;
258 Simulator::Destroy();
259}
260
261void
263{
266}
267
268void
270{
271 while (sock->GetRxAvailable() > 0)
272 {
274 Ptr<Packet> p = sock->Recv(toRead, 0);
275 if (!p && sock->GetErrno() != Socket::ERROR_NOTERROR)
276 {
277 NS_FATAL_ERROR("Server could not read stream at byte " << m_currentServerRxBytes);
278 }
280 true,
281 "Server received too many bytes");
282 NS_LOG_DEBUG("Server recv data=\"" << GetString(p) << "\"");
285 ServerHandleSend(sock, sock->GetTxAvailable());
286 }
287}
288
289void
291{
293 {
295 uint32_t toSend = std::min(left, sock->GetTxAvailable());
296 toSend = std::min(toSend, m_serverWriteSize);
297 Ptr<Packet> p = Create<Packet>(&m_serverRxPayload[m_currentServerTxBytes], toSend);
298 NS_LOG_DEBUG("Server send data=\"" << GetString(p) << "\"");
299 int sent = sock->Send(p);
300 NS_TEST_EXPECT_MSG_EQ((sent != -1), true, "Server error during send ?");
302 }
304 {
305 sock->Close();
306 }
307}
308
309void
311{
312 while (sock->GetTxAvailable() > 0 && m_currentSourceTxBytes < m_totalBytes)
313 {
315 uint32_t toSend = std::min(left, sock->GetTxAvailable());
316 toSend = std::min(toSend, m_sourceWriteSize);
317 Ptr<Packet> p = Create<Packet>(&m_sourceTxPayload[m_currentSourceTxBytes], toSend);
318 NS_LOG_DEBUG("Source send data=\"" << GetString(p) << "\"");
319 int sent = sock->Send(p);
320 NS_TEST_EXPECT_MSG_EQ((sent != -1), true, "Error during send ?");
322 }
323}
324
325void
327{
328 while (sock->GetRxAvailable() > 0 && m_currentSourceRxBytes < m_totalBytes)
329 {
331 Ptr<Packet> p = sock->Recv(toRead, 0);
332 if (!p && sock->GetErrno() != Socket::ERROR_NOTERROR)
333 {
334 NS_FATAL_ERROR("Source could not read stream at byte " << m_currentSourceRxBytes);
335 }
337 true,
338 "Source received too many bytes");
339 NS_LOG_DEBUG("Source recv data=\"" << GetString(p) << "\"");
342 }
344 {
345 sock->Close();
346 }
347}
348
351{
352 Ptr<Node> node = CreateObject<Node>();
353 // Traffic Control
354 Ptr<TrafficControlLayer> tc = CreateObject<TrafficControlLayer>();
355 node->AggregateObject(tc);
356 // ARP
357 Ptr<ArpL3Protocol> arp = CreateObject<ArpL3Protocol>();
358 node->AggregateObject(arp);
359 arp->SetTrafficControl(tc);
360 // IPV4
361 Ptr<Ipv4L3Protocol> ipv4 = CreateObject<Ipv4L3Protocol>();
362 // Routing for Ipv4
363 Ptr<Ipv4ListRouting> ipv4Routing = CreateObject<Ipv4ListRouting>();
364 ipv4->SetRoutingProtocol(ipv4Routing);
365 Ptr<Ipv4StaticRouting> ipv4staticRouting = CreateObject<Ipv4StaticRouting>();
366 ipv4Routing->AddRoutingProtocol(ipv4staticRouting, 0);
367 node->AggregateObject(ipv4);
368 // ICMP
369 Ptr<Icmpv4L4Protocol> icmp = CreateObject<Icmpv4L4Protocol>();
370 node->AggregateObject(icmp);
371 // UDP
372 Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol>();
373 node->AggregateObject(udp);
374 // TCP
375 Ptr<TcpL4Protocol> tcp = CreateObject<TcpL4Protocol>();
376 node->AggregateObject(tcp);
377 return node;
378}
379
381TcpTestCase::AddSimpleNetDevice(Ptr<Node> node, const char* ipaddr, const char* netmask)
382{
383 Ptr<SimpleNetDevice> dev = CreateObject<SimpleNetDevice>();
384 dev->SetAddress(Mac48Address::ConvertFrom(Mac48Address::Allocate()));
385 node->AddDevice(dev);
386 Ptr<Ipv4> ipv4 = node->GetObject<Ipv4>();
387 uint32_t ndid = ipv4->AddInterface(dev);
389 ipv4->AddAddress(ndid, ipv4Addr);
390 ipv4->SetUp(ndid);
391 return dev;
392}
393
394void
396{
397 const char* netmask = "255.255.255.0";
398 const char* ipaddr0 = "192.168.1.1";
399 const char* ipaddr1 = "192.168.1.2";
402 Ptr<SimpleNetDevice> dev0 = AddSimpleNetDevice(node0, ipaddr0, netmask);
403 Ptr<SimpleNetDevice> dev1 = AddSimpleNetDevice(node1, ipaddr1, netmask);
404
405 Ptr<SimpleChannel> channel = CreateObject<SimpleChannel>();
406 dev0->SetChannel(channel);
407 dev1->SetChannel(channel);
408
409 Ptr<SocketFactory> sockFactory0 = node0->GetObject<TcpSocketFactory>();
410 Ptr<SocketFactory> sockFactory1 = node1->GetObject<TcpSocketFactory>();
411
412 Ptr<Socket> server = sockFactory0->CreateSocket();
413 Ptr<Socket> source = sockFactory1->CreateSocket();
414
415 uint16_t port = 50000;
416 InetSocketAddress serverlocaladdr(Ipv4Address::GetAny(), port);
417 InetSocketAddress serverremoteaddr(Ipv4Address(ipaddr0), port);
418
419 server->Bind(serverlocaladdr);
420 server->Listen();
421 server->SetAcceptCallback(MakeNullCallback<bool, Ptr<Socket>, const Address&>(),
423
426
427 Address peerAddress;
428 int err = source->GetPeerName(peerAddress);
429 NS_TEST_EXPECT_MSG_EQ(err, -1, "socket GetPeerName() should fail when socket is not connected");
431 Socket::ERROR_NOTCONN,
432 "socket error code should be ERROR_NOTCONN");
433
434 err = source->Connect(serverremoteaddr);
435 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket Connect() should succeed");
436
437 err = source->GetPeerName(peerAddress);
438 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket GetPeerName() should succeed when socket is connected");
439 NS_TEST_EXPECT_MSG_EQ(peerAddress,
440 serverremoteaddr,
441 "address from socket GetPeerName() should equal the connected address");
442}
443
444void
446{
447 Ipv6Prefix prefix = Ipv6Prefix(64);
448 Ipv6Address ipaddr0 = Ipv6Address("2001:0100:f00d:cafe::1");
449 Ipv6Address ipaddr1 = Ipv6Address("2001:0100:f00d:cafe::2");
452 Ptr<SimpleNetDevice> dev0 = AddSimpleNetDevice6(node0, ipaddr0, prefix);
453 Ptr<SimpleNetDevice> dev1 = AddSimpleNetDevice6(node1, ipaddr1, prefix);
454
455 Ptr<SimpleChannel> channel = CreateObject<SimpleChannel>();
456 dev0->SetChannel(channel);
457 dev1->SetChannel(channel);
458
459 Ptr<SocketFactory> sockFactory0 = node0->GetObject<TcpSocketFactory>();
460 Ptr<SocketFactory> sockFactory1 = node1->GetObject<TcpSocketFactory>();
461
462 Ptr<Socket> server = sockFactory0->CreateSocket();
463 Ptr<Socket> source = sockFactory1->CreateSocket();
464
465 uint16_t port = 50000;
466 Inet6SocketAddress serverlocaladdr(Ipv6Address::GetAny(), port);
467 Inet6SocketAddress serverremoteaddr(ipaddr0, port);
468
469 server->Bind(serverlocaladdr);
470 server->Listen();
471 server->SetAcceptCallback(MakeNullCallback<bool, Ptr<Socket>, const Address&>(),
473
476
477 Address peerAddress;
478 int err = source->GetPeerName(peerAddress);
479 NS_TEST_EXPECT_MSG_EQ(err, -1, "socket GetPeerName() should fail when socket is not connected");
481 Socket::ERROR_NOTCONN,
482 "socket error code should be ERROR_NOTCONN");
483
484 err = source->Connect(serverremoteaddr);
485 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket Connect() should succeed");
486
487 err = source->GetPeerName(peerAddress);
488 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket GetPeerName() should succeed when socket is connected");
489 NS_TEST_EXPECT_MSG_EQ(peerAddress,
490 serverremoteaddr,
491 "address from socket GetPeerName() should equal the connected address");
492}
493
496{
497 Ptr<Node> node = CreateObject<Node>();
498 // IPV6
499 Ptr<Ipv6L3Protocol> ipv6 = CreateObject<Ipv6L3Protocol>();
500 // Routing for Ipv6
501 Ptr<Ipv6ListRouting> ipv6Routing = CreateObject<Ipv6ListRouting>();
502 ipv6->SetRoutingProtocol(ipv6Routing);
503 Ptr<Ipv6StaticRouting> ipv6staticRouting = CreateObject<Ipv6StaticRouting>();
504 ipv6Routing->AddRoutingProtocol(ipv6staticRouting, 0);
505 node->AggregateObject(ipv6);
506 // ICMP
507 Ptr<Icmpv6L4Protocol> icmp = CreateObject<Icmpv6L4Protocol>();
508 node->AggregateObject(icmp);
509 // Ipv6 Extensions
510 ipv6->RegisterExtensions();
511 ipv6->RegisterOptions();
512 // UDP
513 Ptr<UdpL4Protocol> udp = CreateObject<UdpL4Protocol>();
514 node->AggregateObject(udp);
515 // TCP
516 Ptr<TcpL4Protocol> tcp = CreateObject<TcpL4Protocol>();
517 node->AggregateObject(tcp);
518 // Traffic Control
519 Ptr<TrafficControlLayer> tc = CreateObject<TrafficControlLayer>();
520 node->AggregateObject(tc);
521 return node;
522}
523
526{
527 Ptr<SimpleNetDevice> dev = CreateObject<SimpleNetDevice>();
528 dev->SetAddress(Mac48Address::ConvertFrom(Mac48Address::Allocate()));
529 node->AddDevice(dev);
530 Ptr<Ipv6> ipv6 = node->GetObject<Ipv6>();
531 uint32_t ndid = ipv6->AddInterface(dev);
532 Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress(ipaddr, prefix);
533 ipv6->AddAddress(ndid, ipv6Addr);
534 ipv6->SetUp(ndid);
535 return dev;
536}
537
545{
546 public:
548 : TestSuite("tcp", UNIT)
549 {
550 // Arguments to these test cases are 1) totalStreamSize,
551 // 2) source write size, 3) source read size
552 // 4) server write size, and 5) server read size
553 // with units of bytes
554 AddTestCase(new TcpTestCase(13, 200, 200, 200, 200, false), TestCase::QUICK);
555 AddTestCase(new TcpTestCase(13, 1, 1, 1, 1, false), TestCase::QUICK);
556 AddTestCase(new TcpTestCase(100000, 100, 50, 100, 20, false), TestCase::QUICK);
557
558 AddTestCase(new TcpTestCase(13, 200, 200, 200, 200, true), TestCase::QUICK);
559 AddTestCase(new TcpTestCase(13, 1, 1, 1, 1, true), TestCase::QUICK);
560 AddTestCase(new TcpTestCase(100000, 100, 50, 100, 20, true), TestCase::QUICK);
561 }
562};
563
#define min(a, b)
Definition: 80211b.c:42
TCP Test - send string data from client to server and back.
Definition: tcp-test.cc:60
uint32_t m_serverReadSize
Server data size when receiving.
Definition: tcp-test.cc:154
uint8_t * m_sourceTxPayload
Client Tx payload.
Definition: tcp-test.cc:159
Ptr< SimpleNetDevice > AddSimpleNetDevice(Ptr< Node > node, const char *ipaddr, const char *netmask)
Add a SimpleNetDevice to a node (IPv4 version).
Definition: tcp-test.cc:381
bool m_useIpv6
Use IPv6 instead of IPv4.
Definition: tcp-test.cc:163
void ServerHandleSend(Ptr< Socket > sock, uint32_t available)
Server: Send data.
Definition: tcp-test.cc:290
uint32_t m_currentServerTxBytes
Server Rx bytes.
Definition: tcp-test.cc:158
void DoRun() override
Implementation to actually run this TestCase.
Definition: tcp-test.cc:213
uint32_t m_currentSourceTxBytes
Client Tx bytes.
Definition: tcp-test.cc:155
void ServerHandleRecv(Ptr< Socket > sock)
Server: Receive data.
Definition: tcp-test.cc:269
Ptr< SimpleNetDevice > AddSimpleNetDevice6(Ptr< Node > node, Ipv6Address ipaddr, Ipv6Prefix prefix)
Add a SimpleNetDevice to a node (IPv6 version).
Definition: tcp-test.cc:525
Ptr< Node > CreateInternetNode()
Create a node with the Internet stack (IPv4 version).
Definition: tcp-test.cc:350
Ptr< Node > CreateInternetNode6()
Create a node with the Internet stack (IPv6 version).
Definition: tcp-test.cc:495
void SourceHandleRecv(Ptr< Socket > sock)
Client: Receive data.
Definition: tcp-test.cc:326
void ServerHandleConnectionCreated(Ptr< Socket > s, const Address &addr)
Server: Handle connection created.
Definition: tcp-test.cc:262
TcpTestCase(uint32_t totalStreamSize, uint32_t sourceWriteSize, uint32_t sourceReadSize, uint32_t serverWriteSize, uint32_t serverReadSize, bool useIpv6)
Constructor.
Definition: tcp-test.cc:190
uint32_t m_currentSourceRxBytes
Client Rx bytes.
Definition: tcp-test.cc:156
uint32_t m_totalBytes
Total stream size (in bytes).
Definition: tcp-test.cc:150
uint32_t m_sourceReadSize
Client data size when receiving.
Definition: tcp-test.cc:152
void SetupDefaultSim6()
Setup the test (IPv6 version).
Definition: tcp-test.cc:445
uint8_t * m_sourceRxPayload
Client Rx payload.
Definition: tcp-test.cc:160
uint32_t m_serverWriteSize
Server data size when sending.
Definition: tcp-test.cc:153
void SourceHandleSend(Ptr< Socket > sock, uint32_t available)
Client: Send data.
Definition: tcp-test.cc:310
void SetupDefaultSim()
Setup the test (IPv4 version).
Definition: tcp-test.cc:395
uint32_t m_currentServerRxBytes
Server Tx bytes.
Definition: tcp-test.cc:157
uint8_t * m_serverRxPayload
Server Rx payload.
Definition: tcp-test.cc:161
uint32_t m_sourceWriteSize
Client data size when sending.
Definition: tcp-test.cc:151
void DoTeardown() override
Implementation to do any local setup required for this TestCase.
Definition: tcp-test.cc:253
TCP TestSuite - send string data from client to server and back.
Definition: tcp-test.cc:545
a polymophic address class
Definition: address.h:92
An Inet6 address class.
an Inet address class
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:79
a class to store IPv4 address information on an interface
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:258
Describes an IPv6 address.
Definition: ipv6-address.h:50
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:456
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:138
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition: object.h:471
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Definition: object.cc:259
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:863
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:400
virtual int Send(Ptr< Packet > p, uint32_t flags)=0
Send data (or dummy data) to the remote host.
virtual uint32_t GetRxAvailable() const =0
Return number of bytes which can be returned from one or multiple calls to Recv.
virtual int GetPeerName(Address &address) const =0
Get the peer address of a connected socket.
void SetSendCallback(Callback< void, Ptr< Socket >, uint32_t > sendCb)
Notify application when space in transmit buffer is added.
Definition: socket.cc:119
virtual int Connect(const Address &address)=0
Initiate a connection to a remote host.
void SetRecvCallback(Callback< void, Ptr< Socket > > receivedData)
Notify application when new data is available to be read.
Definition: socket.cc:126
static Ptr< Socket > CreateSocket(Ptr< Node > node, TypeId tid)
This method wraps the creation of sockets that is performed on a given node by a SocketFactory specif...
Definition: socket.cc:72
virtual enum Socket::SocketErrno GetErrno() const =0
Get last error number.
virtual Ptr< Packet > Recv(uint32_t maxSize, uint32_t flags)=0
Read data from the socket.
virtual int Close()=0
Close a socket.
virtual uint32_t GetTxAvailable() const =0
Returns the number of bytes which can be sent in a single call to Send.
API to create TCP socket instances.
encapsulates test code
Definition: test.h:1060
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:305
A suite of tests to run.
Definition: test.h:1256
@ UNIT
This test suite implements a Unit Test.
Definition: test.h:1265
uint16_t port
Definition: dsdv-manet.cc:45
Callback< R, Args... > MakeNullCallback()
Definition: callback.h:734
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:160
#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:251
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:691
channel
Definition: third.py:81
static TcpTestSuite g_tcpTestSuite
Static variable for test initialization.
Definition: tcp-test.cc:564
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:167
static std::string GetString(Ptr< Packet > p)
Definition: tcp-test.cc:183