|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #ifndef EPC_PGW_APPLICATION_H
23 #define EPC_PGW_APPLICATION_H
25 #include "ns3/virtual-net-device.h"
26 #include "ns3/socket.h"
27 #include "ns3/application.h"
28 #include "ns3/epc-tft-classifier.h"
29 #include "ns3/epc-gtpc-header.h"
139 void AddUe (uint64_t imsi);
343 #endif // EPC_PGW_APPLICATION_H
void AddUe(uint64_t imsi)
Let the PGW be aware of a new UE.
a unique identifier for an interface.
void DoRecvDeleteBearerCommand(Ptr< Packet > packet)
Process Delete Bearer Command message.
virtual void DoDispose()
Destructor implementation.
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoByImsiMap
UeInfo stored by IMSI.
uint32_t Classify(Ptr< Packet > p, uint16_t protocolNumber)
Classify the packet according to TFTs of this UE.
void DoRecvDeleteBearerResponse(Ptr< Packet > packet)
Process Delete Bearer Response message.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TracedCallback< Ptr< Packet > > m_rxTunPktTrace
Callback to trace received data packets at Tun NetDevice from internet.
Ptr< VirtualNetDevice > m_tunDevice
TUN VirtualNetDevice used for tunneling/detunneling IP packets from/to the internet over GTP-U/UDP/IP...
Ipv4Address m_sgwS5Addr
SGW address of the S5 interface.
A template-based reference counting class.
Ipv4 addresses are stored in host order in this class.
void RemoveBearer(uint8_t bearerId)
Delete context of bearer for this UE on PGW side.
Describes an IPv6 address.
Ipv4Address GetUeAddr()
Get the IPv4 address of the UE.
static TypeId GetTypeId(void)
Get the type ID.
std::map< Ipv6Address, Ptr< UeInfo > > m_ueInfoByAddrMap6
UeInfo stored by UE IPv6 address.
void(* RxTracedCallback)(Ptr< Packet > packet)
TracedCallback signature for data Packet reception event.
Ipv4Address m_ueAddr
UE IPv4 address.
void DoRecvCreateSessionRequest(Ptr< Packet > packet)
Process Create Session Request message.
void SendToTunDevice(Ptr< Packet > packet, uint32_t teid)
Send a data packet to the internet via the SGi interface of the PGW.
void SendToS5uSocket(Ptr< Packet > packet, Ipv4Address sgwS5uAddress, uint32_t teid)
Send a data packet to the SGW via the S5-U interface.
void RecvFromS5uSocket(Ptr< Socket > socket)
Method to be assigned to the receiver callback of the S5-U socket.
void RecvFromS5cSocket(Ptr< Socket > socket)
Method to be assigned to the receiver callback of the S5-C socket.
EpcTftClassifier m_tftClassifier
TFT classifier.
Ipv4Address m_pgwS5Addr
PGW address of the S5 interface.
void AddBearer(uint8_t bearerId, uint32_t teid, Ptr< EpcTft > tft)
Add a bearer for this UE on PGW side.
virtual ~EpcPgwApplication(void)
Destructor.
a polymophic address class
This application implements the Packet Data Network (PDN) Gateway Entity (PGW) according to the 3GPP ...
classifies IP packets according to Traffic Flow Templates (TFTs)
void SetUeAddr6(Ipv6Address addr)
Set the IPv6 address of the UE.
Ipv6Address GetUeAddr6()
Get the IPv6 address of the UE.
uint16_t m_gtpcUdpPort
UDP port to be used for GTPv2-C.
Ipv4Address GetSgwAddr()
Get the address of the SGW to which the UE is connected.
void SetUeAddr(Ipv4Address addr)
Set the IPv4 address of the UE.
void SetUeAddress(uint64_t imsi, Ipv4Address ueAddr)
Set the address of a previously added UE.
bool RecvFromTunDevice(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Method to be assigned to the callback of the SGi TUN VirtualNetDevice.
store info for each UE connected to this PGW
TracedCallback< Ptr< Packet > > m_rxS5PktTrace
Callback to trace received data packets from S5 socket.
Ptr< Socket > m_s5uSocket
UDP socket to send/receive GTP-U packets to/from the S5 interface.
void SetUeAddress6(uint64_t imsi, Ipv6Address ueAddr)
set the address of a previously added UE
void DoRecvModifyBearerRequest(Ptr< Packet > packet)
Process Modify Bearer Request message.
uint16_t m_gtpuUdpPort
UDP port to be used for GTP-U.
void AddSgw(Ipv4Address sgwS5Addr)
Let the PGW be aware of a new SGW.
Forward calls to a chain of Callback.
void SetSgwAddr(Ipv4Address addr)
Set the address of the eNB to which the UE is connected.
The base class for all ns3 applications.
EpcPgwApplication(const Ptr< VirtualNetDevice > tunDevice, Ipv4Address s5Addr, const Ptr< Socket > s5uSocket, const Ptr< Socket > s5cSocket)
Constructor that binds the tap device to the callback methods.
std::map< Ipv4Address, Ptr< UeInfo > > m_ueInfoByAddrMap
UeInfo stored by UE IPv4 address.
Ptr< Socket > m_s5cSocket
UDP socket to send/receive GTPv2-C packets to/from the S5 interface.
std::map< uint8_t, uint32_t > m_teidByBearerIdMap
TEID By bearer ID Map.
Ipv4Address m_sgwAddr
SGW IPv4 address.
Ipv6Address m_ueAddr6
UE IPv6 address.