99 packet->PeekHeader(header);
133 packet->RemoveHeader(
gtpu);
148 packet->PeekHeader(header);
178 packet->RemoveHeader(
gtpu);
193 gtpu.SetLength(packet->GetSize() +
gtpu.GetSerializedSize() - 8);
194 packet->AddHeader(
gtpu);
207 gtpu.SetLength(packet->GetSize() +
gtpu.GetSerializedSize() - 8);
208 packet->AddHeader(
gtpu);
222 packet->RemoveHeader(
msg);
223 uint64_t imsi =
msg.GetImsi();
224 uint16_t cellId =
msg.GetUliEcgi();
237 msgOut.SetUliEcgi(cellId);
246 std::list<GtpcCreateSessionRequestMessage::BearerContextToBeCreated>
bearerContexts =
247 msg.GetBearerContextsToBeCreated();
249 std::list<GtpcCreateSessionRequestMessage::BearerContextToBeCreated>
bearerContextsOut;
274 msgOut.ComputeMessageLength();
288 packet->RemoveHeader(
msg);
289 uint64_t imsi =
msg.GetImsi();
290 uint16_t cellId =
msg.GetUliEcgi();
300 msgOut.SetUliEcgi(cellId);
302 std::list<GtpcModifyBearerRequestMessage::BearerContextToBeModified>
bearerContextsOut;
303 std::list<GtpcModifyBearerRequestMessage::BearerContextToBeModified>
bearerContexts =
304 msg.GetBearerContextsToBeModified();
309 "Wrong FTEID in ModifyBearerRequest msg");
326 msgOut.ComputeMessageLength();
340 packet->RemoveHeader(
msg);
354 msgOut.ComputeMessageLength();
368 packet->RemoveHeader(
msg);
372 msgOut.ComputeMessageLength();
390 packet->RemoveHeader(
msg);
401 std::list<GtpcCreateSessionResponseMessage::BearerContextCreated>
bearerContexts =
402 msg.GetBearerContextsCreated();
404 std::list<GtpcCreateSessionResponseMessage::BearerContextCreated>
bearerContextsOut;
419 msgOut.ComputeMessageLength();
433 packet->RemoveHeader(
msg);
438 msgOut.ComputeMessageLength();
452 packet->RemoveHeader(
msg);
457 msgOut.ComputeMessageLength();
Ptr< Socket > m_s5cSocket
UDP socket to send/receive GTP-C packets to/from the S5 interface.
void SendToS1uSocket(Ptr< Packet > packet, Ipv4Address enbS1uAddress, uint32_t teid)
Send a data packet to an eNB via the S1-U interface.
uint16_t m_gtpuUdpPort
UDP port to be used for GTP-U.
std::map< uint32_t, GtpcHeader::Fteid_t > m_mmeS11FteidBySgwS5cTeid
MME S11 FTEID by SGW S5C TEID.
void DoRecvModifyBearerRequest(Ptr< Packet > packet)
Process GTP-C Modify Bearer Request message.
void DoRecvCreateSessionResponse(Ptr< Packet > packet)
Process GTP-C Create Session Response message.
Ipv4Address m_mmeS11Addr
MME address in the S11 interface.
void DoRecvDeleteBearerRequest(Ptr< Packet > packet)
Process GTP-C Delete Bearer Request message.
void AddMme(Ipv4Address mmeS11Addr, Ptr< Socket > s11Socket)
Let the SGW be aware of an MME.
void DoRecvDeleteBearerCommand(Ptr< Packet > packet)
Process GTP-C Delete Bearer Command message.
void RecvFromS5cSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the S5-C socket.
~EpcSgwApplication() override
Destructor.
void SendToS5uSocket(Ptr< Packet > packet, Ipv4Address pgwAddr, uint32_t teid)
Send a data packet to the PGW via the S5 interface.
void DoRecvCreateSessionRequest(Ptr< Packet > packet)
Process GTP-C Create Session Request message.
EpcSgwApplication(const Ptr< Socket > s1uSocket, Ipv4Address s5Addr, const Ptr< Socket > s5uSocket, const Ptr< Socket > s5cSocket)
Constructor that binds callback methods of sockets.
void AddPgw(Ipv4Address pgwAddr)
Let the SGW be aware of a PGW.
void RecvFromS5uSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the S5-U socket.
std::map< uint32_t, Ipv4Address > m_enbByTeidMap
Map for eNB address by TEID.
Ptr< Socket > m_s1uSocket
UDP socket to send/receive GTP-U packets to/from the S1-U interface.
Ptr< Socket > m_s11Socket
UDP socket to send/receive control messages to/from the S11 interface.
std::map< uint16_t, EnbInfo > m_enbInfoByCellId
Map for eNB info by cell ID.
uint32_t m_teidCount
TEID count.
void RecvFromS11Socket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the S11 socket.
Ipv4Address m_s5Addr
SGW address in the S5 interface.
uint16_t m_gtpcUdpPort
UDP port to be used for GTP-C.
void RecvFromS1uSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the S1-U socket.
void DoDispose() override
Destructor implementation.
void DoRecvDeleteBearerResponse(Ptr< Packet > packet)
Process GTP-C Delete Bearer Response message.
Ptr< Socket > m_s5uSocket
UDP socket to send/receive GTP-U packets to/from the S5 interface.
Ipv4Address m_pgwAddr
PGW address in the S5 interface.
void DoRecvModifyBearerResponse(Ptr< Packet > packet)
Process GTP-C Modify Bearer Response message.
void AddEnb(uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
Let the SGW be aware of a new eNB.
static TypeId GetTypeId()
Get the type ID.
GTP-C Create Session Request Message.
void SetImsi(uint64_t imsi)
Set the IMSI.
GTP-C Create Session Response Message.
void SetCause(Cause_t cause)
Set the Cause.
GTP-C Delete Bearer Command Message.
void SetBearerContexts(std::list< BearerContext > bearerContexts)
Set the Bearer contexts.
GTP-C Delete Bearer Request Message.
void SetEpsBearerIds(std::list< uint8_t > epsBearerIds)
Set the Bearers IDs.
GTP-C Delete Bearer Response Message.
void SetEpsBearerIds(std::list< uint8_t > epsBearerIds)
Set the Bearers IDs.
GTP-C Modify Bearer Request Message.
void SetImsi(uint64_t imsi)
Set the IMSI.
GTP-C Modify Bearer Response Message.
void SetCause(Cause_t cause)
Set the Cause.
Ipv4 addresses are stored in host order in this class.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
void SetRecvCallback(Callback< void, Ptr< Socket > > receivedData)
Notify application when new data is available to be read.
virtual int SendTo(Ptr< Packet > p, uint32_t flags, const Address &toAddress)=0
Send data to a specified peer.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Callback< R, Args... > MakeNullCallback()
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Ipv4Address enbAddr
eNB address
Bearer Context structure.
GtpcHeader::Fteid_t sgwS5uFteid
FTEID.
Bearer Context structure.
GtpcHeader::Fteid_t fteid
FTEID.
uint8_t m_epsBearerId
EPS bearer ID.
Bearer Context structure.
uint8_t epsBearerId
EPS bearer ID.