A Discrete-Event Network Simulator
API
ns3::EpcMmeApplication Class Reference

This application implements the Mobility Management Entity (MME) according to the 3GPP TS 23.401 document. More...

#include "epc-mme-application.h"

+ Inheritance diagram for ns3::EpcMmeApplication:
+ Collaboration diagram for ns3::EpcMmeApplication:

Classes

struct  BearerInfo
 Hold info on an EPS bearer to be activated. More...
 
struct  EnbInfo
 Hold info on an ENB. More...
 
struct  UeInfo
 Hold info on a UE. More...
 

Public Member Functions

 EpcMmeApplication ()
 Constructor. More...
 
virtual ~EpcMmeApplication ()
 Destructor. More...
 
uint8_t AddBearer (uint64_t imsi, Ptr< EpcTft > tft, EpsBearer bearer)
 Add an EPS bearer to the list of bearers to be activated for this UE. More...
 
void AddEnb (uint16_t ecgi, Ipv4Address enbS1UAddr, EpcS1apSapEnb *enbS1apSap)
 Add a new eNB to the MME. More...
 
void AddSgw (Ipv4Address sgwS11Addr, Ipv4Address mmeS11Addr, Ptr< Socket > mmeS11Socket)
 Add a new SGW to the MME. More...
 
void AddUe (uint64_t imsi)
 Add a new UE to the MME. More...
 
virtual void DoDispose ()
 Destructor implementation. More...
 
EpcS1apSapMmeGetS1apSapMme ()
 
- Public Member Functions inherited from ns3::Application
 Application ()
 
virtual ~Application ()
 
Ptr< NodeGetNode () const
 
void SetNode (Ptr< Node > node)
 
void SetStartTime (Time start)
 Specify application start time. More...
 
void SetStopTime (Time stop)
 Specify application stop time. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= ([[maybe_unused]] const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Application
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

void DoErabReleaseIndication (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabToBeReleasedIndication > erabToBeReleaseIndication)
 Process ERAB Release Indication received from an eNB. More...
 
void DoInitialContextSetupResponse (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapMme::ErabSetupItem > erabSetupList)
 Process the S1 Initial Context Setup Response received from an eNB. More...
 
void DoInitialUeMessage (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, uint64_t imsi, uint16_t ecgi)
 Process the S1 Initial UE Message received from an eNB. More...
 
void DoPathSwitchRequest (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< EpcS1apSapMme::ErabSwitchedInDownlinkItem > erabToBeSwitchedInDownlinkList)
 Process the S1 Path Switch Request received from an eNB. More...
 
void DoRecvCreateSessionResponse (GtpcHeader &header, Ptr< Packet > packet)
 Process GTP-C Create Session Response message. More...
 
void DoRecvDeleteBearerRequest (GtpcHeader &header, Ptr< Packet > packet)
 Process GTP-C Delete Bearer Request message. More...
 
void DoRecvModifyBearerResponse (GtpcHeader &header, Ptr< Packet > packet)
 Process GTP-C Modify Bearer Response message. More...
 
void RecvFromS11Socket (Ptr< Socket > socket)
 Reads the S11 messages from a socket. More...
 
void RemoveBearer (Ptr< UeInfo > ueInfo, uint8_t epsBearerId)
 This Function erases all contexts of bearer from MME side. More...
 

Private Attributes

std::map< uint16_t, Ptr< EnbInfo > > m_enbInfoMap
 EnbInfo stored by EGCI. More...
 
uint16_t m_gtpcUdpPort
 UDP port for GTP-C protocol. Fixed by the standard to port 2123. More...
 
Ipv4Address m_mmeS11Addr
 IPv4 address of the MME S11 interface. More...
 
Ptr< Socketm_s11Socket
 Socket to send/receive messages in the S11 interface. More...
 
EpcS1apSapMmem_s1apSapMme
 EpcS1apSapMme. More...
 
Ipv4Address m_sgwS11Addr
 IPv4 address of the SGW S11 interface. More...
 
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoMap
 UeInfo stored by IMSI. More...
 

Friends

class MemberEpcS1apSapMme< EpcMmeApplication >
 allow MemberEpcS1apSapMme<EpcMme> class friend access More...
 

Additional Inherited Members

- Public Types inherited from ns3::Application
typedef void(* DelayAddressCallback) (const Time &delay, const Address &from)
 Common callback signature for packet delay and address. More...
 
typedef void(* StateTransitionCallback) (const std::string &oldState, const std::string &newState)
 Common signature used by callbacks to application's state transition trace source. More...
 
- Protected Member Functions inherited from ns3::Application
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 
- Protected Attributes inherited from ns3::Application
Ptr< Nodem_node
 The node that this application is installed on. More...
 
EventId m_startEvent
 The event that will fire at m_startTime to start the application. More...
 
Time m_startTime
 The simulation time that the application will start. More...
 
EventId m_stopEvent
 The event that will fire at m_stopTime to end the application. More...
 
Time m_stopTime
 The simulation time that the application will end. More...
 

Detailed Description

This application implements the Mobility Management Entity (MME) according to the 3GPP TS 23.401 document.

Introspection did not find any typical Config paths.

This Application implements the MME side of the S1-MME interface between the MME node and the eNB nodes and the MME side of the S11 interface between the MME node and the SGW node. It supports the following functions and messages:

  • Bearer management functions including dedicated bearer establishment
  • NAS signalling
  • Tunnel Management messages

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


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 240 bytes (on a 64-bit architecture).

Definition at line 46 of file epc-mme-application.h.

Constructor & Destructor Documentation

◆ EpcMmeApplication()

ns3::EpcMmeApplication::EpcMmeApplication ( )

Constructor.

Definition at line 31 of file epc-mme-application.cc.

References m_s1apSapMme, MemberEpcS1apSapMme< EpcMmeApplication >, and NS_LOG_FUNCTION.

◆ ~EpcMmeApplication()

ns3::EpcMmeApplication::~EpcMmeApplication ( )
virtual

Destructor.

Definition at line 37 of file epc-mme-application.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddBearer()

uint8_t ns3::EpcMmeApplication::AddBearer ( uint64_t  imsi,
Ptr< EpcTft tft,
EpsBearer  bearer 
)

Add an EPS bearer to the list of bearers to be activated for this UE.

The bearer will be activated when the UE enters the ECM connected state.

Parameters
imsiUE identifier
tfttraffic flow template of the bearer
bearerQoS characteristics of the bearer
Returns
bearer ID

Definition at line 98 of file epc-mme-application.cc.

References ns3::EpcMmeApplication::BearerInfo::bearer, ns3::EpcMmeApplication::BearerInfo::bearerId, m_ueInfoMap, NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::EpcMmeApplication::BearerInfo::tft.

◆ AddEnb()

void ns3::EpcMmeApplication::AddEnb ( uint16_t  ecgi,
Ipv4Address  enbS1UAddr,
EpcS1apSapEnb enbS1apSap 
)

Add a new eNB to the MME.

Parameters
ecgiE-UTRAN Cell Global ID, the unique identifier of the eNodeB
enbS1UAddrIPv4 address of the eNB for S1-U communications
enbS1apSapthe eNB side of the S1-AP SAP

Definition at line 76 of file epc-mme-application.cc.

References m_enbInfoMap, and NS_LOG_FUNCTION.

◆ AddSgw()

void ns3::EpcMmeApplication::AddSgw ( Ipv4Address  sgwS11Addr,
Ipv4Address  mmeS11Addr,
Ptr< Socket mmeS11Socket 
)

Add a new SGW to the MME.

Parameters
sgwS11AddrIPv4 address of the SGW S11 interface
mmeS11AddrIPv4 address of the MME S11 interface
mmeS11Socketsocket of the MME S11 interface

Definition at line 66 of file epc-mme-application.cc.

References m_mmeS11Addr, m_s11Socket, m_sgwS11Addr, ns3::MakeCallback(), NS_LOG_FUNCTION, RecvFromS11Socket(), and ns3::Socket::SetRecvCallback().

+ Here is the call graph for this function:

◆ AddUe()

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

Add a new UE to the MME.

This is the equivalent of storing the UE credentials before the UE is ever turned on.

Parameters
imsithe unique identifier of the UE

Definition at line 87 of file epc-mme-application.cc.

References m_ueInfoMap, and NS_LOG_FUNCTION.

◆ DoDispose()

void ns3::EpcMmeApplication::DoDispose ( void  )
virtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Application.

Definition at line 43 of file epc-mme-application.cc.

References m_s1apSapMme, and NS_LOG_FUNCTION.

◆ DoErabReleaseIndication()

void ns3::EpcMmeApplication::DoErabReleaseIndication ( uint64_t  mmeUeS1Id,
uint16_t  enbUeS1Id,
std::list< EpcS1apSapMme::ErabToBeReleasedIndication erabToBeReleaseIndication 
)
private

Process ERAB Release Indication received from an eNB.

Parameters
mmeUeS1Idthe MME UE S1 ID
enbUeS1Idthe ENB UE S1 ID
erabToBeReleaseIndicationthe ERAB to be release indication list

Definition at line 203 of file epc-mme-application.cc.

References ns3::Packet::AddHeader(), ns3::GtpcHeader::ComputeMessageLength(), ns3::GtpcDeleteBearerCommandMessage::BearerContext::m_epsBearerId, m_gtpcUdpPort, m_s11Socket, m_sgwS11Addr, m_ueInfoMap, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Socket::SendTo(), ns3::GtpcDeleteBearerCommandMessage::SetBearerContexts(), and ns3::GtpcHeader::SetTeid().

+ Here is the call graph for this function:

◆ DoInitialContextSetupResponse()

void ns3::EpcMmeApplication::DoInitialContextSetupResponse ( uint64_t  mmeUeS1Id,
uint16_t  enbUeS1Id,
std::list< EpcS1apSapMme::ErabSetupItem erabSetupList 
)
private

Process the S1 Initial Context Setup Response received from an eNB.

Parameters
mmeUeS1Idthe MME UE S1 ID
enbUeS1Idthe ENB UE S1 ID
erabSetupListthe ERAB setup list

Definition at line 157 of file epc-mme-application.cc.

References NS_FATAL_ERROR, and NS_LOG_FUNCTION.

◆ DoInitialUeMessage()

◆ DoPathSwitchRequest()

void ns3::EpcMmeApplication::DoPathSwitchRequest ( uint64_t  enbUeS1Id,
uint64_t  mmeUeS1Id,
uint16_t  cgi,
std::list< EpcS1apSapMme::ErabSwitchedInDownlinkItem erabToBeSwitchedInDownlinkList 
)
private

◆ DoRecvCreateSessionResponse()

void ns3::EpcMmeApplication::DoRecvCreateSessionResponse ( GtpcHeader header,
Ptr< Packet packet 
)
private

Process GTP-C Create Session Response message.

Parameters
headerthe GTP-C header
packetthe packet containing the message

Definition at line 278 of file epc-mme-application.cc.

References ns3::EpcS1apSapEnb::ErabToBeSetupItem::erabId, ns3::EpcS1apSapEnb::ErabToBeSetupItem::erabLevelQosParameters, ns3::GtpcCreateSessionResponseMessage::GetBearerContextsCreated(), ns3::GtpcHeader::GetTeid(), m_enbInfoMap, m_ueInfoMap, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::RemoveHeader(), ns3::EpcS1apSapEnb::ErabToBeSetupItem::sgwTeid, and ns3::EpcS1apSapEnb::ErabToBeSetupItem::transportLayerAddress.

Referenced by RecvFromS11Socket().

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

◆ DoRecvDeleteBearerRequest()

void ns3::EpcMmeApplication::DoRecvDeleteBearerRequest ( GtpcHeader header,
Ptr< Packet packet 
)
private

Process GTP-C Delete Bearer Request message.

Parameters
headerthe GTP-C header
packetthe packet containing the message

Definition at line 339 of file epc-mme-application.cc.

References ns3::Packet::AddHeader(), ns3::GtpcHeader::ComputeMessageLength(), ns3::GtpcDeleteBearerRequestMessage::GetEpsBearerIds(), ns3::GtpcHeader::GetTeid(), m_gtpcUdpPort, m_s11Socket, m_sgwS11Addr, m_ueInfoMap, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, RemoveBearer(), ns3::Packet::RemoveHeader(), ns3::Socket::SendTo(), ns3::GtpcDeleteBearerResponseMessage::SetEpsBearerIds(), and ns3::GtpcHeader::SetTeid().

Referenced by RecvFromS11Socket().

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

◆ DoRecvModifyBearerResponse()

void ns3::EpcMmeApplication::DoRecvModifyBearerResponse ( GtpcHeader header,
Ptr< Packet packet 
)
private

Process GTP-C Modify Bearer Response message.

Parameters
headerthe GTP-C header
packetthe packet containing the message

Definition at line 315 of file epc-mme-application.cc.

References ns3::GtpcModifyBearerResponseMessage::GetCause(), ns3::GtpcHeader::GetTeid(), m_enbInfoMap, m_ueInfoMap, NS_ASSERT, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::RemoveHeader(), and ns3::GtpcIes::REQUEST_ACCEPTED.

Referenced by RecvFromS11Socket().

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

◆ GetS1apSapMme()

EpcS1apSapMme * ns3::EpcMmeApplication::GetS1apSapMme ( )
Returns
the MME side of the S1-AP SAP

Definition at line 60 of file epc-mme-application.cc.

References m_s1apSapMme.

◆ GetTypeId()

TypeId ns3::EpcMmeApplication::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 50 of file epc-mme-application.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ RecvFromS11Socket()

void ns3::EpcMmeApplication::RecvFromS11Socket ( Ptr< Socket socket)
private

Reads the S11 messages from a socket.

Parameters
socketthe socket

Definition at line 248 of file epc-mme-application.cc.

References ns3::GtpcHeader::CreateSessionResponse, ns3::GtpcHeader::DeleteBearerRequest, DoRecvCreateSessionResponse(), DoRecvDeleteBearerRequest(), DoRecvModifyBearerResponse(), ns3::GtpcHeader::GetMessageType(), m_s11Socket, ns3::GtpcHeader::ModifyBearerResponse, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Packet::PeekHeader(), and ns3::Socket::Recv().

Referenced by AddSgw().

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

◆ RemoveBearer()

void ns3::EpcMmeApplication::RemoveBearer ( Ptr< UeInfo ueInfo,
uint8_t  epsBearerId 
)
private

This Function erases all contexts of bearer from MME side.

Parameters
ueInfoUE information pointer
epsBearerIdBearer Id which need to be removed corresponding to UE

Definition at line 230 of file epc-mme-application.cc.

References NS_LOG_FUNCTION.

Referenced by DoRecvDeleteBearerRequest().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ MemberEpcS1apSapMme< EpcMmeApplication >

friend class MemberEpcS1apSapMme< EpcMmeApplication >
friend

allow MemberEpcS1apSapMme<EpcMme> class friend access

Definition at line 1 of file epc-mme-application.h.

Referenced by EpcMmeApplication().

Member Data Documentation

◆ m_enbInfoMap

std::map<uint16_t, Ptr<EnbInfo> > ns3::EpcMmeApplication::m_enbInfoMap
private

EnbInfo stored by EGCI.

Definition at line 227 of file epc-mme-application.h.

Referenced by AddEnb(), DoRecvCreateSessionResponse(), and DoRecvModifyBearerResponse().

◆ m_gtpcUdpPort

uint16_t ns3::EpcMmeApplication::m_gtpcUdpPort
private

UDP port for GTP-C protocol. Fixed by the standard to port 2123.

Definition at line 235 of file epc-mme-application.h.

Referenced by DoErabReleaseIndication(), DoInitialUeMessage(), DoPathSwitchRequest(), and DoRecvDeleteBearerRequest().

◆ m_mmeS11Addr

Ipv4Address ns3::EpcMmeApplication::m_mmeS11Addr
private

IPv4 address of the MME S11 interface.

Definition at line 233 of file epc-mme-application.h.

Referenced by AddSgw(), and DoInitialUeMessage().

◆ m_s11Socket

Ptr<Socket> ns3::EpcMmeApplication::m_s11Socket
private

Socket to send/receive messages in the S11 interface.

Definition at line 232 of file epc-mme-application.h.

Referenced by AddSgw(), DoErabReleaseIndication(), DoInitialUeMessage(), DoPathSwitchRequest(), DoRecvDeleteBearerRequest(), and RecvFromS11Socket().

◆ m_s1apSapMme

EpcS1apSapMme* ns3::EpcMmeApplication::m_s1apSapMme
private

EpcS1apSapMme.

Definition at line 230 of file epc-mme-application.h.

Referenced by EpcMmeApplication(), DoDispose(), and GetS1apSapMme().

◆ m_sgwS11Addr

Ipv4Address ns3::EpcMmeApplication::m_sgwS11Addr
private

IPv4 address of the SGW S11 interface.

Definition at line 234 of file epc-mme-application.h.

Referenced by AddSgw(), DoErabReleaseIndication(), DoInitialUeMessage(), DoPathSwitchRequest(), and DoRecvDeleteBearerRequest().

◆ m_ueInfoMap

std::map<uint64_t, Ptr<UeInfo> > ns3::EpcMmeApplication::m_ueInfoMap
private

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