A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
epc-test-s1u-uplink.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007,2008,2009 INRIA, UDCAST
4  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
5  *
6  * 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
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * The original version of UdpClient is by Amine Ismail
20  * <amine.ismail@sophia.inria.fr> <amine.ismail@udcast.com>
21  * The rest of the code (including modifying UdpClient into
22  * EpsBearerTagUdpClient) is by Nicola Baldo <nbaldo@cttc.es>
23  */
24 
25 
26 
27 #include "ns3/simulator.h"
28 #include "ns3/log.h"
29 #include "ns3/test.h"
30 #include "ns3/point-to-point-epc-helper.h"
31 #include "ns3/epc-enb-application.h"
32 #include "ns3/packet-sink-helper.h"
33 #include "ns3/point-to-point-helper.h"
34 #include "ns3/csma-helper.h"
35 #include "ns3/internet-stack-helper.h"
36 #include "ns3/ipv4-address-helper.h"
37 #include "ns3/inet-socket-address.h"
38 #include "ns3/packet-sink.h"
39 #include <ns3/ipv4-static-routing-helper.h>
40 #include <ns3/ipv4-static-routing.h>
41 #include <ns3/ipv4-interface.h>
42 #include <ns3/mac48-address.h>
43 #include "ns3/seq-ts-header.h"
44 #include "ns3/eps-bearer-tag.h"
45 #include "ns3/arp-cache.h"
46 #include "ns3/boolean.h"
47 #include "ns3/uinteger.h"
48 #include "ns3/config.h"
49 #include "lte-test-entities.h"
50 
51 namespace ns3 {
52 
53 
54 
55 NS_LOG_COMPONENT_DEFINE ("EpcTestS1uUplink")
56  ;
57 
58 /*
59  * A Udp client. Sends UDP packet carrying sequence number and time
60  * stamp but also including the EpsBearerTag. This tag is normally
61  * generated by the LteEnbNetDevice when forwarding packet in the
62  * uplink. But in this test we don't have the LteEnbNetDevice, because
63  * we test the S1-U interface with simpler devices to make sure it
64  * just works.
65  *
66  */
68 {
69 public:
70  static TypeId
71  GetTypeId (void);
72 
74  EpsBearerTagUdpClient (uint16_t rnti, uint8_t bid);
75 
76  virtual ~EpsBearerTagUdpClient ();
77 
83  void SetRemote (Ipv4Address ip, uint16_t port);
84 
85 protected:
86  virtual void DoDispose (void);
87 
88 private:
89 
90  virtual void StartApplication (void);
91  virtual void StopApplication (void);
92 
93  void ScheduleTransmit (Time dt);
94  void Send (void);
95 
96  uint32_t m_count;
98  uint32_t m_size;
99 
100  uint32_t m_sent;
103  uint16_t m_peerPort;
105 
106  uint16_t m_rnti;
107  uint8_t m_bid;
108 
109 };
110 
111 
112 
113 TypeId
115 {
116  static TypeId tid = TypeId ("ns3::EpsBearerTagUdpClient")
118  .AddConstructor<EpsBearerTagUdpClient> ()
119  .AddAttribute ("MaxPackets",
120  "The maximum number of packets the application will send",
121  UintegerValue (100),
122  MakeUintegerAccessor (&EpsBearerTagUdpClient::m_count),
123  MakeUintegerChecker<uint32_t> ())
124  .AddAttribute ("Interval",
125  "The time to wait between packets", TimeValue (Seconds (1.0)),
126  MakeTimeAccessor (&EpsBearerTagUdpClient::m_interval),
127  MakeTimeChecker ())
128  .AddAttribute (
129  "RemoteAddress",
130  "The destination Ipv4Address of the outbound packets",
131  Ipv4AddressValue (),
132  MakeIpv4AddressAccessor (&EpsBearerTagUdpClient::m_peerAddress),
133  MakeIpv4AddressChecker ())
134  .AddAttribute ("RemotePort", "The destination port of the outbound packets",
135  UintegerValue (100),
136  MakeUintegerAccessor (&EpsBearerTagUdpClient::m_peerPort),
137  MakeUintegerChecker<uint16_t> ())
138  .AddAttribute ("PacketSize",
139  "Size of packets generated. The minimum packet size is 12 bytes which is the size of the header carrying the sequence number and the time stamp.",
140  UintegerValue (1024),
141  MakeUintegerAccessor (&EpsBearerTagUdpClient::m_size),
142  MakeUintegerChecker<uint32_t> ())
143  ;
144  return tid;
145 }
146 
148  : m_rnti (0),
149  m_bid (0)
150 {
152  m_sent = 0;
153  m_socket = 0;
154  m_sendEvent = EventId ();
155 }
156 
158  : m_rnti (rnti),
159  m_bid (bid)
160 {
162  m_sent = 0;
163  m_socket = 0;
164  m_sendEvent = EventId ();
165 }
166 
168 {
170 }
171 
172 void
174 {
175  m_peerAddress = ip;
176  m_peerPort = port;
177 }
178 
179 void
181 {
184 }
185 
186 void
188 {
190 
191  if (m_socket == 0)
192  {
193  TypeId tid = TypeId::LookupByName ("ns3::UdpSocketFactory");
195  m_socket->Bind ();
197  }
198 
201 }
202 
203 void
205 {
208 }
209 
210 void
212 {
215  SeqTsHeader seqTs;
216  seqTs.SetSeq (m_sent);
217  Ptr<Packet> p = Create<Packet> (m_size-(8+4)); // 8+4 : the size of the seqTs header
218  p->AddHeader (seqTs);
219 
220  EpsBearerTag tag (m_rnti, m_bid);
221  p->AddPacketTag (tag);
222 
223  if ((m_socket->Send (p)) >= 0)
224  {
225  ++m_sent;
226  NS_LOG_INFO ("TraceDelay TX " << m_size << " bytes to "
227  << m_peerAddress << " Uid: " << p->GetUid ()
228  << " Time: " << (Simulator::Now ()).GetSeconds ());
229 
230  }
231  else
232  {
233  NS_LOG_INFO ("Error while sending " << m_size << " bytes to "
234  << m_peerAddress);
235  }
236 
237  if (m_sent < m_count)
238  {
240  }
241 }
242 
243 
244 
246 {
247  UeUlTestData (uint32_t n, uint32_t s, uint16_t r, uint8_t l);
248 
249  uint32_t numPkts;
250  uint32_t pktSize;
251  uint16_t rnti;
252  uint8_t bid;
253 
256 };
257 
258  UeUlTestData::UeUlTestData (uint32_t n, uint32_t s, uint16_t r, uint8_t l)
259  : numPkts (n),
260  pktSize (s),
261  rnti (r),
262  bid (l)
263 {
264 }
265 
267 {
268  std::vector<UeUlTestData> ues;
269 };
270 
271 
273 {
274 public:
275  EpcS1uUlTestCase (std::string name, std::vector<EnbUlTestData> v);
276  virtual ~EpcS1uUlTestCase ();
277 
278 private:
279  virtual void DoRun (void);
280  std::vector<EnbUlTestData> m_enbUlTestData;
281 };
282 
283 
284 EpcS1uUlTestCase::EpcS1uUlTestCase (std::string name, std::vector<EnbUlTestData> v)
285  : TestCase (name),
286  m_enbUlTestData (v)
287 {
288 }
289 
291 {
292 }
293 
294 void
296 {
297  Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> ();
298  Ptr<Node> pgw = epcHelper->GetPgwNode ();
299 
300  // allow jumbo packets
301  Config::SetDefault ("ns3::CsmaNetDevice::Mtu", UintegerValue (30000));
302  Config::SetDefault ("ns3::PointToPointNetDevice::Mtu", UintegerValue (30000));
303  epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000));
304 
305  // Create a single RemoteHost
306  NodeContainer remoteHostContainer;
307  remoteHostContainer.Create (1);
308  Ptr<Node> remoteHost = remoteHostContainer.Get (0);
309  InternetStackHelper internet;
310  internet.Install (remoteHostContainer);
311 
312  // Create the internet
313  PointToPointHelper p2ph;
314  p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
315  NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
316  Ipv4AddressHelper ipv4h;
317  ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
318  Ipv4InterfaceContainer internetNodesIpIfaceContainer = ipv4h.Assign (internetDevices);
319 
320  // setup default gateway for the remote hosts
321  Ipv4StaticRoutingHelper ipv4RoutingHelper;
322  Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
323 
324  // hardcoded UE addresses for now
325  remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.255.255.0"), 1);
326 
327 
328 
329  uint16_t udpSinkPort = 1234;
330 
331  NodeContainer enbs;
332  uint16_t cellIdCounter = 0;
333 
334  for (std::vector<EnbUlTestData>::iterator enbit = m_enbUlTestData.begin ();
335  enbit < m_enbUlTestData.end ();
336  ++enbit)
337  {
338  Ptr<Node> enb = CreateObject<Node> ();
339  enbs.Add (enb);
340 
341  // we test EPC without LTE, hence we use:
342  // 1) a CSMA network to simulate the cell
343  // 2) a raw socket opened on the CSMA device to simulate the LTE socket
344 
345  uint16_t cellId = ++cellIdCounter;
346 
347  NodeContainer ues;
348  ues.Create (enbit->ues.size ());
349 
350  NodeContainer cell;
351  cell.Add (ues);
352  cell.Add (enb);
353 
354  CsmaHelper csmaCell;
355  NetDeviceContainer cellDevices = csmaCell.Install (cell);
356 
357  // the eNB's CSMA NetDevice acting as an LTE NetDevice.
358  Ptr<NetDevice> enbDevice = cellDevices.Get (cellDevices.GetN () - 1);
359 
360  // Note that the EpcEnbApplication won't care of the actual NetDevice type
361  epcHelper->AddEnb (enb, enbDevice, cellId);
362 
363  // Plug test RRC entity
364  Ptr<EpcEnbApplication> enbApp = enb->GetApplication (0)->GetObject<EpcEnbApplication> ();
365  NS_ASSERT_MSG (enbApp != 0, "cannot retrieve EpcEnbApplication");
366  Ptr<EpcTestRrc> rrc = CreateObject<EpcTestRrc> ();
367  rrc->SetS1SapProvider (enbApp->GetS1SapProvider ());
368  enbApp->SetS1SapUser (rrc->GetS1SapUser ());
369 
370  // we install the IP stack on UEs only
371  InternetStackHelper internet;
372  internet.Install (ues);
373 
374  // assign IP address to UEs, and install applications
375  for (uint32_t u = 0; u < ues.GetN (); ++u)
376  {
377  Ptr<NetDevice> ueLteDevice = cellDevices.Get (u);
378  Ipv4InterfaceContainer ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueLteDevice));
379 
380  Ptr<Node> ue = ues.Get (u);
381 
382  // disable IP Forwarding on the UE. This is because we use
383  // CSMA broadcast MAC addresses for this test. The problem
384  // won't happen with a LteUeNetDevice.
385  Ptr<Ipv4> ueIpv4 = ue->GetObject<Ipv4> ();
386  ueIpv4->SetAttribute ("IpForward", BooleanValue (false));
387 
388  // tell the UE to route all packets to the GW
389  Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueIpv4);
390  Ipv4Address gwAddr = epcHelper->GetUeDefaultGatewayAddress ();
391  NS_LOG_INFO ("GW address: " << gwAddr);
392  ueStaticRouting->SetDefaultRoute (gwAddr, 1);
393 
394  // since the UEs in this test use CSMA with IP enabled, and
395  // the eNB uses CSMA but without IP, we fool the UE's ARP
396  // cache into thinking that the IP address of the GW can be
397  // reached by sending a CSMA packet to the broadcast
398  // address, so the eNB will get it.
399  int32_t ueLteIpv4IfIndex = ueIpv4->GetInterfaceForDevice (ueLteDevice);
400  Ptr<Ipv4L3Protocol> ueIpv4L3Protocol = ue->GetObject<Ipv4L3Protocol> ();
401  Ptr<Ipv4Interface> ueLteIpv4Iface = ueIpv4L3Protocol->GetInterface (ueLteIpv4IfIndex);
402  Ptr<ArpCache> ueArpCache = ueLteIpv4Iface->GetArpCache ();
403  ueArpCache->SetAliveTimeout (Seconds (1000));
404  ArpCache::Entry* arpCacheEntry = ueArpCache->Add (gwAddr);
405  arpCacheEntry->MarkWaitReply(0);
406  arpCacheEntry->MarkAlive (Mac48Address::GetBroadcast ());
407 
408 
409  PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory",
410  InetSocketAddress (Ipv4Address::GetAny (), udpSinkPort));
411  ApplicationContainer sinkApp = packetSinkHelper.Install (remoteHost);
412  sinkApp.Start (Seconds (1.0));
413  sinkApp.Stop (Seconds (10.0));
414  enbit->ues[u].serverApp = sinkApp.Get (0)->GetObject<PacketSink> ();
415 
416  Time interPacketInterval = Seconds (0.01);
417  Ptr<EpsBearerTagUdpClient> client = CreateObject<EpsBearerTagUdpClient> (enbit->ues[u].rnti, enbit->ues[u].bid);
418  client->SetAttribute ("RemoteAddress", Ipv4AddressValue (internetNodesIpIfaceContainer.GetAddress (1)));
419  client->SetAttribute ("RemotePort", UintegerValue (udpSinkPort));
420  client->SetAttribute ("MaxPackets", UintegerValue (enbit->ues[u].numPkts));
421  client->SetAttribute ("Interval", TimeValue (interPacketInterval));
422  client->SetAttribute ("PacketSize", UintegerValue (enbit->ues[u].pktSize));
423  ue->AddApplication (client);
424  ApplicationContainer clientApp;
425  clientApp.Add (client);
426  clientApp.Start (Seconds (2.0));
427  clientApp.Stop (Seconds (10.0));
428  enbit->ues[u].clientApp = client;
429 
430  uint64_t imsi = u+1;
431  epcHelper->AddUe (ueLteDevice, imsi);
432  epcHelper->ActivateEpsBearer (ueLteDevice, imsi, EpcTft::Default (), EpsBearer (EpsBearer::NGBR_VIDEO_TCP_DEFAULT));
433  enbApp->GetS1SapProvider ()->InitialUeMessage (imsi, (uint16_t) imsi);
434 
435  // need this since all sinks are installed in the same node
436  ++udpSinkPort;
437  }
438 
439  }
440 
441  Simulator::Run ();
442 
443  for (std::vector<EnbUlTestData>::iterator enbit = m_enbUlTestData.begin ();
444  enbit < m_enbUlTestData.end ();
445  ++enbit)
446  {
447  for (std::vector<UeUlTestData>::iterator ueit = enbit->ues.begin ();
448  ueit < enbit->ues.end ();
449  ++ueit)
450  {
451  NS_TEST_ASSERT_MSG_EQ (ueit->serverApp->GetTotalRx (), (ueit->numPkts) * (ueit->pktSize), "wrong total received bytes");
452  }
453  }
454 
456 }
457 
458 
459 
460 
461 
466 {
467 public:
469 
471 
473  : TestSuite ("epc-s1u-uplink", SYSTEM)
474 {
475  std::vector<EnbUlTestData> v1;
476  EnbUlTestData e1;
477  UeUlTestData f1 (1, 100, 1, 1);
478  e1.ues.push_back (f1);
479  v1.push_back (e1);
480  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 1UE", v1), TestCase::QUICK);
481 
482 
483  std::vector<EnbUlTestData> v2;
484  EnbUlTestData e2;
485  UeUlTestData f2_1 (1, 100, 1, 1);
486  e2.ues.push_back (f2_1);
487  UeUlTestData f2_2 (2, 200, 2, 1);
488  e2.ues.push_back (f2_2);
489  v2.push_back (e2);
490  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 2UEs", v2), TestCase::QUICK);
491 
492 
493  std::vector<EnbUlTestData> v3;
494  v3.push_back (e1);
495  v3.push_back (e2);
496  AddTestCase (new EpcS1uUlTestCase ("2 eNBs", v3), TestCase::QUICK);
497 
498 
499  EnbUlTestData e3;
500  UeUlTestData f3_1 (3, 50, 1, 1);
501  e3.ues.push_back (f3_1);
502  UeUlTestData f3_2 (5, 1472, 2, 1);
503  e3.ues.push_back (f3_2);
504  UeUlTestData f3_3 (1, 1, 3, 1);
505  e3.ues.push_back (f3_2);
506  std::vector<EnbUlTestData> v4;
507  v4.push_back (e3);
508  v4.push_back (e1);
509  v4.push_back (e2);
510  AddTestCase (new EpcS1uUlTestCase ("3 eNBs", v4), TestCase::QUICK);
511 
512  std::vector<EnbUlTestData> v5;
513  EnbUlTestData e5;
514  UeUlTestData f5 (10, 3000, 1, 1);
515  e5.ues.push_back (f5);
516  v5.push_back (e5);
517  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 10 pkts 3000 bytes each", v5), TestCase::QUICK);
518 
519  std::vector<EnbUlTestData> v6;
520  EnbUlTestData e6;
521  UeUlTestData f6 (50, 3000, 1, 1);
522  e6.ues.push_back (f6);
523  v6.push_back (e6);
524  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 50 pkts 3000 bytes each", v6), TestCase::QUICK);
525 
526  std::vector<EnbUlTestData> v7;
527  EnbUlTestData e7;
528  UeUlTestData f7 (10, 15000, 1, 1);
529  e7.ues.push_back (f7);
530  v7.push_back (e7);
531  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7), TestCase::QUICK);
532 
533  std::vector<EnbUlTestData> v8;
534  EnbUlTestData e8;
535  UeUlTestData f8 (100, 15000, 1, 1);
536  e8.ues.push_back (f8);
537  v8.push_back (e8);
538  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8), TestCase::QUICK);
539 
540 }
541 
542 
543 
544 } // namespace ns3
545 
std::vector< EnbUlTestData > m_enbUlTestData
holds a vector of ns3::Application pointers.
uint32_t AddApplication(Ptr< Application > application)
Definition: node.cc:147
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
an Inet address class
static Ipv4Address GetAny(void)
Hold a bool native type.
Definition: boolean.h:38
ArpCache::Entry * Add(Ipv4Address to)
Add an Ipv4Address to this ARP cache.
Definition: arp-cache.cc:259
NS_LOG_COMPONENT_DEFINE("GrantedTimeWindowMpiInterface")
holds a vector of std::pair of Ptr and interface index.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr 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
void Add(ApplicationContainer other)
Append the contents of another ApplicationContainer to the end of this container. ...
void ScheduleTransmit(Time dt)
A suite of tests to run.
Definition: test.h:1025
void AddPacketTag(const Tag &tag) const
Add a packet tag.
Definition: packet.cc:841
ns3::EpcS1uUlTestSuite g_epcS1uUlTestSuiteInstance
uint64_t GetUid(void) const
A packet is allocated a new uid when it is created empty or with zero-filled payload.
Definition: packet.cc:393
static Ptr< EpcTft > Default()
creates a TFT matching any traffic
Definition: epc-tft.cc:142
Ptr< PacketSink > serverApp
#define NS_ASSERT(condition)
Definition: assert.h:64
static void Run(void)
Run the simulation until one of:
Definition: simulator.cc:157
aggregate IP/TCP/UDP functionality to existing Nodes.
Tag used to define the RNTI and EPS bearer ID for packets interchanged between the EpcEnbApplication ...
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::CsmaChannel with the attributes configured by CsmaHelper::SetChannelAttri...
Definition: csma-helper.cc:215
#define NS_LOG_INFO(msg)
Definition: log.h:298
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes...
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
Definition: simulator.cc:268
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition: log.h:309
Callback< R > MakeNullCallback(void)
Definition: callback.h:1395
Build a set of PointToPointNetDevice objects.
encapsulates test code
Definition: test.h:849
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
Definition: simulator.h:824
virtual void StopApplication(void)
Application specific shutdown code.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
uint16_t port
Definition: dsdv-manet.cc:44
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
uint32_t GetN(void) const
Get the number of Ptr stored in this container.
Class for representing data rates.
Definition: data-rate.h:71
virtual void DoRun(void)
Implementation to actually run this TestCase.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Ptr< Application > GetApplication(uint32_t index) const
Definition: node.cc:158
void SetRemote(Ipv4Address ip, uint16_t port)
set the remote address and port
The base class for all ns3 applications.
Definition: application.h:61
hold objects of type ns3::Time
Definition: nstime.h:961
void MarkWaitReply(Ptr< Packet > waiting)
Definition: arp-cache.cc:335
Hold an unsigned integer type.
Definition: uinteger.h:46
std::vector< UeUlTestData > ues
Ptr< SampleEmitter > s
holds a vector of ns3::NetDevice pointers
Ptr< Node > GetNode() const
Definition: application.cc:104
static Mac48Address GetBroadcast(void)
void SetRecvCallback(Callback< void, Ptr< Socket > >)
Notify application when new data is available to be read.
Definition: socket.cc:128
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:71
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)
Every event scheduled by the Simulator::insertAtDestroy method is invoked.
Definition: simulator.cc:121
Doxygen introspection did not find any typical Config paths.
Definition: seq-ts-header.h:36
virtual int Connect(const Address &address)=0
Initiate a connection to a remote host.
Access to the Ipv4 forwarding table, interfaces, and configuration.
Definition: ipv4.h:75
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition: application.cc:83
void SetAliveTimeout(Time aliveTimeout)
Set the time the entry will be in ALIVE state (unless refreshed)
Definition: arp-cache.cc:125
void SetDefault(std::string name, const AttributeValue &value)
Definition: config.cc:667
Implement the Ipv4 layer.
virtual int Bind(const Address &address)=0
Allocate a local endpoint for this socket.
keep track of a set of node pointers.
Ptr< Application > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
EpcS1uUlTestCase(std::string name, std::vector< EnbUlTestData > v)
void MarkAlive(Address macAddress)
Definition: arp-cache.cc:308
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
A record that that holds information about an ArpCache entry.
Definition: arp-cache.h:160
hold objects of type ns3::Ipv4Address
Test that the S1-U interface implementation works correctly.
static Time Now(void)
Return the "current simulation time".
Definition: simulator.cc:180
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
Definition: test.cc:173
build a set of CsmaNetDevice objects
Definition: csma-helper.h:46
#define NS_ASSERT_MSG(condition, message)
Definition: assert.h:86
Fast test.
Definition: test.h:857
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:38
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter...
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
This application is installed inside eNBs and provides the bridge functionality for user data plane p...
void Add(NodeContainer other)
Append the contents of another NodeContainer to the end of this container.
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
an identifier for simulation events.
Definition: event-id.h:46
Helper class that adds ns3::Ipv4StaticRouting objects.
hold objects of type ns3::DataRate
Ptr< Node > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
void SetSeq(uint32_t seq)
Ptr< Application > clientApp
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:452
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
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.
Receive and consume traffic generated to an IP address and port.
Definition: packet-sink.h:68
virtual int Send(Ptr< Packet > p, uint32_t flags)=0
Send data (or dummy data) to the remote host.
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::isExpired method.
Definition: event-id.cc:53
Ptr< T > GetObject(void) const
Definition: object.h:361
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611
UeUlTestData(uint32_t n, uint32_t s, uint16_t r, uint8_t l)
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:253
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
virtual void StartApplication(void)
Application specific startup code.
#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:137
static TypeId LookupByName(std::string name)
Definition: type-id.cc:536
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...