A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
test-lte-epc-e2e-data.cc
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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  * Author: Nicola Baldo <nbaldo@cttc.es>
19  */
20 
21 
22 
23 #include "ns3/simulator.h"
24 #include "ns3/log.h"
25 #include "ns3/test.h"
26 #include "ns3/lte-helper.h"
27 #include "ns3/epc-helper.h"
28 #include "ns3/packet-sink-helper.h"
29 #include "ns3/udp-client-server-helper.h"
30 #include "ns3/udp-echo-helper.h"
31 #include "ns3/point-to-point-helper.h"
32 #include "ns3/internet-stack-helper.h"
33 #include "ns3/ipv4-address-helper.h"
34 #include "ns3/inet-socket-address.h"
35 #include "ns3/packet-sink.h"
36 #include <ns3/ipv4-static-routing-helper.h>
37 #include <ns3/ipv4-static-routing.h>
38 #include "ns3/boolean.h"
39 #include "ns3/uinteger.h"
40 #include "ns3/double.h"
41 #include "ns3/abort.h"
42 #include "ns3/mobility-helper.h"
43 
44 
45 
46 
47 namespace ns3 {
48 
49 
50 NS_LOG_COMPONENT_DEFINE ("LteEpcE2eData");
51 
52 
53 
55 {
56  BearerTestData (uint32_t n, uint32_t s, double i);
57 
58  uint32_t numPkts;
59  uint32_t pktSize;
60  Time interPacketInterval;
61 
62  Ptr<PacketSink> dlServerApp;
63  Ptr<Application> dlClientApp;
64 
65  Ptr<PacketSink> ulServerApp;
66  Ptr<Application> ulClientApp;
67 };
68 
69  BearerTestData::BearerTestData (uint32_t n, uint32_t s, double i)
70  : numPkts (n),
71  pktSize (s),
72  interPacketInterval (Seconds (i))
73 {
74 }
75 
76 struct UeTestData
77 {
78  std::vector<BearerTestData> bearers;
79 };
80 
82 {
83  std::vector<UeTestData> ues;
84 };
85 
86 
88 {
89 public:
90  LteEpcE2eDataTestCase (std::string name, std::vector<EnbTestData> v);
91  virtual ~LteEpcE2eDataTestCase ();
92 
93 private:
94  virtual void DoRun (void);
95  std::vector<EnbTestData> m_enbTestData;
96 };
97 
98 
99 LteEpcE2eDataTestCase::LteEpcE2eDataTestCase (std::string name, std::vector<EnbTestData> v)
100  : TestCase (name),
101  m_enbTestData (v)
102 {
103  NS_LOG_FUNCTION (this << name);
104 }
105 
106 LteEpcE2eDataTestCase::~LteEpcE2eDataTestCase ()
107 {
108 }
109 
110 void
112 {
113  NS_LOG_FUNCTION (this << GetName ());
114  Config::Reset ();
115  Config::SetDefault ("ns3::LteSpectrumPhy::CtrlErrorModelEnabled", BooleanValue (false));
116  Config::SetDefault ("ns3::LteSpectrumPhy::DataErrorModelEnabled", BooleanValue (false));
117  Config::SetDefault ("ns3::LteHelper::UseIdealRrc", BooleanValue (true));
118  Ptr<LteHelper> lteHelper = CreateObject<LteHelper> ();
119  Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
120  lteHelper->SetEpcHelper (epcHelper);
121 
122  lteHelper->SetAttribute("PathlossModel",
123  StringValue("ns3::FriisPropagationLossModel"));
124 
125  // allow jumbo frames on the S1-U link
126  epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000));
127 
128  Ptr<Node> pgw = epcHelper->GetPgwNode ();
129 
130  // Create a single RemoteHost
131  NodeContainer remoteHostContainer;
132  remoteHostContainer.Create (1);
133  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
134  InternetStackHelper internet;
135  internet.Install (remoteHostContainer);
136 
137  // Create the internet
138  PointToPointHelper p2ph;
139  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
140  p2ph.SetDeviceAttribute ("Mtu", UintegerValue (30000)); // jumbo frames here as well
141  p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.010)));
142  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
143  Ipv4AddressHelper ipv4h;
144  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
145  Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
146  Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
147 
148  // setup default gateway for the remote hosts
149  Ipv4StaticRoutingHelper ipv4RoutingHelper;
150  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
151 
152  // hardcoded UE addresses for now
153  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.255.0"), 1);
154 
155 
156  NodeContainer enbs;
157  enbs.Create (m_enbTestData.size ());
158  MobilityHelper enbMobility;
159  enbMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
160  enbMobility.SetPositionAllocator ("ns3::GridPositionAllocator",
161  "MinX", DoubleValue (0.0),
162  "MinY", DoubleValue (0.0),
163  "DeltaX", DoubleValue (10000.0),
164  "DeltaY", DoubleValue (10000.0),
165  "GridWidth", UintegerValue (3),
166  "LayoutType", StringValue ("RowFirst"));
167  enbMobility.Install (enbs);
168  NetDeviceContainer enbLteDevs = lteHelper->InstallEnbDevice (enbs);
169  NetDeviceContainer::Iterator enbLteDevIt = enbLteDevs.Begin ();
170 
171  uint16_t ulPort = 1000;
172 
173  for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin ();
174  enbit < m_enbTestData.end ();
175  ++enbit, ++enbLteDevIt)
176  {
177  NS_ABORT_IF (enbLteDevIt == enbLteDevs.End ());
178 
179 
180 
181  NodeContainer ues;
182  ues.Create (enbit->ues.size ());
183  Vector enbPosition = (*enbLteDevIt)->GetNode ()->GetObject<MobilityModel> ()->GetPosition ();
184  MobilityHelper ueMobility;
185  ueMobility.SetPositionAllocator ("ns3::UniformDiscPositionAllocator",
186  "X", DoubleValue (enbPosition.x),
187  "Y", DoubleValue (enbPosition.y),
188  "rho", DoubleValue (100.0));
189  ueMobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
190  ueMobility.Install (ues);
191  NetDeviceContainer ueLteDevs = lteHelper->InstallUeDevice (ues);
192 
193  // we install the IP stack on the UEs
194  InternetStackHelper internet;
195  internet.Install (ues);
196 
197  // assign IP address to UEs, and install applications
198  for (uint32_t u = 0; u < ues.GetN (); ++u)
199  {
200 
201  Ptr<Node> ue = ues.Get (u);
202  Ptr<NetDevice> ueLteDevice = ueLteDevs.Get (u);
203  Ipv4InterfaceContainer ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevice));
204  // set the default gateway for the UE
205  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ue->GetObject<Ipv4> ());
206  ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
207 
208 
209  // we can now attach the UE, which will also activate the default EPS bearer
210  lteHelper->Attach (ueLteDevice, *enbLteDevIt);
211 
212 
213  uint16_t dlPort = 2000;
214  for (uint32_t b = 0; b < enbit->ues.at (u).bearers.size (); ++b)
215  {
216  BearerTestData& bearerTestData = enbit->ues.at (u).bearers.at (b);
217 
218  { // Downlink
219  ++dlPort;
220  PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), dlPort));
221  ApplicationContainer apps = packetSinkHelper.Install (ue);
222  apps.Start (Seconds (0.04));
223  bearerTestData.dlServerApp = apps.Get (0)->GetObject<PacketSink> ();
224 
225  UdpEchoClientHelper client (ueIpIface.GetAddress (0), dlPort);
226  client.SetAttribute ("MaxPackets", UintegerValue (bearerTestData.numPkts));
227  client.SetAttribute ("Interval", TimeValue (bearerTestData.interPacketInterval));
228  client.SetAttribute ("PacketSize", UintegerValue (bearerTestData.pktSize));
229  apps = client.Install (remoteHost);
230  apps.Start (Seconds (0.04));
231  bearerTestData.dlClientApp = apps.Get (0);
232  }
233 
234  { // Uplink
235  ++ulPort;
236  PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory", InetSocketAddress (Ipv4Address::GetAny (), ulPort));
237  ApplicationContainer apps = packetSinkHelper.Install (remoteHost);
238  apps.Start (Seconds (0.8));
239  bearerTestData.ulServerApp = apps.Get (0)->GetObject<PacketSink> ();
240 
241  UdpEchoClientHelper client (remoteHostAddr, ulPort);
242  client.SetAttribute ("MaxPackets", UintegerValue (bearerTestData.numPkts));
243  client.SetAttribute ("Interval", TimeValue (bearerTestData.interPacketInterval));
244  client.SetAttribute ("PacketSize", UintegerValue (bearerTestData.pktSize));
245  apps = client.Install (ue);
246  apps.Start (Seconds (0.8));
247  bearerTestData.ulClientApp = apps.Get (0);
248  }
249 
250  EpsBearer epsBearer (EpsBearer::NGBR_VOICE_VIDEO_GAMING);
251 
252  Ptr<EpcTft> tft = Create<EpcTft> ();
254  dlpf.localPortStart = dlPort;
255  dlpf.localPortEnd = dlPort;
256  tft->Add (dlpf);
258  ulpf.remotePortStart = ulPort;
259  ulpf.remotePortEnd = ulPort;
260  tft->Add (ulpf);
261 
262  // all data will go over the dedicated bearer instead of the default EPS bearer
263  lteHelper->ActivateDedicatedEpsBearer (ueLteDevice, epsBearer, tft);
264  }
265  }
266 
267  }
268 
269  Config::Set ("/NodeList/*/DeviceList/*/LteEnbRrc/UeMap/*/RadioBearerMap/*/LteRlc/MaxTxBufferSize",
270  UintegerValue (2 * 1024 * 1024));
271  Config::Set ("/NodeList/*/DeviceList/*/LteUeRrc/RadioBearerMap/*/LteRlc/MaxTxBufferSize",
272  UintegerValue (2 * 1024 * 1024));
273 
274 
275  Time simulationTime = Seconds (2.0);
276 
277  double statsStartTime = 0.040; // need to allow for RRC connection establishment + SRS
278  lteHelper->EnablePdcpTraces ();
279 
280  lteHelper->GetPdcpStats ()->SetAttribute ("StartTime", TimeValue (Seconds (statsStartTime)));
281  lteHelper->GetPdcpStats ()->SetAttribute ("EpochDuration", TimeValue (simulationTime));
282 
283 
284  Simulator::Stop (simulationTime);
285  Simulator::Run ();
286 
287  uint64_t imsiCounter = 0;
288 
289  for (std::vector<EnbTestData>::iterator enbit = m_enbTestData.begin ();
290  enbit < m_enbTestData.end ();
291  ++enbit)
292  {
293  for (std::vector<UeTestData>::iterator ueit = enbit->ues.begin ();
294  ueit < enbit->ues.end ();
295  ++ueit)
296  {
297  uint64_t imsi = ++imsiCounter;
298  for (uint32_t b = 0; b < ueit->bearers.size (); ++b)
299  {
300  // LCID 0, 1, 2 are for SRBs
301  // LCID 3 is (at the moment) the Default EPS bearer, and is unused in this test program
302  uint8_t lcid = b+4;
303  uint32_t expectedPkts = ueit->bearers.at (b).numPkts;
304  uint32_t expectedBytes = (ueit->bearers.at (b).numPkts) * (ueit->bearers.at (b).pktSize);
305  uint32_t txPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlTxPackets (imsi, lcid);
306  uint32_t rxPktsPdcpDl = lteHelper->GetPdcpStats ()->GetDlRxPackets (imsi, lcid);
307  uint32_t txPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlTxPackets (imsi, lcid);
308  uint32_t rxPktsPdcpUl = lteHelper->GetPdcpStats ()->GetUlRxPackets (imsi, lcid);
309  uint32_t rxBytesDl = ueit->bearers.at (b).dlServerApp->GetTotalRx ();
310  uint32_t rxBytesUl = ueit->bearers.at (b).ulServerApp->GetTotalRx ();
311 
312 
313  NS_TEST_ASSERT_MSG_EQ (txPktsPdcpDl,
314  expectedPkts,
315  "wrong TX PDCP packets in downlink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
316 
317  NS_TEST_ASSERT_MSG_EQ (rxPktsPdcpDl,
318  expectedPkts,
319  "wrong RX PDCP packets in downlink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
320  NS_TEST_ASSERT_MSG_EQ (txPktsPdcpUl,
321  expectedPkts,
322  "wrong TX PDCP packets in uplink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
323  NS_TEST_ASSERT_MSG_EQ (rxPktsPdcpUl,
324  expectedPkts,
325  "wrong RX PDCP packets in uplink for IMSI=" << imsi << " LCID=" << (uint16_t) lcid);
326 
327  NS_TEST_ASSERT_MSG_EQ (rxBytesDl,
328  expectedBytes,
329  "wrong total received bytes in downlink");
330  NS_TEST_ASSERT_MSG_EQ (rxBytesUl,
331  expectedBytes,
332  "wrong total received bytes in uplink");
333  }
334  }
335  }
336 
338 }
339 
340 
341 
342 
343 
348 {
349 public:
351 
352 } g_lteEpcE2eDataTestSuite;
353 
354 LteEpcE2eDataTestSuite::LteEpcE2eDataTestSuite ()
355  : TestSuite ("lte-epc-e2e-data", SYSTEM)
356 {
357  std::vector<EnbTestData> v1;
358  EnbTestData e1;
359  UeTestData u1;
360  BearerTestData f1 (1, 100, 0.01);
361  u1.bearers.push_back (f1);
362  e1.ues.push_back (u1);
363  v1.push_back (e1);
364  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE", v1), TestCase::QUICK);
365 
366  std::vector<EnbTestData> v2;
367  EnbTestData e2;
368  UeTestData u2_1;
369  BearerTestData f2_1 (1, 100, 0.01);
370  u2_1.bearers.push_back (f2_1);
371  e2.ues.push_back (u2_1);
372  UeTestData u2_2;
373  BearerTestData f2_2 (2, 200, 0.01);
374  u2_2.bearers.push_back (f2_2);
375  e2.ues.push_back (u2_2);
376  v2.push_back (e2);
377  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 2UEs", v2), TestCase::EXTENSIVE);
378 
379  std::vector<EnbTestData> v3;
380  v3.push_back (e1);
381  v3.push_back (e2);
383 
384  EnbTestData e4;
385  UeTestData u4_1;
386  BearerTestData f4_1 (3, 50, 0.01);
387  u4_1.bearers.push_back (f4_1);
388  e4.ues.push_back (u4_1);
389  UeTestData u4_2;
390  BearerTestData f4_2 (5, 1400, 0.01);
391  u4_2.bearers.push_back (f4_2);
392  e4.ues.push_back (u4_2);
393  UeTestData u4_3;
394  BearerTestData f4_3 (1, 12, 0.01);
395  u4_3.bearers.push_back (f4_3);
396  e4.ues.push_back (u4_3);
397  std::vector<EnbTestData> v4;
398  v4.push_back (e4);
399  v4.push_back (e1);
400  v4.push_back (e2);
402 
403  EnbTestData e5;
404  UeTestData u5;
405  BearerTestData f5 (5, 1000, 0.01);
406  u5.bearers.push_back (f5);
407  e5.ues.push_back (u5);
408  std::vector<EnbTestData> v5;
409  v5.push_back (e5);
410  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with 1000 byte packets", v5), TestCase::EXTENSIVE);
411 
412 
413  EnbTestData e6;
414  UeTestData u6;
415  BearerTestData f6 (5, 1400, 0.01);
416  u6.bearers.push_back (f6);
417  e6.ues.push_back (u6);
418  std::vector<EnbTestData> v6;
419  v6.push_back (e6);
420  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with 1400 byte packets", v6), TestCase::EXTENSIVE);
421 
422  EnbTestData e7;
423  UeTestData u7;
424  BearerTestData f7_1 (1, 1400, 0.01);
425  u7.bearers.push_back (f7_1);
426  BearerTestData f7_2 (1, 100, 0.01);
427  u7.bearers.push_back (f7_2);
428  e7.ues.push_back (u7);
429  std::vector<EnbTestData> v7;
430  v7.push_back (e7);
431  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with 2 bearers", v7), TestCase::EXTENSIVE);
432 
433  EnbTestData e8;
434  UeTestData u8;
435  BearerTestData f8 (100, 15000, 0.001);
436  u8.bearers.push_back (f8);
437  e8.ues.push_back (u8);
438  std::vector<EnbTestData> v8;
439  v8.push_back (e8);
440  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with fragmentation", v8), TestCase::EXTENSIVE);
441 
442 
443  EnbTestData e9;
444  UeTestData u9;
445  BearerTestData f9 (1000, 20, 0.0001);
446  u9.bearers.push_back (f9);
447  e9.ues.push_back (u9);
448  std::vector<EnbTestData> v9;
449  v9.push_back (e9);
450  AddTestCase (new LteEpcE2eDataTestCase ("1 eNB, 1UE with aggregation", v9), TestCase::EXTENSIVE);
451 
452 
453 }
454 
455 
456 
457 } // namespace ns3
458 
holds a vector of ns3::Application pointers.
double x
Definition: vector.h:49
Iterator Begin(void) const
Get an iterator which refers to the first NetDevice in the container.
keep track of time unit.
Definition: nstime.h:149
an Inet address class
static Ipv4Address GetAny(void)
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:311
Hold a bool native type.
Definition: boolean.h:38
holds a vector of std::pair of Ptr<Ipv4> and interface index.
void Reset(void)
Definition: config.cc:642
hold variables of type string
Definition: string.h:19
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
NetDeviceContainer Install(NodeContainer c)
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:210
A suite of tests to run.
Definition: test.h:962
create an application which sends a udp packet and waits for an echo of this packet ...
static void Run(void)
Definition: simulator.cc:157
#define NS_LOG_COMPONENT_DEFINE(name)
Definition: log.h:122
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
Build a set of PointToPointNetDevice objects.
void Set(std::string path, const AttributeValue &value)
Definition: config.cc:662
encapsulates test code
Definition: test.h:834
void SetDeviceAttribute(std::string name, const AttributeValue &value)
a 3d vector
Definition: vector.h:31
Class for representing data rates.
Definition: data-rate.h:71
Keep track of the current position and velocity of an object.
void Install(Ptr< Node > node) const
"Layout" a single node according to the current position allocator type.
hold objects of type ns3::Time
Definition: nstime.h:700
virtual void DoRun(void)
Implementation to actually run this test case.
Hold an unsigned integer type.
Definition: uinteger.h:46
Fast test.
Definition: test.h:843
holds a vector of ns3::NetDevice pointers
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter...
static void Destroy(void)
Definition: simulator.cc:121
#define NS_ABORT_IF(cond)
Abnormal program termination if cond is true.
Definition: abort.h:69
Access to the Ipv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:75
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:667
keep track of a set of node pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
void SetMobilityModel(std::string type, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue(), std::string n6="", const AttributeValue &v6=EmptyAttributeValue(), std::string n7="", const AttributeValue &v7=EmptyAttributeValue(), std::string n8="", const AttributeValue &v8=EmptyAttributeValue(), std::string n9="", const AttributeValue &v9=EmptyAttributeValue())
void Install(std::string nodeName) const
double y
Definition: vector.h:53
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual test case to this test suite.
Definition: test.cc:172
void SetChannelAttribute(std::string name, const AttributeValue &value)
Helper class used to assign positions and mobility models to nodes.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Time Seconds(double seconds)
create ns3::Time instances in units of seconds.
Definition: nstime.h:586
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Helper class that adds ns3::Ipv4StaticRouting objects.
hold objects of type ns3::DataRate
static void Stop(void)
Definition: simulator.cc:164
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
ApplicationContainer Install(NodeContainer c) const
std::string GetName(void) const
Definition: test.cc:241
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
void SetAttribute(std::string name, const AttributeValue &value)
Receive and consume traffic generated to an IP address and port.
Definition: packet-sink.h:68
void SetPositionAllocator(Ptr< PositionAllocator > allocator)
Iterator End(void) const
Get an iterator which indicates past-the-last NetDevice in the container.
Hold an floating point type.
Definition: double.h:41
Ptr< T > GetObject(void) const
Definition: object.h:332
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const