A Discrete-Event Network Simulator
API
emu-epc-helper.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011-2013 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: Jaume Nin <jnin@cttc.es>
19  * Nicola Baldo <nbaldo@cttc.es>
20  * Manuel Requena <manuel.requena@cttc.es>
21  */
22 
23 #include <ns3/emu-epc-helper.h>
24 #include <ns3/log.h>
25 #include <ns3/inet-socket-address.h>
26 #include <ns3/mac48-address.h>
27 #include <ns3/eps-bearer.h>
28 #include <ns3/ipv4-address.h>
29 #include <ns3/internet-stack-helper.h>
30 #include <ns3/packet-socket-helper.h>
31 #include <ns3/packet-socket-address.h>
32 #include <ns3/epc-enb-application.h>
33 #include <ns3/epc-sgw-pgw-application.h>
34 #include <ns3/emu-fd-net-device-helper.h>
35 
36 #include <ns3/lte-enb-rrc.h>
37 #include <ns3/epc-x2.h>
38 #include <ns3/lte-enb-net-device.h>
39 #include <ns3/lte-ue-net-device.h>
40 #include <ns3/epc-mme.h>
41 #include <ns3/epc-ue-nas.h>
42 #include <ns3/string.h>
43 #include <ns3/abort.h>
44 
45 #include <iomanip>
46 #include <iostream>
47 
48 namespace ns3 {
49 
50 NS_LOG_COMPONENT_DEFINE ("EmuEpcHelper");
51 
52 NS_OBJECT_ENSURE_REGISTERED (EmuEpcHelper);
53 
54 
56  : m_gtpuUdpPort (2152) // fixed by the standard
57 {
58  NS_LOG_FUNCTION (this);
59 
60 }
61 
63 {
64  NS_LOG_FUNCTION (this);
65 }
66 
67 TypeId
69 {
70  static TypeId tid = TypeId ("ns3::EmuEpcHelper")
71  .SetParent<EpcHelper> ()
72  .AddConstructor<EmuEpcHelper> ()
73  .AddAttribute ("sgwDeviceName",
74  "The name of the device used for the S1-U interface of the SGW",
75  StringValue ("veth0"),
78  .AddAttribute ("enbDeviceName",
79  "The name of the device used for the S1-U interface of the eNB",
80  StringValue ("veth1"),
83  .AddAttribute ("SgwMacAddress",
84  "MAC address used for the SGW ",
85  StringValue ("00:00:00:59:00:aa"),
88  .AddAttribute ("EnbMacAddressBase",
89  "First 5 bytes of the Enb MAC address base",
90  StringValue ("00:00:00:eb:00"),
93  ;
94  return tid;
95 }
96 
97 void
99 {
100  NS_LOG_LOGIC (this);
101 
102 
103  // we use a /8 net for all UEs
104  m_ueAddressHelper.SetBase ("7.0.0.0", "255.0.0.0");
105 
106 
107 
108  // create SgwPgwNode
109  m_sgwPgw = CreateObject<Node> ();
110  InternetStackHelper internet;
111  internet.SetIpv4StackInstall (true);
112  internet.Install (m_sgwPgw);
113 
114  // create S1-U socket
115  Ptr<Socket> sgwPgwS1uSocket = Socket::CreateSocket (m_sgwPgw, TypeId::LookupByName ("ns3::UdpSocketFactory"));
116  int retval = sgwPgwS1uSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), m_gtpuUdpPort));
117  NS_ASSERT (retval == 0);
118 
119  // create TUN device implementing tunneling of user data over GTP-U/UDP/IP
120  m_tunDevice = CreateObject<VirtualNetDevice> ();
121  // allow jumbo packets
122  m_tunDevice->SetAttribute ("Mtu", UintegerValue (30000));
123 
124  // yes we need this
126 
128  NetDeviceContainer tunDeviceContainer;
129  tunDeviceContainer.Add (m_tunDevice);
130 
131  // the TUN device is on the same subnet as the UEs, so when a packet
132  // addressed to an UE arrives at the intenet to the WAN interface of
133  // the PGW it will be forwarded to the TUN device.
134  Ipv4InterfaceContainer tunDeviceIpv4IfContainer = m_ueAddressHelper.Assign (tunDeviceContainer);
135 
136  // create EpcSgwPgwApplication
137  m_sgwPgwApp = CreateObject<EpcSgwPgwApplication> (m_tunDevice, sgwPgwS1uSocket);
139 
140  // connect SgwPgwApplication and virtual net device for tunneling
141  m_tunDevice->SetSendCallback (MakeCallback (&EpcSgwPgwApplication::RecvFromTunDevice, m_sgwPgwApp));
142 
143  // Create MME and connect with SGW via S11 interface
144  m_mme = CreateObject<EpcMme> ();
145  m_mme->SetS11SapSgw (m_sgwPgwApp->GetS11SapSgw ());
146  m_sgwPgwApp->SetS11SapMme (m_mme->GetS11SapMme ());
147 
148  // Create EmuFdNetDevice for SGW
150  NS_LOG_LOGIC ("SGW device: " << m_sgwDeviceName);
152  NetDeviceContainer sgwDevices = emu.Install (m_sgwPgw);
153  Ptr<NetDevice> sgwDevice = sgwDevices.Get (0);
154  NS_LOG_LOGIC ("MAC address of SGW: " << m_sgwMacAddress);
155  sgwDevice->SetAttribute ("Address", Mac48AddressValue (m_sgwMacAddress.c_str ()));
156 
157  // we use a /8 subnet so the SGW and the eNBs can talk directly to each other
158  m_epcIpv4AddressHelper.SetBase ("10.0.0.0", "255.255.255.0", "0.0.0.1");
160  m_epcIpv4AddressHelper.SetBase ("10.0.0.0", "255.0.0.0", "0.0.0.101");
161 
162 
164 }
165 
166 void
168 {
169  NS_LOG_FUNCTION (this);
170  m_tunDevice->SetSendCallback (MakeNullCallback<bool, Ptr<Packet>, const Address&, const Address&, uint16_t> ());
171  m_tunDevice = 0;
172  m_sgwPgwApp = 0;
173  m_sgwPgw->Dispose ();
174 }
175 
176 
177 void
178 EmuEpcHelper::AddEnb (Ptr<Node> enb, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId)
179 {
180  NS_LOG_FUNCTION (this << enb << lteEnbNetDevice << cellId);
181 
182  Initialize ();
183 
184  NS_ASSERT (enb == lteEnbNetDevice->GetNode ());
185 
186  // add an IPv4 stack to the previously created eNB
187  InternetStackHelper internet;
188  internet.Install (enb);
189  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after node creation: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
190 
191 
192 
193  // Create an EmuFdNetDevice for the eNB to connect with the SGW and other eNBs
195  NS_LOG_LOGIC ("eNB device: " << m_enbDeviceName);
196  emu.SetDeviceName (m_enbDeviceName);
197  NetDeviceContainer enbDevices = emu.Install (enb);
198 
199  NS_ABORT_IF ((cellId == 0) || (cellId > 255));
200  std::ostringstream enbMacAddress;
201  enbMacAddress << m_enbMacAddressBase << ":" << std::hex << std::setfill ('0') << std::setw (2) << cellId;
202  NS_LOG_LOGIC ("MAC address of enB with cellId " << cellId << " : " << enbMacAddress.str ());
203  Ptr<NetDevice> enbDev = enbDevices.Get (0);
204  enbDev->SetAttribute ("Address", Mac48AddressValue (enbMacAddress.str ().c_str ()));
205 
206  //emu.EnablePcap ("enbDevice", enbDev);
207 
208  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after installing emu dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
209  Ipv4InterfaceContainer enbIpIfaces = m_epcIpv4AddressHelper.Assign (enbDevices);
210  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after assigning Ipv4 addr to S1 dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
211 
212  Ipv4Address enbAddress = enbIpIfaces.GetAddress (0);
213  Ipv4Address sgwAddress = m_sgwIpIfaces.GetAddress (0);
214 
215  // create S1-U socket for the ENB
216  Ptr<Socket> enbS1uSocket = Socket::CreateSocket (enb, TypeId::LookupByName ("ns3::UdpSocketFactory"));
217  int retval = enbS1uSocket->Bind (InetSocketAddress (enbAddress, m_gtpuUdpPort));
218  NS_ASSERT (retval == 0);
219 
220  // create LTE socket for the ENB
221  Ptr<Socket> enbLteSocket = Socket::CreateSocket (enb, TypeId::LookupByName ("ns3::PacketSocketFactory"));
222  PacketSocketAddress enbLteSocketBindAddress;
223  enbLteSocketBindAddress.SetSingleDevice (lteEnbNetDevice->GetIfIndex ());
224  enbLteSocketBindAddress.SetProtocol (Ipv4L3Protocol::PROT_NUMBER);
225  retval = enbLteSocket->Bind (enbLteSocketBindAddress);
226  NS_ASSERT (retval == 0);
227  PacketSocketAddress enbLteSocketConnectAddress;
228  enbLteSocketConnectAddress.SetPhysicalAddress (Mac48Address::GetBroadcast ());
229  enbLteSocketConnectAddress.SetSingleDevice (lteEnbNetDevice->GetIfIndex ());
230  enbLteSocketConnectAddress.SetProtocol (Ipv4L3Protocol::PROT_NUMBER);
231  retval = enbLteSocket->Connect (enbLteSocketConnectAddress);
232  NS_ASSERT (retval == 0);
233 
234 
235  NS_LOG_INFO ("create EpcEnbApplication");
236  Ptr<EpcEnbApplication> enbApp = CreateObject<EpcEnbApplication> (enbLteSocket, enbS1uSocket, enbAddress, sgwAddress, cellId);
237  enb->AddApplication (enbApp);
238  NS_ASSERT (enb->GetNApplications () == 1);
239  NS_ASSERT_MSG (enb->GetApplication (0)->GetObject<EpcEnbApplication> () != 0, "cannot retrieve EpcEnbApplication");
240  NS_LOG_LOGIC ("enb: " << enb << ", enb->GetApplication (0): " << enb->GetApplication (0));
241 
242 
243  NS_LOG_INFO ("Create EpcX2 entity");
244  Ptr<EpcX2> x2 = CreateObject<EpcX2> ();
245  enb->AggregateObject (x2);
246 
247  NS_LOG_INFO ("connect S1-AP interface");
248  m_mme->AddEnb (cellId, enbAddress, enbApp->GetS1apSapEnb ());
249  m_sgwPgwApp->AddEnb (cellId, enbAddress, sgwAddress);
250  enbApp->SetS1apSapMme (m_mme->GetS1apSapMme ());
251 }
252 
253 
254 void
256 {
257  NS_LOG_FUNCTION (this << enb1 << enb2);
258 
259  NS_LOG_WARN ("X2 support still untested");
260 
261 
262  // for X2, we reuse the same device and IP address of the S1-U interface
263  Ptr<Ipv4> enb1Ipv4 = enb1->GetObject<Ipv4> ();
264  Ptr<Ipv4> enb2Ipv4 = enb2->GetObject<Ipv4> ();
265  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1: " << enb1Ipv4->GetNInterfaces ());
266  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #2: " << enb2Ipv4->GetNInterfaces ());
267  NS_LOG_LOGIC ("number of NetDevices of the eNB #1: " << enb1->GetNDevices ());
268  NS_LOG_LOGIC ("number of NetDevices of the eNB #2: " << enb2->GetNDevices ());
269 
270  // 0 is the LTE device, 1 is localhost, 2 is the EPC NetDevice
271  Ptr<NetDevice> enb1EpcDev = enb1->GetDevice (2);
272  Ptr<NetDevice> enb2EpcDev = enb2->GetDevice (2);
273 
274  int32_t enb1Interface = enb1Ipv4->GetInterfaceForDevice (enb1EpcDev);
275  int32_t enb2Interface = enb2Ipv4->GetInterfaceForDevice (enb2EpcDev);
276  NS_ASSERT (enb1Interface >= 0);
277  NS_ASSERT (enb2Interface >= 0);
278  NS_ASSERT (enb1Ipv4->GetNAddresses (enb1Interface) == 1);
279  NS_ASSERT (enb2Ipv4->GetNAddresses (enb2Interface) == 1);
280  Ipv4Address enb1Addr = enb1Ipv4->GetAddress (enb1Interface, 0).GetLocal ();
281  Ipv4Address enb2Addr = enb2Ipv4->GetAddress (enb2Interface, 0).GetLocal ();
282  NS_LOG_LOGIC (" eNB 1 IP address: " << enb1Addr);
283  NS_LOG_LOGIC (" eNB 2 IP address: " << enb2Addr);
284 
285  // Add X2 interface to both eNBs' X2 entities
286  Ptr<EpcX2> enb1X2 = enb1->GetObject<EpcX2> ();
287  Ptr<LteEnbNetDevice> enb1LteDev = enb1->GetDevice (0)->GetObject<LteEnbNetDevice> ();
288  uint16_t enb1CellId = enb1LteDev->GetCellId ();
289  NS_LOG_LOGIC ("LteEnbNetDevice #1 = " << enb1LteDev << " - CellId = " << enb1CellId);
290 
291  Ptr<EpcX2> enb2X2 = enb2->GetObject<EpcX2> ();
292  Ptr<LteEnbNetDevice> enb2LteDev = enb2->GetDevice (0)->GetObject<LteEnbNetDevice> ();
293  uint16_t enb2CellId = enb2LteDev->GetCellId ();
294  NS_LOG_LOGIC ("LteEnbNetDevice #2 = " << enb2LteDev << " - CellId = " << enb2CellId);
295 
296  enb1X2->AddX2Interface (enb1CellId, enb1Addr, enb2CellId, enb2Addr);
297  enb2X2->AddX2Interface (enb2CellId, enb2Addr, enb1CellId, enb1Addr);
298 
299  enb1LteDev->GetRrc ()->AddX2Neighbour (enb2LteDev->GetCellId ());
300  enb2LteDev->GetRrc ()->AddX2Neighbour (enb1LteDev->GetCellId ());
301 }
302 
303 
304 void
305 EmuEpcHelper::AddUe (Ptr<NetDevice> ueDevice, uint64_t imsi)
306 {
307  NS_LOG_FUNCTION (this << imsi << ueDevice );
308 
309  m_mme->AddUe (imsi);
310  m_sgwPgwApp->AddUe (imsi);
311 
312 }
313 
314 uint8_t
316 {
317  NS_LOG_FUNCTION (this << ueDevice << imsi);
318 
319  // we now retrieve the IPv4 address of the UE and notify it to the SGW;
320  // we couldn't do it before since address assignment is triggered by
321  // the user simulation program, rather than done by the EPC
322  Ptr<Node> ueNode = ueDevice->GetNode ();
323  Ptr<Ipv4> ueIpv4 = ueNode->GetObject<Ipv4> ();
324  NS_ASSERT_MSG (ueIpv4 != 0, "UEs need to have IPv4 installed before EPS bearers can be activated");
325  int32_t interface = ueIpv4->GetInterfaceForDevice (ueDevice);
326  NS_ASSERT (interface >= 0);
327  NS_ASSERT (ueIpv4->GetNAddresses (interface) == 1);
328  Ipv4Address ueAddr = ueIpv4->GetAddress (interface, 0).GetLocal ();
329  NS_LOG_LOGIC (" UE IP address: " << ueAddr); m_sgwPgwApp->SetUeAddress (imsi, ueAddr);
330 
331  uint8_t bearerId = m_mme->AddBearer (imsi, tft, bearer);
332  Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> ();
333  if (ueLteDevice)
334  {
335  Simulator::ScheduleNow (&EpcUeNas::ActivateEpsBearer, ueLteDevice->GetNas (), bearer, tft);
336  }
337  return bearerId;
338 }
339 
340 
341 Ptr<Node>
343 {
344  return m_sgwPgw;
345 }
346 
347 
350 {
351  return m_ueAddressHelper.Assign (ueDevices);
352 }
353 
354 
355 
358 {
359  // return the address of the tun device
360  return m_sgwPgw->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();
361 }
362 
363 
364 } // namespace ns3
Ptr< const AttributeChecker > MakeStringChecker(void)
Definition: string.cc:30
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Definition: node.cc:149
static TypeId GetTypeId(void)
Register this type.
virtual uint8_t ActivateEpsBearer(Ptr< NetDevice > ueLteDevice, uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer)
Activate an EPS bearer, setting up the corresponding S1-U tunnel.
virtual NetDeviceContainer Install(Ptr< Node > node) const
This method creates a FdNetDevice and associates it to a node.
void ActivateEpsBearer(EpsBearer bearer, Ptr< EpcTft > tft)
Activate an EPS bearer.
Definition: epc-ue-nas.cc:186
an Inet address class
static Ipv4Address GetAny(void)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
uint32_t GetNApplications(void) const
Definition: node.cc:168
holds a vector of std::pair of Ptr and interface index.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
uint16_t GetCellId() const
Hold variables of type string.
Definition: string.h:41
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
uint16_t m_gtpuUdpPort
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152.
std::string m_sgwDeviceName
The name of the device used for the S1-U interface of the SGW.
Ipv4InterfaceContainer m_sgwIpIfaces
Container for Ipv4Interfaces of the SGW/PGW.
EmuEpcHelper()
Constructor.
an address for a packet socket
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:61
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
aggregate IP/TCP/UDP functionality to existing Nodes.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:244
Callback< R > MakeNullCallback(void)
Definition: callback.h:1436
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
virtual void AddUe(Ptr< NetDevice > ueLteDevice, uint64_t imsi)
Notify the EPC of the existance of a new UE which might attach at a later time.
a polymophic address class
Definition: address.h:90
virtual void DoInitialize()
Initialize() implementation.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Ptr< Application > GetApplication(uint32_t index) const
Retrieve the index-th Application associated to this node.
Definition: node.cc:160
static Mac48Address Allocate(void)
Allocate a new Mac48Address.
bool RecvFromTunDevice(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Method to be assigned to the callback of the Gi TUN VirtualNetDevice.
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Hold an unsigned integer type.
Definition: uinteger.h:44
void SetIpv4StackInstall(bool enable)
Enable/disable IPv4 stack install.
virtual void SetAddress(Address address)
Set the address of this interface.
holds a vector of ns3::NetDevice pointers
virtual void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2)
Add an X2 interface between two eNB.
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:134
static Mac48Address GetBroadcast(void)
virtual void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, uint16_t cellId)
Add an eNB to the EPC.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1290
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:70
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Definition: object.cc:245
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:252
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:76
uint32_t GetNDevices(void) const
Definition: node.cc:142
void SetDeviceName(std::string deviceName)
Set the device name of this device.
std::string m_enbMacAddressBase
First 5 bytes of the Enb MAC address base.
std::string m_sgwMacAddress
MAC address used for the SGW.
Base helper class to handle the creation of the EPC entities.
Definition: epc-helper.h:50
virtual int Bind(const Address &address)=0
Allocate a local endpoint for this socket.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ipv4Address GetUeDefaultGatewayAddress()
void SetPhysicalAddress(const Address address)
Set the destination address.
This entity is installed inside an eNB and provides the functionality for the X2 interface.
Definition: epc-x2.h:70
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
virtual ~EmuEpcHelper()
Destructor.
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now.
Definition: simulator.h:980
Ptr< EpcSgwPgwApplication > m_sgwPgwApp
SGW-PGW application.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:84
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:77
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
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...
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:120
virtual Ptr< Node > GetPgwNode()
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:228
AttributeValue implementation for Mac48Address.
std::string m_enbDeviceName
The name of the device used for the S1-U interface of the eNB.
void Initialize(void)
Invoke DoInitialize on all Objects aggregated to this one.
Definition: object.cc:182
void SetProtocol(uint16_t protocol)
Set the protocol.
Ptr< const AttributeAccessor > MakeStringAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: string.h:42
Ipv4AddressHelper m_ueAddressHelper
helper to assign addresses to UE devices as well as to the TUN device of the SGW/PGW ...
void SetSendCallback(SendCallback transmitCb)
Set the user callback to be called when a L2 packet is to be transmitted.
Ipv4AddressHelper m_epcIpv4AddressHelper
helper to assign addresses to S1-U NetDevices
virtual void DoDispose()
Destructor implementation.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:190
The eNodeB device implementation.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:455
build a set of FdNetDevice objects attached to a physical network interface
Ptr< VirtualNetDevice > m_tunDevice
TUN device implementing tunneling of user data over GTP-U/UDP/IP.
a unique identifier for an interface.
Definition: type-id.h:51
TypeId SetParent(TypeId tid)
Definition: type-id.cc:631
void Dispose(void)
Dispose of this Object.
Definition: object.cc:207
Ptr< Node > m_sgwPgw
SGW-PGW network element.
virtual uint32_t GetNInterfaces(void) const =0
virtual void DoInitialize(void)
Initialize() implementation.
Definition: object.cc:345
static const uint16_t PROT_NUMBER
Protocol number (0x0800)
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
static TypeId LookupByName(std::string name)
Definition: type-id.cc:556
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Ptr< EpcMme > m_mme
MME network element.
The LteUeNetDevice class implements the UE net device.