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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Nicola Baldo <nbaldo@cttc.cat>
7 */
8
9#ifndef EPC_S11_SAP_H
10#define EPC_S11_SAP_H
11
12#include "epc-tft.h"
13#include "eps-bearer.h"
14
15#include <ns3/address.h>
16#include <ns3/object.h>
17#include <ns3/ptr.h>
18
19#include <list>
20
21namespace ns3
22{
23
24/**
25 * EpcS11Sap
26 */
28{
29 public:
30 virtual ~EpcS11Sap();
31
32 /**
33 * GTPC message
34 */
36 {
37 uint32_t teid; ///< TEID
38 };
39
40 /**
41 * Fully-qualified TEID, see 3GPP TS 29.274 section 8.22
42 */
43 struct Fteid
44 {
45 uint32_t teid; ///< TEID
46 Ipv4Address address; ///< IP address
47 };
48
49 /**
50 * TS 29.274 8.21 User Location Information (ULI)
51 */
52 struct Uli
53 {
54 uint16_t gci; ///< GCI
55 };
56};
57
58/**
59 * \ingroup lte
60 *
61 * MME side of the S11 Service Access Point (SAP), provides the MME
62 * methods to be called when an S11 message is received by the MME.
63 */
64class EpcS11SapMme : public EpcS11Sap
65{
66 public:
67 /**
68 * 3GPP TS 29.274 version 8.3.1 Release 8 section 8.28
69 */
71 {
72 EpcS11Sap::Fteid sgwFteid; ///< EPC FTEID
73 uint8_t epsBearerId; ///< EPS bearer ID
74 EpsBearer bearerLevelQos; ///< EPS bearer
75 Ptr<EpcTft> tft; ///< traffic flow template
76 };
77
78 /**
79 * Create Session Response message, see 3GPP TS 29.274 7.2.2
80 */
82 {
83 std::list<BearerContextCreated> bearerContextsCreated; ///< bearer contexts created
84 };
85
86 /**
87 * send a Create Session Response message
88 *
89 * \param msg the message
90 */
92
93 /**
94 * Bearer Context Removed structure
95 */
97 {
98 uint8_t epsBearerId; ///< EPS bearer ID
99 };
100
101 /**
102 * Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2
103 */
105 {
106 std::list<BearerContextRemoved> bearerContextsRemoved; ///< list of bearer context removed
107 };
108
109 /**
110 * \brief As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Request message shall be sent
111 * on the S11 interface by PGW to SGW and from SGW to MME
112 * \param msg the message
113 */
115
116 /**
117 * Modify Bearer Response message, see 3GPP TS 29.274 7.2.7
118 */
120 {
121 /// Cause enumeration
129
130 Cause cause; ///< the cause
131 };
132
133 /**
134 * Send a Modify Bearer Response message
135 *
136 * \param msg the message
137 */
139};
140
141/**
142 * \ingroup lte
143 *
144 * SGW side of the S11 Service Access Point (SAP), provides the SGW
145 * methods to be called when an S11 message is received by the SGW.
146 */
148{
149 public:
150 /// BearerContextToBeCreated structure
152 {
154 uint8_t epsBearerId; ///< EPS bearer ID
155 EpsBearer bearerLevelQos; ///< bearer QOS level
156 Ptr<EpcTft> tft; ///< traffic flow template
157 };
158
159 /**
160 * Create Session Request message, see 3GPP TS 29.274 7.2.1
161 */
163 {
164 uint64_t imsi; ///< IMSI
165 Uli uli; ///< ULI
166 std::list<BearerContextToBeCreated>
167 bearerContextsToBeCreated; ///< list of bearer contexts to be created
168 };
169
170 /**
171 * Send a Create Session Request message
172 *
173 * \param msg the message
174 */
176
177 /// BearerContextToBeCreated structure
179 {
180 uint8_t epsBearerId; ///< EPS bearer ID
181 };
182
183 /**
184 * Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17.1
185 */
187 {
188 std::list<BearerContextToBeRemoved>
189 bearerContextsToBeRemoved; ///< list of bearer contexts to be removed
190 };
191
192 /**
193 * \brief As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent
194 * on the S11 interface by the MME to the SGW
195 * \param msg the DeleteBearerCommandMessage
196 */
198
199 /// BearerContextRemovedSgwPgw structure
201 {
202 uint8_t epsBearerId; ///< EPS bearer ID
203 };
204
205 /**
206 * Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10.2
207 */
209 {
210 std::list<BearerContextRemovedSgwPgw>
211 bearerContextsRemoved; ///< list of bearer contexts removed
212 };
213
214 /**
215 * \brief As per 3GPP TS 29.274 Release 9 V9.3.0, a Delete Bearer Command message shall be sent
216 * on the S11 interface by the MME to the SGW
217 * \param msg the message
218 */
220
221 /**
222 * Modify Bearer Request message, see 3GPP TS 29.274 7.2.7
223 */
225 {
226 Uli uli; ///< ULI
227 };
228
229 /**
230 * Send a Modify Bearer Request message
231 *
232 * \param msg the message
233 */
235};
236
237/**
238 * Template for the implementation of the EpcS11SapMme as a member
239 * of an owner class of type C to which all methods are forwarded
240 */
241template <class C>
243{
244 public:
245 /**
246 * Constructor
247 *
248 * \param owner the owner class
249 */
250 MemberEpcS11SapMme(C* owner);
251
252 // Delete default constructor to avoid misuse
254
255 // inherited from EpcS11SapMme
259
260 private:
261 C* m_owner; ///< owner class
262};
263
264template <class C>
266 : m_owner(owner)
267{
268}
269
270template <class C>
271void
273{
274 m_owner->DoCreateSessionResponse(msg);
275}
276
277template <class C>
278void
280{
281 m_owner->DoDeleteBearerRequest(msg);
282}
283
284template <class C>
285void
287{
288 m_owner->DoModifyBearerResponse(msg);
289}
290
291/**
292 * Template for the implementation of the EpcS11SapSgw as a member
293 * of an owner class of type C to which all methods are forwarded
294 */
295template <class C>
297{
298 public:
299 /**
300 * Constructor
301 *
302 * \param owner the owner class
303 */
304 MemberEpcS11SapSgw(C* owner);
305
306 // Delete default constructor to avoid misuse
308
309 // inherited from EpcS11SapSgw
314
315 private:
316 C* m_owner; ///< owner class
317};
318
319template <class C>
321 : m_owner(owner)
322{
323}
324
325template <class C>
326void
328{
329 m_owner->DoCreateSessionRequest(msg);
330}
331
332template <class C>
333void
335{
336 m_owner->DoModifyBearerRequest(msg);
337}
338
339template <class C>
340void
342{
343 m_owner->DoDeleteBearerCommand(msg);
344}
345
346template <class C>
347void
349{
350 m_owner->DoDeleteBearerResponse(msg);
351}
352
353} // namespace ns3
354
355#endif /* EPC_S11_SAP_H */
EpcS11Sap.
Definition epc-s11-sap.h:28
virtual ~EpcS11Sap()
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:65
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...
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:80
Ipv4 addresses are stored in host order in this class.
Template for the implementation of the EpcS11SapMme as a member of an owner class of type C to which ...
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...
C * m_owner
owner class
void CreateSessionResponse(CreateSessionResponseMessage msg) override
send a Create Session Response message
void ModifyBearerResponse(ModifyBearerResponseMessage msg) override
Send a Modify Bearer Response message.
Template for the implementation of the EpcS11SapSgw as a member of an owner class of type C to which ...
void CreateSessionRequest(CreateSessionRequestMessage msg) override
Send a Create Session Request message.
C * m_owner
owner class
void ModifyBearerRequest(ModifyBearerRequestMessage msg) override
Send a Modify Bearer Request message.
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...
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...
Smart pointer class similar to boost::intrusive_ptr.
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:44
Ipv4Address address
IP address.
Definition epc-s11-sap.h:46
uint32_t teid
TEID.
Definition epc-s11-sap.h:45
TS 29.274 8.21 User Location Information (ULI)
Definition epc-s11-sap.h:53
uint16_t gci
GCI.
Definition epc-s11-sap.h:54
3GPP TS 29.274 version 8.3.1 Release 8 section 8.28
Definition epc-s11-sap.h:71
EpcS11Sap::Fteid sgwFteid
EPC FTEID.
Definition epc-s11-sap.h:72
Ptr< EpcTft > tft
traffic flow template
Definition epc-s11-sap.h:75
Bearer Context Removed structure.
Definition epc-s11-sap.h:97
Create Session Response message, see 3GPP TS 29.274 7.2.2.
Definition epc-s11-sap.h:82
std::list< BearerContextCreated > bearerContextsCreated
bearer contexts created
Definition epc-s11-sap.h:83
Delete Bearer Request message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.9.2.
std::list< BearerContextRemoved > bearerContextsRemoved
list of bearer context removed
Modify Bearer Response message, see 3GPP TS 29.274 7.2.7.
BearerContextRemovedSgwPgw structure.
BearerContextToBeCreated structure.
EpsBearer bearerLevelQos
bearer QOS level
Ptr< EpcTft > tft
traffic flow template
BearerContextToBeCreated structure.
Create Session Request message, see 3GPP TS 29.274 7.2.1.
std::list< BearerContextToBeCreated > bearerContextsToBeCreated
list of bearer contexts to be created
Delete Bearer Command message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.17....
std::list< BearerContextToBeRemoved > bearerContextsToBeRemoved
list of bearer contexts to be removed
Delete Bearer Response message, see 3GPP TS 29.274 Release 9 V9.3.0 section 7.2.10....
std::list< BearerContextRemovedSgwPgw > bearerContextsRemoved
list of bearer contexts removed
Modify Bearer Request message, see 3GPP TS 29.274 7.2.7.