25 #include "ns3/mac48-address.h"
27 #include "ns3/inet-socket-address.h"
28 #include "ns3/epc-gtpu-header.h"
29 #include "ns3/abort.h"
50 m_teidByBearerIdMap[bearerId] = teid;
51 return m_tftClassifier.Add (tft, teid);
139 pCopy->RemoveHeader (ipv4Header);
144 std::map<Ipv4Address, Ptr<UeInfo> >::iterator it =
m_ueInfoByAddrMap.find (ueAddr);
152 uint32_t teid = it->second->Classify (packet);
155 NS_LOG_WARN (
"no matching bearer for this packet");
165 const bool succeeded =
true;
177 uint32_t teid = gtpu.
GetTeid ();
248 ueit->second->SetUeAddr (ueAddr);
257 uint16_t cellId = req.
uli.
gci;
261 ueit->second->SetEnbAddr (enbAddr);
275 ueit->second->AddBearer (bit->tft, bit->epsBearerId, teid);
282 bearerContext.
tft = bit->tft;
293 uint64_t imsi = req.
teid;
296 uint16_t cellId = req.
uli.gci;
300 ueit->second->SetEnbAddr (enbAddr);
uint32_t RemoveHeader(Header &header)
std::map< uint16_t, EnbInfo > m_enbInfoByCellId
enum ns3::EpcS11SapMme::ModifyBearerResponseMessage::Cause cause
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
void SetS11SapMme(EpcS11SapMme *s)
EpcS11SapMme * m_s11SapMme
#define NS_ASSERT(condition)
uint32_t GetSize(void) const
bool Receive(Ptr< Packet > packet, uint16_t protocol, const Address &source, const Address &destination, PacketType packetType)
Callback< R > MakeNullCallback(void)
void SendToTunDevice(Ptr< Packet > packet, uint32_t teid)
a polymophic address class
EpcS11Sap::Fteid sgwFteid
virtual Address GetAddress(void) const
bool RecvFromTunDevice(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Ptr< VirtualNetDevice > m_tunDevice
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoByImsiMap
void DoCreateSessionRequest(EpcS11SapSgw::CreateSessionRequestMessage msg)
void SetUeAddr(Ipv4Address addr)
virtual void ModifyBearerResponse(ModifyBearerResponseMessage msg)=0
uint32_t Classify(Ptr< Packet > p)
This class implements a tag that carries an address of a packet across the socket interface...
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void SetRecvCallback(Callback< void, Ptr< Socket > >)
Notify application when new data is available to be read.
#define NS_LOG_LOGIC(msg)
#define NS_ABORT_IF(cond)
Abnormal program termination if cond is true.
Ptr< Packet > Copy(void) const
void AddBearer(Ptr< EpcTft > tft, uint8_t epsBearerId, uint32_t teid)
virtual Ptr< Packet > Recv(uint32_t maxSize, uint32_t flags)=0
Read data from the socket.
std::list< BearerContextCreated > bearerContextsCreated
void SetUeAddress(uint64_t imsi, Ipv4Address ueAddr)
static TypeId GetTypeId(void)
void AddUe(uint64_t imsi)
void SendToS1uSocket(Ptr< Packet > packet, Ipv4Address enbS1uAddress, uint32_t teid)
#define NS_ASSERT_MSG(condition, message)
Ptr< Socket > m_s1uSocket
std::map< Ipv4Address, Ptr< UeInfo > > m_ueInfoByAddrMap
Ipv4 addresses are stored in host order in this class.
std::list< BearerContextToBeCreated > bearerContextsToBeCreated
virtual void CreateSessionResponse(CreateSessionResponseMessage msg)=0
NS_LOG_COMPONENT_DEFINE("PacketLossCounter")
void SetEnbAddr(Ipv4Address addr)
bool RemovePacketTag(Tag &tag)
EpcS11SapSgw * GetS11SapSgw()
void RecvFromS1uSocket(Ptr< Socket > socket)
virtual ~EpcSgwPgwApplication(void)
virtual int SendTo(Ptr< Packet > p, uint32_t flags, const Address &toAddress)=0
Send data to a specified peer.
a base class which provides memory management and object aggregation
void DoModifyBearerRequest(EpcS11SapSgw::ModifyBearerRequestMessage msg)
EpcS11SapSgw * m_s11SapSgw
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddEnb(uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
void AddHeader(const Header &header)
EpcSgwPgwApplication(const Ptr< VirtualNetDevice > tunDevice, const Ptr< Socket > s1uSocket)