A Discrete-Event Network Simulator
API
point-to-point-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 POINT_TO_POINT_EPC_HELPER_H
24 #define POINT_TO_POINT_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 
53 {
54 public:
55 
60 
64  virtual ~PointToPointEpcHelper ();
65 
66  // inherited from Object
71  static TypeId GetTypeId (void);
72  TypeId GetInstanceTypeId () const;
73  virtual void DoDispose ();
74 
75  // inherited from EpcHelper
76  virtual void AddEnb (Ptr<Node> enbNode, Ptr<NetDevice> lteEnbNetDevice, uint16_t cellId);
77  virtual void AddUe (Ptr<NetDevice> ueLteDevice, uint64_t imsi);
78  virtual void AddX2Interface (Ptr<Node> enbNode1, Ptr<Node> enbNode2);
79  virtual uint8_t ActivateEpsBearer (Ptr<NetDevice> ueLteDevice, uint64_t imsi, Ptr<EpcTft> tft, EpsBearer bearer);
80  virtual Ptr<Node> GetPgwNode ();
85 
86 
87 private:
88 
97 
102 
107 
112 
117 
126 
131 
136 
143  uint16_t m_s1uLinkMtu;
144 
148  uint16_t m_gtpuUdpPort;
149 
153  std::map<uint64_t, Ptr<NetDevice> > m_imsiEnbDeviceMap;
154 
159 
164 
169 
174  uint16_t m_x2LinkMtu;
175 
183  std::string m_x2LinkPcapPrefix;
184 
189 
193  std::string m_s1uLinkPcapPrefix;
194 };
195 
196 
197 
198 
199 } // namespace ns3
200 
201 #endif // POINT_TO_POINT_EPC_HELPER_H
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
DataRate m_s1uLinkDataRate
The data rate to be used for the next S1-U link to be created.
Ptr< EpcMme > m_mme
MME network element.
Keep track of a set of IPv6 interfaces.
holds a vector of std::pair of Ptr and interface index.
static TypeId GetTypeId(void)
Register this type.
uint16_t m_s1uLinkMtu
The MTU of the next S1-U link to be created.
std::string m_s1uLinkPcapPrefix
Prefix for the PCAP file for the S1 link.
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.
Ptr< EpcSgwPgwApplication > m_sgwPgwApp
SGW-PGW application.
Class for representing data rates.
Definition: data-rate.h:88
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:71
Time m_s1uLinkDelay
The delay to be used for the next S1-U link to be created.
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.
holds a vector of ns3::NetDevice pointers
Ipv4AddressHelper m_uePgwAddressHelper
helper to assign IPv4 addresses to UE devices as well as to the TUN device of the SGW/PGW ...
virtual void DoDispose()
Destructor implementation.
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.
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:51
virtual Ipv4Address GetUeDefaultGatewayAddress()
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string m_x2LinkPcapPrefix
Prefix for the PCAP file for the X2 link.
Create an EPC network with PointToPoint links.
Time m_x2LinkDelay
The delay to be used for the next X2 link to be created.
uint16_t m_gtpuUdpPort
UDP port where the GTP-U Socket is bound, fixed by the standard as 2152.
Ipv6AddressHelper m_uePgwAddressHelper6
helper to assign IPv6 addresses to UE devices as well as to the TUN device of the SGW/PGW ...
Helper class to auto-assign global IPv6 unicast addresses.
virtual Ipv4InterfaceContainer AssignUeIpv4Address(NetDeviceContainer ueDevices)
Assign IPv4 addresses to UE devices.
Ipv4AddressHelper m_s1uIpv4AddressHelper
S1-U interfaces.
Describes an IPv6 address.
Definition: ipv6-address.h:49
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
Ipv6InterfaceContainer AssignUeIpv6Address(NetDeviceContainer ueDevices)
std::map< uint64_t, Ptr< NetDevice > > m_imsiEnbDeviceMap
Map storing for each IMSI the corresponding eNB NetDevice.
virtual ~PointToPointEpcHelper()
Destructor.
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.
uint16_t m_x2LinkMtu
The MTU of the next X2 link to be created.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
a unique identifier for an interface.
Definition: type-id.h:58
bool m_enablePcapOverX2
Enable PCAP generation for X2 link.
Ptr< VirtualNetDevice > m_tunDevice
TUN device implementing tunneling of user data over GTP-U/UDP/IP.
Ptr< Node > m_sgwPgw
SGW-PGW network element.
bool m_enablePcapOverS1U
Enable PCAP generation for S1U link.