A Discrete-Event Network Simulator
API
epc-sgw-application.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Manuel Requena <manuel.requena@cttc.es>
18  */
19 
20 #include "ns3/epc-sgw-application.h"
21 
22 #include "ns3/epc-gtpu-header.h"
23 #include "ns3/log.h"
24 
25 namespace ns3
26 {
27 
28 NS_LOG_COMPONENT_DEFINE("EpcSgwApplication");
29 
30 NS_OBJECT_ENSURE_REGISTERED(EpcSgwApplication);
31 
33  Ipv4Address s5Addr,
34  const Ptr<Socket> s5uSocket,
35  const Ptr<Socket> s5cSocket)
36  : m_s5Addr(s5Addr),
37  m_s5uSocket(s5uSocket),
38  m_s5cSocket(s5cSocket),
39  m_s1uSocket(s1uSocket),
40  m_gtpuUdpPort(2152), // fixed by the standard
41  m_gtpcUdpPort(2123), // fixed by the standard
42  m_teidCount(0)
43 {
44  NS_LOG_FUNCTION(this << s1uSocket << s5Addr << s5uSocket << s5cSocket);
48 }
49 
51 {
52  NS_LOG_FUNCTION(this);
53 }
54 
55 void
57 {
58  NS_LOG_FUNCTION(this);
60  m_s1uSocket = nullptr;
62  m_s5uSocket = nullptr;
64  m_s5cSocket = nullptr;
65 }
66 
67 TypeId
69 {
70  static TypeId tid = TypeId("ns3::EpcSgwApplication").SetParent<Object>().SetGroupName("Lte");
71  return tid;
72 }
73 
74 void
76 {
77  NS_LOG_FUNCTION(this << mmeS11Addr << s11Socket);
78  m_mmeS11Addr = mmeS11Addr;
79  m_s11Socket = s11Socket;
81 }
82 
83 void
85 {
86  NS_LOG_FUNCTION(this << pgwAddr);
87  m_pgwAddr = pgwAddr;
88 }
89 
90 void
91 EpcSgwApplication::AddEnb(uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
92 {
93  NS_LOG_FUNCTION(this << cellId << enbAddr << sgwAddr);
94  EnbInfo enbInfo;
95  enbInfo.enbAddr = enbAddr;
96  enbInfo.sgwAddr = sgwAddr;
97  m_enbInfoByCellId[cellId] = enbInfo;
98 }
99 
100 void
102 {
103  NS_LOG_FUNCTION(this << socket);
104  NS_ASSERT(socket == m_s11Socket);
105  Ptr<Packet> packet = socket->Recv();
106  GtpcHeader header;
107  packet->PeekHeader(header);
108  uint16_t msgType = header.GetMessageType();
109 
110  switch (msgType)
111  {
114  break;
115 
118  break;
119 
122  break;
123 
126  break;
127 
128  default:
129  NS_FATAL_ERROR("GTP-C message not supported");
130  break;
131  }
132 }
133 
134 void
136 {
137  NS_LOG_FUNCTION(this << socket);
138  NS_ASSERT(socket == m_s5uSocket);
139  Ptr<Packet> packet = socket->Recv();
140  GtpuHeader gtpu;
141  packet->RemoveHeader(gtpu);
142  uint32_t teid = gtpu.GetTeid();
143 
144  Ipv4Address enbAddr = m_enbByTeidMap[teid];
145  NS_LOG_DEBUG("eNB " << enbAddr << " TEID " << teid);
146  SendToS1uSocket(packet, enbAddr, teid);
147 }
148 
149 void
151 {
152  NS_LOG_FUNCTION(this << socket);
153  NS_ASSERT(socket == m_s5cSocket);
154  Ptr<Packet> packet = socket->Recv();
155  GtpcHeader header;
156  packet->PeekHeader(header);
157  uint16_t msgType = header.GetMessageType();
158 
159  switch (msgType)
160  {
163  break;
164 
167  break;
168 
171  break;
172 
173  default:
174  NS_FATAL_ERROR("GTP-C message not supported");
175  break;
176  }
177 }
178 
179 void
181 {
182  NS_LOG_FUNCTION(this << socket);
183  NS_ASSERT(socket == m_s1uSocket);
184  Ptr<Packet> packet = socket->Recv();
185  GtpuHeader gtpu;
186  packet->RemoveHeader(gtpu);
187  uint32_t teid = gtpu.GetTeid();
188 
189  SendToS5uSocket(packet, m_pgwAddr, teid);
190 }
191 
192 void
194 {
195  NS_LOG_FUNCTION(this << packet << enbAddr << teid);
196 
197  GtpuHeader gtpu;
198  gtpu.SetTeid(teid);
199  // From 3GPP TS 29.281 v10.0.0 Section 5.1
200  // Length of the payload + the non obligatory GTP-U header
201  gtpu.SetLength(packet->GetSize() + gtpu.GetSerializedSize() - 8);
202  packet->AddHeader(gtpu);
203  m_s1uSocket->SendTo(packet, 0, InetSocketAddress(enbAddr, m_gtpuUdpPort));
204 }
205 
206 void
208 {
209  NS_LOG_FUNCTION(this << packet << pgwAddr << teid);
210 
211  GtpuHeader gtpu;
212  gtpu.SetTeid(teid);
213  // From 3GPP TS 29.281 v10.0.0 Section 5.1
214  // Length of the payload + the non obligatory GTP-U header
215  gtpu.SetLength(packet->GetSize() + gtpu.GetSerializedSize() - 8);
216  packet->AddHeader(gtpu);
217  m_s5uSocket->SendTo(packet, 0, InetSocketAddress(pgwAddr, m_gtpuUdpPort));
218 }
219 
221 // Process messages from the MME
223 
224 void
226 {
227  NS_LOG_FUNCTION(this);
228 
230  packet->RemoveHeader(msg);
231  uint64_t imsi = msg.GetImsi();
232  uint16_t cellId = msg.GetUliEcgi();
233  NS_LOG_DEBUG("cellId " << cellId << " IMSI " << imsi);
234 
235  std::map<uint16_t, EnbInfo>::iterator enbit = m_enbInfoByCellId.find(cellId);
236  NS_ASSERT_MSG(enbit != m_enbInfoByCellId.end(), "unknown CellId " << cellId);
237  Ipv4Address enbAddr = enbit->second.enbAddr;
238  NS_LOG_DEBUG("eNB " << enbAddr);
239 
240  GtpcHeader::Fteid_t mmeS11Fteid = msg.GetSenderCpFteid();
241  NS_ASSERT_MSG(mmeS11Fteid.interfaceType == GtpcHeader::S11_MME_GTPC, "wrong interface type");
242 
244  msgOut.SetImsi(imsi);
245  msgOut.SetUliEcgi(cellId);
246 
247  GtpcHeader::Fteid_t sgwS5cFteid;
249  sgwS5cFteid.teid = imsi;
250  m_mmeS11FteidBySgwS5cTeid[sgwS5cFteid.teid] = mmeS11Fteid;
251  sgwS5cFteid.addr = m_s5Addr;
252  msgOut.SetSenderCpFteid(sgwS5cFteid); // S5 SGW GTP-C TEID
253 
254  std::list<GtpcCreateSessionRequestMessage::BearerContextToBeCreated> bearerContexts =
256  NS_LOG_DEBUG("BearerContextToBeCreated size = " << bearerContexts.size());
257  std::list<GtpcCreateSessionRequestMessage::BearerContextToBeCreated> bearerContextsOut;
258  for (auto& bearerContext : bearerContexts)
259  {
260  // simple sanity check. If you ever need more than 4M teids
261  // throughout your simulation, you'll need to implement a smarter teid
262  // management algorithm.
263  NS_ABORT_IF(m_teidCount == 0xFFFFFFFF);
264  uint32_t teid = ++m_teidCount;
265 
266  NS_LOG_DEBUG(" TEID " << teid);
267  m_enbByTeidMap[teid] = enbAddr;
268 
271  bearerContextOut.sgwS5uFteid.teid = teid; // S5U SGW FTEID
272  bearerContextOut.sgwS5uFteid.addr = enbit->second.sgwAddr;
273  bearerContextOut.epsBearerId = bearerContext.epsBearerId;
274  bearerContextOut.bearerLevelQos = bearerContext.bearerLevelQos;
275  bearerContextOut.tft = bearerContext.tft;
276  bearerContextsOut.push_back(bearerContextOut);
277  }
278 
279  msgOut.SetBearerContextsToBeCreated(bearerContextsOut);
280 
281  msgOut.SetTeid(0);
282  msgOut.ComputeMessageLength();
283 
284  Ptr<Packet> packetOut = Create<Packet>();
285  packetOut->AddHeader(msgOut);
286  NS_LOG_DEBUG("Send CreateSessionRequest to PGW " << m_pgwAddr);
288 }
289 
290 void
292 {
293  NS_LOG_FUNCTION(this);
294 
296  packet->RemoveHeader(msg);
297  uint64_t imsi = msg.GetImsi();
298  uint16_t cellId = msg.GetUliEcgi();
299  NS_LOG_DEBUG("cellId " << cellId << " IMSI " << imsi);
300 
301  std::map<uint16_t, EnbInfo>::iterator enbit = m_enbInfoByCellId.find(cellId);
302  NS_ASSERT_MSG(enbit != m_enbInfoByCellId.end(), "unknown CellId " << cellId);
303  Ipv4Address enbAddr = enbit->second.enbAddr;
304  NS_LOG_DEBUG("eNB " << enbAddr);
305 
307  msgOut.SetImsi(imsi);
308  msgOut.SetUliEcgi(cellId);
309 
310  std::list<GtpcModifyBearerRequestMessage::BearerContextToBeModified> bearerContextsOut;
311  std::list<GtpcModifyBearerRequestMessage::BearerContextToBeModified> bearerContexts =
313  NS_LOG_DEBUG("BearerContextsToBeModified size = " << bearerContexts.size());
314  for (auto& bearerContext : bearerContexts)
315  {
316  NS_ASSERT_MSG(bearerContext.fteid.interfaceType == GtpcHeader::S1U_ENB_GTPU,
317  "Wrong FTEID in ModifyBearerRequest msg");
318  uint32_t teid = bearerContext.fteid.teid;
319  Ipv4Address enbAddr = bearerContext.fteid.addr;
320  NS_LOG_DEBUG("bearerId " << (uint16_t)bearerContext.epsBearerId << " TEID " << teid);
321  std::map<uint32_t, Ipv4Address>::iterator addrit = m_enbByTeidMap.find(teid);
322  NS_ASSERT_MSG(addrit != m_enbByTeidMap.end(), "unknown TEID " << teid);
323  addrit->second = enbAddr;
325  bearerContextOut.epsBearerId = bearerContext.epsBearerId;
326  bearerContextOut.fteid.interfaceType = GtpcHeader::S5_SGW_GTPU;
327  bearerContextOut.fteid.addr = m_s5Addr;
328  bearerContextOut.fteid.teid = bearerContext.fteid.teid;
329 
330  bearerContextsOut.push_back(bearerContextOut);
331  }
332 
333  msgOut.SetTeid(imsi);
334  msgOut.ComputeMessageLength();
335 
336  Ptr<Packet> packetOut = Create<Packet>();
337  packetOut->AddHeader(msgOut);
338  NS_LOG_DEBUG("Send ModifyBearerRequest to PGW " << m_pgwAddr);
340 }
341 
342 void
344 {
345  NS_LOG_FUNCTION(this);
346 
348  packet->RemoveHeader(msg);
349 
350  std::list<GtpcDeleteBearerCommandMessage::BearerContext> bearerContextsOut;
351  for (auto& bearerContext : msg.GetBearerContexts())
352  {
353  NS_LOG_DEBUG("ebid " << (uint16_t)bearerContext.m_epsBearerId);
355  bearerContextOut.m_epsBearerId = bearerContext.m_epsBearerId;
356  bearerContextsOut.push_back(bearerContextOut);
357  }
358 
360  msgOut.SetBearerContexts(bearerContextsOut);
361  msgOut.SetTeid(msg.GetTeid());
362  msgOut.ComputeMessageLength();
363 
364  Ptr<Packet> packetOut = Create<Packet>();
365  packetOut->AddHeader(msgOut);
366  NS_LOG_DEBUG("Send DeleteBearerCommand to PGW " << m_pgwAddr);
368 }
369 
370 void
372 {
373  NS_LOG_FUNCTION(this);
374 
376  packet->RemoveHeader(msg);
378  msgOut.SetEpsBearerIds(msg.GetEpsBearerIds());
379  msgOut.SetTeid(msg.GetTeid());
380  msgOut.ComputeMessageLength();
381 
382  Ptr<Packet> packetOut = Create<Packet>();
383  packetOut->AddHeader(msgOut);
384  NS_LOG_DEBUG("Send DeleteBearerResponse to PGW " << m_pgwAddr);
386 }
387 
389 // Process messages received from the PGW
391 
392 void
394 {
395  NS_LOG_FUNCTION(this);
396 
398  packet->RemoveHeader(msg);
399 
400  GtpcHeader::Fteid_t pgwS5cFteid = msg.GetSenderCpFteid();
401  NS_ASSERT_MSG(pgwS5cFteid.interfaceType == GtpcHeader::S5_PGW_GTPC, "wrong interface type");
402 
405 
406  uint32_t teid = msg.GetTeid();
408 
409  std::list<GtpcCreateSessionResponseMessage::BearerContextCreated> bearerContexts =
411  NS_LOG_DEBUG("BearerContextsCreated size = " << bearerContexts.size());
412  std::list<GtpcCreateSessionResponseMessage::BearerContextCreated> bearerContextsOut;
413  for (auto& bearerContext : bearerContexts)
414  {
416  bearerContextOut.fteid.interfaceType = GtpcHeader::S5_SGW_GTPU;
417  bearerContextOut.fteid.teid = bearerContext.fteid.teid;
418  bearerContextOut.fteid.addr = m_s5Addr;
419  bearerContextOut.epsBearerId = bearerContext.epsBearerId;
420  bearerContextOut.bearerLevelQos = bearerContext.bearerLevelQos;
421  bearerContextOut.tft = bearerContext.tft;
422  bearerContextsOut.push_back(bearerContext);
423  }
424  msgOut.SetBearerContextsCreated(bearerContextsOut);
425 
426  msgOut.SetTeid(mmeS11Fteid.teid);
427  msgOut.ComputeMessageLength();
428 
429  Ptr<Packet> packetOut = Create<Packet>();
430  packetOut->AddHeader(msgOut);
431  NS_LOG_DEBUG("Send CreateSessionResponse to MME " << mmeS11Fteid.addr);
432  m_s11Socket->SendTo(packetOut, 0, InetSocketAddress(mmeS11Fteid.addr, m_gtpcUdpPort));
433 }
434 
435 void
437 {
438  NS_LOG_FUNCTION(this);
439 
441  packet->RemoveHeader(msg);
442 
445  msgOut.SetTeid(msg.GetTeid());
446  msgOut.ComputeMessageLength();
447 
448  Ptr<Packet> packetOut = Create<Packet>();
449  packetOut->AddHeader(msgOut);
450  NS_LOG_DEBUG("Send ModifyBearerResponse to MME " << m_mmeS11Addr);
452 }
453 
454 void
456 {
457  NS_LOG_FUNCTION(this);
458 
460  packet->RemoveHeader(msg);
461 
463  msgOut.SetEpsBearerIds(msg.GetEpsBearerIds());
464  msgOut.SetTeid(msg.GetTeid());
465  msgOut.ComputeMessageLength();
466 
467  Ptr<Packet> packetOut = Create<Packet>();
468  packetOut->AddHeader(msgOut);
469  NS_LOG_DEBUG("Send DeleteBearerRequest to MME " << m_mmeS11Addr);
471 }
472 
473 } // namespace ns3
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.
uint64_t GetImsi() const
Get the IMSI.
void SetUliEcgi(uint32_t uliEcgi)
Set the UliEcgi.
GtpcHeader::Fteid_t GetSenderCpFteid() const
Get the Sender CpFteid.
uint32_t GetUliEcgi() const
Get the UliEcgi.
void SetBearerContextsToBeCreated(std::list< BearerContextToBeCreated > bearerContexts)
Set the Bearer Contexts.
std::list< BearerContextToBeCreated > GetBearerContextsToBeCreated() const
Get the Bearer Contexts.
void SetImsi(uint64_t imsi)
Set the IMSI.
void SetSenderCpFteid(GtpcHeader::Fteid_t fteid)
Set the Sender CpFteid.
GTP-C Create Session Response Message.
void SetCause(Cause_t cause)
Set the Cause.
void SetBearerContextsCreated(std::list< BearerContextCreated > bearerContexts)
Set the Bearer Contexts.
std::list< BearerContextCreated > GetBearerContextsCreated() const
Get the Container of Bearer Contexts.
GtpcHeader::Fteid_t GetSenderCpFteid() const
Get the Sender CpFteid.
GTP-C Delete Bearer Command Message.
std::list< BearerContext > GetBearerContexts() const
Get the Bearer contexts.
void SetBearerContexts(std::list< BearerContext > bearerContexts)
Set the Bearer contexts.
GTP-C Delete Bearer Request Message.
std::list< uint8_t > GetEpsBearerIds() const
Get the Bearers IDs.
void SetEpsBearerIds(std::list< uint8_t > epsBearerIds)
Set the Bearers IDs.
GTP-C Delete Bearer Response Message.
std::list< uint8_t > GetEpsBearerIds() const
Get the Bearers IDs.
void SetEpsBearerIds(std::list< uint8_t > epsBearerIds)
Set the Bearers IDs.
Header of the GTPv2-C protocol.
uint8_t GetMessageType() const
Get message type.
void ComputeMessageLength()
Compute the message length according to the message type.
void SetTeid(uint32_t teid)
Set TEID.
uint32_t GetTeid() const
Get TEID.
GTP-C Modify Bearer Request Message.
uint64_t GetImsi() const
Get the IMSI.
uint32_t GetUliEcgi() const
Get the UliEcgi.
void SetUliEcgi(uint32_t uliEcgi)
Set the UliEcgi.
std::list< BearerContextToBeModified > GetBearerContextsToBeModified() const
Get the Bearer Contexts.
void SetImsi(uint64_t imsi)
Set the IMSI.
GTP-C Modify Bearer Response Message.
void SetCause(Cause_t cause)
Set the Cause.
Implementation of the GPRS Tunnelling Protocol header according to GTPv1-U Release 10 as per 3Gpp TS ...
void SetTeid(uint32_t teid)
Set TEID function.
uint32_t GetSerializedSize() const override
uint32_t GetTeid() const
Get a tunnel endpoint identificator (TEID)
void SetLength(uint16_t length)
Set the length in octets of the payload.
an Inet address class
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
A base class which provides memory management and object aggregation.
Definition: object.h:89
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:294
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:268
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:863
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
Definition: packet.cc:305
void SetRecvCallback(Callback< void, Ptr< Socket >> receivedData)
Notify application when new data is available to be read.
Definition: socket.cc:126
virtual Ptr< Packet > Recv(uint32_t maxSize, uint32_t flags)=0
Read data from the socket.
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.
Definition: type-id.h:60
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:935
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Definition: assert.h:66
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:86
Callback< R, Args... > MakeNullCallback()
Definition: callback.h:750
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:179
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:76
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:268
#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.
Definition: object-base.h:46
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...
Definition: callback.h:707
Ptr< EpcTft > tft
Bearer traffic flow template.
Ipv4Address addr
IPv4 address.
InterfaceType_t interfaceType
Interface type.