blob: ad4e5756d88e290213802b37b7d3933994c13230 [file] [log] [blame]
Harald Weltec76f29f2017-11-22 12:46:46 +01001module L3_Templates {
2
Harald Welte35bb7162018-01-03 21:07:52 +01003/* L3 Templates, building on top of MobileL3*_Types from Ericsson.
4 *
5 * (C) 2017 by Harald Welte <laforge@gnumonks.org>
6 * All rights reserved.
7 *
8 * Released under the terms of GNU General Public License, Version 2 or
9 * (at your option) any later version.
10 */
11
Harald Weltec76f29f2017-11-22 12:46:46 +010012import from General_Types all;
13import from MobileL3_Types all;
14import from MobileL3_CommonIE_Types all;
15import from MobileL3_MM_Types all;
16import from MobileL3_RRM_Types all;
Harald Weltecb6cc332018-01-21 13:59:08 +010017import from MobileL3_CC_Types all;
18//import from MobileL3_GMM_SM_Types all;
19//import from MobileL3_SMS_Types all;
20
Harald Weltec76f29f2017-11-22 12:46:46 +010021
22type enumerated CmServiceType {
23 CM_TYPE_MO_CALL ('0001'B),
24 CM_TYPE_EMERG_CALL ('0010'B),
25 CM_TYPE_MO_SMS ('0100'B),
Harald Welte6ed6bf92018-01-24 21:09:15 +010026 CM_TYPE_SS_ACT ('1000'B),
27 CM_TYPE_VGCS ('1001'B),
28 CM_TYPE_VBS ('1010'B),
29 CM_TYPE_LCS ('1011'B)
Harald Weltec76f29f2017-11-22 12:46:46 +010030}
31
32
33/* send template fro Mobile Identity (TMSI) */
34template MobileIdentityLV ts_MI_TMSI_LV(OCT4 tmsi) := {
35 lengthIndicator := 0, /* overwritten */
36 mobileIdentityV := {
37 typeOfIdentity := '000'B, /* overwritten */
38 oddEvenInd_identity := {
39 tmsi_ptmsi := {
40 oddevenIndicator := '0'B,
41 fillerDigit := '1111'B,
42 octets := tmsi
43 }
44 }
45 }
46}
47
48private function f_enc_IMSI_L3(hexstring digits) return IMSI_L3 {
49 var IMSI_L3 l3;
50 var integer len := lengthof(digits);
51 if (len rem 2 == 1) { /* modulo remainder */
Harald Welte365f4ed2017-11-23 00:00:43 +010052 l3.oddevenIndicator := '1'B;
Harald Welteae136252018-01-24 20:53:21 +010053 l3.fillerDigit := omit;
Harald Weltec76f29f2017-11-22 12:46:46 +010054 } else {
Harald Welte365f4ed2017-11-23 00:00:43 +010055 l3.oddevenIndicator := '0'B;
Harald Welteae136252018-01-24 20:53:21 +010056 l3.fillerDigit := '1111'B;
Harald Weltec76f29f2017-11-22 12:46:46 +010057 }
58 l3.digits := digits;
59 return l3;
60}
61
Harald Welteba7b6d92018-01-23 21:32:34 +010062private function f_enc_IMEI_L3(hexstring digits) return IMEI_L3 {
63 var IMEI_L3 l3;
64 var integer len := lengthof(digits);
65 if (len rem 2 == 1) { /* modulo remainder */
66 l3.oddevenIndicator := '1'B;
67 } else {
68 l3.oddevenIndicator := '0'B;
69 }
70 l3.digits := digits;
71 return l3;
72}
73
Harald Weltec76f29f2017-11-22 12:46:46 +010074/* send template fro Mobile Identity (IMSI) */
75template (value) MobileIdentityLV ts_MI_IMSI_LV(hexstring imsi_digits) := {
76 lengthIndicator := 0, /* overwritten */
77 mobileIdentityV := {
78 typeOfIdentity := '000'B, /* overwritten */
79 oddEvenInd_identity := {
80 imsi := f_enc_IMSI_L3(imsi_digits)
81 }
82 }
83}
84
Harald Welteba7b6d92018-01-23 21:32:34 +010085/* send template fro Mobile Identity (IMEI) */
86template (value) MobileIdentityLV ts_MI_IMEI_LV(hexstring imei_digits) := {
87 lengthIndicator := 0, /* overwritten */
88 mobileIdentityV := {
89 typeOfIdentity := '000'B, /* overwritten */
90 oddEvenInd_identity := {
91 imei := f_enc_IMEI_L3(imei_digits)
92 }
93 }
94}
95
96
Harald Weltec76f29f2017-11-22 12:46:46 +010097/* Send template for Classmark 2 */
98template (value) MobileStationClassmark2_LV ts_CM2 := {
99 lengthIndicator := 0,
100 rf_PowerCapability := '000'B,
101 a5_1 := '0'B,
102 esind := '1'B,
103 revisionLevel := '10'B,
104 spare1_1 := '0'B,
Harald Welte898113b2018-01-31 18:32:21 +0100105 mobileStationClassmark2_oct4 := {
106 fc := '1'B,
107 vgcs := '0'B,
108 vbs := '0'B,
109 sm_Capability := '1'B,
110 ss_ScreenIndicator := '01'B,
111 ps_Capability := '1'B,
112 spare2_1 := '0'B
113 },
114 mobileStationClassmark2_oct5 := {
115 a5_2 := '0'B,
116 a5_3 := '1'B,
117 cmsp := '0'B,
118 solsa := '0'B,
119 ucs2 := '0'B,
120 lcsva_cap := '0'B,
121 spare5_7 :='0'B,
122 cm3 := '0'B
123 }
Harald Weltec76f29f2017-11-22 12:46:46 +0100124};
125
126/* Send template for CM SERVICE REQUEST */
Harald Welte6ed6bf92018-01-24 21:09:15 +0100127template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv) := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100128 discriminator := '0000'B, /* overwritten */
129 tiOrSkip := {
130 skipIndicator := '0000'B
131 },
132 msgs := {
133 mm := {
134 cMServiceRequest := {
135 messageType := '000000'B, /* overwritten */
136 nsd := '00'B,
Harald Welte6ed6bf92018-01-24 21:09:15 +0100137 cm_ServiceType := int2bit(enum2int(serv_type), 4),
Harald Weltec76f29f2017-11-22 12:46:46 +0100138 cipheringKeySequenceNumber := { '000'B, '0'B },
139 mobileStationClassmark2 := ts_CM2,
140 mobileIdentity := mi_lv,
141 priorityLevel := omit,
142 additionalUpdateParameterTV := omit,
143 deviceProperties := omit
144 }
145 }
146 }
147}
148
Harald Welte0195ab12018-01-24 21:50:20 +0100149template (value) CipheringKeySequenceNumberV ts_CKSN(integer key_seq) := {
150 keySequence := int2bit(key_seq, 3),
151 spare := '0'B
152}
153
154/* Send template for CM RE-ESTABLISH REQUEST */
155template (value) PDU_ML3_MS_NW ts_CM_REEST_REQ(integer cksn, MobileIdentityLV mi_lv) := {
156 discriminator := '0000'B, /* overwritten */
157 tiOrSkip := {
158 skipIndicator := '0000'B
159 },
160 msgs := {
161 mm := {
162 cMReEstablReq := {
163 messageType := '101000'B, /* overwritten */
164 nsd := '00'B,
165 cipheringKeySequenceNumber := ts_CKSN(cksn),
166 spare := '0000'B,
167 mobileStationClassmark2 := ts_CM2,
168 mobileIdentityLV := mi_lv,
169 locationAreaIdentification := omit,
170 deviceProperties := omit
171 }
172 }
173 }
174}
175
176
Harald Welte6ff81902018-01-21 19:09:08 +0100177template PDU_ML3_NW_MS tr_MT_simple(template BIT4 discr := ?) := {
178 discriminator := discr,
179 tiOrSkip := {
180 skipIndicator := '0000'B
181 },
182 msgs := ?
183}
184
185
186template PDU_ML3_NW_MS tr_CM_SERV_ACC := {
187 discriminator := '0101'B,
188 tiOrSkip := {
189 skipIndicator := '0000'B
190 },
191 msgs := {
192 mm := {
193 cMServiceAccept := {
194 messageType := '100001'B,
195 nsd := ?
196 }
197 }
198 }
199}
200
201
Harald Weltecb6cc332018-01-21 13:59:08 +0100202template PDU_ML3_NW_MS tr_CM_SERV_REJ(template OCT1 rej_cause := ?) := {
203 discriminator := '0101'B,
204 tiOrSkip := {
205 skipIndicator := '0000'B
206 },
207 msgs := {
208 mm := {
209 cMServiceReject := {
210 messageType := '100010'B,
211 nsd := ?,
212 rejectCause := rej_cause,
213 t3246_Value := *
214 }
215 }
216 }
217}
218
Harald Weltec76f29f2017-11-22 12:46:46 +0100219/* Send template for PAGING RESPONSE */
220template (value) PDU_ML3_MS_NW ts_PAG_RESP(MobileIdentityLV mi_lv) := {
221 discriminator := '0000'B, /* overwritten */
222 tiOrSkip := {
223 skipIndicator := '0000'B
224 },
225 msgs := {
226 rrm := {
227 pagingResponse := {
228 messageType := '00000000'B, /* overwritten */
229 cipheringKeySequenceNumber := { '000'B, '0'B },
230 spare1_4 := '0000'B,
231 mobileStationClassmark := ts_CM2,
232 mobileIdentity := mi_lv,
233 additionalUpdateParameters := omit
234 }
235 }
236 }
237}
238
Harald Welte15166142017-12-16 23:02:08 +0100239template (value) PDU_ML3_MS_NW ts_RRM_ModeModifyAck(ChannelDescription2_V desc, ChannelMode_V mode) := {
240 discriminator := '0000'B, /* overwritten */
241 tiOrSkip := {
242 skipIndicator := '0000'B
243 },
244 msgs := {
245 rrm := {
246 channelModeModifyAck := {
247 messageType := '00010111'B,
248 channelDescription := desc,
249 channelMode := mode,
250 extendedTSCSet := omit
251 }
252 }
253 }
254}
255
Harald Welte73cd2712017-12-17 00:44:52 +0100256template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := {
257 discriminator := '0000'B, /* overwritten */
258 tiOrSkip := {
259 skipIndicator := '0000'B
260 },
261 msgs := {
262 rrm := {
263 cipheringModeComplete := {
264 messageType := '00110010'B,
265 mobileEquipmentIdentity := omit
266 }
267 }
268 }
269}
270
Harald Welteecb254b2018-01-29 22:01:54 +0100271template (value) PDU_ML3_MS_NW ts_RRM_AssignmentComplete(OCT1 cause) := {
272 discriminator := '0000'B, /* overwritten */
273 tiOrSkip := {
274 skipIndicator := '0000'B
275 },
276 msgs := {
277 rrm := {
278 assignmentComplete := {
279 messageType := '00101001'B,
280 rR_Cause := {
281 valuePart := cause
282 }
283 }
284 }
285 }
286}
Harald Welte15166142017-12-16 23:02:08 +0100287
Harald Welte898113b2018-01-31 18:32:21 +0100288template (value) PDU_ML3_MS_NW ts_RRM_AssignmentFailure(OCT1 cause) := {
289 discriminator := '0000'B, /* overwritten */
290 tiOrSkip := {
291 skipIndicator := '0000'B
292 },
293 msgs := {
294 rrm := {
295 assignmentFailure := {
296 messageType := '00101111'B,
297 rR_Cause := {
298 valuePart := cause
299 }
300 }
301 }
302 }
303}
304
305
306function ts_CM3_TLV(template (omit) OCTN cm3) return template MobileStationClassmark3_TLV {
307 if (not isvalue(cm3)) {
308 return omit;
309 }
310 var template MobileStationClassmark3_TLV ret := {
311 elementIdentifier := '20'O,
312 lengthIndicator := 0, /* overwritten */
313 valuePart := cm3
314 }
315 return ret;
316}
317
318template (value) PDU_ML3_MS_NW ts_RRM_CM_CHG(MobileStationClassmark2_LV cm2,
319 template (omit) MobileStationClassmark3_TLV cm3 := omit) := {
320 discriminator := '0110'B,
321 tiOrSkip := {
322 skipIndicator := '0000'B
323 },
324 msgs := {
325 rrm := {
326 classmarkChange := {
327 messageType := '00010110'B,
328 mobileStationClassmark2 := cm2,
329 mobileStationClassmark3 := cm3
330 }
331 }
332 }
333}
334
Harald Weltecb6cc332018-01-21 13:59:08 +0100335template PDU_ML3_MS_NW ts_ML3_MO := {
336 discriminator := '0000'B,
337 tiOrSkip := {
338 skipIndicator := '0000'B
339 },
340 msgs := ?
341}
342
343template LocationUpdatingType ts_ML3_IE_LuType := {
344 lut := ?,
345 spare1_1 := '0'B,
346 fop := '0'B
347}
348
349template LocationUpdatingType ts_ML3_IE_LuType_Normal modifies ts_ML3_IE_LuType := {
350 lut := '00'B
351}
352
353template LocationUpdatingType ts_ML3_IE_LuType_Periodic modifies ts_ML3_IE_LuType := {
354 lut := '01'B
355}
356
357template LocationUpdatingType ts_ML3_IE_LuType_Attach modifies ts_ML3_IE_LuType := {
358 lut := '10'B
359}
360
361template CipheringKeySequenceNumberV ts_ML3_IE_CKSN(integer cksn) := {
362 keySequence := int2bit(cksn, 3),
363 spare := '0'B
364}
365
366template PDU_ML3_MS_NW ts_ML3_MO_LU_Req(LocationUpdatingType lu_type, LocationAreaIdentification_V lai,
367 MobileIdentityLV mi, MobileStationClassmark1_V cm1)
368modifies ts_ML3_MO := {
369 msgs := {
370 mm := {
371 locationUpdateRequest := {
372 messageType := '001000'B,
373 nsd := '00'B, /* ? */
374 locationUpdatingType := lu_type,
375 cipheringKeySequenceNumber := ts_ML3_IE_CKSN(0),
376 locationAreaIdentification := lai,
377 mobileStationClassmark1 := cm1,
378 mobileIdentityLV := mi,
379 classmarkInformationType2_forUMTS := omit,
380 additionalUpdateParameterTV := omit,
381 deviceProperties := omit,
382 mS_NetworkFeatureSupport := omit
383 }
384 }
385 }
386}
387
Harald Welte6ff81902018-01-21 19:09:08 +0100388template PDU_ML3_MS_NW ts_ML3_MO_TmsiRealloc_Cmpl modifies ts_ML3_MO := {
389 msgs := {
390 mm := {
391 tmsiReallocComplete := {
392 messageType := '011011'B,
393 nsd := '00'B
394 }
395 }
396 }
397}
398
399template PDU_ML3_NW_MS tr_ML3_MT_LU_Acc := {
400 discriminator := '0101'B,
401 tiOrSkip := {
402 skipIndicator := '0000'B
403 },
404 msgs := {
405 mm := {
406 locationUpdateAccept := {
407 messageType := '000010'B,
408 nsd := '00'B,
409 locationAreaIdentification := ?,
410 mobileIdentityTLV := *,
411 followOnProceed := *,
412 cTS_Permission := *,
413 equivalentPLMNs := *,
414 emergencyNumberList := *,
415 perMS_T3212 := *
416 }
417 }
418 }
419}
420
421template PDU_ML3_NW_MS tr_ML3_MT_LU_Rej(template OCT1 cause := ?) := {
422 discriminator := '0101'B,
423 tiOrSkip := {
424 skipIndicator := '0000'B
425 },
426 msgs := {
427 mm := {
428 locationUpdateReject := {
429 messageType := '000100'B,
430 nsd := '00'B,
431 rejectCause := cause,
432 t3246_Value := *
433 }
434 }
435 }
436}
437
Harald Welteba7b6d92018-01-23 21:32:34 +0100438template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := {
439 discriminator := '0101'B,
440 tiOrSkip := {
441 skipIndicator := '0000'B
442 },
443 msgs := {
444 mm := {
445 identityRequest := {
446 messageType := '011000'B,
447 nsd := '00'B,
448 identityType := id_type,
449 spare1_5 := ?
450 }
451 }
452 }
453}
454
455template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies ts_ML3_MO := {
456 msgs := {
457 mm := {
458 identityResponse := {
459 messageType := '011001'B,
460 nsd := '00'B,
461 mobileIdentityLV := mi,
462 p_TMSI_TypeTV := omit,
463 routingAreaIdentification2TLV := omit,
464 p_TMSISignature2TLV := omit
465 }
466 }
467 }
468}
469template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) :=
470 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi)));
471template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) :=
472 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
473
474
Harald Welte45164da2018-01-24 12:51:27 +0100475template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, BIT2 rev := '10'B) := {
476 rf_PowerCapability := '010'B,
477 a5_1 := a5_1_unavail,
478 esind := '1'B,
479 revisionLevel := rev,
480 spare1_1 := '0'B
481}
482
483template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi,
484 template MobileStationClassmark1_V cm1 := ts_CM1)
485modifies ts_ML3_MO := {
486 msgs := {
487 mm := {
488 imsiDetachIndication := {
489 messageType := '000001'B,
490 nsd := '00'B,
491 mobileStationClassmark1 := cm1,
492 mobileIdentityLV := mi
493 }
494 }
495 }
496}
497
Harald Welted748a052018-01-22 02:59:24 +0100498template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
499 discriminator := '0011'B,
500 tiOrSkip := {
501 transactionId := {
502 tio := '000'B,
503 tiFlag := '0'B,
504 tIExtension := omit
505 }
506 }
507}
508
509template (value) CalledPartyBCD_Number ts_Called(hexstring digits) := {
510 elementIdentifier := '5E'O,
511 lengthIndicator := 0, /* overwritten */
512 numberingPlanIdentification := '0000'B,
513 typeOfNumber := '000'B, /* unknown */
514 ext1 := '0'B,
515 digits := digits
516}
517
Harald Welte812f7a42018-01-27 00:49:18 +0100518template CalledPartyBCD_Number tr_Called(template hexstring digits) := {
519 elementIdentifier := '5E'O,
520 lengthIndicator := ?,
521 numberingPlanIdentification := ?,
522 typeOfNumber := ?,
523 ext1 := ?,
524 digits := digits
525}
526
527template CallingPartyBCD_Number tr_Calling(template hexstring digits) := {
528 elementIdentifier := '5C'O,
529 lengthIndicator := ?,
530 oct3 := ?,
531 digits := digits
532}
533
Harald Welte4b2b3a62018-01-26 10:32:39 +0100534type integer SpeechVer;
535
536template (value) Speech_AuxiliarySpeech ts_SpeechAux(SpeechVer ver, BIT1 suffix) := {
537 speechVersionIndication := int2bit(ver-1,3) & suffix,
538 spare1_1 := '0'B,
539 cTM_or_Spare := '0'B,
540 coding := '0'B,
541 extension_octet_3a_3b := '0'B
542}
543
544template (value) Speech_AuxiliarySpeech ts_SpeechAuxFR(SpeechVer ver) := ts_SpeechAux(ver, '0'B);
545template (value) Speech_AuxiliarySpeech ts_SpeechAuxHR(SpeechVer ver) := ts_SpeechAux(ver, '1'B);
546
Harald Welted748a052018-01-22 02:59:24 +0100547template (value) BearerCapability_TLV ts_Bcap_voice := {
548 elementIdentifier := '04'O,
549 lengthIndicator := 0, /* overwritten */
550 octet3 := {
551 informationTransferCapability := '000'B,
552 transferMode := '0'B,
553 codingStandard := '0'B,
554 radioChannelRequirement := '11'B, /* FR preferred */
555 extension_octet_3 := '0'B, /* overwritten */
Harald Welte4b2b3a62018-01-26 10:32:39 +0100556 speech_aux_3a_3b := {
557 valueof(ts_SpeechAuxHR(3)),
558 valueof(ts_SpeechAuxFR(3)),
559 valueof(ts_SpeechAuxFR(2)),
560 valueof(ts_SpeechAuxFR(1)),
561 valueof(ts_SpeechAuxHR(1))
562 }
Harald Welted748a052018-01-22 02:59:24 +0100563 },
564 octet4 := omit,
565 octet5 := omit,
566 octet6 := omit,
567 octet7 := omit
568}
569
570template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
571 discriminator := '0011'B,
572 tiOrSkip := {
573 transactionId := {
574 tio := int2bit(tid, 3),
575 tiFlag := '0'B,
576 tIExtension := omit
577 }
578 },
579 msgs := {
580 cc := {
581 setup_MS_NW := {
582 messageType := '000101'B,
583 nsd := '00'B,
584 bcRepeatIndicator := omit,
585 bearerCapability1 := bcap,
586 bearerCapability2 := omit,
587 facility := omit,
588 callingPartySubAddress := omit,
589 calledPartyBCD_Number := ts_Called(called),
590 calledPartySubAddress := omit,
591 llc_RepeatIndicator := omit,
592 lowLayerCompatibility1 := omit,
593 lowLayerCompatibility2 := omit,
594 hlc_RepeatIndicator := omit,
595 highLayerCompatibility1 := omit,
596 highLayerCompatibility2 := omit,
597 user_user := omit,
598 ss_VersionIndicator := omit,
599 clir_Suppression := omit,
600 clir_Invocation := omit,
601 cC_Capabilities := omit,
602 facility_ccbs1 := omit,
603 facility_ccbs2 := omit,
604 streamIdentifier := omit,
605 supportedCodecs := omit,
606 redial := omit
607 }
608 }
609 }
610}
611
Harald Welte45164da2018-01-24 12:51:27 +0100612template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
613 discriminator := '0011'B,
614 tiOrSkip := {
615 transactionId := {
616 tio := int2bit(tid, 3),
617 tiFlag := '0'B,
618 tIExtension := omit
619 }
620 },
621 msgs := {
622 cc := {
623 emergencySetup := {
624 messageType := '001110'B,
625 nsd := '00'B,
626 bearerCapability := bcap,
627 streamIdentifier := omit,
628 supportedCodecs := omit,
629 emergencyCategory := omit
630 }
631 }
632 }
633}
634
635
Harald Welted748a052018-01-22 02:59:24 +0100636template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := {
637 discriminator := '0011'B,
638 tiOrSkip := {
639 transactionId := {
640 tio := int2bit(tid, 3),
641 tiFlag := ?,
642 tIExtension := omit
643 }
644 },
645 msgs := {
646 cc := {
647 callProceeding := {
648 messageType := '000010'B,
649 nsd := '00'B,
650 repeatIndicator := *,
651 bearerCapability1 := *,
652 bearerCapability2 := *,
653 facility := *,
654 progressIndicator := *,
655 priorityGranted := *,
656 networkCCCapabilities := *
657 }
658 }
659 }
660}
661
662template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := {
663 discriminator := '0011'B,
664 tiOrSkip := {
665 transactionId := {
666 tio := int2bit(tid, 3),
667 tiFlag := ?,
668 tIExtension := omit
669 }
670 },
671 msgs := {
672 cc := {
673 alerting_NW_MS := {
674 messageType := '000001'B,
675 nsd := '00'B,
676 facility := *,
677 progressIndicator := *,
678 user_user := *
679 }
680 }
681 }
682}
683
Harald Welte4017d552018-01-26 21:40:05 +0100684template PDU_ML3_NW_MS tr_ML3_MT_CC_CONNECT(integer tid) := {
685 discriminator := '0011'B,
686 tiOrSkip := {
687 transactionId := {
688 tio := int2bit(tid, 3),
689 tiFlag := '1'B,
690 tIExtension := omit
691 }
692 },
693 msgs := {
694 cc := {
695 connect_NW_MS := {
696 messageType := '000111'B,
697 nsd := '00'B,
698 facility := *,
699 progressIndicator := *,
700 connectedNumber := *,
701 connectedSubAddress := *,
702 user_user := *
703 }
704 }
705 }
706}
707
708template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_CONNECT_ACK(integer tid) := {
709 discriminator := '0011'B,
710 tiOrSkip := {
711 transactionId := {
712 tio := int2bit(tid, 3),
713 tiFlag := '0'B,
714 tIExtension := omit
715 }
716 },
717 msgs := {
718 cc := {
719 connectAck := {
720 messageType := '001111'B,
721 nsd := '00'B
722 }
723 }
724 }
725}
726
Harald Welte2bb825f2018-01-22 11:31:18 +0100727template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := {
728 discriminator := '0011'B,
729 tiOrSkip := {
730 transactionId := {
731 tio := int2bit(tid, 3),
732 tiFlag := ?,
733 tIExtension := omit
734 }
735 },
736 msgs := {
737 cc := {
738 disconnect_NW_MS := {
739 messageType := '100101'B,
740 nsd := '00'B,
741 cause := ?,
742 facility := *,
743 progressIndicator := *,
744 user_user := *,
745 allowedActions := *
746 }
747 }
748 }
749}
750
751template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := {
752 discriminator := '0011'B,
753 tiOrSkip := {
754 transactionId := {
755 tio := int2bit(tid, 3),
756 tiFlag := ?,
757 tIExtension := omit
758 }
759 },
760 msgs := {
761 cc := {
762 release_NW_MS := {
763 messageType := '101101'B,
764 nsd := '00'B,
765 cause := ?,
766 secondCause := *,
767 facility := *,
768 user_user := *
769 }
770 }
771 }
772}
Harald Welted748a052018-01-22 02:59:24 +0100773
Harald Welteb71901a2018-01-26 19:16:05 +0100774template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := {
775 discriminator := '0011'B,
776 tiOrSkip := {
777 transactionId := {
778 tio := int2bit(tid, 3),
779 tiFlag := '0'B,
780 tIExtension := omit
781 }
782 },
783 msgs := {
784 cc := {
785 releaseComplete_MS_NW := {
786 messageType := '101010'B,
787 nsd := '00'B,
788 cause := omit,
789 facility := omit,
790 user_user := omit,
791 ss_VersionIndicator := omit
792 }
793 }
794 }
795}
796
797
Harald Welte77a8eba2018-01-22 21:22:32 +0100798template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := {
799 discriminator := '0101'B,
800 tiOrSkip := {
801 skipIndicator := '0000'B
802 },
803 msgs := {
804 mm := {
805 authenticationRequest := {
806 messageType := '010010'B,
807 nsd := '00'B,
808 cipheringKeySequenceNumber := ?,
809 spare2_4 := ?,
810 authenticationParRAND := rand,
811 authenticationParAUTN := *
812 }
813 }
814 }
815}
816
817template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := {
818 discriminator := '0101'B,
819 tiOrSkip := {
820 skipIndicator := '0000'B
821 },
822 msgs := {
823 mm := {
824 authenticationResponse := {
825 messageType := '010100'B,
826 nsd := '00'B,
827 authenticationParSRES := sres,
828 authenticationParSRESext := omit
829 }
830 }
831 }
832}
833
834template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := {
835 discriminator := '0101'B,
836 tiOrSkip := {
837 skipIndicator := '0000'B
838 },
839 msgs := {
840 mm := {
841 authenticationResponse := {
842 messageType := '010100'B,
843 nsd := '00'B,
844 authenticationParSRES := sres,
845 authenticationParSRESext := {
846 elementIdentifier := '21'O,
847 lengthIndicator := 0, /* overwritten */
848 valueField := res
849 }
850 }
851 }
852 }
853}
Harald Weltecb6cc332018-01-21 13:59:08 +0100854
Harald Welte812f7a42018-01-27 00:49:18 +0100855template PDU_ML3_MS_NW ts_ML3_MO_CC_CALL_CONF(integer tid,
856 template BearerCapability_TLV bcap := omit) := {
857 discriminator := '0011'B,
858 tiOrSkip := {
859 transactionId := {
860 tio := int2bit(tid, 3),
861 tiFlag := '1'B, /* response from destination */
862 tIExtension := omit
863 }
864 },
865 msgs := {
866 cc := {
867 callConfirmed := {
868 messageType := '001000'B,
869 nsd := '00'B,
870 repeatIndicator := omit,
871 bearerCapability1 := bcap,
872 bearerCapability2 := omit,
873 cause := omit,
874 cC_Capabilities := omit,
875 streamIdentifier := omit,
876 supportedCodecs := omit
877 }
878 }
879 }
880}
881
882
883template PDU_ML3_NW_MS tr_ML3_MT_CC_SETUP(integer tid, template hexstring called := *,
884 template hexstring calling := *,
885 template BearerCapability_TLV bcap := *) := {
886 discriminator := '0011'B,
887 tiOrSkip := {
888 transactionId := {
889 tio := int2bit(tid, 3),
890 tiFlag := '0'B, /* from originator */
891 tIExtension := omit
892 }
893 },
894 msgs := {
895 cc := {
896 setup_NW_MS := {
897 messageType := '000101'B,
898 nsd := '00'B,
899 bcRepeatIndicator := *,
900 bearerCapability1 := bcap,
901 bearerCapability2 := *,
902 facility := *,
903 progressIndicator := *,
904 signal := *,
905 callingPartyBCD_Number := tr_Calling(calling) ifpresent,
906 callingPartySubAddress := *,
907 calledPartyBCD_Number := tr_Called(called) ifpresent,
908 calledPartySubAddress := *,
909 redirectingPartyBCDNumber := *,
910 redirectingPartySubaddress := *,
911 llc_RepeatIndicator := *,
912 lowLayerCompatibility1 := *,
913 lowLayerCompatibility2 := *,
914 hlc_RepeatIndicator := *,
915 highLayerCompatibility1 := *,
916 highLayerCompatibility2 := *,
917 user_user := *,
918 priority := *,
919 alert := *,
920 networkCCCapabilities := *,
921 causeofNoCli := *,
922 backupBearerCapacity := *
923 }
924 }
925 }
926}
927
928
Harald Weltecb6cc332018-01-21 13:59:08 +0100929
Harald Weltec76f29f2017-11-22 12:46:46 +0100930}