A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::EpcEnbApplication Class Reference

#include <epc-enb-application.h>

+ Inheritance diagram for ns3::EpcEnbApplication:

Classes

struct  EpsFlowId_t
 

Public Member Functions

 EpcEnbApplication (Ptr< Socket > lteSocket, Ptr< Socket > s1uSocket, Ipv4Address enbS1uAddress, Ipv4Address sgwS1uAddress, uint16_t cellId)
 
virtual ~EpcEnbApplication (void)
 
EpcS1apSapEnbGetS1apSapEnb ()
 
EpcEnbS1SapProviderGetS1SapProvider ()
 
void RecvFromLteSocket (Ptr< Socket > socket)
 
void RecvFromS1uSocket (Ptr< Socket > socket)
 
void SetS1apSapMme (EpcS1apSapMme *s)
 
void SetS1SapUser (EpcEnbS1SapUser *s)
 
- Public Member Functions inherited from ns3::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
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Application
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Protected Member Functions

void DoDispose (void)
 
- Protected Member Functions inherited from ns3::Application
virtual void DoInitialize (void)
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Private Member Functions

void DoInitialContextSetupRequest (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list< EpcS1apSapEnb::ErabToBeSetupItem > erabToBeSetupList)
 
void DoInitialUeMessage (uint64_t imsi, uint16_t rnti)
 
void DoPathSwitchRequest (EpcEnbS1SapProvider::PathSwitchRequestParameters params)
 
void DoPathSwitchRequestAcknowledge (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list< EpcS1apSapEnb::ErabSwitchedInUplinkItem > erabToBeSwitchedInUplinkList)
 
void DoUeContextRelease (uint16_t rnti)
 
void SendToLteSocket (Ptr< Packet > packet, uint16_t rnti, uint8_t bid)
 
void SendToS1uSocket (Ptr< Packet > packet, uint32_t teid)
 
void SetupS1Bearer (uint32_t teid, uint16_t rnti, uint8_t bid)
 

Private Attributes

uint16_t m_cellId
 
Ipv4Address m_enbS1uAddress
 
uint16_t m_gtpuUdpPort
 
std::map< uint64_t, uint16_t > m_imsiRntiMap
 
Ptr< Socketm_lteSocket
 
std::map< uint16_t, std::map
< uint8_t, uint32_t > > 
m_rbidTeidMap
 
EpcS1apSapEnbm_s1apSapEnb
 
EpcS1apSapMmem_s1apSapMme
 
EpcEnbS1SapProviderm_s1SapProvider
 
EpcEnbS1SapUserm_s1SapUser
 
Ptr< Socketm_s1uSocket
 
Ipv4Address m_sgwS1uAddress
 
std::map< uint32_t, EpsFlowId_tm_teidRbidMap
 

Friends

class MemberEpcEnbS1SapProvider< EpcEnbApplication >
 
class MemberEpcS1apSapEnb< EpcEnbApplication >
 

Additional Inherited Members

- Protected Attributes inherited from ns3::Application
Ptr< Nodem_node
 
EventId m_startEvent
 
Time m_startTime
 
EventId m_stopEvent
 
Time m_stopTime
 

Detailed Description

This application is installed inside eNBs and provides the bridge functionality for user data plane packets between the radio interface and the S1-U interface.

Definition at line 49 of file epc-enb-application.h.

Constructor & Destructor Documentation

ns3::EpcEnbApplication::EpcEnbApplication ( Ptr< Socket lteSocket,
Ptr< Socket s1uSocket,
Ipv4Address  enbS1uAddress,
Ipv4Address  sgwS1uAddress,
uint16_t  cellId 
)

Constructor

Parameters
lteSocketthe socket to be used to send/receive packets to/from the LTE radio interface
s1uSocketthe socket to be used to send/receive packets to/from the S1-U interface connected with the SGW
enbS1uAddressthe IPv4 address of the S1-U interface of this eNB
sgwS1uAddressthe IPv4 address at which this eNB will be able to reach its SGW for S1-U communications
cellIdthe identifier of the enb

Definition at line 81 of file epc-enb-application.cc.

References m_lteSocket, m_s1apSapEnb, m_s1SapProvider, m_s1uSocket, ns3::MakeCallback(), NS_LOG_FUNCTION, RecvFromLteSocket(), RecvFromS1uSocket(), and ns3::Socket::SetRecvCallback().

ns3::EpcEnbApplication::~EpcEnbApplication ( void  )
virtual

Destructor

Definition at line 99 of file epc-enb-application.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EpcEnbApplication::DoDispose ( void  )
protectedvirtual

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

Subclasses are expected to implement their real destruction code in an overriden 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 71 of file epc-enb-application.cc.

References NS_LOG_FUNCTION.

EpcS1apSapEnb * ns3::EpcEnbApplication::GetS1apSapEnb ( )
Returns
the ENB side of the S1-AP SAP

Definition at line 126 of file epc-enb-application.cc.

References m_s1apSapEnb.

EpcEnbS1SapProvider * ns3::EpcEnbApplication::GetS1SapProvider ( )
Returns
the S1 SAP Provider

Definition at line 113 of file epc-enb-application.cc.

References m_s1SapProvider.

void ns3::EpcEnbApplication::RecvFromLteSocket ( Ptr< Socket socket)

Method to be assigned to the recv callback of the LTE socket. It is called when the eNB receives a data packet from the radio interface that is to be forwarded to the SGW.

Parameters
socketpointer to the LTE socket

Definition at line 240 of file epc-enb-application.cc.

References m_lteSocket, m_rbidTeidMap, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, NS_LOG_WARN, ns3::Socket::Recv(), ns3::Packet::RemovePacketTag(), and SendToS1uSocket().

Referenced by EpcEnbApplication().

void ns3::EpcEnbApplication::RecvFromS1uSocket ( Ptr< Socket socket)

Method to be assigned to the recv callback of the S1-U socket. It is called when the eNB receives a data packet from the SGW that is to be forwarded to the UE.

Parameters
socketpointer to the S1-U socket

Definition at line 271 of file epc-enb-application.cc.

References m_s1uSocket, m_teidRbidMap, NS_ASSERT, NS_LOG_FUNCTION, ns3::Socket::Recv(), ns3::Packet::RemoveHeader(), ns3::Packet::RemovePacketTag(), and SendToLteSocket().

Referenced by EpcEnbApplication().

void ns3::EpcEnbApplication::SendToLteSocket ( Ptr< Packet packet,
uint16_t  rnti,
uint8_t  bid 
)
private

Send a packet to the UE via the LTE radio interface of the eNB

Parameters
packett
bidthe EPS Bearer IDentifier

Definition at line 290 of file epc-enb-application.cc.

References ns3::Packet::AddPacketTag(), ns3::Packet::GetSize(), m_lteSocket, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Socket::Send().

Referenced by RecvFromS1uSocket().

void ns3::EpcEnbApplication::SendToS1uSocket ( Ptr< Packet packet,
uint32_t  teid 
)
private

Send a packet to the SGW via the S1-U interface

Parameters
packetpacket to be sent
teidthe Tunnel Enpoint IDentifier

Definition at line 301 of file epc-enb-application.cc.

References ns3::Packet::AddHeader(), ns3::Packet::GetSize(), m_gtpuUdpPort, m_s1uSocket, m_sgwS1uAddress, NS_LOG_FUNCTION, and ns3::Socket::SendTo().

Referenced by RecvFromLteSocket().

void ns3::EpcEnbApplication::SetS1apSapMme ( EpcS1apSapMme s)

Set the MME side of the S1-AP SAP

Parameters
sthe MME side of the S1-AP SAP

Definition at line 119 of file epc-enb-application.cc.

References m_s1apSapMme.

void ns3::EpcEnbApplication::SetS1SapUser ( EpcEnbS1SapUser s)

Set the S1 SAP User

Parameters
sthe S1 SAP User

Definition at line 106 of file epc-enb-application.cc.

References m_s1SapUser.

void ns3::EpcEnbApplication::SetupS1Bearer ( uint32_t  teid,
uint16_t  rnti,
uint8_t  bid 
)
private

internal method used for the actual setup of the S1 Bearer

Parameters
teid
rnti
bid

Member Data Documentation

Ipv4Address ns3::EpcEnbApplication::m_enbS1uAddress
private

address of the eNB for S1-U communications

Definition at line 193 of file epc-enb-application.h.

uint16_t ns3::EpcEnbApplication::m_gtpuUdpPort
private

UDP port to be used for GTP

Definition at line 215 of file epc-enb-application.h.

Referenced by SendToS1uSocket().

std::map<uint64_t, uint16_t> ns3::EpcEnbApplication::m_imsiRntiMap
private

UE context info

Definition at line 243 of file epc-enb-application.h.

Ptr<Socket> ns3::EpcEnbApplication::m_lteSocket
private

raw packet socket to send and receive the packets to and from the LTE radio interface

Definition at line 183 of file epc-enb-application.h.

Referenced by EpcEnbApplication(), RecvFromLteSocket(), and SendToLteSocket().

std::map<uint16_t, std::map<uint8_t, uint32_t> > ns3::EpcEnbApplication::m_rbidTeidMap
private

map of maps telling for each RNTI and BID the corresponding S1-U TEID

Definition at line 204 of file epc-enb-application.h.

Referenced by RecvFromLteSocket().

EpcS1apSapEnb* ns3::EpcEnbApplication::m_s1apSapEnb
private

ENB side of the S1-AP SAP

Definition at line 237 of file epc-enb-application.h.

Referenced by EpcEnbApplication(), and GetS1apSapEnb().

EpcS1apSapMme* ns3::EpcEnbApplication::m_s1apSapMme
private

MME side of the S1-AP SAP

Definition at line 231 of file epc-enb-application.h.

Referenced by SetS1apSapMme().

EpcEnbS1SapProvider* ns3::EpcEnbApplication::m_s1SapProvider
private

Provider for the S1 SAP

Definition at line 220 of file epc-enb-application.h.

Referenced by EpcEnbApplication(), and GetS1SapProvider().

EpcEnbS1SapUser* ns3::EpcEnbApplication::m_s1SapUser
private

User for the S1 SAP

Definition at line 225 of file epc-enb-application.h.

Referenced by SetS1SapUser().

Ptr<Socket> ns3::EpcEnbApplication::m_s1uSocket
private

UDP socket to send and receive GTP-U the packets to and from the S1-U interface

Definition at line 188 of file epc-enb-application.h.

Referenced by EpcEnbApplication(), RecvFromS1uSocket(), and SendToS1uSocket().

Ipv4Address ns3::EpcEnbApplication::m_sgwS1uAddress
private

address of the SGW which terminates all S1-U tunnels

Definition at line 198 of file epc-enb-application.h.

Referenced by SendToS1uSocket().

std::map<uint32_t, EpsFlowId_t> ns3::EpcEnbApplication::m_teidRbidMap
private

map telling for each S1-U TEID the corresponding RNTI,BID

Definition at line 210 of file epc-enb-application.h.

Referenced by RecvFromS1uSocket().


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