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> 149 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.
TracedCallback< Ptr< Packet > > m_rxTunPktTrace
Callback to trace RX (reception) data packets at Tun Net Device from internet.
store info for each UE connected to this SGW
Forward calls to a chain of Callback.
classifies IP packets according to Traffic Flow Templates (TFTs)
EpcS11SapMme * m_s11SapMme
MME side of the S11 SAP.
Ipv4Address m_enbAddr
ENB IPv4 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.
TracedCallback< Ptr< Packet > > m_rxS1uPktTrace
Callback to trace RX (reception) data packets from S1-U socket.
void SetUeAddress6(uint64_t imsi, Ipv6Address ueAddr)
set the address of a previously added UE
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 IPv4 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 SetUeAddr6(Ipv6Address addr)
set the IPv6 address of the UE
void AddUe(uint64_t imsi)
Let the SGW be aware of a new UE.
Ipv4Address enbAddr
eNB IPv4 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 IPv4 address the corresponding UE info.
Describes an IPv6 address.
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
Ipv6Address m_ueAddr6
UE IPv6 address.
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.
void(* RxTracedCallback)(Ptr< Packet > packet)
TracedCallback signature for data Packet reception event.
EpcS11SapSgw * m_s11SapSgw
SGW side of the S11 SAP.
A template-based reference counting class.
a unique identifier for an interface.
Ipv4Address sgwAddr
SGW IPV4 address.
Ipv4Address m_ueAddr
UE IPv4 address.
void AddEnb(uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
Let the SGW be aware of a new eNB.
std::map< Ipv6Address, Ptr< UeInfo > > m_ueInfoByAddrMap6
Map telling for each UE IPv6 address the corresponding UE info.
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.