5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::NrEpcPgwApplication Class Reference

#include "nr-epc-pgw-application.h"

+ Inheritance diagram for ns3::NrEpcPgwApplication:
+ Collaboration diagram for ns3::NrEpcPgwApplication:

Public Types

typedef void(* RxTracedCallback) (Ptr< Packet > packet)
 

Public Member Functions

 NrEpcPgwApplication (const Ptr< VirtualNetDevice > tunDevice, Ipv4Address s5Addr, const Ptr< Socket > s5uSocket, const Ptr< Socket > s5cSocket)
 
 ~NrEpcPgwApplication () override
 
void AddSgw (Ipv4Address sgwS5Addr)
 
void AddUe (uint64_t imsi)
 
void DoDispose () override
 
void RecvFromS5cSocket (Ptr< Socket > socket)
 
void RecvFromS5uSocket (Ptr< Socket > socket)
 
bool RecvFromTunDevice (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
 
void SendToS5uSocket (Ptr< Packet > packet, Ipv4Address sgwS5uAddress, uint32_t teid)
 
void SendToTunDevice (Ptr< Packet > packet, uint32_t teid)
 
void SetUeAddress (uint64_t imsi, Ipv4Address ueAddr)
 
void SetUeAddress6 (uint64_t imsi, Ipv6Address ueAddr)
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 

Detailed Description

This application implements the Packet Data Network (PDN) Gateway Entity (PGW) according to the 3GPP TS 23.401 document.

This Application implements the PGW side of the S5 interface between the PGW node and the SGW nodes and the PGW side of the SGi interface between the PGW node and the internet hosts. It supports the following functions and messages:

  • S5 connectivity (i.e. GTPv2-C signalling and GTP-U data plane)
  • Bearer management functions including dedicated bearer establishment
  • Per-user based packet filtering
  • UL and DL bearer binding
  • Tunnel Management messages

Others functions enumerated in section 4.4.3.3 of 3GPP TS 23.401 are not supported.

Definition at line 39 of file nr-epc-pgw-application.h.

Member Typedef Documentation

◆ RxTracedCallback

typedef void(* ns3::NrEpcPgwApplication::RxTracedCallback) (Ptr< Packet > packet)

TracedCallback signature for data Packet reception event.

Parameters
[in]packetThe data packet sent from the internet.

Definition at line 153 of file nr-epc-pgw-application.h.

Constructor & Destructor Documentation

◆ NrEpcPgwApplication()

ns3::NrEpcPgwApplication::NrEpcPgwApplication ( const Ptr< VirtualNetDevice >  tunDevice,
Ipv4Address  s5Addr,
const Ptr< Socket >  s5uSocket,
const Ptr< Socket >  s5cSocket 
)

Constructor that binds the tap device to the callback methods.

Parameters
tunDeviceTUN VirtualNetDevice used to tunnel IP packets from the SGi interface of the PGW in the internet over GTP-U/UDP/IP on the S5 interface
s5AddrIP address of the PGW S5 interface
s5uSocketsocket used to send GTP-U packets to the peer SGW
s5cSocketsocket used to send GTP-C packets to the peer SGW

Definition at line 131 of file nr-epc-pgw-application.cc.

References RecvFromS5cSocket(), and RecvFromS5uSocket().

+ Here is the call graph for this function:

◆ ~NrEpcPgwApplication()

ns3::NrEpcPgwApplication::~NrEpcPgwApplication ( )
override

Destructor

Definition at line 147 of file nr-epc-pgw-application.cc.

Member Function Documentation

◆ AddSgw()

void ns3::NrEpcPgwApplication::AddSgw ( Ipv4Address  sgwS5Addr)

Let the PGW be aware of a new SGW

Parameters
sgwS5Addrthe address of the SGW S5 interface

Definition at line 470 of file nr-epc-pgw-application.cc.

◆ AddUe()

void ns3::NrEpcPgwApplication::AddUe ( uint64_t  imsi)

Let the PGW be aware of a new UE

Parameters
imsithe unique identifier of the UE

Definition at line 477 of file nr-epc-pgw-application.cc.

◆ DoDispose()

void ns3::NrEpcPgwApplication::DoDispose ( )
override

Definition at line 122 of file nr-epc-pgw-application.cc.

◆ GetTypeId()

TypeId ns3::NrEpcPgwApplication::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 104 of file nr-epc-pgw-application.cc.

◆ RecvFromS5cSocket()

void ns3::NrEpcPgwApplication::RecvFromS5cSocket ( Ptr< Socket >  socket)

Method to be assigned to the receiver callback of the S5-C socket. It is called when the PGW receives a control packet from the SGW.

Parameters
socketpointer to the S5-C socket

Definition at line 244 of file nr-epc-pgw-application.cc.

References ns3::NrGtpcHeader::GetMessageType().

Referenced by NrEpcPgwApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RecvFromS5uSocket()

void ns3::NrEpcPgwApplication::RecvFromS5uSocket ( Ptr< Socket >  socket)

Method to be assigned to the receiver callback of the S5-U socket. It is called when the PGW receives a data packet from the SGW that is to be forwarded to the internet.

Parameters
socketpointer to the S5-U socket

Definition at line 229 of file nr-epc-pgw-application.cc.

References ns3::NrGtpuHeader::GetTeid(), and SendToTunDevice().

Referenced by NrEpcPgwApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RecvFromTunDevice()

bool ns3::NrEpcPgwApplication::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. It is called when the PGW receives a data packet from the internet (including IP headers) that is to be sent to the UE via its associated SGW and gNB, tunneling IP over GTP-U/UDP/IP.

Parameters
packet
source
dest
protocolNumber
Returns
true always

Definition at line 153 of file nr-epc-pgw-application.cc.

References SendToS5uSocket().

Referenced by ns3::NrNoBackhaulEpcHelper::NrNoBackhaulEpcHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendToS5uSocket()

void ns3::NrEpcPgwApplication::SendToS5uSocket ( Ptr< Packet >  packet,
Ipv4Address  sgwS5uAddress,
uint32_t  teid 
)

Send a data packet to the SGW via the S5-U interface

Parameters
packetpacket to be sent
sgwS5uAddressthe address of the SGW
teidthe Tunnel Endpoint Identifier

Definition at line 455 of file nr-epc-pgw-application.cc.

References ns3::NrGtpuHeader::SetLength(), and ns3::NrGtpuHeader::SetTeid().

Referenced by RecvFromTunDevice().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendToTunDevice()

void ns3::NrEpcPgwApplication::SendToTunDevice ( Ptr< Packet >  packet,
uint32_t  teid 
)

Send a data packet to the internet via the SGi interface of the PGW

Parameters
packetpacket to be sent
teidthe Tunnel Endpoint Identifier

Definition at line 424 of file nr-epc-pgw-application.cc.

Referenced by RecvFromS5uSocket().

+ Here is the caller graph for this function:

◆ SetUeAddress()

void ns3::NrEpcPgwApplication::SetUeAddress ( uint64_t  imsi,
Ipv4Address  ueAddr 
)

Set the address of a previously added UE

Parameters
imsithe unique identifier of the UE
ueAddrthe IPv4 address of the UE

Definition at line 485 of file nr-epc-pgw-application.cc.

◆ SetUeAddress6()

void ns3::NrEpcPgwApplication::SetUeAddress6 ( uint64_t  imsi,
Ipv6Address  ueAddr 
)

set the address of a previously added UE

Parameters
imsithe unique identifier of the UE
ueAddrthe IPv6 address of the UE

Definition at line 495 of file nr-epc-pgw-application.cc.


The documentation for this class was generated from the following files: