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

#include <epc-enb-application.h>

+ Inheritance diagram for ns3::EpcEnbApplication:
+ Collaboration diagram for ns3::EpcEnbApplication:

Public Member Functions

 EpcEnbApplication (Ptr< Socket > lteSocket, Ptr< Socket > s1uSocket, Ipv4Address sgwAddress)
virtual ~EpcEnbApplication (void)
void ErabSetupRequest (uint32_t teid, uint16_t rnti, uint8_t lcid)
void RecvFromLteSocket (Ptr< Socket > socket)
void RecvFromS1uSocket (Ptr< Socket > socket)
void SendToLteSocket (Ptr< Packet > packet, uint16_t rnti, uint8_t lcid)
void SendToS1uSocket (Ptr< Packet > packet, uint32_t teid)
- 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.
void SetStopTime (Time stop)
 Specify application stop time.
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~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 Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 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
virtual ~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)
 This method returns the TypeId associated to ns3::Application.

Private Attributes

uint16_t m_gtpuUdpPort
Ptr< Socketm_lteSocket
std::map< LteFlowId_t, uint32_t > m_rbidTeidMap
Ptr< Socketm_s1uSocket
Ipv4Address m_sgwAddress
std::map< uint32_t, LteFlowId_tm_teidRbidMap

Additional Inherited Members

- Protected Member Functions inherited from ns3::Application
virtual void DoDispose (void)
virtual void DoStart (void)
- 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 43 of file epc-enb-application.h.

Constructor & Destructor Documentation

ns3::EpcEnbApplication::EpcEnbApplication ( Ptr< Socket lteSocket,
Ptr< Socket s1uSocket,
Ipv4Address  sgwAddress 
)

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
sgwAddressthe IPv4 address at which this eNB will be able to reach its SGW

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

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

+ Here is the call graph for this function:

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

Destructor

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

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EpcEnbApplication::ErabSetupRequest ( uint32_t  teid,
uint16_t  rnti,
uint8_t  lcid 
)

This method is triggered after the eNB received a S1-AP message of type E-RAB Setup Request by the MME and the RadioBearer has already been created

Parameters
teidthe Tunnel Endpoint IDentifier of the S1-bearer to be setup.
rntithe unique ID of the UE on this eNB
lcidthe Logical Channel ID identifying the Radio Bearer

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

References m_rbidTeidMap, m_teidRbidMap, and NS_LOG_FUNCTION.

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

This method returns the TypeId associated to ns3::Application.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/ApplicationList/[i]

Attributes defined for this type:

  • StartTime: Time at which the application will start
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +0.0ns
    • Flags: construct write read
  • StopTime: Time at which the application will stop
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +0.0ns
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::Application.

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

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

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 73 of file epc-enb-application.cc.

References ns3::LteRadioBearerTag::GetLcid(), ns3::LteRadioBearerTag::GetRnti(), ns3::LteFlowId_t::m_lcId, m_lteSocket, m_rbidTeidMap, ns3::LteFlowId_t::m_rnti, NS_ASSERT, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Socket::Recv(), ns3::Packet::RemovePacketTag(), and SendToS1uSocket().

Referenced by EpcEnbApplication().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 97 of file epc-enb-application.cc.

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

Referenced by EpcEnbApplication().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

Parameters
packett
rbidthe Radio Bearer IDentifier

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

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

Referenced by RecvFromS1uSocket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

Parameters
packetpacket to be sent
teidthe Tunnel Enpoint IDentifier

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

References ns3::Packet::AddHeader(), ns3::GtpuHeader::GetSerializedSize(), ns3::Packet::GetSize(), m_gtpuUdpPort, m_s1uSocket, m_sgwAddress, NS_LOG_FUNCTION, ns3::Socket::SendTo(), ns3::GtpuHeader::SetLength(), and ns3::GtpuHeader::SetTeid().

Referenced by RecvFromLteSocket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint16_t ns3::EpcEnbApplication::m_gtpuUdpPort
private

UDP port to be used for GTP

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

Referenced by SendToS1uSocket().

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 120 of file epc-enb-application.h.

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

std::map<LteFlowId_t, uint32_t> ns3::EpcEnbApplication::m_rbidTeidMap
private

map telling for each RadioBearer (RNTI,LCID) the corresponding S1-U TEID

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

Referenced by ErabSetupRequest(), and RecvFromLteSocket().

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 125 of file epc-enb-application.h.

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

Ipv4Address ns3::EpcEnbApplication::m_sgwAddress
private

address of the SGW which terminates all S1-U tunnels

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

Referenced by SendToS1uSocket().

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

map telling for each S1-U TEID the corresponding RadioBearer (RNTI,LCID)

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

Referenced by ErabSetupRequest(), and RecvFromS1uSocket().


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