A Discrete-Event Network Simulator
API
epc-s11-sap.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012 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: Nicola Baldo <nbaldo@cttc.cat>
18  */
19 
20 #ifndef EPC_S11_SAP_H
21 #define EPC_S11_SAP_H
22 
23 #include <ns3/address.h>
24 #include <ns3/epc-tft.h>
25 #include <ns3/eps-bearer.h>
26 #include <ns3/object.h>
27 #include <ns3/ptr.h>
28 
29 #include <list>
30 
31 namespace ns3
32 {
33 
37 class EpcS11Sap
38 {
39  public:
40  virtual ~EpcS11Sap();
41 
45  struct GtpcMessage
46  {
47  uint32_t teid;
48  };
49 
53  struct Fteid
54  {
55  uint32_t teid;
57  };
58 
62  struct Uli
63  {
64  uint16_t gci;
65  };
66 };
67 
74 class EpcS11SapMme : public EpcS11Sap
75 {
76  public:
81  {
83  uint8_t epsBearerId;
86  };
87 
92  {
93  std::list<BearerContextCreated> bearerContextsCreated;
94  };
95 
102 
107  {
108  uint8_t epsBearerId;
109  };
110 
115  {
116  std::list<BearerContextRemoved> bearerContextsRemoved;
117  };
118 
125 
130  {
132  enum Cause
133  {
138  };
139 
141  };
142 
149 };
150 
157 class EpcS11SapSgw : public EpcS11Sap
158 {
159  public:
162  {
164  uint8_t epsBearerId;
167  };
168 
173  {
174  uint64_t imsi;
176  std::list<BearerContextToBeCreated>
178  };
179 
186 
189  {
190  uint8_t epsBearerId;
191  };
192 
197  {
198  std::list<BearerContextToBeRemoved>
200  };
201 
208 
211  {
212  uint8_t epsBearerId;
213  };
214 
219  {
220  std::list<BearerContextRemovedSgwPgw>
222  };
223 
230 
235  {
237  };
238 
245 };
246 
251 template <class C>
253 {
254  public:
260  MemberEpcS11SapMme(C* owner);
261 
262  // Delete default constructor to avoid misuse
263  MemberEpcS11SapMme() = delete;
264 
265  // inherited from EpcS11SapMme
269 
270  private:
271  C* m_owner;
272 };
273 
274 template <class C>
276  : m_owner(owner)
277 {
278 }
279 
280 template <class C>
281 void
283 {
284  m_owner->DoCreateSessionResponse(msg);
285 }
286 
287 template <class C>
288 void
290 {
291  m_owner->DoDeleteBearerRequest(msg);
292 }
293 
294 template <class C>
295 void
297 {
298  m_owner->DoModifyBearerResponse(msg);
299 }
300 
305 template <class C>
307 {
308  public:
314  MemberEpcS11SapSgw(C* owner);
315 
316  // Delete default constructor to avoid misuse
317  MemberEpcS11SapSgw() = delete;
318 
319  // inherited from EpcS11SapSgw
324 
325  private:
326  C* m_owner;
327 };
328 
329 template <class C>
331  : m_owner(owner)
332 {
333 }
334 
335 template <class C>
336 void
338 {
339  m_owner->DoCreateSessionRequest(msg);
340 }
341 
342 template <class C>
343 void
345 {
346  m_owner->DoModifyBearerRequest(msg);
347 }
348 
349 template <class C>
350 void
352 {
353  m_owner->DoDeleteBearerCommand(msg);
354 }
355 
356 template <class C>
357 void
359 {
360  m_owner->DoDeleteBearerResponse(msg);
361 }
362 
363 } // namespace ns3
364 
365 #endif /* EPC_S11_SAP_H */
EpcS11Sap.
Definition: epc-s11-sap.h:38
virtual ~EpcS11Sap()
Definition: epc-s11-sap.cc:25
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:75
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...
virtual void CreateSessionResponse(CreateSessionResponseMessage msg)=0
send a Create Session Response message
virtual void ModifyBearerResponse(ModifyBearerResponseMessage msg)=0
Send a Modify Bearer Response message.
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:158
virtual void CreateSessionRequest(CreateSessionRequestMessage msg)=0
Send a Create Session Request message.
virtual void DeleteBearerResponse(DeleteBearerResponseMessage msg)=0
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent on the S11 inte...
virtual void ModifyBearerRequest(ModifyBearerRequestMessage msg)=0
Send a Modify Bearer Request message.
virtual void DeleteBearerCommand(DeleteBearerCommandMessage msg)=0
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent on the S11 inte...
This class contains the specification of EPS Bearers.
Definition: eps-bearer.h:91
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
Template for the implementation of the EpcS11SapMme as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:253
void DeleteBearerRequest(DeleteBearerRequestMessage msg) override
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Request message shall be sent on the S11 inte...
Definition: epc-s11-sap.h:289
C * m_owner
owner class
Definition: epc-s11-sap.h:271
void CreateSessionResponse(CreateSessionResponseMessage msg) override
send a Create Session Response message
Definition: epc-s11-sap.h:282
void ModifyBearerResponse(ModifyBearerResponseMessage msg) override
Send a Modify Bearer Response message.
Definition: epc-s11-sap.h:296
Template for the implementation of the EpcS11SapSgw as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:307
void CreateSessionRequest(CreateSessionRequestMessage msg) override
Send a Create Session Request message.
Definition: epc-s11-sap.h:337
C * m_owner
owner class
Definition: epc-s11-sap.h:326
void ModifyBearerRequest(ModifyBearerRequestMessage msg) override
Send a Modify Bearer Request message.
Definition: epc-s11-sap.h:344
void DeleteBearerResponse(DeleteBearerResponseMessage msg) override
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent on the S11 inte...
Definition: epc-s11-sap.h:358
void DeleteBearerCommand(DeleteBearerCommandMessage msg) override
As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent on the S11 inte...
Definition: epc-s11-sap.h:351
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Fully-qualified TEID, see 3GPP TS 29.274 section 8.22.
Definition: epc-s11-sap.h:54
Ipv4Address address
IP address.
Definition: epc-s11-sap.h:56
uint32_t teid
TEID.
Definition: epc-s11-sap.h:55
TS 29.274 8.21 User Location Information (ULI)
Definition: epc-s11-sap.h:63
uint16_t gci
GCI.
Definition: epc-s11-sap.h:64
3GPP TS 29.274 version 8.3.1 Release 8 section 8.28
Definition: epc-s11-sap.h:81
EpcS11Sap::Fteid sgwFteid
EPC FTEID.
Definition: epc-s11-sap.h:82
Ptr< EpcTft > tft
traffic flow template
Definition: epc-s11-sap.h:85
Bearer Context Removed structure.
Definition: epc-s11-sap.h:107
Create Session Response message, see 3GPP TS 29.274 7.2.2.
Definition: epc-s11-sap.h:92
std::list< BearerContextCreated > bearerContextsCreated
bearer contexts created
Definition: epc-s11-sap.h:93
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
Definition: epc-s11-sap.h:115
std::list< BearerContextRemoved > bearerContextsRemoved
list of bearer context removed
Definition: epc-s11-sap.h:116
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7.
Definition: epc-s11-sap.h:130
BearerContextRemovedSgwPgw structure.
Definition: epc-s11-sap.h:211
BearerContextToBeCreated structure.
Definition: epc-s11-sap.h:162
EpsBearer bearerLevelQos
bearer QOS level
Definition: epc-s11-sap.h:165
Ptr< EpcTft > tft
traffic flow template
Definition: epc-s11-sap.h:166
BearerContextToBeCreated structure.
Definition: epc-s11-sap.h:189
Create Session Request message, see 3GPP TS 29.274 7.2.1.
Definition: epc-s11-sap.h:173
std::list< BearerContextToBeCreated > bearerContextsToBeCreated
list of bearer contexts to be created
Definition: epc-s11-sap.h:177
Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17....
Definition: epc-s11-sap.h:197
std::list< BearerContextToBeRemoved > bearerContextsToBeRemoved
list of bearer contexts to be removed
Definition: epc-s11-sap.h:199
Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10....
Definition: epc-s11-sap.h:219
std::list< BearerContextRemovedSgwPgw > bearerContextsRemoved
list of bearer contexts removed
Definition: epc-s11-sap.h:221
Modify Bearer Request message, see 3GPP TS 29.274 7.2.7.
Definition: epc-s11-sap.h:235