A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv4-raw-test.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 Hajime Tazaki
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Hajime Tazaki <tazaki@sfc.wide.ad.jp>
7 */
8/*
9 * This is the test code for ipv4-raw-socket-impl.cc.
10 */
11
12#include "ns3/arp-l3-protocol.h"
13#include "ns3/boolean.h"
14#include "ns3/core-module.h"
15#include "ns3/error-model.h"
16#include "ns3/icmpv4-l4-protocol.h"
17#include "ns3/inet-socket-address.h"
18#include "ns3/internet-stack-helper.h"
19#include "ns3/ipv4-address-helper.h"
20#include "ns3/ipv4-global-routing-helper.h"
21#include "ns3/ipv4-l3-protocol.h"
22#include "ns3/ipv4-list-routing.h"
23#include "ns3/ipv4-raw-socket-factory.h"
24#include "ns3/ipv4-static-routing.h"
25#include "ns3/log.h"
26#include "ns3/node.h"
27#include "ns3/simple-channel.h"
28#include "ns3/simple-net-device-helper.h"
29#include "ns3/simple-net-device.h"
30#include "ns3/simulator.h"
31#include "ns3/socket-factory.h"
32#include "ns3/socket.h"
33#include "ns3/test.h"
34#ifdef __WIN32__
35#include "ns3/win32-internet.h"
36#else
37#include <netinet/in.h>
38#include <sys/socket.h>
39#endif
40
41#include <limits>
42#include <string>
43#include <sys/types.h>
44
45using namespace ns3;
46
47NS_LOG_COMPONENT_DEFINE("ipv4-raw-fragmentation-test");
48
49/**
50 * @ingroup internet-test
51 *
52 * @brief IPv4 Raw Socket Fragmentation Test
53 * Configuration : Two sockets. 1 sender, 1 receiver
54 * Sender socket sends packets in two epochs.
55 * In the first epoch, it sends payload of sizes {500, 1000, 5000, 10000,
56 * 20000, 40000, 60000}.
57 * In the second epoch, it sends payload of sizes {5000, 10000, 20000,
58 * 40000, 60000}. These are payloads of size greater than the MTU of
59 * the link.
60 * In the first epoch, there is no loss model.
61 * In the second epoch, the second fragment of the packet sent is dropped.
62 *
63 * Expected behaviour: In the first epoch: Receiver should receive only 1 packet and the size of
64 * the payload received should be equal to the size of the payload sent.
65 * No packets should have been dropped.
66 * In the second epoch: Receiver should not receive any packet. Only 1 packet
67 * should have been dropped at the physical layer.
68 */
70{
71 public:
73 void DoRun() override;
74
75 private:
76 /**
77 * @brief Send data to the receiver
78 * @param s The sending socket.
79 * @param sz Size of the packet.
80 */
82
83 /**
84 * @brief Receive callback
85 * @param s The receiving socket.
86 */
87 void RxCallback(Ptr<Socket> s);
88
89 /**
90 * @brief Packet dropped callback at Phy Rx.
91 * @param p Dropped packet.
92 */
94
95 uint32_t m_rxCount{0}; //!< Received packet count
96 uint32_t m_rxPayloadSize{0}; //!< Received packet size
97 uint32_t m_droppedFragments{0}; //!< Number of dropped fragments
98};
99
101 : TestCase("IPv4 raw fragmentation, fragment‑loss test")
102{
103}
104
105void
107{
108 Ptr<Packet> p = s->Recv();
109 Ipv4Header h;
110 if (p->PeekHeader(h))
111 {
112 p->RemoveHeader(h);
113 }
114 m_rxCount++;
115 m_rxPayloadSize = p->GetSize();
116 NS_LOG_DEBUG("Receiver got " << m_rxPayloadSize << " bytes");
117}
118
119void
124
125void
127{
128 Address realTo = InetSocketAddress(Ipv4Address("10.0.1.1"), 0);
129 Ptr<Packet> p = Create<Packet>(size);
130 socket->SendTo(p, 0, realTo);
131 NS_LOG_DEBUG("Sender sent " << p->GetSize() << " bytes to 10.0.1.1");
132}
133
134void
136{
137 Ptr<Node> rxNode = CreateObject<Node>();
138 Ptr<Node> txNode = CreateObject<Node>();
139
140 NodeContainer nodes(rxNode, txNode);
141
142 SimpleNetDeviceHelper helperChannel;
143 helperChannel.SetNetDevicePointToPointMode(true);
144 NetDeviceContainer net = helperChannel.Install(nodes);
145
146 net.Get(1)->SetMtu(1000);
147
148 InternetStackHelper internet;
149 internet.Install(nodes);
150
151 Ptr<Ipv4> ipv4;
152 uint32_t netdev_idx;
153 Ipv4InterfaceAddress ipv4Addr;
154
155 ipv4 = rxNode->GetObject<Ipv4>();
156 netdev_idx = ipv4->AddInterface(net.Get(0));
157 ipv4Addr = Ipv4InterfaceAddress(Ipv4Address("10.0.1.1"), Ipv4Mask(0xffff0000U));
158 ipv4->AddAddress(netdev_idx, ipv4Addr);
159 ipv4->SetUp(netdev_idx);
160
161 ipv4 = txNode->GetObject<Ipv4>();
162 netdev_idx = ipv4->AddInterface(net.Get(1));
163 ipv4Addr = Ipv4InterfaceAddress(Ipv4Address("10.0.1.2"), Ipv4Mask(0xffff0000U));
164 ipv4->AddAddress(netdev_idx, ipv4Addr);
165 ipv4->SetUp(netdev_idx);
166
167 net.Get(0)->TraceConnectWithoutContext(
168 "PhyRxDrop",
170
171 Ptr<SocketFactory> rxSocketFactory = rxNode->GetObject<Ipv4RawSocketFactory>();
172 Ptr<Socket> rxSocket = rxSocketFactory->CreateSocket();
173 rxSocket->Bind(InetSocketAddress(Ipv4Address::GetAny(), 0));
174 rxSocket->SetRecvCallback(MakeCallback(&Ipv4RawFragmentationTest::RxCallback, this));
175
176 Ptr<SocketFactory> txSocketFactory = txNode->GetObject<Ipv4RawSocketFactory>();
177 Ptr<Socket> txSocket = txSocketFactory->CreateSocket();
178
179 // Contains both Fragmentable and Non-fragmentable payload sizes
180 std::vector<uint32_t> payloadSizes = {500, 1000, 5000, 10000, 20000, 40000, 60000};
181
182 for (auto sentPayloadSize : payloadSizes)
183 {
184 m_rxCount = 0;
186 m_rxPayloadSize = 0;
189 this,
190 txSocket,
191 sentPayloadSize);
193
194 NS_TEST_EXPECT_MSG_EQ(m_rxCount, 1, "Packet should be reassembled and be delivered");
196 sentPayloadSize,
197 "Reassembled payload size must match the payload size sent");
198 NS_TEST_EXPECT_MSG_EQ(m_droppedFragments, 0, "No fragment must have been dropped");
199 }
200
201 std::vector<uint32_t> fragmentablePayloadSizes = {5000, 10000, 20000, 40000, 60000};
202
203 for (auto sentPayloadSize : fragmentablePayloadSizes)
204 {
205 m_rxCount = 0;
208 errModel->SetList({1});
209
210 net.Get(0)->SetAttribute("ReceiveErrorModel", PointerValue(errModel));
211
214 this,
215 txSocket,
216 sentPayloadSize);
218
219 NS_TEST_EXPECT_MSG_EQ(m_rxCount, 0, "Packet must not have been delivered");
220
221 NS_TEST_EXPECT_MSG_EQ(m_droppedFragments, 1, "One fragment must have been dropped");
222 }
224}
225
226/**
227 * @ingroup internet-test
228 *
229 * @brief IPv4 RAW Socket Test
230 */
232{
233 Ptr<Packet> m_receivedPacket; //!< Received packet (1).
234 Ptr<Packet> m_receivedPacket2; //!< Received packet (2).
235
236 /**
237 * @brief Send data.
238 * @param socket The sending socket.
239 * @param to Destination address.
240 */
241 void DoSendData(Ptr<Socket> socket, std::string to);
242 /**
243 * @brief Send data.
244 * @param socket The sending socket.
245 * @param to Destination address.
246 */
247 void SendData(Ptr<Socket> socket, std::string to);
248 /**
249 * @brief Send data.
250 * @param socket The sending socket.
251 * @param to Destination address.
252 */
253 void DoSendData_IpHdr(Ptr<Socket> socket, std::string to);
254 /**
255 * @brief Send data.
256 * @param socket The sending socket.
257 * @param to Destination address.
258 */
259 void SendData_IpHdr(Ptr<Socket> socket, std::string to);
260
261 public:
262 void DoRun() override;
264
265 /**
266 * @brief Receive data.
267 * @param socket The receiving socket.
268 * @param packet The received packet.
269 * @param from The sender.
270 */
271 void ReceivePacket(Ptr<Socket> socket, Ptr<Packet> packet, const Address& from);
272 /**
273 * @brief Receive data.
274 * @param socket The receiving socket.
275 * @param packet The received packet.
276 * @param from The sender.
277 */
278 void ReceivePacket2(Ptr<Socket> socket, Ptr<Packet> packet, const Address& from);
279 /**
280 * @brief Receive data.
281 * @param socket The receiving socket.
282 */
283 void ReceivePkt(Ptr<Socket> socket);
284 /**
285 * @brief Receive data.
286 * @param socket The receiving socket.
287 */
288 void ReceivePkt2(Ptr<Socket> socket);
289};
290
292 : TestCase("IPv4 Raw socket implementation")
293{
294}
295
296void
298{
299 m_receivedPacket = packet;
300}
301
302void
304{
305 m_receivedPacket2 = packet;
306}
307
308void
310{
311 uint32_t availableData;
312 availableData = socket->GetRxAvailable();
313 m_receivedPacket = socket->Recv(2, MSG_PEEK);
314 NS_TEST_ASSERT_MSG_EQ(m_receivedPacket->GetSize(), 2, "ReceivedPacket size is not equal to 2");
315 m_receivedPacket = socket->Recv(std::numeric_limits<uint32_t>::max(), 0);
316 NS_TEST_ASSERT_MSG_EQ(availableData,
317 m_receivedPacket->GetSize(),
318 "Received packet size is not equal to Rx buffer size");
319}
320
321void
323{
324 uint32_t availableData;
325 availableData = socket->GetRxAvailable();
326 m_receivedPacket2 = socket->Recv(2, MSG_PEEK);
327 NS_TEST_ASSERT_MSG_EQ(m_receivedPacket2->GetSize(), 2, "ReceivedPacket size is not equal to 2");
328 m_receivedPacket2 = socket->Recv(std::numeric_limits<uint32_t>::max(), 0);
329 NS_TEST_ASSERT_MSG_EQ(availableData,
330 m_receivedPacket2->GetSize(),
331 "Received packet size is not equal to Rx buffer size");
332}
333
334void
336{
337 Address realTo = InetSocketAddress(Ipv4Address(to.c_str()), 0);
338 NS_TEST_EXPECT_MSG_EQ(socket->SendTo(Create<Packet>(123), 0, realTo), 123, to);
339}
340
341void
343{
346 Simulator::ScheduleWithContext(socket->GetNode()->GetId(),
347 Seconds(0),
349 this,
350 socket,
351 to);
353}
354
355void
357{
358 Address realTo = InetSocketAddress(Ipv4Address(to.c_str()), 0);
359 socket->SetAttribute("IpHeaderInclude", BooleanValue(true));
361 Ipv4Header ipHeader;
362 ipHeader.SetSource(Ipv4Address("10.0.0.2"));
363 ipHeader.SetDestination(Ipv4Address(to.c_str()));
364 ipHeader.SetProtocol(0);
365 ipHeader.SetPayloadSize(p->GetSize());
366 ipHeader.SetTtl(255);
367 p->AddHeader(ipHeader);
368
369 NS_TEST_EXPECT_MSG_EQ(socket->SendTo(p, 0, realTo), 143, to);
370 socket->SetAttribute("IpHeaderInclude", BooleanValue(false));
371}
372
373void
375{
378 Simulator::ScheduleWithContext(socket->GetNode()->GetId(),
379 Seconds(0),
381 this,
382 socket,
383 to);
385}
386
387void
389{
390 // Create topology
391
392 // Receiver Node
393 Ptr<Node> rxNode = CreateObject<Node>();
394 // Sender Node
395 Ptr<Node> txNode = CreateObject<Node>();
396
397 NodeContainer nodes(rxNode, txNode);
398
399 SimpleNetDeviceHelper helperChannel1;
400 helperChannel1.SetNetDevicePointToPointMode(true);
401 NetDeviceContainer net1 = helperChannel1.Install(nodes);
402
403 SimpleNetDeviceHelper helperChannel2;
404 helperChannel2.SetNetDevicePointToPointMode(true);
405 NetDeviceContainer net2 = helperChannel2.Install(nodes);
406
407 InternetStackHelper internet;
408 internet.Install(nodes);
409
410 Ptr<Ipv4> ipv4;
411 uint32_t netdev_idx;
412 Ipv4InterfaceAddress ipv4Addr;
413
414 // Receiver Node
415 ipv4 = rxNode->GetObject<Ipv4>();
416 netdev_idx = ipv4->AddInterface(net1.Get(0));
417 ipv4Addr = Ipv4InterfaceAddress(Ipv4Address("10.0.0.1"), Ipv4Mask(0xffff0000U));
418 ipv4->AddAddress(netdev_idx, ipv4Addr);
419 ipv4->SetUp(netdev_idx);
420
421 netdev_idx = ipv4->AddInterface(net2.Get(0));
422 ipv4Addr = Ipv4InterfaceAddress(Ipv4Address("10.0.1.1"), Ipv4Mask(0xffff0000U));
423 ipv4->AddAddress(netdev_idx, ipv4Addr);
424 ipv4->SetUp(netdev_idx);
425
426 // Sender Node
427 ipv4 = txNode->GetObject<Ipv4>();
428 netdev_idx = ipv4->AddInterface(net1.Get(1));
429 ipv4Addr = Ipv4InterfaceAddress(Ipv4Address("10.0.0.2"), Ipv4Mask(0xffff0000U));
430 ipv4->AddAddress(netdev_idx, ipv4Addr);
431 ipv4->SetUp(netdev_idx);
432
433 netdev_idx = ipv4->AddInterface(net2.Get(1));
434 ipv4Addr = Ipv4InterfaceAddress(Ipv4Address("10.0.1.2"), Ipv4Mask(0xffff0000U));
435 ipv4->AddAddress(netdev_idx, ipv4Addr);
436 ipv4->SetUp(netdev_idx);
437
438 // Create the IPv4 Raw sockets
439 Ptr<SocketFactory> rxSocketFactory = rxNode->GetObject<Ipv4RawSocketFactory>();
440 Ptr<Socket> rxSocket = rxSocketFactory->CreateSocket();
441 NS_TEST_EXPECT_MSG_EQ(rxSocket->Bind(InetSocketAddress(Ipv4Address("0.0.0.0"), 0)),
442 0,
443 "trivial");
444 rxSocket->SetRecvCallback(MakeCallback(&Ipv4RawSocketImplTest::ReceivePkt, this));
445
446 Ptr<Socket> rxSocket2 = rxSocketFactory->CreateSocket();
447 rxSocket2->SetRecvCallback(MakeCallback(&Ipv4RawSocketImplTest::ReceivePkt2, this));
448 NS_TEST_EXPECT_MSG_EQ(rxSocket2->Bind(InetSocketAddress(Ipv4Address("10.0.1.1"), 0)),
449 0,
450 "trivial");
451
452 Ptr<SocketFactory> txSocketFactory = txNode->GetObject<Ipv4RawSocketFactory>();
453 Ptr<Socket> txSocket = txSocketFactory->CreateSocket();
454
455 // ------ Now the tests ------------
456
457 // Unicast test
458 SendData(txSocket, "10.0.0.1");
459 NS_TEST_EXPECT_MSG_EQ(m_receivedPacket->GetSize(), 143, "recv: 10.0.0.1");
461 0,
462 "second interface should not receive it");
463
464 m_receivedPacket->RemoveAllByteTags();
465 m_receivedPacket2->RemoveAllByteTags();
466
467 // Unicast w/ header test
468 SendData_IpHdr(txSocket, "10.0.0.1");
469 NS_TEST_EXPECT_MSG_EQ(m_receivedPacket->GetSize(), 143, "recv(hdrincl): 10.0.0.1");
471 0,
472 "second interface should not receive it");
473
474 m_receivedPacket->RemoveAllByteTags();
475 m_receivedPacket2->RemoveAllByteTags();
476
477#if 0
478 // Simple broadcast test
479
480 SendData (txSocket, "255.255.255.255");
481 NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 143, "recv: 255.255.255.255");
482 NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 0, "second socket should not receive it (it is bound specifically to the second interface's address");
483
484 m_receivedPacket->RemoveAllByteTags ();
485 m_receivedPacket2->RemoveAllByteTags ();
486#endif
487
488 // Simple Link-local multicast test
489
490 txSocket->Bind(InetSocketAddress(Ipv4Address("10.0.0.2"), 0));
491 SendData(txSocket, "224.0.0.9");
492 NS_TEST_EXPECT_MSG_EQ(m_receivedPacket->GetSize(), 143, "recv: 224.0.0.9");
494 0,
495 "second socket should not receive it (it is bound specifically to the "
496 "second interface's address");
497
498 m_receivedPacket->RemoveAllByteTags();
499 m_receivedPacket2->RemoveAllByteTags();
500
501#if 0
502 // Broadcast test with multiple receiving sockets
503
504 // When receiving broadcast packets, all sockets sockets bound to
505 // the address/port should receive a copy of the same packet -- if
506 // the socket address matches.
507 rxSocket2->Dispose ();
508 rxSocket2 = rxSocketFactory->CreateSocket ();
509 rxSocket2->SetRecvCallback (MakeCallback (&Ipv4RawSocketImplTest::ReceivePkt2, this));
510 NS_TEST_EXPECT_MSG_EQ (rxSocket2->Bind (InetSocketAddress (Ipv4Address ("0.0.0.0"), 0)), 0, "trivial");
511
512 SendData (txSocket, "255.255.255.255");
513 NS_TEST_EXPECT_MSG_EQ (m_receivedPacket->GetSize (), 143, "recv: 255.255.255.255");
514 NS_TEST_EXPECT_MSG_EQ (m_receivedPacket2->GetSize (), 143, "recv: 255.255.255.255");
515#endif
516
517 m_receivedPacket = nullptr;
518 m_receivedPacket2 = nullptr;
519
520 // Simple getpeername tests
521
522 Address peerAddress;
523 int err = txSocket->GetPeerName(peerAddress);
524 NS_TEST_EXPECT_MSG_EQ(err, -1, "socket GetPeerName() should fail when socket is not connected");
525 NS_TEST_EXPECT_MSG_EQ(txSocket->GetErrno(),
527 "socket error code should be ERROR_NOTCONN");
528
529 InetSocketAddress peer("10.0.0.1", 1234);
530 err = txSocket->Connect(peer);
531 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket Connect() should succeed");
532
533 err = txSocket->GetPeerName(peerAddress);
534 NS_TEST_EXPECT_MSG_EQ(err, 0, "socket GetPeerName() should succeed when socket is connected");
535 peer.SetPort(0);
536 NS_TEST_EXPECT_MSG_EQ(peerAddress,
537 peer,
538 "address from socket GetPeerName() should equal the connected address");
539
541}
542
543/**
544 * @ingroup internet-test
545 *
546 * @brief IPv4 RAW Socket TestSuite
547 */
558
559static Ipv4RawTestSuite g_ipv4rawTestSuite; //!< Static variable for test initialization
IPv4 Raw Socket Fragmentation Test Configuration : Two sockets.
uint32_t m_droppedFragments
Number of dropped fragments.
void DoRun() override
Implementation to actually run this TestCase.
void RxCallback(Ptr< Socket > s)
Receive callback.
uint32_t m_rxCount
Received packet count.
uint32_t m_rxPayloadSize
Received packet size.
void SendPacket(Ptr< Socket > s, uint32_t sz)
Send data to the receiver.
void PhyRxDropCallback(Ptr< const Packet > p)
Packet dropped callback at Phy Rx.
IPv4 RAW Socket Test.
void SendData_IpHdr(Ptr< Socket > socket, std::string to)
Send data.
void ReceivePkt(Ptr< Socket > socket)
Receive data.
Ptr< Packet > m_receivedPacket
Received packet (1).
void DoRun() override
Implementation to actually run this TestCase.
Ptr< Packet > m_receivedPacket2
Received packet (2).
void SendData(Ptr< Socket > socket, std::string to)
Send data.
void DoSendData(Ptr< Socket > socket, std::string to)
Send data.
void DoSendData_IpHdr(Ptr< Socket > socket, std::string to)
Send data.
void ReceivePacket2(Ptr< Socket > socket, Ptr< Packet > packet, const Address &from)
Receive data.
void ReceivePkt2(Ptr< Socket > socket)
Receive data.
void ReceivePacket(Ptr< Socket > socket, Ptr< Packet > packet, const Address &from)
Receive data.
IPv4 RAW Socket TestSuite.
a polymophic address class
Definition address.h:90
AttributeValue implementation for Boolean.
Definition boolean.h:26
an Inet address class
void SetPort(uint16_t port)
aggregate IP/TCP/UDP functionality to existing Nodes.
Ipv4 addresses are stored in host order in this class.
static Ipv4Address GetAny()
Packet header for IPv4.
Definition ipv4-header.h:23
void SetDestination(Ipv4Address destination)
void SetPayloadSize(uint16_t size)
void SetTtl(uint8_t ttl)
void SetProtocol(uint8_t num)
void SetSource(Ipv4Address source)
Access to the IPv4 forwarding table, interfaces, and configuration.
Definition ipv4.h:69
a class to store IPv4 address information on an interface
a class to represent an Ipv4 address mask
API to create RAW socket instances.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
AttributeValue implementation for Pointer.
Definition pointer.h:37
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:67
build a set of SimpleNetDevice objects
void SetNetDevicePointToPointMode(bool pointToPointMode)
SimpleNetDevice is Broadcast capable and ARP needing.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:561
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:131
static void ScheduleWithContext(uint32_t context, const Time &delay, FUNC f, Ts &&... args)
Schedule an event with the given context.
Definition simulator.h:578
static void Run()
Run the simulation.
Definition simulator.cc:167
@ ERROR_NOTCONN
Definition socket.h:76
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition test.cc:292
@ QUICK
Fast test.
Definition test.h:1054
TestCase(const TestCase &)=delete
Type
Type of test.
Definition test.h:1257
@ UNIT
This test suite implements a Unit Test.
Definition test.h:1259
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
Definition test.cc:490
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition log.h:257
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:439
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition test.h:133
#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:240
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1369
static Ipv4RawTestSuite g_ipv4rawTestSuite
Static variable for test initialization.
NodeContainer nodes
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:684