A Discrete-Event Network Simulator
API
point-to-point-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/point-to-point-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/point-to-point-helper.h>
31 #include <ns3/packet-socket-helper.h>
32 #include <ns3/packet-socket-address.h>
33 #include <ns3/epc-enb-application.h>
34 #include <ns3/epc-sgw-pgw-application.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 
43 namespace ns3 {
44 
45 NS_LOG_COMPONENT_DEFINE ("PointToPointEpcHelper");
46 
47 NS_OBJECT_ENSURE_REGISTERED (PointToPointEpcHelper);
48 
49 
51  : m_gtpuUdpPort (2152) // fixed by the standard
52 {
53  NS_LOG_FUNCTION (this);
54 
55  // since we use point-to-point links for all S1-U links,
56  // we use a /30 subnet which can hold exactly two addresses
57  // (remember that net broadcast and null address are not valid)
58  m_s1uIpv4AddressHelper.SetBase ("10.0.0.0", "255.255.255.252");
59 
60  m_x2Ipv4AddressHelper.SetBase ("12.0.0.0", "255.255.255.252");
61 
62  // we use a /8 net for all UEs
63  m_ueAddressHelper.SetBase ("7.0.0.0", "255.0.0.0");
64 
65  // create SgwPgwNode
66  m_sgwPgw = CreateObject<Node> ();
67  InternetStackHelper internet;
68  internet.Install (m_sgwPgw);
69 
70  // create S1-U socket
71  Ptr<Socket> sgwPgwS1uSocket = Socket::CreateSocket (m_sgwPgw, TypeId::LookupByName ("ns3::UdpSocketFactory"));
72  int retval = sgwPgwS1uSocket->Bind (InetSocketAddress (Ipv4Address::GetAny (), m_gtpuUdpPort));
73  NS_ASSERT (retval == 0);
74 
75  // create TUN device implementing tunneling of user data over GTP-U/UDP/IP
76  m_tunDevice = CreateObject<VirtualNetDevice> ();
77  // allow jumbo packets
78  m_tunDevice->SetAttribute ("Mtu", UintegerValue (30000));
79 
80  // yes we need this
82 
84  NetDeviceContainer tunDeviceContainer;
85  tunDeviceContainer.Add (m_tunDevice);
86 
87  // the TUN device is on the same subnet as the UEs, so when a packet
88  // addressed to an UE arrives at the intenet to the WAN interface of
89  // the PGW it will be forwarded to the TUN device.
90  Ipv4InterfaceContainer tunDeviceIpv4IfContainer = m_ueAddressHelper.Assign (tunDeviceContainer);
91 
92  // create EpcSgwPgwApplication
93  m_sgwPgwApp = CreateObject<EpcSgwPgwApplication> (m_tunDevice, sgwPgwS1uSocket);
95 
96  // connect SgwPgwApplication and virtual net device for tunneling
97  m_tunDevice->SetSendCallback (MakeCallback (&EpcSgwPgwApplication::RecvFromTunDevice, m_sgwPgwApp));
98 
99  // Create MME and connect with SGW via S11 interface
100  m_mme = CreateObject<EpcMme> ();
101  m_mme->SetS11SapSgw (m_sgwPgwApp->GetS11SapSgw ());
102  m_sgwPgwApp->SetS11SapMme (m_mme->GetS11SapMme ());
103 }
104 
106 {
107  NS_LOG_FUNCTION (this);
108 }
109 
110 TypeId
112 {
113  static TypeId tid = TypeId ("ns3::PointToPointEpcHelper")
114  .SetParent<EpcHelper> ()
115  .SetGroupName("Lte")
116  .AddConstructor<PointToPointEpcHelper> ()
117  .AddAttribute ("S1uLinkDataRate",
118  "The data rate to be used for the next S1-U link to be created",
119  DataRateValue (DataRate ("10Gb/s")),
122  .AddAttribute ("S1uLinkDelay",
123  "The delay to be used for the next S1-U link to be created",
124  TimeValue (Seconds (0)),
126  MakeTimeChecker ())
127  .AddAttribute ("S1uLinkMtu",
128  "The MTU of the next S1-U link to be created. Note that, because of the additional GTP/UDP/IP tunneling overhead, you need a MTU larger than the end-to-end MTU that you want to support.",
129  UintegerValue (2000),
131  MakeUintegerChecker<uint16_t> ())
132  .AddAttribute ("X2LinkDataRate",
133  "The data rate to be used for the next X2 link to be created",
134  DataRateValue (DataRate ("10Gb/s")),
137  .AddAttribute ("X2LinkDelay",
138  "The delay to be used for the next X2 link to be created",
139  TimeValue (Seconds (0)),
141  MakeTimeChecker ())
142  .AddAttribute ("X2LinkMtu",
143  "The MTU of the next X2 link to be created. Note that, because of some big X2 messages, you need a big MTU.",
144  UintegerValue (3000),
146  MakeUintegerChecker<uint16_t> ())
147  ;
148  return tid;
149 }
150 
151 void
153 {
154  NS_LOG_FUNCTION (this);
155  m_tunDevice->SetSendCallback (MakeNullCallback<bool, Ptr<Packet>, const Address&, const Address&, uint16_t> ());
156  m_tunDevice = 0;
157  m_sgwPgwApp = 0;
158  m_sgwPgw->Dispose ();
159 }
160 
161 
162 void
163 PointToPointEpcHelper::AddEnb (Ptr<Node> enb, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId)
164 {
165  NS_LOG_FUNCTION (this << enb << lteEnbNetDevice << cellId);
166 
167  NS_ASSERT (enb == lteEnbNetDevice->GetNode ());
168 
169  // add an IPv4 stack to the previously created eNB
170  InternetStackHelper internet;
171  internet.Install (enb);
172  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after node creation: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
173 
174  // create a point to point link between the new eNB and the SGW with
175  // the corresponding new NetDevices on each side
176  NodeContainer enbSgwNodes;
177  enbSgwNodes.Add (m_sgwPgw);
178  enbSgwNodes.Add (enb);
179  PointToPointHelper p2ph;
182  p2ph.SetChannelAttribute ("Delay", TimeValue (m_s1uLinkDelay));
183  NetDeviceContainer enbSgwDevices = p2ph.Install (enb, m_sgwPgw);
184  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after installing p2p dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
185  Ptr<NetDevice> enbDev = enbSgwDevices.Get (0);
186  Ptr<NetDevice> sgwDev = enbSgwDevices.Get (1);
188  Ipv4InterfaceContainer enbSgwIpIfaces = m_s1uIpv4AddressHelper.Assign (enbSgwDevices);
189  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB after assigning Ipv4 addr to S1 dev: " << enb->GetObject<Ipv4> ()->GetNInterfaces ());
190 
191  Ipv4Address enbAddress = enbSgwIpIfaces.GetAddress (0);
192  Ipv4Address sgwAddress = enbSgwIpIfaces.GetAddress (1);
193 
194  // create S1-U socket for the ENB
195  Ptr<Socket> enbS1uSocket = Socket::CreateSocket (enb, TypeId::LookupByName ("ns3::UdpSocketFactory"));
196  int retval = enbS1uSocket->Bind (InetSocketAddress (enbAddress, m_gtpuUdpPort));
197  NS_ASSERT (retval == 0);
198 
199 
200  // give PacketSocket powers to the eNB
201  //PacketSocketHelper packetSocket;
202  //packetSocket.Install (enb);
203 
204  // create LTE socket for the ENB
205  Ptr<Socket> enbLteSocket = Socket::CreateSocket (enb, TypeId::LookupByName ("ns3::PacketSocketFactory"));
206  PacketSocketAddress enbLteSocketBindAddress;
207  enbLteSocketBindAddress.SetSingleDevice (lteEnbNetDevice->GetIfIndex ());
208  enbLteSocketBindAddress.SetProtocol (Ipv4L3Protocol::PROT_NUMBER);
209  retval = enbLteSocket->Bind (enbLteSocketBindAddress);
210  NS_ASSERT (retval == 0);
211  PacketSocketAddress enbLteSocketConnectAddress;
212  enbLteSocketConnectAddress.SetPhysicalAddress (Mac48Address::GetBroadcast ());
213  enbLteSocketConnectAddress.SetSingleDevice (lteEnbNetDevice->GetIfIndex ());
214  enbLteSocketConnectAddress.SetProtocol (Ipv4L3Protocol::PROT_NUMBER);
215  retval = enbLteSocket->Connect (enbLteSocketConnectAddress);
216  NS_ASSERT (retval == 0);
217 
218 
219  NS_LOG_INFO ("create EpcEnbApplication");
220  Ptr<EpcEnbApplication> enbApp = CreateObject<EpcEnbApplication> (enbLteSocket, enbS1uSocket, enbAddress, sgwAddress, cellId);
221  enb->AddApplication (enbApp);
222  NS_ASSERT (enb->GetNApplications () == 1);
223  NS_ASSERT_MSG (enb->GetApplication (0)->GetObject<EpcEnbApplication> () != 0, "cannot retrieve EpcEnbApplication");
224  NS_LOG_LOGIC ("enb: " << enb << ", enb->GetApplication (0): " << enb->GetApplication (0));
225 
226 
227  NS_LOG_INFO ("Create EpcX2 entity");
228  Ptr<EpcX2> x2 = CreateObject<EpcX2> ();
229  enb->AggregateObject (x2);
230 
231  NS_LOG_INFO ("connect S1-AP interface");
232  m_mme->AddEnb (cellId, enbAddress, enbApp->GetS1apSapEnb ());
233  m_sgwPgwApp->AddEnb (cellId, enbAddress, sgwAddress);
234  enbApp->SetS1apSapMme (m_mme->GetS1apSapMme ());
235 }
236 
237 
238 void
240 {
241  NS_LOG_FUNCTION (this << enb1 << enb2);
242 
243  // Create a point to point link between the two eNBs with
244  // the corresponding new NetDevices on each side
245  NodeContainer enbNodes;
246  enbNodes.Add (enb1);
247  enbNodes.Add (enb2);
248  PointToPointHelper p2ph;
251  p2ph.SetChannelAttribute ("Delay", TimeValue (m_x2LinkDelay));
252  NetDeviceContainer enbDevices = p2ph.Install (enb1, enb2);
253  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1 after installing p2p dev: " << enb1->GetObject<Ipv4> ()->GetNInterfaces ());
254  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #2 after installing p2p dev: " << enb2->GetObject<Ipv4> ()->GetNInterfaces ());
255  Ptr<NetDevice> enb1Dev = enbDevices.Get (0);
256  Ptr<NetDevice> enb2Dev = enbDevices.Get (1);
257 
259  Ipv4InterfaceContainer enbIpIfaces = m_x2Ipv4AddressHelper.Assign (enbDevices);
260  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #1 after assigning Ipv4 addr to X2 dev: " << enb1->GetObject<Ipv4> ()->GetNInterfaces ());
261  NS_LOG_LOGIC ("number of Ipv4 ifaces of the eNB #2 after assigning Ipv4 addr to X2 dev: " << enb2->GetObject<Ipv4> ()->GetNInterfaces ());
262 
263  Ipv4Address enb1X2Address = enbIpIfaces.GetAddress (0);
264  Ipv4Address enb2X2Address = enbIpIfaces.GetAddress (1);
265 
266  // Add X2 interface to both eNBs' X2 entities
267  Ptr<EpcX2> enb1X2 = enb1->GetObject<EpcX2> ();
268  Ptr<LteEnbNetDevice> enb1LteDev = enb1->GetDevice (0)->GetObject<LteEnbNetDevice> ();
269  uint16_t enb1CellId = enb1LteDev->GetCellId ();
270  NS_LOG_LOGIC ("LteEnbNetDevice #1 = " << enb1LteDev << " - CellId = " << enb1CellId);
271 
272  Ptr<EpcX2> enb2X2 = enb2->GetObject<EpcX2> ();
273  Ptr<LteEnbNetDevice> enb2LteDev = enb2->GetDevice (0)->GetObject<LteEnbNetDevice> ();
274  uint16_t enb2CellId = enb2LteDev->GetCellId ();
275  NS_LOG_LOGIC ("LteEnbNetDevice #2 = " << enb2LteDev << " - CellId = " << enb2CellId);
276 
277  enb1X2->AddX2Interface (enb1CellId, enb1X2Address, enb2CellId, enb2X2Address);
278  enb2X2->AddX2Interface (enb2CellId, enb2X2Address, enb1CellId, enb1X2Address);
279 
280  enb1LteDev->GetRrc ()->AddX2Neighbour (enb2LteDev->GetCellId ());
281  enb2LteDev->GetRrc ()->AddX2Neighbour (enb1LteDev->GetCellId ());
282 }
283 
284 
285 void
287 {
288  NS_LOG_FUNCTION (this << imsi << ueDevice );
289 
290  m_mme->AddUe (imsi);
291  m_sgwPgwApp->AddUe (imsi);
292 
293 
294 }
295 
296 uint8_t
298 {
299  NS_LOG_FUNCTION (this << ueDevice << imsi);
300 
301  // we now retrieve the IPv4 address of the UE and notify it to the SGW;
302  // we couldn't do it before since address assignment is triggered by
303  // the user simulation program, rather than done by the EPC
304  Ptr<Node> ueNode = ueDevice->GetNode ();
305  Ptr<Ipv4> ueIpv4 = ueNode->GetObject<Ipv4> ();
306  NS_ASSERT_MSG (ueIpv4 != 0, "UEs need to have IPv4 installed before EPS bearers can be activated");
307  int32_t interface = ueIpv4->GetInterfaceForDevice (ueDevice);
308  NS_ASSERT (interface >= 0);
309  NS_ASSERT (ueIpv4->GetNAddresses (interface) == 1);
310  Ipv4Address ueAddr = ueIpv4->GetAddress (interface, 0).GetLocal ();
311  NS_LOG_LOGIC (" UE IP address: " << ueAddr); m_sgwPgwApp->SetUeAddress (imsi, ueAddr);
312 
313  uint8_t bearerId = m_mme->AddBearer (imsi, tft, bearer);
314  Ptr<LteUeNetDevice> ueLteDevice = ueDevice->GetObject<LteUeNetDevice> ();
315  if (ueLteDevice)
316  {
317  ueLteDevice->GetNas ()->ActivateEpsBearer (bearer, tft);
318  }
319  return bearerId;
320 }
321 
322 
323 Ptr<Node>
325 {
326  return m_sgwPgw;
327 }
328 
329 
332 {
333  return m_ueAddressHelper.Assign (ueDevices);
334 }
335 
336 
337 
340 {
341  // return the address of the tun device
342  return m_sgwPgw->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();
343 }
344 
345 
346 } // namespace ns3
void Dispose(void)
Dispose of this Object.
Definition: object.cc:214
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Definition: node.cc:157
DataRate m_s1uLinkDataRate
The data rate to be used for the next S1-U link to be created.
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 "...
Ptr< EpcMme > m_mme
MME network element.
uint32_t GetNApplications(void) const
Definition: node.cc:176
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:45
uint16_t GetCellId() const
static TypeId GetTypeId(void)
Register this type.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
Definition: object.h:459
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr stored in this container at a given index.
NetDeviceContainer Install(NodeContainer c)
uint16_t m_s1uLinkMtu
The MTU of the next S1-U link to be created.
void AggregateObject(Ptr< Object > other)
Aggregate two Objects together.
Definition: object.cc:252
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:67
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.
#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.
Ptr< EpcSgwPgwApplication > m_sgwPgwApp
SGW-PGW application.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition: log.h:277
Callback< R > MakeNullCallback(void)
Definition: callback.h:1635
Build a set of PointToPointNetDevice objects.
void SetDeviceAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each NetDevice created by the helper.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
a polymophic address class
Definition: address.h:90
Ptr< const AttributeChecker > MakeDataRateChecker(void)
Definition: data-rate.cc:30
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:446
Class for representing data rates.
Definition: data-rate.h:88
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:168
static Mac48Address Allocate(void)
Allocate a new Mac48Address.
Time m_s1uLinkDelay
The delay to be used for the next S1-U link to be created.
AttributeValue implementation for Time.
Definition: nstime.h:1055
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.
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
virtual void SetAddress(Address address)
Set the address of this interface.
holds a vector of ns3::NetDevice pointers
Ptr< NetDevice > GetDevice(uint32_t index) const
Retrieve the index-th NetDevice associated to this node.
Definition: node.cc:142
static Mac48Address GetBroadcast(void)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
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
virtual void DoDispose()
Destructor implementation.
Ptr< const AttributeAccessor > MakeDataRateAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: data-rate.h:242
virtual void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, uint16_t cellId)
Add an eNB to the EPC.
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
Ipv4AddressHelper m_x2Ipv4AddressHelper
helper to assign addresses to X2 NetDevices
Base helper class to handle the creation of the EPC entities.
Definition: epc-helper.h:50
virtual Ipv4Address GetUeDefaultGatewayAddress()
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.
void SetPhysicalAddress(const Address address)
Set the destination address.
keep track of a set of node pointers.
This entity is installed inside an eNB and provides the functionality for the X2 interface.
Definition: epc-x2.h:99
Create an EPC network with PointToPoint links.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
Time m_x2LinkDelay
The delay to be used for the next X2 link to be created.
Ipv4AddressHelper m_ueAddressHelper
helper to assign addresses to UE devices as well as to the TUN device of the SGW/PGW ...
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: nstime.h:1056
uint16_t m_gtpuUdpPort
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
void SetChannelAttribute(std::string name, const AttributeValue &value)
Set an attribute value to be propagated to each Channel created by the helper.
#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:90
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
Ipv4AddressHelper m_s1uIpv4AddressHelper
S1-U interfaces.
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...
void Add(NodeContainer other)
Append the contents of another NodeContainer to the end of this container.
uint32_t AddDevice(Ptr< NetDevice > device)
Associate a NetDevice to this node.
Definition: node.cc:128
AttributeValue implementation for DataRate.
Definition: data-rate.h:242
virtual ~PointToPointEpcHelper()
Destructor.
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:993
void SetProtocol(uint16_t protocol)
Set the protocol.
DataRate m_x2LinkDataRate
The data rate to be used for the next X2 link to be created.
virtual void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2)
Add an X2 interface between two eNB.
Ipv4Address NewNetwork(void)
Increment the network number and reset the IP address counter to the base value provided in the SetBa...
uint16_t m_x2LinkMtu
The MTU of the next X2 link to be created.
void SetSendCallback(SendCallback transmitCb)
Set the user callback to be called when a L2 packet is to be transmitted.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
Definition: object-base.cc:185
The eNodeB device implementation.
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Definition: uinteger.h:45
a unique identifier for an interface.
Definition: type-id.h:58
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:914
virtual uint32_t GetNInterfaces(void) const =0
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.
Ptr< VirtualNetDevice > m_tunDevice
TUN device implementing tunneling of user data over GTP-U/UDP/IP.
Ptr< Node > m_sgwPgw
SGW-PGW network element.
static TypeId LookupByName(std::string name)
Get a TypeId by name.
Definition: type-id.cc:823
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
The LteUeNetDevice class implements the UE net device.