22 #ifndef EPC_SGW_PGW_APPLICATION_H
23 #define EPC_SGW_PGW_APPLICATION_H
25 #include <ns3/address.h>
26 #include <ns3/socket.h>
27 #include <ns3/virtual-net-device.h>
28 #include <ns3/traced-callback.h>
29 #include <ns3/callback.h>
31 #include <ns3/object.h>
32 #include <ns3/eps-bearer.h>
33 #include <ns3/epc-tft.h>
34 #include <ns3/epc-tft-classifier.h>
35 #include <ns3/lte-common.h>
36 #include <ns3/application.h>
37 #include <ns3/epc-s1ap-sap.h>
38 #include <ns3/epc-s11-sap.h>
148 void AddUe (uint64_t imsi);
std::map< uint16_t, EnbInfo > m_enbInfoByCellId
eNB info by cell ID
Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17.1.
MME side of the S11 Service Access Point (SAP), provides the MME methods to be called when an S11 mes...
uint16_t m_gtpuUdpPort
UDP port to be used for GTP.
void SetS11SapMme(EpcS11SapMme *s)
Set the MME side of the S11 SAP.
store info for each UE connected to this SGW
classifies IP packets accoding to Traffic Flow Templates (TFTs)
EpcS11SapMme * m_s11SapMme
MME side of the S11 SAP.
Ipv4Address m_enbAddr
ENB address.
void SendToTunDevice(Ptr< Packet > packet, uint32_t teid)
Send a packet to the internet via the Gi interface of the SGW/PGW.
Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10.2.
a polymophic address class
Template for the implementation of the EpcS11SapSgw as a member of an owner class of type C to which ...
uint32_t m_teidCount
TEID count.
void RemoveBearer(uint8_t bearerId)
Function, deletes contexts of bearer on SGW and PGW side.
The base class for all ns3 applications.
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.
Ptr< VirtualNetDevice > m_tunDevice
TUN VirtualNetDevice used for tunneling/detunneling IP packets from/to the internet over GTP-U/UDP/IP...
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoByImsiMap
Map telling for each IMSI the corresponding UE info.
void DoCreateSessionRequest(EpcS11SapSgw::CreateSessionRequestMessage msg)
Create session request function.
void SetUeAddr(Ipv4Address addr)
set the address of the UE
uint32_t Classify(Ptr< Packet > p)
Modify Bearer Request message, see 3GPP TS 29.274 7.2.7.
std::map< uint8_t, uint32_t > m_teidByBearerIdMap
TEID By bearer ID Map.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void AddBearer(Ptr< EpcTft > tft, uint8_t epsBearerId, uint32_t teid)
void SetUeAddress(uint64_t imsi, Ipv4Address ueAddr)
set the address of a previously added UE
void DoDeleteBearerResponse(EpcS11SapSgw::DeleteBearerResponseMessage req)
Delete bearer response function.
EpcTftClassifier m_tftClassifier
TFT classifier.
static TypeId GetTypeId(void)
Get the type ID.
void AddUe(uint64_t imsi)
Let the SGW be aware of a new UE.
Ipv4Address enbAddr
eNB address
void SendToS1uSocket(Ptr< Packet > packet, Ipv4Address enbS1uAddress, uint32_t teid)
Send a packet to the SGW via the S1-U interface.
Ptr< Socket > m_s1uSocket
UDP socket to send and receive GTP-U packets to and from the S1-U interface.
std::map< Ipv4Address, Ptr< UeInfo > > m_ueInfoByAddrMap
Map telling for each UE address the corresponding UE info.
Ipv4 addresses are stored in host order in this class.
void DoDeleteBearerCommand(EpcS11SapSgw::DeleteBearerCommandMessage req)
Delete bearer command function.
SGW side of the S11 Service Access Point (SAP), provides the SGW methods to be called when an S11 mes...
This application implements the SGW/PGW functionality.
void SetEnbAddr(Ipv4Address addr)
set the address of the eNB to which the UE is connected
virtual void DoDispose()
Destructor implementation.
EpcS11SapSgw * GetS11SapSgw()
void RecvFromS1uSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the S1-U socket.
virtual ~EpcSgwPgwApplication(void)
Destructor.
void DoModifyBearerRequest(EpcS11SapSgw::ModifyBearerRequestMessage msg)
Modify bearer request function.
EpcS11SapSgw * m_s11SapSgw
SGW side of the S11 SAP.
A template-based reference counting class.
a unique identifier for an interface.
Ipv4Address sgwAddr
SGW address.
Ipv4Address m_ueAddr
UE address.
void AddEnb(uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
Let the SGW be aware of a new eNB.
Create Session Request message, see 3GPP TS 29.274 7.2.1.
EpcSgwPgwApplication(const Ptr< VirtualNetDevice > tunDevice, const Ptr< Socket > s1uSocket)
Constructor that binds the tap device to the callback methods.