A Discrete-Event Network Simulator
API
epc-sgw-pgw-application.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Jaume Nin <jnin@cttc.cat>
19  * Nicola Baldo <nbaldo@cttc.cat>
20  */
21 
22 
24 #include "ns3/log.h"
25 #include "ns3/mac48-address.h"
26 #include "ns3/ipv4.h"
27 #include "ns3/ipv6.h"
28 #include "ns3/ipv6-header.h"
29 #include "ns3/inet-socket-address.h"
30 #include "ns3/epc-gtpu-header.h"
31 #include "ns3/abort.h"
32 
33 namespace ns3 {
34 
35 NS_LOG_COMPONENT_DEFINE ("EpcSgwPgwApplication");
36 
38 // UeInfo
40 
41 
43 {
44  NS_LOG_FUNCTION (this);
45 }
46 
47 void
48 EpcSgwPgwApplication::UeInfo::AddBearer (Ptr<EpcTft> tft, uint8_t bearerId, uint32_t teid)
49 {
50  NS_LOG_FUNCTION (this << tft << teid);
51  m_teidByBearerIdMap[bearerId] = teid;
52  return m_tftClassifier.Add (tft, teid);
53 }
54 
55 void
57 {
58  NS_LOG_FUNCTION (this << bearerId);
59  m_teidByBearerIdMap.erase (bearerId);
60 }
61 
62 uint32_t
64 {
65  NS_LOG_FUNCTION (this << p);
66  // we hardcode DOWNLINK direction since the PGW is espected to
67  // classify only downlink packets (uplink packets will go to the
68  // internet without any classification).
69  return m_tftClassifier.Classify (p, EpcTft::DOWNLINK);
70 }
71 
74 {
75  return m_enbAddr;
76 }
77 
78 void
80 {
81  m_enbAddr = enbAddr;
82 }
83 
86 {
87  return m_ueAddr;
88 }
89 
90 void
92 {
93  m_ueAddr = ueAddr;
94 }
95 
98 {
99  return m_ueAddr6;
100 }
101 
102 void
104 {
105  m_ueAddr6 = ueAddr;
106 }
107 
109 // EpcSgwPgwApplication
111 
112 
113 TypeId
115 {
116  static TypeId tid = TypeId ("ns3::EpcSgwPgwApplication")
117  .SetParent<Object> ()
118  .SetGroupName("Lte")
119  .AddTraceSource ("RxFromTun",
120  "Receive data packets from internet in Tunnel net device",
122  "ns3::EpcSgwPgwApplication::RxTracedCallback")
123  .AddTraceSource ("RxFromS1u",
124  "Receive data packets from S1 U Socket",
126  "ns3::EpcSgwPgwApplication::RxTracedCallback")
127  ;
128  return tid;
129 }
130 
131 void
133 {
134  NS_LOG_FUNCTION (this);
136  m_s1uSocket = 0;
137  delete (m_s11SapSgw);
138 }
139 
140 
142  : m_s1uSocket (s1uSocket),
143  m_tunDevice (tunDevice),
144  m_gtpuUdpPort (2152), // fixed by the standard
145  m_teidCount (0),
146  m_s11SapMme (0)
147 {
148  NS_LOG_FUNCTION (this << tunDevice << s1uSocket);
151 }
152 
153 
155 {
156  NS_LOG_FUNCTION (this);
157 }
158 
159 
160 bool
161 EpcSgwPgwApplication::RecvFromTunDevice (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber)
162 {
163  NS_LOG_FUNCTION (this << source << dest << packet << packet->GetSize ());
164  m_rxTunPktTrace (packet->Copy ());
165  Ptr<Packet> pCopy = packet->Copy ();
166 
167  uint8_t ipType;
168  pCopy->CopyData (&ipType, 1);
169  ipType = (ipType>>4) & 0x0f;
170 
171  // get IP address of UE
172  if (ipType == 0x04)
173  {
174  Ipv4Header ipv4Header;
175  pCopy->RemoveHeader (ipv4Header);
176  Ipv4Address ueAddr = ipv4Header.GetDestination ();
177  NS_LOG_LOGIC ("packet addressed to UE " << ueAddr);
178  // find corresponding UeInfo address
179  std::map<Ipv4Address, Ptr<UeInfo> >::iterator it = m_ueInfoByAddrMap.find (ueAddr);
180  if (it == m_ueInfoByAddrMap.end ())
181  {
182  NS_LOG_WARN ("unknown UE address " << ueAddr);
183  }
184  else
185  {
186  Ipv4Address enbAddr = it->second->GetEnbAddr ();
187  uint32_t teid = it->second->Classify (packet);
188  if (teid == 0)
189  {
190  NS_LOG_WARN ("no matching bearer for this packet");
191  }
192  else
193  {
194  SendToS1uSocket (packet, enbAddr, teid);
195  }
196  }
197  }
198  else if (ipType == 0x06)
199  {
200  Ipv6Header ipv6Header;
201  pCopy->RemoveHeader (ipv6Header);
202  Ipv6Address ueAddr = ipv6Header.GetDestinationAddress ();
203  NS_LOG_LOGIC ("packet addressed to UE " << ueAddr);
204  // find corresponding UeInfo address
205  std::map<Ipv6Address, Ptr<UeInfo> >::iterator it = m_ueInfoByAddrMap6.find (ueAddr);
206  if (it == m_ueInfoByAddrMap6.end ())
207  {
208  NS_LOG_WARN ("unknown UE address " << ueAddr);
209  }
210  else
211  {
212  Ipv4Address enbAddr = it->second->GetEnbAddr ();
213  uint32_t teid = it->second->Classify (packet);
214  if (teid == 0)
215  {
216  NS_LOG_WARN ("no matching bearer for this packet");
217  }
218  else
219  {
220  SendToS1uSocket (packet, enbAddr, teid);
221  }
222  }
223  }
224  else
225  {
226  NS_ABORT_MSG ("EpcSgwPgwApplication::RecvFromTunDevice - Unknown IP type...");
227  }
228 
229  // there is no reason why we should notify the TUN
230  // VirtualNetDevice that he failed to send the packet: if we receive
231  // any bogus packet, it will just be silently discarded.
232  const bool succeeded = true;
233  return succeeded;
234 }
235 
236 void
238 {
239  NS_LOG_FUNCTION (this << socket);
240  NS_ASSERT (socket == m_s1uSocket);
241  Ptr<Packet> packet = socket->Recv ();
242  GtpuHeader gtpu;
243  packet->RemoveHeader (gtpu);
244  uint32_t teid = gtpu.GetTeid ();
245 
246  SendToTunDevice (packet, teid);
247 
248  m_rxS1uPktTrace (packet->Copy ());
249 }
250 
251 void
253 {
254  NS_LOG_FUNCTION (this << packet << teid);
255  NS_LOG_LOGIC (" packet size: " << packet->GetSize () << " bytes");
256 
257  uint8_t ipType;
258  packet->CopyData (&ipType, 1);
259  ipType = (ipType>>4) & 0x0f;
260 
261  if (ipType == 0x04)
262  {
264  }
265  else if (ipType == 0x06)
266  {
268  }
269  else
270  {
271  NS_ABORT_MSG ("EpcSgwPgwApplication::SendToTunDevice - Unknown IP type...");
272  }
273 }
274 
275 void
277 {
278  NS_LOG_FUNCTION (this << packet << enbAddr << teid);
279 
280  GtpuHeader gtpu;
281  gtpu.SetTeid (teid);
282  // From 3GPP TS 29.281 v10.0.0 Section 5.1
283  // Length of the payload + the non obligatory GTP-U header
284  gtpu.SetLength (packet->GetSize () + gtpu.GetSerializedSize () - 8);
285  packet->AddHeader (gtpu);
286  uint32_t flags = 0;
287  m_s1uSocket->SendTo (packet, flags, InetSocketAddress (enbAddr, m_gtpuUdpPort));
288 }
289 
290 
291 void
293 {
294  m_s11SapMme = s;
295 }
296 
297 EpcS11SapSgw*
299 {
300  return m_s11SapSgw;
301 }
302 
303 void
304 EpcSgwPgwApplication::AddEnb (uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
305 {
306  NS_LOG_FUNCTION (this << cellId << enbAddr << sgwAddr);
307  EnbInfo enbInfo;
308  enbInfo.enbAddr = enbAddr;
309  enbInfo.sgwAddr = sgwAddr;
310  m_enbInfoByCellId[cellId] = enbInfo;
311 }
312 
313 void
315 {
316  NS_LOG_FUNCTION (this << imsi);
317  Ptr<UeInfo> ueInfo = Create<UeInfo> ();
318  m_ueInfoByImsiMap[imsi] = ueInfo;
319 }
320 
321 void
323 {
324  NS_LOG_FUNCTION (this << imsi << ueAddr);
325  std::map<uint64_t, Ptr<UeInfo> >::iterator ueit = m_ueInfoByImsiMap.find (imsi);
326  NS_ASSERT_MSG (ueit != m_ueInfoByImsiMap.end (), "unknown IMSI " << imsi);
327  m_ueInfoByAddrMap[ueAddr] = ueit->second;
328  ueit->second->SetUeAddr (ueAddr);
329 }
330 
331 void
333 {
334  NS_LOG_FUNCTION (this << imsi << ueAddr);
335  std::map<uint64_t, Ptr<UeInfo> >::iterator ueit = m_ueInfoByImsiMap.find (imsi);
336  NS_ASSERT_MSG (ueit != m_ueInfoByImsiMap.end (), "unknown IMSI " << imsi);
337  m_ueInfoByAddrMap6[ueAddr] = ueit->second;
338  ueit->second->SetUeAddr6 (ueAddr);
339 }
340 
341 void
343 {
344  NS_LOG_FUNCTION (this << req.imsi);
345  std::map<uint64_t, Ptr<UeInfo> >::iterator ueit = m_ueInfoByImsiMap.find (req.imsi);
346  NS_ASSERT_MSG (ueit != m_ueInfoByImsiMap.end (), "unknown IMSI " << req.imsi);
347  uint16_t cellId = req.uli.gci;
348  std::map<uint16_t, EnbInfo>::iterator enbit = m_enbInfoByCellId.find (cellId);
349  NS_ASSERT_MSG (enbit != m_enbInfoByCellId.end (), "unknown CellId " << cellId);
350  Ipv4Address enbAddr = enbit->second.enbAddr;
351  ueit->second->SetEnbAddr (enbAddr);
352 
354  res.teid = req.imsi; // trick to avoid the need for allocating TEIDs on the S11 interface
355 
356  for (std::list<EpcS11SapSgw::BearerContextToBeCreated>::iterator bit = req.bearerContextsToBeCreated.begin ();
357  bit != req.bearerContextsToBeCreated.end ();
358  ++bit)
359  {
360  // simple sanity check. If you ever need more than 4M teids
361  // throughout your simulation, you'll need to implement a smarter teid
362  // management algorithm.
363  NS_ABORT_IF (m_teidCount == 0xFFFFFFFF);
364  uint32_t teid = ++m_teidCount;
365  ueit->second->AddBearer (bit->tft, bit->epsBearerId, teid);
366 
368  bearerContext.sgwFteid.teid = teid;
369  bearerContext.sgwFteid.address = enbit->second.sgwAddr;
370  bearerContext.epsBearerId = bit->epsBearerId;
371  bearerContext.bearerLevelQos = bit->bearerLevelQos;
372  bearerContext.tft = bit->tft;
373  res.bearerContextsCreated.push_back (bearerContext);
374  }
376 
377 }
378 
379 void
381 {
382  NS_LOG_FUNCTION (this << req.teid);
383  uint64_t imsi = req.teid; // trick to avoid the need for allocating TEIDs on the S11 interface
384  std::map<uint64_t, Ptr<UeInfo> >::iterator ueit = m_ueInfoByImsiMap.find (imsi);
385  NS_ASSERT_MSG (ueit != m_ueInfoByImsiMap.end (), "unknown IMSI " << imsi);
386  uint16_t cellId = req.uli.gci;
387  std::map<uint16_t, EnbInfo>::iterator enbit = m_enbInfoByCellId.find (cellId);
388  NS_ASSERT_MSG (enbit != m_enbInfoByCellId.end (), "unknown CellId " << cellId);
389  Ipv4Address enbAddr = enbit->second.enbAddr;
390  ueit->second->SetEnbAddr (enbAddr);
391  // no actual bearer modification: for now we just support the minimum needed for path switch request (handover)
393  res.teid = imsi; // trick to avoid the need for allocating TEIDs on the S11 interface
396 }
397 
398 void
400 {
401  NS_LOG_FUNCTION (this << req.teid);
402  uint64_t imsi = req.teid; // trick to avoid the need for allocating TEIDs on the S11 interface
403  std::map<uint64_t, Ptr<UeInfo> >::iterator ueit = m_ueInfoByImsiMap.find (imsi);
404  NS_ASSERT_MSG (ueit != m_ueInfoByImsiMap.end (), "unknown IMSI " << imsi);
405 
407  res.teid = imsi;
408 
409  for (std::list<EpcS11SapSgw::BearerContextToBeRemoved>::iterator bit = req.bearerContextsToBeRemoved.begin ();
410  bit != req.bearerContextsToBeRemoved.end ();
411  ++bit)
412  {
414  bearerContext.epsBearerId = bit->epsBearerId;
415  res.bearerContextsRemoved.push_back (bearerContext);
416  }
417  //schedules Delete Bearer Request towards MME
419 }
420 
421 void
423 {
424  NS_LOG_FUNCTION (this << req.teid);
425  uint64_t imsi = req.teid; // trick to avoid the need for allocating TEIDs on the S11 interface
426  std::map<uint64_t, Ptr<UeInfo> >::iterator ueit = m_ueInfoByImsiMap.find (imsi);
427  NS_ASSERT_MSG (ueit != m_ueInfoByImsiMap.end (), "unknown IMSI " << imsi);
428 
429  for (std::list<EpcS11SapSgw::BearerContextRemovedSgwPgw>::iterator bit = req.bearerContextsRemoved.begin ();
430  bit != req.bearerContextsRemoved.end ();
431  ++bit)
432  {
433  //Function to remove de-activated bearer contexts from S-Gw and P-Gw side
434  ueit->second->RemoveBearer (bit->epsBearerId);
435  }
436 }
437 
438 } // namespace ns3
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
std::map< uint16_t, EnbInfo > m_enbInfoByCellId
eNB info by cell ID
enum ns3::EpcS11SapMme::ModifyBearerResponseMessage::Cause cause
the cause
Packet header for IPv6.
Definition: ipv6-header.h:34
an Inet address class
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
3GPP TS 29.274 version 8.3.1 Release 8 section 8.28
Definition: epc-s11-sap.h:86
Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17.1.
Definition: epc-s11-sap.h:206
uint32_t teid
TEID.
Definition: epc-s11-sap.h:56
Ipv4Address address
IP address.
Definition: epc-s11-sap.h:57
#define NS_ABORT_MSG(msg)
Unconditional abnormal program termination with a message.
Definition: abort.h:50
MME side of the S11 Service Access Point (SAP), provides the MME methods to be called when an S11 mes...
Definition: epc-s11-sap.h:78
uint16_t m_gtpuUdpPort
UDP port to be used for GTP.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:831
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
uint8_t epsBearerId
EPS bearer ID.
Definition: epc-s11-sap.h:117
void SetS11SapMme(EpcS11SapMme *s)
Set the MME side of the S11 SAP.
TracedCallback< Ptr< Packet > > m_rxTunPktTrace
Callback to trace RX (reception) data packets at Tun Net Device from internet.
void SetLength(uint16_t length)
Set the length in octets of the payload.
EpcS11SapMme * m_s11SapMme
MME side of the S11 SAP.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
Definition: epc-s11-sap.h:123
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
std::list< BearerContextRemovedSgwPgw > bearerContextsRemoved
list of bearer contexts removed
Definition: epc-s11-sap.h:228
virtual uint32_t GetSerializedSize(void) const
bool Receive(Ptr< Packet > packet, uint16_t protocol, const Address &source, const Address &destination, PacketType packetType)
Callback< R > MakeNullCallback(void)
Definition: callback.h:1635
std::list< BearerContextToBeRemoved > bearerContextsToBeRemoved
list of bearer contexts to be removed
Definition: epc-s11-sap.h:208
void SendToTunDevice(Ptr< Packet > packet, uint32_t teid)
Send a packet to the internet via the Gi interface of the SGW/PGW.
virtual void DeleteBearerRequest(DeleteBearerRequestMessage msg)=0
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Request message shall be sent on the S11 inte...
Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10.2.
Definition: epc-s11-sap.h:226
a polymophic address class
Definition: address.h:90
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
EpcS11Sap::Fteid sgwFteid
EPC FTEID.
Definition: epc-s11-sap.h:89
Ptr< EpcTft > tft
traffic flow template
Definition: epc-s11-sap.h:92
Template for the implementation of the EpcS11SapSgw as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:330
Packet header for IPv4.
Definition: ipv4-header.h:33
EpsBearer bearerLevelQos
EPS bearer.
Definition: epc-s11-sap.h:91
TracedCallback< Ptr< Packet > > m_rxS1uPktTrace
Callback to trace RX (reception) data packets from S1-U socket.
void SetUeAddress6(uint64_t imsi, Ipv6Address ueAddr)
set the address of a previously added UE
void RemoveBearer(uint8_t bearerId)
Function, deletes contexts of bearer on SGW and PGW side.
uint32_t GetTeid() const
Get a tunnel endpoint identificator (TEID)
bool RecvFromTunDevice(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Method to be assigned to the callback of the Gi TUN VirtualNetDevice.
uint8_t epsBearerId
EPS bearer ID.
Definition: epc-s11-sap.h:90
uint16_t gci
GCI.
Definition: epc-s11-sap.h:66
Ptr< VirtualNetDevice > m_tunDevice
TUN VirtualNetDevice used for tunneling/detunneling IP packets from/to the internet over GTP-U/UDP/IP...
std::map< uint64_t, Ptr< UeInfo > > m_ueInfoByImsiMap
Map telling for each IMSI the corresponding UE info.
void DoCreateSessionRequest(EpcS11SapSgw::CreateSessionRequestMessage msg)
Create session request function.
void SetUeAddr(Ipv4Address addr)
set the IPv4 address of the UE
virtual void ModifyBearerResponse(ModifyBearerResponseMessage msg)=0
send a Modify Bearer Response message
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
void SetRecvCallback(Callback< void, Ptr< Socket > >)
Notify application when new data is available to be read.
Definition: socket.cc:128
Modify Bearer Request message, see 3GPP TS 29.274 7.2.7
Definition: epc-s11-sap.h:240
Bearer Context Removed structure.
Definition: epc-s11-sap.h:115
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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
bearer contexts created
Definition: epc-s11-sap.h:101
void SetUeAddress(uint64_t imsi, Ipv4Address ueAddr)
set the address of a previously added UE
void DoDeleteBearerResponse(EpcS11SapSgw::DeleteBearerResponseMessage req)
Delete bearer response function.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Definition: packet.cc:121
static TypeId GetTypeId(void)
Get the type ID.
virtual Address GetAddress(void) const
void SetUeAddr6(Ipv6Address addr)
set the IPv6 address of the UE
void AddUe(uint64_t imsi)
Let the SGW be aware of a new UE.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
Ipv4Address enbAddr
eNB IPv4 address
void SendToS1uSocket(Ptr< Packet > packet, Ipv4Address enbS1uAddress, uint32_t teid)
Send a packet to the SGW via the S1-U interface.
Ipv4Address GetDestination(void) const
Definition: ipv4-header.cc:304
Ptr< Socket > m_s1uSocket
UDP socket to send and receive GTP-U packets to and from the S1-U interface.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Definition: abort.h:77
std::map< Ipv4Address, Ptr< UeInfo > > m_ueInfoByAddrMap
Map telling for each UE IPv4 address the corresponding UE info.
Describes an IPv6 address.
Definition: ipv6-address.h:49
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:40
void SetTeid(uint32_t teid)
Set TEID function.
void DoDeleteBearerCommand(EpcS11SapSgw::DeleteBearerCommandMessage req)
Delete bearer command function.
SGW side of the S11 Service Access Point (SAP), provides the SGW methods to be called when an S11 mes...
Definition: epc-s11-sap.h:166
std::list< BearerContextToBeCreated > bearerContextsToBeCreated
list of bearer contexts to be created
Definition: epc-s11-sap.h:187
virtual void CreateSessionResponse(CreateSessionResponseMessage msg)=0
send a Create Session Response message
void SetEnbAddr(Ipv4Address addr)
set the address of the eNB to which the UE is connected
Packet addressed oo us.
Definition: net-device.h:298
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition: log.h:262
uint32_t CopyData(uint8_t *buffer, uint32_t size) const
Copy the packet contents to a byte buffer.
Definition: packet.cc:378
virtual void DoDispose()
Destructor implementation.
void RecvFromS1uSocket(Ptr< Socket > socket)
Method to be assigned to the recv callback of the S1-U socket.
virtual ~EpcSgwPgwApplication(void)
Destructor.
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.
Definition: object.h:87
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7
Definition: epc-s11-sap.h:140
Ipv6Address GetDestinationAddress(void) const
Get the "Destination address" field.
Definition: ipv6-header.cc:110
void DoModifyBearerRequest(EpcS11SapSgw::ModifyBearerRequestMessage msg)
Modify bearer request function.
EpcS11SapSgw * m_s11SapSgw
SGW side of the S11 SAP.
a unique identifier for an interface.
Definition: type-id.h:58
Ipv4Address sgwAddr
SGW IPV4 address.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:915
void AddEnb(uint16_t cellId, Ipv4Address enbAddr, Ipv4Address sgwAddr)
Let the SGW be aware of a new eNB.
std::map< Ipv6Address, Ptr< UeInfo > > m_ueInfoByAddrMap6
Map telling for each UE IPv6 address the corresponding UE info.
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
Create Session Request message, see 3GPP TS 29.274 7.2.1
Definition: epc-s11-sap.h:183
EpcSgwPgwApplication(const Ptr< VirtualNetDevice > tunDevice, const Ptr< Socket > s1uSocket)
Constructor that binds the tap device to the callback methods.
Implementation of the GPRS Tunnelling Protocol header according to GTPv1-U Release 10 as per 3Gpp TS ...
Create Session Response message, see 3GPP TS 29.274 7.2.2
Definition: epc-s11-sap.h:99