A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 "epc-tft.h"
24#include "eps-bearer.h"
25
26#include <ns3/address.h>
27#include <ns3/object.h>
28#include <ns3/ptr.h>
29
30#include <list>
31
32namespace ns3
33{
34
35/**
36 * EpcS11Sap
37 */
39{
40 public:
41 virtual ~EpcS11Sap();
42
43 /**
44 * GTPC message
45 */
47 {
48 uint32_t teid; ///< TEID
49 };
50
51 /**
52 * Fully-qualified TEID, see 3GPP TS 29.274 section 8.22
53 */
54 struct Fteid
55 {
56 uint32_t teid; ///< TEID
57 Ipv4Address address; ///< IP address
58 };
59
60 /**
61 * TS 29.274 8.21 User Location Information (ULI)
62 */
63 struct Uli
64 {
65 uint16_t gci; ///< GCI
66 };
67};
68
69/**
70 * \ingroup lte
71 *
72 * MME side of the S11 Service Access Point (SAP), provides the MME
73 * methods to be called when an S11 message is received by the MME.
74 */
75class EpcS11SapMme : public EpcS11Sap
76{
77 public:
78 /**
79 * 3GPP TS 29.274 version 8.3.1 Release 8 section 8.28
80 */
82 {
83 EpcS11Sap::Fteid sgwFteid; ///< EPC FTEID
84 uint8_t epsBearerId; ///< EPS bearer ID
85 EpsBearer bearerLevelQos; ///< EPS bearer
86 Ptr<EpcTft> tft; ///< traffic flow template
87 };
88
89 /**
90 * Create Session Response message, see 3GPP TS 29.274 7.2.2
91 */
93 {
94 std::list<BearerContextCreated> bearerContextsCreated; ///< bearer contexts created
95 };
96
97 /**
98 * send a Create Session Response message
99 *
100 * \param msg the message
101 */
103
104 /**
105 * Bearer Context Removed structure
106 */
108 {
109 uint8_t epsBearerId; ///< EPS bearer ID
110 };
111
112 /**
113 * Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2
114 */
116 {
117 std::list<BearerContextRemoved> bearerContextsRemoved; ///< list of bearer context removed
118 };
119
120 /**
121 * \brief As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Request message shall be sent
122 * on the S11 interface by PGW to SGW and from SGW to MME
123 * \param msg the message
124 */
126
127 /**
128 * Modify Bearer Response message, see 3GPP TS 29.274 7.2.7
129 */
131 {
132 /// Cause enumeration
133 enum Cause
134 {
139 };
140
141 Cause cause; ///< the cause
142 };
143
144 /**
145 * Send a Modify Bearer Response message
146 *
147 * \param msg the message
148 */
150};
151
152/**
153 * \ingroup lte
154 *
155 * SGW side of the S11 Service Access Point (SAP), provides the SGW
156 * methods to be called when an S11 message is received by the SGW.
157 */
159{
160 public:
161 /// BearerContextToBeCreated structure
163 {
165 uint8_t epsBearerId; ///< EPS bearer ID
166 EpsBearer bearerLevelQos; ///< bearer QOS level
167 Ptr<EpcTft> tft; ///< traffic flow template
168 };
169
170 /**
171 * Create Session Request message, see 3GPP TS 29.274 7.2.1
172 */
174 {
175 uint64_t imsi; ///< IMSI
176 Uli uli; ///< ULI
177 std::list<BearerContextToBeCreated>
178 bearerContextsToBeCreated; ///< list of bearer contexts to be created
179 };
180
181 /**
182 * Send a Create Session Request message
183 *
184 * \param msg the message
185 */
187
188 /// BearerContextToBeCreated structure
190 {
191 uint8_t epsBearerId; ///< EPS bearer ID
192 };
193
194 /**
195 * Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17.1
196 */
198 {
199 std::list<BearerContextToBeRemoved>
200 bearerContextsToBeRemoved; ///< list of bearer contexts to be removed
201 };
202
203 /**
204 * \brief As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent
205 * on the S11 interface by the MME to the SGW
206 * \param msg the DeleteBearerCommandMessage
207 */
209
210 /// BearerContextRemovedSgwPgw structure
212 {
213 uint8_t epsBearerId; ///< EPS bearer ID
214 };
215
216 /**
217 * Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10.2
218 */
220 {
221 std::list<BearerContextRemovedSgwPgw>
222 bearerContextsRemoved; ///< list of bearer contexts removed
223 };
224
225 /**
226 * \brief As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent
227 * on the S11 interface by the MME to the SGW
228 * \param msg the message
229 */
231
232 /**
233 * Modify Bearer Request message, see 3GPP TS 29.274 7.2.7
234 */
236 {
237 Uli uli; ///< ULI
238 };
239
240 /**
241 * Send a Modify Bearer Request message
242 *
243 * \param msg the message
244 */
246};
247
248/**
249 * Template for the implementation of the EpcS11SapMme as a member
250 * of an owner class of type C to which all methods are forwarded
251 */
252template <class C>
254{
255 public:
256 /**
257 * Constructor
258 *
259 * \param owner the owner class
260 */
261 MemberEpcS11SapMme(C* owner);
262
263 // Delete default constructor to avoid misuse
265
266 // inherited from EpcS11SapMme
270
271 private:
272 C* m_owner; ///< owner class
273};
274
275template <class C>
277 : m_owner(owner)
278{
279}
280
281template <class C>
282void
284{
285 m_owner->DoCreateSessionResponse(msg);
286}
287
288template <class C>
289void
291{
292 m_owner->DoDeleteBearerRequest(msg);
293}
294
295template <class C>
296void
298{
299 m_owner->DoModifyBearerResponse(msg);
300}
301
302/**
303 * Template for the implementation of the EpcS11SapSgw as a member
304 * of an owner class of type C to which all methods are forwarded
305 */
306template <class C>
308{
309 public:
310 /**
311 * Constructor
312 *
313 * \param owner the owner class
314 */
315 MemberEpcS11SapSgw(C* owner);
316
317 // Delete default constructor to avoid misuse
319
320 // inherited from EpcS11SapSgw
325
326 private:
327 C* m_owner; ///< owner class
328};
329
330template <class C>
332 : m_owner(owner)
333{
334}
335
336template <class C>
337void
339{
340 m_owner->DoCreateSessionRequest(msg);
341}
342
343template <class C>
344void
346{
347 m_owner->DoModifyBearerRequest(msg);
348}
349
350template <class C>
351void
353{
354 m_owner->DoDeleteBearerCommand(msg);
355}
356
357template <class C>
358void
360{
361 m_owner->DoDeleteBearerResponse(msg);
362}
363
364} // namespace ns3
365
366#endif /* EPC_S11_SAP_H */
EpcS11Sap.
Definition: epc-s11-sap.h:39
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:76
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:159
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:42
Template for the implementation of the EpcS11SapMme as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:254
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:290
C * m_owner
owner class
Definition: epc-s11-sap.h:272
void CreateSessionResponse(CreateSessionResponseMessage msg) override
send a Create Session Response message
Definition: epc-s11-sap.h:283
void ModifyBearerResponse(ModifyBearerResponseMessage msg) override
Send a Modify Bearer Response message.
Definition: epc-s11-sap.h:297
Template for the implementation of the EpcS11SapSgw as a member of an owner class of type C to which ...
Definition: epc-s11-sap.h:308
void CreateSessionRequest(CreateSessionRequestMessage msg) override
Send a Create Session Request message.
Definition: epc-s11-sap.h:338
C * m_owner
owner class
Definition: epc-s11-sap.h:327
void ModifyBearerRequest(ModifyBearerRequestMessage msg) override
Send a Modify Bearer Request message.
Definition: epc-s11-sap.h:345
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:359
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:352
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
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:55
Ipv4Address address
IP address.
Definition: epc-s11-sap.h:57
uint32_t teid
TEID.
Definition: epc-s11-sap.h:56
TS 29.274 8.21 User Location Information (ULI)
Definition: epc-s11-sap.h:64
uint16_t gci
GCI.
Definition: epc-s11-sap.h:65
3GPP TS 29.274 version 8.3.1 Release 8 section 8.28
Definition: epc-s11-sap.h:82
EpcS11Sap::Fteid sgwFteid
EPC FTEID.
Definition: epc-s11-sap.h:83
Ptr< EpcTft > tft
traffic flow template
Definition: epc-s11-sap.h:86
Bearer Context Removed structure.
Definition: epc-s11-sap.h:108
Create Session Response message, see 3GPP TS 29.274 7.2.2.
Definition: epc-s11-sap.h:93
std::list< BearerContextCreated > bearerContextsCreated
bearer contexts created
Definition: epc-s11-sap.h:94
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
Definition: epc-s11-sap.h:116
std::list< BearerContextRemoved > bearerContextsRemoved
list of bearer context removed
Definition: epc-s11-sap.h:117
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7.
Definition: epc-s11-sap.h:131
BearerContextRemovedSgwPgw structure.
Definition: epc-s11-sap.h:212
BearerContextToBeCreated structure.
Definition: epc-s11-sap.h:163
EpsBearer bearerLevelQos
bearer QOS level
Definition: epc-s11-sap.h:166
Ptr< EpcTft > tft
traffic flow template
Definition: epc-s11-sap.h:167
BearerContextToBeCreated structure.
Definition: epc-s11-sap.h:190
Create Session Request message, see 3GPP TS 29.274 7.2.1.
Definition: epc-s11-sap.h:174
std::list< BearerContextToBeCreated > bearerContextsToBeCreated
list of bearer contexts to be created
Definition: epc-s11-sap.h:178
Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17....
Definition: epc-s11-sap.h:198
std::list< BearerContextToBeRemoved > bearerContextsToBeRemoved
list of bearer contexts to be removed
Definition: epc-s11-sap.h:200
Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10....
Definition: epc-s11-sap.h:220
std::list< BearerContextRemovedSgwPgw > bearerContextsRemoved
list of bearer contexts removed
Definition: epc-s11-sap.h:222
Modify Bearer Request message, see 3GPP TS 29.274 7.2.7.
Definition: epc-s11-sap.h:236