A Discrete-Event Network Simulator
API
no-backhaul-epc-helper.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2019 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: Manuel Requena <manuel.requena@cttc.es>
19  * (based on the original point-to-point-epc-helper.h)
20  */
21 
22 #ifndef NO_BACKHAUL_EPC_HELPER_H
23 #define NO_BACKHAUL_EPC_HELPER_H
24 
25 #include "ns3/epc-helper.h"
26 
27 namespace ns3 {
28 
29 class EpcSgwApplication;
30 class EpcPgwApplication;
31 class EpcMmeApplication;
32 
47 {
48 public:
53 
57  virtual ~NoBackhaulEpcHelper ();
58 
59  // inherited from Object
64  static TypeId GetTypeId (void);
65  TypeId GetInstanceTypeId () const;
66  virtual void DoDispose ();
67 
68  // inherited from EpcHelper
69  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, std::vector<uint16_t> cellIds);
70  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
71  virtual void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2);
72  virtual void AddS1Interface (Ptr<Node> enb, Ipv4Address enbAddress, Ipv4Address sgwAddress, std::vector<uint16_t> cellIds);
73  virtual uint8_t ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer);
74  virtual Ptr<Node> GetSgwNode () const;
75  virtual Ptr<Node> GetPgwNode () const;
80 
81 protected:
92  virtual void DoAddX2Interface(const Ptr<EpcX2> &enb1X2, const Ptr<NetDevice> &enb1LteDev,
93  const Ipv4Address &enb1X2Address,
94  const Ptr<EpcX2> &enb2X2, const Ptr<NetDevice> &enb2LteDev,
95  const Ipv4Address &enb2X2Address) const;
96 
103  virtual void DoActivateEpsBearerForUe (const Ptr<NetDevice> &ueDevice,
104  const Ptr<EpcTft> &tft,
105  const EpsBearer &bearer) const;
106 
107 private:
108 
117 
122 
127 
132 
137 
142 
147 
152 
156  uint16_t m_gtpuUdpPort;
157 
162 
167 
172 
176  uint16_t m_s11LinkMtu;
177 
181  uint16_t m_gtpcUdpPort;
182 
191 
196 
201 
205  uint16_t m_s5LinkMtu;
206 
210  std::map<uint64_t, Ptr<NetDevice> > m_imsiEnbDeviceMap;
211 
216 
221 
226 
231  uint16_t m_x2LinkMtu;
232 
237 
241  std::string m_x2LinkPcapPrefix;
242 
243 };
244 
245 } // namespace ns3
246 
247 #endif // NO_BACKHAUL_EPC_HELPER_H
Class for representing data rates.
Definition: data-rate.h:89
Base helper class to handle the creation of the EPC entities.
Definition: epc-helper.h:50
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:92
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Helper class to auto-assign global IPv6 unicast addresses.
Describes an IPv6 address.
Definition: ipv6-address.h:50
Keep track of a set of IPv6 interfaces.
holds a vector of ns3::NetDevice pointers
Create an EPC network with PointToPoint links between the core network nodes.
virtual Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices)
Assign IPv6 addresses to UE devices.
uint16_t m_s5LinkMtu
The MTU of the next S5 link to be created.
virtual Ipv4Address GetUeDefaultGatewayAddress()
virtual Ptr< Node > GetSgwNode() const
Get the SGW node.
virtual ~NoBackhaulEpcHelper()
Destructor.
Ptr< VirtualNetDevice > m_tunDevice
TUN device implementing tunneling of user data over GTP-U/UDP/IP.
Time m_s5LinkDelay
The delay to be used for the next S5 link to be created.
Ipv4AddressHelper m_x2Ipv4AddressHelper
helper to assign addresses to X2 NetDevices
Ptr< Node > m_sgw
SGW network element.
virtual Ptr< Node > GetPgwNode() const
Get the PGW node.
Ptr< EpcSgwApplication > m_sgwApp
SGW application.
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.
DataRate m_x2LinkDataRate
The data rate to be used for the next X2 link to be created.
Ptr< Node > m_mme
MME network element.
Ipv4AddressHelper m_uePgwAddressHelper
helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW
Ptr< EpcMmeApplication > m_mmeApp
MME application.
uint16_t m_s11LinkMtu
The MTU of the next S11 link to be created.
virtual void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, std::vector< uint16_t > cellIds)
Add an eNB to the EPC.
std::string m_x2LinkPcapPrefix
Prefix for the PCAP file for the X2 link.
bool m_x2LinkEnablePcap
Enable PCAP generation for X2 link.
Ipv4AddressHelper m_s5Ipv4AddressHelper
S5 interfaces.
uint16_t m_x2LinkMtu
The MTU of the next X2 link to be created.
uint16_t m_gtpcUdpPort
UDP port where the GTPv2-C Socket is bound, fixed by the standard as 2123.
virtual void DoDispose()
Destructor implementation.
virtual void AddUe(Ptr< NetDevice > ueLteDevice, uint64_t imsi)
Notify the EPC of the existence of a new UE which might attach at a later time.
static TypeId GetTypeId(void)
Register this type.
Ptr< EpcPgwApplication > m_pgwApp
PGW application.
virtual void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2)
Add an X2 interface between two eNB.
uint16_t m_gtpuUdpPort
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152.
virtual void DoAddX2Interface(const Ptr< EpcX2 > &enb1X2, const Ptr< NetDevice > &enb1LteDev, const Ipv4Address &enb1X2Address, const Ptr< EpcX2 > &enb2X2, const Ptr< NetDevice > &enb2LteDev, const Ipv4Address &enb2X2Address) const
DoAddX2Interface: Call AddX2Interface on top of the Enb device pointers.
Time m_x2LinkDelay
The delay to be used for the next X2 link to be created.
virtual Ipv6Address GetUeDefaultGatewayAddress6()
Ipv4AddressHelper m_s11Ipv4AddressHelper
Helper to assign addresses to S11 NetDevices.
Time m_s11LinkDelay
The delay to be used for the next S11 link to be created.
virtual void AddS1Interface(Ptr< Node > enb, Ipv4Address enbAddress, Ipv4Address sgwAddress, std::vector< uint16_t > cellIds)
Add an S1 interface between an eNB and a SGW.
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
Ptr< Node > m_pgw
PGW network element.
DataRate m_s11LinkDataRate
The data rate to be used for the next S11 link to be created.
Ipv6AddressHelper m_uePgwAddressHelper6
helper to assign IPv6 addresses to UE devices as well as to the TUN device of the SGW/PGW
std::map< uint64_t, Ptr< NetDevice > > m_imsiEnbDeviceMap
Map storing for each IMSI the corresponding eNB NetDevice.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
virtual void DoActivateEpsBearerForUe(const Ptr< NetDevice > &ueDevice, const Ptr< EpcTft > &tft, const EpsBearer &bearer) const
DoActivateEpsBearerForUe: Schedule ActivateEpsBearer on the UE.
DataRate m_s5LinkDataRate
The data rate to be used for the next S5 link to be created.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.