#include <epc-enb-application.h>
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) |
![]() | |
Application () | |
virtual | ~Application () |
Ptr< Node > | GetNode () const |
void | SetNode (Ptr< Node > node) |
void | SetStartTime (Time start) |
Specify application start time. | |
void | SetStopTime (Time stop) |
Specify application stop time. | |
![]() | |
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) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
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< Socket > | m_lteSocket |
std::map< LteFlowId_t, uint32_t > | m_rbidTeidMap |
Ptr< Socket > | m_s1uSocket |
Ipv4Address | m_sgwAddress |
std::map< uint32_t, LteFlowId_t > | m_teidRbidMap |
Additional Inherited Members | |
![]() | |
virtual void | DoDispose (void) |
virtual void | DoStart (void) |
![]() | |
Ptr< Node > | m_node |
EventId | m_startEvent |
Time | m_startTime |
EventId | m_stopEvent |
Time | m_stopTime |
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.
ns3::EpcEnbApplication::EpcEnbApplication | ( | Ptr< Socket > | lteSocket, |
Ptr< Socket > | s1uSocket, | ||
Ipv4Address | sgwAddress | ||
) |
Constructor
lteSocket | the socket to be used to send/receive packets to/from the LTE radio interface |
s1uSocket | the socket to be used to send/receive packets to/from the S1-U interface connected with the SGW |
sgwAddress | the 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().
|
virtual |
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
teid | the Tunnel Endpoint IDentifier of the S1-bearer to be setup. |
rnti | the unique ID of the UE on this eNB |
lcid | the 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.
|
static |
This method returns the TypeId associated to ns3::Application.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Application.
Definition at line 38 of file epc-enb-application.cc.
References ns3::TypeId::SetParent().
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.
socket | pointer 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().
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.
socket | pointer 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().
Send a packet to the UE via the LTE radio interface of the eNB
packet | t |
rbid | the 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().
Send a packet to the SGW via the S1-U interface
packet | packet to be sent |
teid | the 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().
|
private |
UDP port to be used for GTP
Definition at line 147 of file epc-enb-application.h.
Referenced by SendToS1uSocket().
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().
|
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().
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().
|
private |
address of the SGW which terminates all S1-U tunnels
Definition at line 130 of file epc-enb-application.h.
Referenced by SendToS1uSocket().
|
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().