blob: c024d371e8c0563161ed56f28093c70821ea7130 [file] [log] [blame]
Harald Weltedf327232017-12-28 22:51:51 +01001module GSUP_Types {
2
Harald Welte35bb7162018-01-03 21:07:52 +01003/* GSUP_Types, defining abstract TTCN-3 data types for the GSUP protocol.
4 *
5 * GSUP is a non-standard protocol used between OsmoMSC/OsmoSGSN and OsmoHLR
6 * in order to replace the complex TCAP/MAP protocol.
7 *
8 * (C) 2017 by Harald Welte <laforge@gnumonks.org>
9 * All rights reserved.
10 *
11 * Released under the terms of GNU General Public License, Version 2 or
12 * (at your option) any later version.
13 */
14
Harald Weltedf327232017-12-28 22:51:51 +010015import from General_Types all;
16import from Osmocom_Types all;
17
18type enumerated GSUP_IEI {
19 OSMO_GSUP_IMSI_IE ('01'O),
20 OSMO_GSUP_CAUSE_IE ('02'O),
21 OSMO_GSUP_AUTH_TUPLE_IE ('03'O),
22 OSMO_GSUP_PDP_INFO_COMPL_IE ('04'O),
23 OSMO_GSUP_PDP_INFO_IE ('05'O),
24 OSMO_GSUP_CANCEL_TYPE_IE ('06'O),
25 OSMO_GSUP_FREEZE_PTMSI_IE ('07'O),
26 OSMO_GSUP_MSISDN_IE ('08'O),
27 OSMO_GSUP_HLR_NUMBER_IE ('09'O),
28 OSMO_GSUP_PDP_CONTEXT_ID_IE ('10'O),
29 OSMO_GSUP_PDP_TYPE_IE ('11'O),
30 OSMO_GSUP_ACCESS_POINT_NAME_IE ('12'O),
31 OSMO_GSUP_PDP_QOS_IE ('13'O),
32 OSMO_GSUP_CHARG_CHAR_IE ('14'O),
33
34 OSMO_GSUP_RAND_IE ('20'O),
35 OSMO_GSUP_SRES_IE ('21'O),
36 OSMO_GSUP_KC_IE ('22'O),
37 OSMO_GSUP_IK_IE ('23'O),
38 OSMO_GSUP_CK_IE ('24'O),
39 OSMO_GSUP_AUTN_IE ('25'O),
40 OSMO_GSUP_AUTS_IE ('26'O),
41 OSMO_GSUP_RES_IE ('27'O),
Vadim Yanitskiyb761d142018-06-02 21:05:04 +070042 OSMO_GSUP_CN_DOMAIN_IE ('28'O),
43
44 OSMO_GSUP_SESSION_ID_IE ('30'O),
45 OSMO_GSUP_SESSION_STATE_IE ('31'O),
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +070046 OSMO_GSUP_SS_INFO_IE ('35'O),
47
48 /* SM related IEs (see 3GPP TS 29.002, section 7.6.8) */
49 OSMO_GSUP_SM_RP_MR_IE ('40'O),
50 OSMO_GSUP_SM_RP_DA_IE ('41'O),
51 OSMO_GSUP_SM_RP_OA_IE ('42'O),
52 OSMO_GSUP_SM_RP_UI_IE ('43'O),
53 OSMO_GSUP_SM_RP_CAUSE_IE ('44'O),
Vadim Yanitskiy88e23232018-11-13 03:04:02 +070054 OSMO_GSUP_SM_RP_MMS_IE ('45'O),
Oliver Smithc5748292019-02-22 15:02:48 +010055 OSMO_GSUP_SM_ALERT_RSN_IE ('46'O),
56
57 OSMO_GSUP_IMEI_IE ('50'O),
58 OSMO_GSUP_IMEI_RESULT_IE ('51'O)
Harald Weltedf327232017-12-28 22:51:51 +010059} with { variant "FIELDLENGTH(8)" };
60
61type enumerated GSUP_MessageType {
62 OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST ('00000100'B),
63 OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR ('00000101'B),
64 OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT ('00000110'B),
65
66 OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST ('00001000'B),
67 OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR ('00001001'B),
68 OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT ('00001010'B),
69
70 OSMO_GSUP_MSGT_AUTH_FAIL_REPORT ('00001011'B),
71
72 OSMO_GSUP_MSGT_PURGE_MS_REQUEST ('00001100'B),
73 OSMO_GSUP_MSGT_PURGE_MS_ERROR ('00001101'B),
74 OSMO_GSUP_MSGT_PURGE_MS_RESULT ('00001110'B),
75
76 OSMO_GSUP_MSGT_INSERT_DATA_REQUEST ('00010000'B),
77 OSMO_GSUP_MSGT_INSERT_DATA_ERROR ('00010001'B),
78 OSMO_GSUP_MSGT_INSERT_DATA_RESULT ('00010010'B),
79
80 OSMO_GSUP_MSGT_DELETE_DATA_REQUEST ('00010100'B),
81 OSMO_GSUP_MSGT_DELETE_DATA_ERROR ('00010101'B),
82 OSMO_GSUP_MSGT_DELETE_DATA_RESULT ('00010110'B),
83
84 OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST ('00011100'B),
85 OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR ('00011101'B),
Vadim Yanitskiyb761d142018-06-02 21:05:04 +070086 OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT ('00011110'B),
87
88 OSMO_GSUP_MSGT_PROC_SS_REQUEST ('00100000'B),
89 OSMO_GSUP_MSGT_PROC_SS_ERROR ('00100001'B),
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +070090 OSMO_GSUP_MSGT_PROC_SS_RESULT ('00100010'B),
91
92 OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST ('00100100'B),
93 OSMO_GSUP_MSGT_MO_FORWARD_SM_ERROR ('00100101'B),
94 OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT ('00100110'B),
95
96 OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST ('00101000'B),
97 OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR ('00101001'B),
Vadim Yanitskiy88e23232018-11-13 03:04:02 +070098 OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT ('00101010'B),
99
100 OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST ('00101100'B),
101 OSMO_GSUP_MSGT_READY_FOR_SM_ERROR ('00101101'B),
Oliver Smithc5748292019-02-22 15:02:48 +0100102 OSMO_GSUP_MSGT_READY_FOR_SM_RESULT ('00101110'B),
103
104 OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST ('00110000'B),
105 OSMO_GSUP_MSGT_CHECK_IMEI_ERROR ('00110001'B),
106 OSMO_GSUP_MSGT_CHECK_IMEI_RESULT ('00110010'B)
Harald Weltedf327232017-12-28 22:51:51 +0100107} with { variant "FIELDLENGTH(8)" };
108
109type enumerated GSUP_CancelType {
Alexander Couzens4786b3f2018-09-16 03:33:30 +0200110 OSMO_GSUP_CANCEL_TYPE_UPDATE (0),
111 OSMO_GSUP_CANCEL_TYPE_WITHDRAW (1)
Harald Weltedf327232017-12-28 22:51:51 +0100112} with { variant "FIELDLENGTH(8)" };
113
114type enumerated GSUP_CnDomain {
115 OSMO_GSUP_CN_DOMAIN_PS (1),
116 OSMO_GSUP_CN_DOMAIN_CS (2)
117} with { variant "FIELDLENGTH(8)" };
118
Oliver Smithc5748292019-02-22 15:02:48 +0100119type enumerated GSUP_IMEIResult {
120 OSMO_GSUP_IMEI_RESULT_ACK (0),
121 OSMO_GSUP_IMEI_RESULT_NACK (1)
122} with { variant "FIELDLENGTH(8)" };
123
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700124type enumerated GSUP_SessionState {
125 OSMO_GSUP_SESSION_STATE_NONE (0),
126 OSMO_GSUP_SESSION_STATE_BEGIN (1),
127 OSMO_GSUP_SESSION_STATE_CONTINUE (2),
128 OSMO_GSUP_SESSION_STATE_END (3)
129} with { variant "FIELDLENGTH(8)" };
130
Harald Welte3f95be82018-01-27 00:48:13 +0100131type record GSUP_MSISDN {
132 uint8_t len,
133 hexstring digits optional
134} with { variant (len) "LENGTHTO(digits)" };
135
Oliver Smithc5748292019-02-22 15:02:48 +0100136type record GSUP_IMEI {
137 uint8_t len,
138 hexstring digits optional
139} with { variant (len) "LENGTHTO(digits)" };
140
Harald Weltedf327232017-12-28 22:51:51 +0100141type record GSUP_IE {
142 GSUP_IEI tag,
143 uint8_t len,
144 GSUP_IeValue val
145} with { variant (len) "LENGTHTO(val)"
146 variant (val) "CROSSTAG(imsi, tag = OSMO_GSUP_IMSI_IE;
147 cause, tag = OSMO_GSUP_CAUSE_IE;
148 cancel_type, tag = OSMO_GSUP_CANCEL_TYPE_IE;
Harald Welte77a8eba2018-01-22 21:22:32 +0100149 auth_tuple, tag = OSMO_GSUP_AUTH_TUPLE_IE;
Harald Weltedf327232017-12-28 22:51:51 +0100150 auts, tag = OSMO_GSUP_AUTS_IE;
151 rand, tag = OSMO_GSUP_RAND_IE;
Harald Welte77a8eba2018-01-22 21:22:32 +0100152 sres, tag = OSMO_GSUP_SRES_IE;
153 kc, tag = OSMO_GSUP_KC_IE;
154 ik, tag = OSMO_GSUP_IK_IE;
155 ck, tag = OSMO_GSUP_CK_IE;
156 autn, tag = OSMO_GSUP_AUTN_IE;
157 res, tag = OSMO_GSUP_RES_IE;
Harald Weltedf327232017-12-28 22:51:51 +0100158 msisdn, tag = OSMO_GSUP_MSISDN_IE;
159 hlr_number, tag = OSMO_GSUP_HLR_NUMBER_IE;
160 cn_domain, tag = OSMO_GSUP_CN_DOMAIN_IE;
Harald Welteeded9ad2018-02-17 20:57:34 +0100161 pdp_info, tag = OSMO_GSUP_PDP_INFO_IE;
162 apn, tag = OSMO_GSUP_ACCESS_POINT_NAME_IE;
163 pdp_qos, tag = OSMO_GSUP_PDP_QOS_IE;
164 pdp_type, tag = OSMO_GSUP_PDP_TYPE_IE;
165 charg_char, tag = OSMO_GSUP_CHARG_CHAR_IE;
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700166 session_state, tag = OSMO_GSUP_SESSION_STATE_IE;
167 session_id, tag = OSMO_GSUP_SESSION_ID_IE;
168 ss_info, tag = OSMO_GSUP_SS_INFO_IE;
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700169 sm_rp_mr, tag = OSMO_GSUP_SM_RP_MR_IE;
170 sm_rp_da, tag = OSMO_GSUP_SM_RP_DA_IE;
171 sm_rp_oa, tag = OSMO_GSUP_SM_RP_OA_IE;
172 sm_rp_ui, tag = OSMO_GSUP_SM_RP_UI_IE;
173 sm_rp_cause, tag = OSMO_GSUP_SM_RP_CAUSE_IE;
174 sm_rp_mms, tag = OSMO_GSUP_SM_RP_MMS_IE;
Vadim Yanitskiy88e23232018-11-13 03:04:02 +0700175 sm_alert_rsn, tag = OSMO_GSUP_SM_ALERT_RSN_IE;
Oliver Smithc5748292019-02-22 15:02:48 +0100176 imei, tag = OSMO_GSUP_IMEI_IE;
177 imei_result, tag = OSMO_GSUP_IMEI_RESULT_IE;
Harald Welteeded9ad2018-02-17 20:57:34 +0100178 )"
Harald Weltedf327232017-12-28 22:51:51 +0100179};
180
181type record of GSUP_IE GSUP_IEs;
182
183type union GSUP_IeValue {
184 hexstring imsi,
185 integer cause,
186 GSUP_CancelType cancel_type,
187 //boolean pdp_info_compl,
188 //boolean freeze_ptmsi,
Harald Weltedf327232017-12-28 22:51:51 +0100189 GSUP_IEs auth_tuple,
190 octetstring auts,
191 octetstring rand,
Harald Welte77a8eba2018-01-22 21:22:32 +0100192 octetstring sres,
193 octetstring kc,
194 octetstring ik,
195 octetstring ck,
196 octetstring autn,
197 octetstring res,
Harald Welte3f95be82018-01-27 00:48:13 +0100198 GSUP_MSISDN msisdn,
Harald Weltedf327232017-12-28 22:51:51 +0100199 octetstring hlr_number,
200 GSUP_CnDomain cn_domain,
Harald Welteeded9ad2018-02-17 20:57:34 +0100201 /* PDP context + nested IEs */
202 GSUP_IEs pdp_info,
203 octetstring apn,
204 octetstring pdp_qos,
205 OCT2 pdp_type,
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700206 octetstring charg_char,
207 /* Session information */
208 GSUP_SessionState session_state,
209 OCT4 session_id,
210 /* Supplementary Services */
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700211 octetstring ss_info,
212 /* Short Message Service */
213 OCT1 sm_rp_mr,
214 GSUP_SM_RP_DA sm_rp_da,
215 GSUP_SM_RP_OA sm_rp_oa,
216 octetstring sm_rp_ui,
217 OCT1 sm_rp_cause,
Vadim Yanitskiy88e23232018-11-13 03:04:02 +0700218 OCT1 sm_rp_mms,
Oliver Smithc5748292019-02-22 15:02:48 +0100219 GSUP_SM_ALERT_RSN_Type sm_alert_rsn,
220
221 GSUP_IMEI imei,
222 GSUP_IMEIResult imei_result
Harald Weltedf327232017-12-28 22:51:51 +0100223};
224
225type record GSUP_PDU {
226 GSUP_MessageType msg_type,
227 GSUP_IEs ies
228};
229
230external function enc_GSUP_PDU(in GSUP_PDU msg) return octetstring
231 with { extension "prototype(convert) encode(RAW)" };
232
233external function dec_GSUP_PDU(in octetstring msg) return GSUP_PDU
234 with { extension "prototype(convert) decode(RAW)" };
235
Harald Welte2f562b12018-01-24 20:52:38 +0100236function f_gsup_postprocess_decoded(inout GSUP_PDU gsup) {
237 if (gsup.ies[0].tag == OSMO_GSUP_IMSI_IE) {
238 /* if last digit is 'F', then there's an odd number of digits and we must strip the F */
239 var integer num_digits := lengthof(gsup.ies[0].val.imsi);
240 if (gsup.ies[0].val.imsi[num_digits-1] == 'F'H) {
241 gsup.ies[0].val.imsi := substr(gsup.ies[0].val.imsi, 0, num_digits-1);
242 }
243 }
244}
245
246function f_gsup_preprocess_encoded(inout GSUP_PDU gsup) {
247 if (ischosen(gsup.ies[0].val.imsi)) {
248 /* if number of digits is odd, add a 'F' as padding at the end */
249 var integer num_digits := lengthof(gsup.ies[0].val.imsi);
250 if (num_digits rem 2 == 1) {
251 gsup.ies[0].val.imsi := gsup.ies[0].val.imsi & 'F'H;
252 }
253 }
254}
255
Harald Welte3f95be82018-01-27 00:48:13 +0100256template (value) GSUP_MSISDN ts_GSUP_MSISDN(hexstring digits,
257 BIT3 ton := '000'B,
258 BIT4 npi := '0000'B) := {
259 len := 0, /* overwritten */
260 /* numberingPlanIdentification := npi,
261 typeOfNumber := ton,
262 ext1 := '0'B, */
263 digits := digits
264}
265
266template GSUP_MSISDN tr_GSUP_MSISDN(template hexstring digits,
267 template BIT3 ton := ?,
268 template BIT4 npi := ?) := {
269 len := ?,
270 /* numberingPlanIdentification := npi,
271 typeOfNumber := ton,
272 ext1 := '0'B, */
273 digits := digits
274}
275
276
Harald Weltedf327232017-12-28 22:51:51 +0100277
Harald Welte77a8eba2018-01-22 21:22:32 +0100278template GSUP_IE ts_GSUP_IE_AuthTuple2G(octetstring rand, octetstring sres,
279 octetstring kc) := {
280 tag := OSMO_GSUP_AUTH_TUPLE_IE,
281 len := 0, /* overwritten */
282 val := {
283 auth_tuple := {
284 valueof(ts_GSUP_IE_RAND(rand)),
285 valueof(ts_GSUP_IE_SRES(sres)),
286 valueof(ts_GSUP_IE_Kc(kc))
287 }
288 }
289}
290
291template GSUP_IE ts_GSUP_IE_AuthTuple2G3G(octetstring rand, octetstring sres,
292 octetstring kc, octetstring ik,
293 octetstring ck, octetstring autn,
294 octetstring res) := {
295 tag := OSMO_GSUP_AUTH_TUPLE_IE,
296 len := 0, /* overwritten */
297 val := {
298 auth_tuple := {
299 valueof(ts_GSUP_IE_RAND(rand)),
300 valueof(ts_GSUP_IE_SRES(sres)),
301 valueof(ts_GSUP_IE_Kc(kc)),
302 valueof(ts_GSUP_IE_IK(ik)),
303 valueof(ts_GSUP_IE_CK(ck)),
304 valueof(ts_GSUP_IE_AUTN(autn)),
305 valueof(ts_GSUP_IE_RES(res))
306 }
307 }
308}
309
Harald Welteeded9ad2018-02-17 20:57:34 +0100310template GSUP_IE ts_GSUP_IE_PdpInfo(octetstring apn, octetstring pdp_type, octetstring pdp_qos) := {
311 tag := OSMO_GSUP_PDP_INFO_IE,
312 len := 0, /* overwritten */
313 val := {
314 pdp_info := {
315 valueof(ts_GSUP_IE_APN(apn)),
316 valueof(ts_GSUP_IE_PDP_TYPE(pdp_type)),
317 valueof(ts_GSUP_IE_PDP_QOS(pdp_qos))
318 }
319 }
320}
321
322template (value) GSUP_IE ts_GSUP_IE_PDP_TYPE(OCT2 pdp_type) := {
323 tag := OSMO_GSUP_PDP_TYPE_IE,
324 len := 0,
325 val := {
326 pdp_type := pdp_type
327 }
328}
329
330template (value) GSUP_IE ts_GSUP_IE_PDP_QOS(octetstring pdp_qos) := {
331 tag := OSMO_GSUP_PDP_QOS_IE,
332 len := 0,
333 val := {
334 pdp_qos := pdp_qos
335 }
336}
337
338
Harald Weltedf327232017-12-28 22:51:51 +0100339template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template GSUP_IEs ies := *) := {
340 msg_type := msgt,
341 ies := ies
342}
343
Harald Welte8a1dd532018-01-27 15:38:18 +0100344template GSUP_PDU tr_GSUP_IMSI(template GSUP_MessageType msgt := ?, template hexstring imsi) := {
345 msg_type := msgt,
346 ies := { tr_GSUP_IE_IMSI(imsi), * }
347}
348
Harald Weltedf327232017-12-28 22:51:51 +0100349template GSUP_PDU ts_GSUP(GSUP_MessageType msgt, GSUP_IEs ies := {}) := {
350 msg_type := msgt,
351 ies := ies
352}
353
Harald Welte6aa04e32018-01-27 15:35:19 +0100354template (value) GSUP_PDU ts_GSUP_SAI_REQ(hexstring imsi) :=
Harald Weltedf327232017-12-28 22:51:51 +0100355 ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { valueof(ts_GSUP_IE_IMSI(imsi)) });
356
Harald Welteef9fa872018-01-22 03:00:17 +0100357template GSUP_PDU tr_GSUP_SAI_REQ(template hexstring imsi) :=
Harald Welte8a1dd532018-01-27 15:38:18 +0100358 tr_GSUP_IMSI(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, imsi);
Harald Welteef9fa872018-01-22 03:00:17 +0100359
Alexander Couzensd24973d2018-09-04 16:10:14 +0200360template GSUP_PDU tr_GSUP_SAI_REQ_UMTS_AKA_RESYNC(
361 template hexstring imsi,
362 template octetstring auts,
363 template octetstring rand) :=
364 tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, {
365 tr_GSUP_IE_IMSI(imsi),
366 tr_GSUP_IE_AUTS(auts),
367 tr_GSUP_IE_RAND(rand),
368 *
369 });
370
Harald Welte77a8eba2018-01-22 21:22:32 +0100371template (value) GSUP_PDU ts_GSUP_SAI_RES(hexstring imsi, GSUP_IE auth_tuple) :=
372 ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, {
373 valueof(ts_GSUP_IE_IMSI(imsi)), auth_tuple });
374
Harald Weltedf327232017-12-28 22:51:51 +0100375template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer cause) :=
Harald Welte071ed732018-01-23 19:53:52 +0100376 tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, {
Harald Weltedf327232017-12-28 22:51:51 +0100377 tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) });
378
Harald Welte6aa04e32018-01-27 15:35:19 +0100379template (value) GSUP_PDU ts_GSUP_SAI_ERR(hexstring imsi, integer cause) :=
380 ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, {
381 valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_Cause(cause)) });
Harald Welte071ed732018-01-23 19:53:52 +0100382
383
Harald Weltedf327232017-12-28 22:51:51 +0100384template GSUP_PDU tr_GSUP_SAI_RES(template hexstring imsi) :=
Harald Weltec2c52552018-03-01 21:20:39 +0100385 tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, {
Harald Weltedf327232017-12-28 22:51:51 +0100386 tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * });
387
Harald Weltec2c52552018-03-01 21:20:39 +0100388template (value) GSUP_PDU ts_GSUP_UL_REQ(hexstring imsi) :=
389 ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, {
390 valueof(ts_GSUP_IE_IMSI(imsi)) });
391
Harald Weltedfe94dd2018-01-21 13:55:22 +0100392template GSUP_PDU tr_GSUP_UL_REQ(template hexstring imsi) :=
Harald Welte8a1dd532018-01-27 15:38:18 +0100393 tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_REQUEST, imsi);
Harald Weltedfe94dd2018-01-21 13:55:22 +0100394
Harald Welte6aa04e32018-01-27 15:35:19 +0100395template (value) GSUP_PDU ts_GSUP_UL_RES(hexstring imsi) :=
Harald Weltedfe94dd2018-01-21 13:55:22 +0100396 ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, { valueof(ts_GSUP_IE_IMSI(imsi)) });
397
Harald Weltec2c52552018-03-01 21:20:39 +0100398template GSUP_PDU tr_GSUP_UL_RES(template hexstring imsi) :=
399 tr_GSUP_IMSI(OSMO_GSUP_MSGT_UPDATE_LOCATION_RESULT, imsi);
400
Harald Welte6aa04e32018-01-27 15:35:19 +0100401template (value) GSUP_PDU ts_GSUP_UL_ERR(hexstring imsi, integer cause) :=
Harald Welte6ff81902018-01-21 19:09:08 +0100402 ts_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, {
403 valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_Cause(cause)) });
404
Harald Weltec2c52552018-03-01 21:20:39 +0100405template GSUP_PDU tr_GSUP_UL_ERR(template hexstring imsi, template integer cause := ?) :=
406 tr_GSUP(OSMO_GSUP_MSGT_UPDATE_LOCATION_ERROR, {
407 tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) });
408
Harald Welte6aa04e32018-01-27 15:35:19 +0100409template (value) GSUP_PDU ts_GSUP_ISD_REQ(hexstring imsi, hexstring msisdn) :=
Harald Welte6ff81902018-01-21 19:09:08 +0100410 ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, {
411 valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_MSISDN(msisdn)) });
412
Harald Weltec2c52552018-03-01 21:20:39 +0100413template GSUP_PDU tr_GSUP_ISD_REQ(template hexstring imsi, template hexstring msisdn := ?) :=
414 tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_REQUEST, {
Harald Welte8f6ac162018-03-01 22:43:28 +0100415 tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE_MSISDN(msisdn), * });
Harald Weltec2c52552018-03-01 21:20:39 +0100416
417template (value) GSUP_PDU ts_GSUP_ISD_RES(hexstring imsi) :=
418 ts_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, {
419 valueof(ts_GSUP_IE_IMSI(imsi)) });
420
Harald Welte6ff81902018-01-21 19:09:08 +0100421template GSUP_PDU tr_GSUP_ISD_RES(template hexstring imsi) :=
Harald Welte8a1dd532018-01-27 15:38:18 +0100422 tr_GSUP_IMSI(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, imsi);
Harald Weltedf327232017-12-28 22:51:51 +0100423
Harald Weltec638f4d2018-01-24 22:00:36 +0100424template GSUP_PDU tr_GSUP_AUTH_FAIL_IND(hexstring imsi) :=
Harald Welte8a1dd532018-01-27 15:38:18 +0100425 tr_GSUP_IMSI(OSMO_GSUP_MSGT_AUTH_FAIL_REPORT, imsi);
Harald Weltedf327232017-12-28 22:51:51 +0100426
Harald Welte167458a2018-01-27 15:58:16 +0100427template (value) GSUP_PDU ts_GSUP_CL_REQ(hexstring imsi, GSUP_CancelType ctype) :=
428 ts_GSUP(OSMO_GSUP_MSGT_LOCATION_CANCEL_REQUEST, {
429 valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_CancelType(ctype)) });
430
431template GSUP_PDU tr_GSUP_CL_RES(template hexstring imsi) :=
432 tr_GSUP_IMSI(OSMO_GSUP_MSGT_LOCATION_CANCEL_RESULT, imsi);
433
434template GSUP_PDU tr_GSUP_CL_ERR(template hexstring imsi, template integer cause := ?) :=
435 tr_GSUP(OSMO_GSUP_MSGT_LOCATION_CANCEL_ERROR, {
Alexander Couzens4cfff3a2018-05-22 17:08:36 +0200436 tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause), * });
Harald Welte167458a2018-01-27 15:58:16 +0100437
Harald Welte958f8b42018-03-01 23:40:17 +0100438template (value) GSUP_PDU ts_GSUP_PURGE_MS_REQ(hexstring imsi, GSUP_CnDomain dom) :=
439 ts_GSUP(OSMO_GSUP_MSGT_PURGE_MS_REQUEST, {
440 valueof(ts_GSUP_IE_IMSI(imsi)), valueof(ts_GSUP_IE_CnDomain(dom)) });
441
Harald Welte6abb9fe2018-02-17 15:24:48 +0100442template GSUP_PDU tr_GSUP_PURGE_MS_REQ(template hexstring imsi, template GSUP_CnDomain dom := ?) :=
443 tr_GSUP(OSMO_GSUP_MSGT_PURGE_MS_REQUEST, {
444 tr_GSUP_IE_IMSI(imsi), *, tr_GSUP_IE_CnDomain(dom) });
445
446template (value) GSUP_PDU ts_GSUP_PURGE_MS_RES(hexstring imsi) :=
447 ts_GSUP(OSMO_GSUP_MSGT_PURGE_MS_RESULT, {
448 valueof(ts_GSUP_IE_IMSI(imsi)) });
449
Harald Welte958f8b42018-03-01 23:40:17 +0100450template GSUP_PDU tr_GSUP_PURGE_MS_RES(template hexstring imsi) :=
451 tr_GSUP(OSMO_GSUP_MSGT_PURGE_MS_RESULT, {
452 tr_GSUP_IE_IMSI(imsi), * });
453
454template GSUP_PDU tr_GSUP_PURGE_MS_ERR(template hexstring imsi, template integer cause) :=
455 tr_GSUP(OSMO_GSUP_MSGT_PURGE_MS_ERROR, {
456 tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) });
457
Harald Welte167458a2018-01-27 15:58:16 +0100458
459template (value) GSUP_IE ts_GSUP_IE_CancelType(GSUP_CancelType ctype) := {
460 tag := OSMO_GSUP_CANCEL_TYPE_IE,
461 len := 0, /* overwritten */
462 val := {
463 cancel_type := ctype
464 }
465}
466
467template GSUP_IE tr_GSUP_IE_CancelType(template GSUP_CancelType ctype) :=
468 tr_GSUP_IE(OSMO_GSUP_CANCEL_TYPE_IE, GSUP_IeValue:{cancel_type:=ctype});
469
Harald Welte6abb9fe2018-02-17 15:24:48 +0100470template GSUP_IE tr_GSUP_IE_CnDomain(template GSUP_CnDomain domain) :=
471 tr_GSUP_IE(OSMO_GSUP_CN_DOMAIN_IE, GSUP_IeValue:{cn_domain:=domain});
472
Harald Weltedf327232017-12-28 22:51:51 +0100473template GSUP_IE tr_GSUP_IE(template GSUP_IEI iei, template GSUP_IeValue val := ?) := {
474 tag := iei,
475 len := ?,
476 val := val
477}
478
479template (value) GSUP_IE ts_GSUP_IE_IMSI(hexstring imsi) := {
480 tag := OSMO_GSUP_IMSI_IE,
481 len := 0, /* overwritten */
482 val := {
483 imsi := imsi
484 }
485}
486
487template GSUP_IE tr_GSUP_IE_IMSI(template hexstring imsi) := {
488 tag := OSMO_GSUP_IMSI_IE,
489 len := ?,
490 val := {
491 imsi := imsi
492 }
493}
494
Harald Welte6ff81902018-01-21 19:09:08 +0100495template (value) GSUP_IE ts_GSUP_IE_MSISDN(hexstring msisdn) := {
496 tag := OSMO_GSUP_MSISDN_IE,
497 len := 0, /* overwritten */
498 val := {
Harald Welte3f95be82018-01-27 00:48:13 +0100499 msisdn := ts_GSUP_MSISDN(msisdn)
Harald Welte6ff81902018-01-21 19:09:08 +0100500 }
501}
502
503template GSUP_IE tr_GSUP_IE_MSISDN(template hexstring msisdn) := {
504 tag := OSMO_GSUP_MSISDN_IE,
505 len := ?,
506 val := {
Harald Welte3f95be82018-01-27 00:48:13 +0100507 msisdn := tr_GSUP_MSISDN(msisdn)
Harald Welte6ff81902018-01-21 19:09:08 +0100508 }
509}
510
511
Harald Weltedf327232017-12-28 22:51:51 +0100512template (value) GSUP_IE ts_GSUP_IE_Cause(integer cause) := {
513 tag := OSMO_GSUP_CAUSE_IE,
514 len := 0, /* overwritten */
515 val := {
516 cause := cause
517 }
518}
519
520template GSUP_IE tr_GSUP_IE_Cause(template integer cause) := {
521 tag := OSMO_GSUP_CAUSE_IE,
522 len := ?,
523 val := {
524 cause := cause
525 }
526}
527
528template (value) GSUP_IE ts_GSUP_IE_AUTS(octetstring auts) := {
529 tag := OSMO_GSUP_AUTS_IE,
530 len := 0, /* overwritten */
531 val := {
532 auts := auts
533 }
534}
535
Alexander Couzensd24973d2018-09-04 16:10:14 +0200536template GSUP_IE tr_GSUP_IE_AUTS(template octetstring auts) := {
537 tag := OSMO_GSUP_AUTS_IE,
538 len := ?,
539 val := {
540 auts := auts
541 }
542}
543
Harald Weltedf327232017-12-28 22:51:51 +0100544template (value) GSUP_IE ts_GSUP_IE_RAND(octetstring rand) := {
545 tag := OSMO_GSUP_RAND_IE,
546 len := 0, /* overwritten */
547 val := {
548 rand := rand
549 }
550}
551
Alexander Couzensd24973d2018-09-04 16:10:14 +0200552template GSUP_IE tr_GSUP_IE_RAND(template octetstring rand) := {
553 tag := OSMO_GSUP_RAND_IE,
554 len := ?,
555 val := {
556 rand := rand
557 }
558}
559
Harald Welte77a8eba2018-01-22 21:22:32 +0100560template (value) GSUP_IE ts_GSUP_IE_SRES(octetstring sres) := {
561 tag := OSMO_GSUP_SRES_IE,
562 len := 0, /* overwritten */
563 val := {
564 sres := sres
565 }
566}
567
568template (value) GSUP_IE ts_GSUP_IE_Kc(octetstring kc) := {
569 tag := OSMO_GSUP_KC_IE,
570 len := 0, /* overwritten */
571 val := {
572 kc := kc
573 }
574}
575
576template (value) GSUP_IE ts_GSUP_IE_IK(octetstring ik) := {
577 tag := OSMO_GSUP_IK_IE,
578 len := 0, /* overwritten */
579 val := {
580 ik := ik
581 }
582}
583
584template (value) GSUP_IE ts_GSUP_IE_CK(octetstring ck) := {
585 tag := OSMO_GSUP_CK_IE,
586 len := 0, /* overwritten */
587 val := {
588 ck := ck
589 }
590}
591
592template (value) GSUP_IE ts_GSUP_IE_AUTN(octetstring autn) := {
593 tag := OSMO_GSUP_AUTN_IE,
594 len := 0, /* overwritten */
595 val := {
596 autn := autn
597 }
598}
599
600template (value) GSUP_IE ts_GSUP_IE_RES(octetstring res) := {
601 tag := OSMO_GSUP_RES_IE,
602 len := 0, /* overwritten */
603 val := {
604 res := res
605 }
606}
Harald Weltedf327232017-12-28 22:51:51 +0100607
Harald Welteeded9ad2018-02-17 20:57:34 +0100608template (value) GSUP_IE ts_GSUP_IE_APN(octetstring apn) := {
609 tag := OSMO_GSUP_ACCESS_POINT_NAME_IE,
610 len := 0, /* overwritten */
611 val := {
612 apn := apn
613 }
614}
615
Harald Welte958f8b42018-03-01 23:40:17 +0100616template (value) GSUP_IE ts_GSUP_IE_CnDomain(GSUP_CnDomain dom) := {
617 tag := OSMO_GSUP_CN_DOMAIN_IE,
618 len := 0, /* overwritten */
619 val := {
620 cn_domain := dom
621 }
622}
Harald Weltedf327232017-12-28 22:51:51 +0100623
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700624template (value) GSUP_IE ts_GSUP_IE_SessionId(OCT4 sid) := {
625 tag := OSMO_GSUP_SESSION_ID_IE,
626 len := 0, /* overwritten */
627 val := {
628 session_id := sid
629 }
630}
631template GSUP_IE tr_GSUP_IE_SessionId(template OCT4 sid) := {
632 tag := OSMO_GSUP_SESSION_ID_IE,
633 len := ?,
634 val := {
635 session_id := sid
636 }
637}
638
639template (value) GSUP_IE ts_GSUP_IE_SessionState(GSUP_SessionState state) := {
640 tag := OSMO_GSUP_SESSION_STATE_IE,
641 len := 0, /* overwritten */
642 val := {
643 session_state := state
644 }
645}
646template GSUP_IE tr_GSUP_IE_SessionState(template GSUP_SessionState state) := {
647 tag := OSMO_GSUP_SESSION_STATE_IE,
648 len := ?,
649 val := {
650 session_state := state
651 }
652}
653
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700654template (value) GSUP_IE ts_GSUP_IE_SM_RP_MR(OCT1 ref) := {
655 tag := OSMO_GSUP_SM_RP_MR_IE,
656 len := 0, /* overwritten */
657 val := {
658 sm_rp_mr := ref
659 }
660}
661template GSUP_IE tr_GSUP_IE_SM_RP_MR(template OCT1 ref) := {
662 tag := OSMO_GSUP_SM_RP_MR_IE,
663 len := ?,
664 val := {
665 sm_rp_mr := ref
666 }
667}
668
669template (value) GSUP_IE ts_GSUP_IE_SM_RP_CAUSE(OCT1 cause) := {
670 tag := OSMO_GSUP_SM_RP_CAUSE_IE,
671 len := 0, /* overwritten */
672 val := {
673 sm_rp_cause := cause
674 }
675}
676template GSUP_IE tr_GSUP_IE_SM_RP_CAUSE(template OCT1 cause) := {
677 tag := OSMO_GSUP_SM_RP_CAUSE_IE,
678 len := ?,
679 val := {
680 sm_rp_cause := cause
681 }
682}
683
684template (value) GSUP_IE ts_GSUP_IE_SM_RP_MMS(OCT1 mms) := {
685 tag := OSMO_GSUP_SM_RP_MMS_IE,
686 len := 0, /* overwritten */
687 val := {
688 sm_rp_mms := mms
689 }
690}
691template GSUP_IE tr_GSUP_IE_SM_RP_MMS(template OCT1 mms) := {
692 tag := OSMO_GSUP_SM_RP_MMS_IE,
693 len := ?,
694 val := {
695 sm_rp_mms := mms
696 }
697}
698
Oliver Smithc5748292019-02-22 15:02:48 +0100699template (value) GSUP_IE ts_GSUP_IE_IMEI_IE(GSUP_IMEI imei) := {
700 tag := OSMO_GSUP_IMEI_IE,
701 len := 0, /* overwritten */
702 val := {
703 imei := imei
704 }
705}
706template GSUP_IE tr_GSUP_IE_IMEI_IE(template GSUP_IMEI imei) := {
707 tag := OSMO_GSUP_IMEI_IE,
708 len := ?,
709 val := {
710 imei := imei
711 }
712}
713
714template (value) GSUP_IE ts_GSUP_IE_IMEI_RESULT_IE(GSUP_IMEIResult result) := {
715 tag := OSMO_GSUP_IMEI_RESULT_IE,
716 len := 0, /* overwritten */
717 val := {
718 imei_result := result
719 }
720}
721template GSUP_IE tr_GSUP_IE_IMEI_RESULT_IE(template GSUP_IMEIResult result) := {
722 tag := OSMO_GSUP_IMEI_RESULT_IE,
723 len := ?,
724 val := {
725 imei_result := result
726 }
727}
728
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700729/* Possible identity types for SM-RP-{OA|DA} IEs */
730type enumerated GSUP_SM_RP_ODA_IdType {
731 OSMO_GSUP_SM_RP_ODA_ID_NONE ('00'O),
732 OSMO_GSUP_SM_RP_ODA_ID_IMSI ('01'O),
733 OSMO_GSUP_SM_RP_ODA_ID_MSISDN ('02'O),
734 OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR ('03'O),
735 /* Special value for noSM-RP-DA and noSM-RP-OA */
736 OSMO_GSUP_SM_RP_ODA_ID_NULL ('FF'O)
737} with { variant "FIELDLENGTH(8)" };
738
739/**
740 * SM-RP-DA represents the SM Destination Address, see 7.6.8.1.
741 * It can be either of the following:
742 * - IMSI
743 * - LMSI (not implemented)
744 * - MSISDN
745 * - roaming number (not implemented)
746 * - service centre address
747 */
748type union GSUP_SM_RP_DA_ID {
749 hexstring imsi,
750 hexstring msisdn,
751 hexstring smsc_addr
752};
753
754type record GSUP_SM_RP_DA {
755 GSUP_SM_RP_ODA_IdType id_type,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700756 GSUP_SM_RP_DA_ID id_enc optional
Vadim Yanitskiyf1f39bd2018-12-14 08:00:33 +0700757} with { variant (id_enc) "CROSSTAG(
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700758 imsi, id_type = OSMO_GSUP_SM_RP_ODA_ID_IMSI;
759 msisdn, id_type = OSMO_GSUP_SM_RP_ODA_ID_MSISDN;
760 smsc_addr, id_type = OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR;
761 /* FIXME: how to handle noSM-RP-DA? */
762 )"
763};
764
765template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_IMSI(hexstring imsi) := {
766 id_type := OSMO_GSUP_SM_RP_ODA_ID_IMSI,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700767 id_enc := { imsi := imsi }
768}
769template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_IMSI(template hexstring imsi) := {
770 id_type := OSMO_GSUP_SM_RP_ODA_ID_IMSI,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700771 id_enc := { imsi := imsi }
772}
773
774template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_MSISDN(hexstring msisdn) := {
775 id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700776 id_enc := { msisdn := msisdn }
777}
778template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_MSISDN(template hexstring msisdn) := {
779 id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700780 id_enc := { msisdn := msisdn }
781}
782
783template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_SMSC_ADDR(hexstring smsc_addr) := {
784 id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700785 id_enc := { smsc_addr := smsc_addr }
786}
787template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_SMSC_ADDR(template hexstring smsc_addr) := {
788 id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700789 id_enc := { smsc_addr := smsc_addr }
790}
791
792template (value) GSUP_SM_RP_DA ts_GSUP_SM_RP_DA_NULL := {
793 id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700794 id_enc := omit
795}
796template GSUP_SM_RP_DA tr_GSUP_SM_RP_DA_NULL := {
797 id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700798 id_enc := omit
799}
800
801template (value) GSUP_IE ts_GSUP_IE_SM_RP_DA(GSUP_SM_RP_DA val) := {
802 tag := OSMO_GSUP_SM_RP_DA_IE,
803 len := 0, /* overwritten */
804 val := {
805 sm_rp_da := val
806 }
807}
808template GSUP_IE tr_GSUP_IE_SM_RP_DA(template GSUP_SM_RP_DA val) := {
809 tag := OSMO_GSUP_SM_RP_DA_IE,
810 len := ?,
811 val := {
812 sm_rp_da := val
813 }
814}
815
816/**
817 * SM-RP-OA represents the SM Originating Address, see 7.6.8.2.
818 * It can be either of the following:
819 * - MSISDN
820 * - service centre address
821 */
822type union GSUP_SM_RP_OA_ID {
823 hexstring msisdn,
824 hexstring smsc_addr
825};
826
827type record GSUP_SM_RP_OA {
828 GSUP_SM_RP_ODA_IdType id_type,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700829 GSUP_SM_RP_OA_ID id_enc optional
Vadim Yanitskiyf1f39bd2018-12-14 08:00:33 +0700830} with { variant (id_enc) "CROSSTAG(
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700831 msisdn, id_type = OSMO_GSUP_SM_RP_ODA_ID_MSISDN;
832 smsc_addr, id_type = OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR;
833 /* FIXME: how to handle noSM-RP-OA? */
834 )"
835};
836
837template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_MSISDN(hexstring msisdn) := {
838 id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700839 id_enc := { msisdn := msisdn }
840}
841template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_MSISDN(template hexstring msisdn) := {
842 id_type := OSMO_GSUP_SM_RP_ODA_ID_MSISDN,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700843 id_enc := { msisdn := msisdn }
844}
845
846template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_SMSC_ADDR(hexstring smsc_addr) := {
847 id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700848 id_enc := { smsc_addr := smsc_addr }
849}
850template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_SMSC_ADDR(template hexstring smsc_addr) := {
851 id_type := OSMO_GSUP_SM_RP_ODA_ID_SMSC_ADDR,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700852 id_enc := { smsc_addr := smsc_addr }
853}
854
855template (value) GSUP_SM_RP_OA ts_GSUP_SM_RP_OA_NULL := {
856 id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700857 id_enc := omit
858}
859template GSUP_SM_RP_OA tr_GSUP_SM_RP_OA_NULL := {
860 id_type := OSMO_GSUP_SM_RP_ODA_ID_NULL,
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +0700861 id_enc := omit
862}
863
864template (value) GSUP_IE ts_GSUP_IE_SM_RP_OA(GSUP_SM_RP_OA val) := {
865 tag := OSMO_GSUP_SM_RP_OA_IE,
866 len := 0, /* overwritten */
867 val := {
868 sm_rp_oa := val
869 }
870}
871template GSUP_IE tr_GSUP_IE_SM_RP_OA(template GSUP_SM_RP_OA val) := {
872 tag := OSMO_GSUP_SM_RP_OA_IE,
873 len := ?,
874 val := {
875 sm_rp_oa := val
876 }
877}
878
879/* SM-RP-UI represents the SM TPDU, see 7.6.8.4 */
880template (value) GSUP_IE ts_GSUP_IE_SM_RP_UI(octetstring val) := {
881 tag := OSMO_GSUP_SM_RP_UI_IE,
882 len := 0, /* overwritten */
883 val := {
884 sm_rp_ui := val
885 }
886}
887template GSUP_IE tr_GSUP_IE_SM_RP_UI(template octetstring val) := {
888 tag := OSMO_GSUP_SM_RP_UI_IE,
889 len := ?,
890 val := {
891 sm_rp_ui := val
892 }
893}
894
Vadim Yanitskiy88e23232018-11-13 03:04:02 +0700895/* SM Alert Reason types, see 7.6.8.8 */
896type enumerated GSUP_SM_ALERT_RSN_Type {
897 GSUP_SM_ALERT_RSN_TYPE_NONE ('00'O),
898 GSUP_SM_ALERT_RSN_TYPE_MS_PRESENT ('01'O),
899 GSUP_SM_ALERT_RSN_TYPE_MEM_AVAIL ('02'O)
900} with { variant "FIELDLENGTH(8)" };
901
902/* SM Alert Reason IE (used in READY-FOR-SM), see 7.6.8.8 */
903template (value) GSUP_IE ts_GSUP_IE_SM_ALERT_RSN(GSUP_SM_ALERT_RSN_Type rsn) := {
904 tag := OSMO_GSUP_SM_ALERT_RSN_IE,
905 len := 0, /* overwritten */
906 val := {
907 sm_alert_rsn := rsn
908 }
909}
910template GSUP_IE tr_GSUP_IE_SM_ALERT_RSN(template GSUP_SM_ALERT_RSN_Type rsn) := {
911 tag := OSMO_GSUP_SM_ALERT_RSN_IE,
912 len := ?,
913 val := {
914 sm_alert_rsn := rsn
915 }
916}
917
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700918template (value) GSUP_IE ts_GSUP_IE_SSInfo(octetstring ss) := {
919 tag := OSMO_GSUP_SS_INFO_IE,
920 len := 0, /* overwritten */
921 val := {
922 ss_info := ss
923 }
924}
925template GSUP_IE tr_GSUP_IE_SSInfo(template octetstring ss) := {
926 tag := OSMO_GSUP_SS_INFO_IE,
927 len := ?,
928 val := {
929 ss_info := ss
930 }
931}
932
Vadim Yanitskiy911257e2018-06-21 04:18:54 +0700933private function f_gen_ts_ss_ies(
934 hexstring imsi,
935 OCT4 sid,
936 GSUP_SessionState state,
937 template (omit) octetstring ss
938) return GSUP_IEs {
939 /* Mandatory IEs */
940 var GSUP_IEs ies := {
941 valueof(ts_GSUP_IE_IMSI(imsi)),
942 valueof(ts_GSUP_IE_SessionId(sid)),
943 valueof(ts_GSUP_IE_SessionState(state))
944 };
945
946 /* Optional SS payload */
947 if (isvalue(ss)) {
948 ies[3] := valueof(ts_GSUP_IE_SSInfo(valueof(ss)));
949 }
950
951 return ies;
952}
953private function f_gen_tr_ss_ies(
954 template hexstring imsi,
955 template OCT4 sid := ?,
956 template GSUP_SessionState state := ?,
957 template octetstring ss := ?
958) return template GSUP_IEs {
959 /* Mandatory IEs */
960 var template GSUP_IEs ies := {
961 tr_GSUP_IE_IMSI(imsi),
962 tr_GSUP_IE_SessionId(sid),
963 tr_GSUP_IE_SessionState(state)
964 };
965
966 /* Optional SS payload */
967 if (istemplatekind(ss, "*")) {
968 ies[3] := *;
969 } else if (not istemplatekind(ss, "omit")) {
970 ies[3] := tr_GSUP_IE_SSInfo(ss);
971 }
972
973 return ies;
974}
975
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700976template (value) GSUP_PDU ts_GSUP_PROC_SS_REQ(
977 hexstring imsi,
978 OCT4 sid,
979 GSUP_SessionState state,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +0700980 template (omit) octetstring ss := omit
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700981) := ts_GSUP(
982 OSMO_GSUP_MSGT_PROC_SS_REQUEST,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +0700983 f_gen_ts_ss_ies(imsi, sid, state, ss)
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700984);
985template GSUP_PDU tr_GSUP_PROC_SS_REQ(
986 template hexstring imsi,
987 template OCT4 sid := ?,
988 template GSUP_SessionState state := ?,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +0700989 template octetstring ss := *
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700990) := tr_GSUP(
991 OSMO_GSUP_MSGT_PROC_SS_REQUEST,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +0700992 f_gen_tr_ss_ies(imsi, sid, state, ss)
Vadim Yanitskiyb761d142018-06-02 21:05:04 +0700993);
994
995template (value) GSUP_PDU ts_GSUP_PROC_SS_RES(
996 hexstring imsi,
997 OCT4 sid,
998 GSUP_SessionState state,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +0700999 template (omit) octetstring ss := omit
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001000) := ts_GSUP(
1001 OSMO_GSUP_MSGT_PROC_SS_RESULT,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +07001002 f_gen_ts_ss_ies(imsi, sid, state, ss)
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001003);
1004template GSUP_PDU tr_GSUP_PROC_SS_RES(
1005 template hexstring imsi,
1006 template OCT4 sid := ?,
1007 template GSUP_SessionState state := ?,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +07001008 template octetstring ss := *
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001009) := tr_GSUP(
1010 OSMO_GSUP_MSGT_PROC_SS_RESULT,
Vadim Yanitskiy911257e2018-06-21 04:18:54 +07001011 f_gen_tr_ss_ies(imsi, sid, state, ss)
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001012);
1013
1014template (value) GSUP_PDU ts_GSUP_PROC_SS_ERR(
1015 hexstring imsi,
1016 OCT4 sid,
Vadim Yanitskiy21c42332018-11-29 00:18:05 +07001017 GSUP_SessionState state,
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001018 integer cause
1019) := ts_GSUP(
1020 OSMO_GSUP_MSGT_PROC_SS_ERROR,
1021 {
1022 valueof(ts_GSUP_IE_IMSI(imsi)),
Vadim Yanitskiy772a8452018-11-29 02:17:37 +07001023 valueof(ts_GSUP_IE_Cause(cause)),
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001024 valueof(ts_GSUP_IE_SessionId(sid)),
Vadim Yanitskiy772a8452018-11-29 02:17:37 +07001025 valueof(ts_GSUP_IE_SessionState(state))
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001026 }
1027);
1028template GSUP_PDU tr_GSUP_PROC_SS_ERR(
1029 template hexstring imsi,
1030 template OCT4 sid := ?,
Vadim Yanitskiy21c42332018-11-29 00:18:05 +07001031 template GSUP_SessionState state := ?,
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001032 template integer cause := ?
1033) := tr_GSUP(
1034 OSMO_GSUP_MSGT_PROC_SS_ERROR,
1035 {
1036 tr_GSUP_IE_IMSI(imsi),
Vadim Yanitskiy772a8452018-11-29 02:17:37 +07001037 tr_GSUP_IE_Cause(cause),
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001038 tr_GSUP_IE_SessionId(sid),
Vadim Yanitskiy772a8452018-11-29 02:17:37 +07001039 tr_GSUP_IE_SessionState(state)
Vadim Yanitskiyb761d142018-06-02 21:05:04 +07001040 }
1041);
Harald Weltedf327232017-12-28 22:51:51 +01001042
Vadim Yanitskiy8a1d4b62018-09-23 20:28:23 +07001043template (value) GSUP_PDU ts_GSUP_MO_FORWARD_SM_REQ(
1044 hexstring imsi,
1045 OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1046 GSUP_SM_RP_DA sm_rp_da, /* Destination Address, see 7.6.8.1 */
1047 GSUP_SM_RP_OA sm_rp_oa, /* Originating Address, see 7.6.8.2 */
1048 octetstring sm_rp_ui /* SM TPDU, see 7.6.8.4 */
1049) := ts_GSUP(
1050 OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST,
1051 {
1052 valueof(ts_GSUP_IE_IMSI(imsi)),
1053 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
1054 valueof(ts_GSUP_IE_SM_RP_DA(sm_rp_da)),
1055 valueof(ts_GSUP_IE_SM_RP_OA(sm_rp_oa)),
1056 valueof(ts_GSUP_IE_SM_RP_UI(sm_rp_ui))
1057 }
1058);
1059template GSUP_PDU tr_GSUP_MO_FORWARD_SM_REQ(
1060 template hexstring imsi := ?,
1061 template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1062 template GSUP_SM_RP_DA sm_rp_da, /* Destination Address, see 7.6.8.1 */
1063 template GSUP_SM_RP_OA sm_rp_oa, /* Originating Address, see 7.6.8.2 */
1064 template octetstring sm_rp_ui /* SM TPDU, see 7.6.8.4 */
1065) := tr_GSUP(
1066 OSMO_GSUP_MSGT_MO_FORWARD_SM_REQUEST,
1067 {
1068 tr_GSUP_IE_IMSI(imsi),
1069 tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
1070 tr_GSUP_IE_SM_RP_DA(sm_rp_da),
1071 tr_GSUP_IE_SM_RP_OA(sm_rp_oa),
1072 tr_GSUP_IE_SM_RP_UI(sm_rp_ui)
1073 }
1074);
1075
1076template (value) GSUP_PDU ts_GSUP_MO_FORWARD_SM_RES(
1077 hexstring imsi,
1078 OCT1 sm_rp_mr /* Message Reference, see GSM TS 04.11, 8.2.3 */
1079) := ts_GSUP(
1080 OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT,
1081 {
1082 valueof(ts_GSUP_IE_IMSI(imsi)),
1083 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr))
1084 }
1085);
1086template GSUP_PDU tr_GSUP_MO_FORWARD_SM_RES(
1087 template hexstring imsi := ?,
1088 template OCT1 sm_rp_mr := ? /* Message Reference, see GSM TS 04.11, 8.2.3 */
1089) := tr_GSUP(
1090 OSMO_GSUP_MSGT_MO_FORWARD_SM_RESULT,
1091 {
1092 tr_GSUP_IE_IMSI(imsi),
1093 tr_GSUP_IE_SM_RP_MR(sm_rp_mr)
1094 }
1095);
1096
1097template (value) GSUP_PDU ts_GSUP_MO_FORWARD_SM_ERR(
1098 hexstring imsi,
1099 OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1100 OCT1 sm_rp_cause /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
1101) := ts_GSUP(
1102 OSMO_GSUP_MSGT_MO_FORWARD_SM_ERROR,
1103 {
1104 valueof(ts_GSUP_IE_IMSI(imsi)),
1105 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
1106 valueof(ts_GSUP_IE_SM_RP_CAUSE(sm_rp_cause))
1107 }
1108);
1109template GSUP_PDU tr_GSUP_MO_FORWARD_SM_ERR(
1110 template hexstring imsi := ?,
1111 template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1112 template OCT1 sm_rp_cause := ? /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
1113) := tr_GSUP(
1114 OSMO_GSUP_MSGT_MO_FORWARD_SM_ERROR,
1115 {
1116 tr_GSUP_IE_IMSI(imsi),
1117 tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
1118 tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause)
1119 }
1120);
1121
1122template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_REQ(
1123 hexstring imsi,
1124 OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1125 GSUP_SM_RP_DA sm_rp_da, /* Destination Address, see 7.6.8.1 */
1126 GSUP_SM_RP_OA sm_rp_oa, /* Originating Address, see 7.6.8.2 */
1127 octetstring sm_rp_ui, /* SM TPDU, see 7.6.8.4 */
1128 OCT1 sm_rp_mms /* MMS (More Messages to Send), see 7.6.8.7 */
1129) := ts_GSUP(
1130 OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST,
1131 {
1132 /**
1133 * TODO: add MT-specific fields (and IEs):
1134 * - smDeliveryTimer
1135 * - smDeliveryStartTime
1136 */
1137 valueof(ts_GSUP_IE_IMSI(imsi)),
1138 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
1139 valueof(ts_GSUP_IE_SM_RP_DA(sm_rp_da)),
1140 valueof(ts_GSUP_IE_SM_RP_OA(sm_rp_oa)),
1141 valueof(ts_GSUP_IE_SM_RP_UI(sm_rp_ui)),
1142 valueof(ts_GSUP_IE_SM_RP_MMS(sm_rp_mms))
1143 }
1144);
1145template GSUP_PDU tr_GSUP_MT_FORWARD_SM_REQ(
1146 template hexstring imsi := ?,
1147 template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1148 template GSUP_SM_RP_DA sm_rp_da, /* Destination Address, see 7.6.8.1 */
1149 template GSUP_SM_RP_OA sm_rp_oa, /* Originating Address, see 7.6.8.2 */
1150 template octetstring sm_rp_ui, /* SM TPDU, see 7.6.8.4 */
1151 template OCT1 sm_rp_mms /* MMS (More Messages to Send), see 7.6.8.7 */
1152) := tr_GSUP(
1153 OSMO_GSUP_MSGT_MT_FORWARD_SM_REQUEST,
1154 {
1155 /**
1156 * TODO: add MT-specific fields (and IEs):
1157 * - smDeliveryTimer
1158 * - smDeliveryStartTime
1159 */
1160 tr_GSUP_IE_IMSI(imsi),
1161 tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
1162 tr_GSUP_IE_SM_RP_DA(sm_rp_da),
1163 tr_GSUP_IE_SM_RP_OA(sm_rp_oa),
1164 tr_GSUP_IE_SM_RP_UI(sm_rp_ui),
1165 tr_GSUP_IE_SM_RP_MMS(sm_rp_mms)
1166 }
1167);
1168
1169template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_RES(
1170 hexstring imsi,
1171 OCT1 sm_rp_mr /* Message Reference, see GSM TS 04.11, 8.2.3 */
1172) := ts_GSUP(
1173 OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT,
1174 {
1175 valueof(ts_GSUP_IE_IMSI(imsi)),
1176 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr))
1177 }
1178);
1179template GSUP_PDU tr_GSUP_MT_FORWARD_SM_RES(
1180 template hexstring imsi := ?,
1181 template OCT1 sm_rp_mr := ? /* Message Reference, see GSM TS 04.11, 8.2.3 */
1182) := tr_GSUP(
1183 OSMO_GSUP_MSGT_MT_FORWARD_SM_RESULT,
1184 {
1185 tr_GSUP_IE_IMSI(imsi),
1186 tr_GSUP_IE_SM_RP_MR(sm_rp_mr)
1187 }
1188);
1189
1190template (value) GSUP_PDU ts_GSUP_MT_FORWARD_SM_ERR(
1191 hexstring imsi,
1192 OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1193 OCT1 sm_rp_cause /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
1194) := ts_GSUP(
1195 OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR,
1196 {
1197 valueof(ts_GSUP_IE_IMSI(imsi)),
1198 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
1199 valueof(ts_GSUP_IE_SM_RP_CAUSE(sm_rp_cause))
1200 }
1201);
1202template GSUP_PDU tr_GSUP_MT_FORWARD_SM_ERR(
1203 template hexstring imsi := ?,
1204 template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1205 template OCT1 sm_rp_cause := ? /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
1206) := tr_GSUP(
1207 OSMO_GSUP_MSGT_MT_FORWARD_SM_ERROR,
1208 {
1209 tr_GSUP_IE_IMSI(imsi),
1210 tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
1211 tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause)
1212 }
1213);
1214
Vadim Yanitskiy88e23232018-11-13 03:04:02 +07001215template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_REQ(
1216 hexstring imsi,
1217 OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1218 GSUP_SM_ALERT_RSN_Type sm_alert_rsn /* SM Alert Reason, see 7.6.8.8 */
1219) := ts_GSUP(
1220 OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST,
1221 {
1222 valueof(ts_GSUP_IE_IMSI(imsi)),
1223 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
1224 valueof(ts_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn))
1225 }
1226);
1227template GSUP_PDU tr_GSUP_MO_READY_FOR_SM_REQ(
1228 template hexstring imsi := ?,
1229 template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1230 template GSUP_SM_ALERT_RSN_Type sm_alert_rsn := ? /* SM Alert Reason, see 7.6.8.8 */
1231) := tr_GSUP(
1232 OSMO_GSUP_MSGT_READY_FOR_SM_REQUEST,
1233 {
1234 tr_GSUP_IE_IMSI(imsi),
1235 tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
1236 tr_GSUP_IE_SM_ALERT_RSN(sm_alert_rsn)
1237 }
1238);
1239
1240template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_RES(
1241 hexstring imsi,
1242 OCT1 sm_rp_mr /* Message Reference, see GSM TS 04.11, 8.2.3 */
1243) := ts_GSUP(
1244 OSMO_GSUP_MSGT_READY_FOR_SM_RESULT,
1245 {
1246 valueof(ts_GSUP_IE_IMSI(imsi)),
1247 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr))
1248 }
1249);
1250template GSUP_PDU tr_GSUP_MO_READY_FOR_SM_RES(
1251 template hexstring imsi := ?,
1252 template OCT1 sm_rp_mr := ? /* Message Reference, see GSM TS 04.11, 8.2.3 */
1253) := tr_GSUP(
1254 OSMO_GSUP_MSGT_READY_FOR_SM_RESULT,
1255 {
1256 tr_GSUP_IE_IMSI(imsi),
1257 tr_GSUP_IE_SM_RP_MR(sm_rp_mr)
1258 }
1259);
1260
1261template (value) GSUP_PDU ts_GSUP_MO_READY_FOR_SM_ERR(
1262 hexstring imsi,
1263 OCT1 sm_rp_mr, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1264 OCT1 sm_rp_cause /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
1265) := ts_GSUP(
1266 OSMO_GSUP_MSGT_READY_FOR_SM_ERROR,
1267 {
1268 valueof(ts_GSUP_IE_IMSI(imsi)),
1269 valueof(ts_GSUP_IE_SM_RP_MR(sm_rp_mr)),
1270 valueof(ts_GSUP_IE_SM_RP_CAUSE(sm_rp_cause))
1271 }
1272);
1273template GSUP_PDU tr_GSUP_MO_READY_FOR_SM_ERR(
1274 template hexstring imsi := ?,
1275 template OCT1 sm_rp_mr := ?, /* Message Reference, see GSM TS 04.11, 8.2.3 */
1276 template OCT1 sm_rp_cause := ? /* RP-Cause value, see GSM TS 04.11, 8.2.5.4 */
1277) := tr_GSUP(
1278 OSMO_GSUP_MSGT_READY_FOR_SM_ERROR,
1279 {
1280 tr_GSUP_IE_IMSI(imsi),
1281 tr_GSUP_IE_SM_RP_MR(sm_rp_mr),
1282 tr_GSUP_IE_SM_RP_CAUSE(sm_rp_cause)
1283 }
1284);
1285
Harald Weltef9d449e2018-06-24 22:27:47 +02001286function f_gsup_find_ie(GSUP_PDU msg, GSUP_IEI iei, out GSUP_IeValue ret) return boolean {
1287 for (var integer i := 0; i < sizeof(msg.ies); i := i+1) {
1288 if (msg.ies[i].tag == iei) {
1289 ret := msg.ies[i].val;
1290 return true;
1291 }
1292 }
1293 return false;
1294}
1295
1296
Harald Weltedf327232017-12-28 22:51:51 +01001297} with { encode "RAW"; variant "FIELDORDER(msb)" }