A Discrete-Event Network Simulator
API
emu-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) 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 #ifndef EMU_EPC_HELPER_H
24 #define EMU_EPC_HELPER_H
25 
26 #include <ns3/object.h>
27 #include <ns3/ipv4-address-helper.h>
28 #include <ns3/ipv6-address-helper.h>
29 #include <ns3/data-rate.h>
30 #include <ns3/epc-tft.h>
31 #include <ns3/eps-bearer.h>
32 #include <ns3/epc-helper.h>
33 
34 namespace ns3 {
35 
36 class Node;
37 class NetDevice;
38 class VirtualNetDevice;
39 class EpcSgwPgwApplication;
40 class EpcX2;
41 class EpcMme;
42 
54 class EmuEpcHelper : public EpcHelper
55 {
56 public:
57 
61  EmuEpcHelper ();
62 
66  virtual ~EmuEpcHelper ();
67 
68  // inherited from Object
73  static TypeId GetTypeId (void);
74  TypeId GetInstanceTypeId () const;
75  virtual void DoInitialize ();
76  virtual void DoDispose ();
77 
78  // inherited from EpcHelper
79  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
80  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
81  virtual void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2);
82  virtual uint8_t ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer);
83  virtual Ptr<Node> GetPgwNode ();
88 
89 
90 private:
91 
96 
101 
106 
111 
116 
121 
126 
130  uint16_t m_gtpuUdpPort;
131 
136  std::map<uint64_t, Ptr<NetDevice> > m_imsiEnbDeviceMap;
137 
142 
146  std::string m_sgwDeviceName;
147 
151  std::string m_enbDeviceName;
152 
156  std::string m_sgwMacAddress;
157 
161  std::string m_enbMacAddressBase;
162 
163 };
164 
165 
166 
167 
168 } // namespace ns3
169 
170 #endif // EMU_EPC_HELPER_H
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.
Keep track of a set of IPv6 interfaces.
holds a vector of std::pair of Ptr<Ipv4> and interface 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.
std::map< uint64_t, Ptr< NetDevice > > m_imsiEnbDeviceMap
Map storing for each IMSI the corresponding eNB NetDevice.
Ipv4AddressHelper m_uePgwAddressHelper
helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW ...
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.
virtual Ipv6Address GetUeDefaultGatewayAddress6()
virtual void DoInitialize()
Initialize() implementation.
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
virtual Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices)
Assign IPv6 addresses to UE devices.
holds a vector of ns3::NetDevice pointers
virtual void AddX2Interface(Ptr< Node > enbNode1, Ptr< Node > enbNode2)
Add an X2 interface between two eNB.
virtual void AddEnb(Ptr< Node > enbNode, Ptr< NetDevice > lteEnbNetDevice, uint16_t cellId)
Add an eNB to the EPC.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
Create an EPC network using EmuFdNetDevice.
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:51
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ipv4Address GetUeDefaultGatewayAddress()
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
virtual ~EmuEpcHelper()
Destructor.
Ptr< EpcSgwPgwApplication > m_sgwPgwApp
SGW-PGW application.
Helper class to auto-assign global IPv6 unicast addresses.
Describes an IPv6 address.
Definition: ipv6-address.h:49
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
virtual Ptr< Node > GetPgwNode()
std::string m_enbDeviceName
The name of the device used for the S1-U interface of the eNB.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Ipv6AddressHelper m_uePgwAddressHelper6
helper to assign IPv6 addresses to UE devices as well as to the TUN device of the SGW/PGW ...
Ipv4AddressHelper m_epcIpv4AddressHelper
helper to assign addresses to S1-U NetDevices
virtual void DoDispose()
Destructor implementation.
Ptr< VirtualNetDevice > m_tunDevice
TUN device containing IPv4 address and implementing tunneling of user data over GTP-U/UDP/IP.
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< Node > m_sgwPgw
SGW-PGW network element.
Ptr< EpcMme > m_mme
MME network element.