blob: ed477d57877aa9de4cfdca7f56e4cbe05a7f4be6 [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,
105 mobileStationClassmark2_oct4 := omit,
106 mobileStationClassmark2_oct5 := omit
107};
108
109/* Send template for CM SERVICE REQUEST */
Harald Welte6ed6bf92018-01-24 21:09:15 +0100110template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv) := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100111 discriminator := '0000'B, /* overwritten */
112 tiOrSkip := {
113 skipIndicator := '0000'B
114 },
115 msgs := {
116 mm := {
117 cMServiceRequest := {
118 messageType := '000000'B, /* overwritten */
119 nsd := '00'B,
Harald Welte6ed6bf92018-01-24 21:09:15 +0100120 cm_ServiceType := int2bit(enum2int(serv_type), 4),
Harald Weltec76f29f2017-11-22 12:46:46 +0100121 cipheringKeySequenceNumber := { '000'B, '0'B },
122 mobileStationClassmark2 := ts_CM2,
123 mobileIdentity := mi_lv,
124 priorityLevel := omit,
125 additionalUpdateParameterTV := omit,
126 deviceProperties := omit
127 }
128 }
129 }
130}
131
Harald Welte0195ab12018-01-24 21:50:20 +0100132template (value) CipheringKeySequenceNumberV ts_CKSN(integer key_seq) := {
133 keySequence := int2bit(key_seq, 3),
134 spare := '0'B
135}
136
137/* Send template for CM RE-ESTABLISH REQUEST */
138template (value) PDU_ML3_MS_NW ts_CM_REEST_REQ(integer cksn, MobileIdentityLV mi_lv) := {
139 discriminator := '0000'B, /* overwritten */
140 tiOrSkip := {
141 skipIndicator := '0000'B
142 },
143 msgs := {
144 mm := {
145 cMReEstablReq := {
146 messageType := '101000'B, /* overwritten */
147 nsd := '00'B,
148 cipheringKeySequenceNumber := ts_CKSN(cksn),
149 spare := '0000'B,
150 mobileStationClassmark2 := ts_CM2,
151 mobileIdentityLV := mi_lv,
152 locationAreaIdentification := omit,
153 deviceProperties := omit
154 }
155 }
156 }
157}
158
159
Harald Welte6ff81902018-01-21 19:09:08 +0100160template PDU_ML3_NW_MS tr_MT_simple(template BIT4 discr := ?) := {
161 discriminator := discr,
162 tiOrSkip := {
163 skipIndicator := '0000'B
164 },
165 msgs := ?
166}
167
168
169template PDU_ML3_NW_MS tr_CM_SERV_ACC := {
170 discriminator := '0101'B,
171 tiOrSkip := {
172 skipIndicator := '0000'B
173 },
174 msgs := {
175 mm := {
176 cMServiceAccept := {
177 messageType := '100001'B,
178 nsd := ?
179 }
180 }
181 }
182}
183
184
Harald Weltecb6cc332018-01-21 13:59:08 +0100185template PDU_ML3_NW_MS tr_CM_SERV_REJ(template OCT1 rej_cause := ?) := {
186 discriminator := '0101'B,
187 tiOrSkip := {
188 skipIndicator := '0000'B
189 },
190 msgs := {
191 mm := {
192 cMServiceReject := {
193 messageType := '100010'B,
194 nsd := ?,
195 rejectCause := rej_cause,
196 t3246_Value := *
197 }
198 }
199 }
200}
201
Harald Weltec76f29f2017-11-22 12:46:46 +0100202/* Send template for PAGING RESPONSE */
203template (value) PDU_ML3_MS_NW ts_PAG_RESP(MobileIdentityLV mi_lv) := {
204 discriminator := '0000'B, /* overwritten */
205 tiOrSkip := {
206 skipIndicator := '0000'B
207 },
208 msgs := {
209 rrm := {
210 pagingResponse := {
211 messageType := '00000000'B, /* overwritten */
212 cipheringKeySequenceNumber := { '000'B, '0'B },
213 spare1_4 := '0000'B,
214 mobileStationClassmark := ts_CM2,
215 mobileIdentity := mi_lv,
216 additionalUpdateParameters := omit
217 }
218 }
219 }
220}
221
Harald Welte15166142017-12-16 23:02:08 +0100222template (value) PDU_ML3_MS_NW ts_RRM_ModeModifyAck(ChannelDescription2_V desc, ChannelMode_V mode) := {
223 discriminator := '0000'B, /* overwritten */
224 tiOrSkip := {
225 skipIndicator := '0000'B
226 },
227 msgs := {
228 rrm := {
229 channelModeModifyAck := {
230 messageType := '00010111'B,
231 channelDescription := desc,
232 channelMode := mode,
233 extendedTSCSet := omit
234 }
235 }
236 }
237}
238
Harald Welte73cd2712017-12-17 00:44:52 +0100239template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := {
240 discriminator := '0000'B, /* overwritten */
241 tiOrSkip := {
242 skipIndicator := '0000'B
243 },
244 msgs := {
245 rrm := {
246 cipheringModeComplete := {
247 messageType := '00110010'B,
248 mobileEquipmentIdentity := omit
249 }
250 }
251 }
252}
253
Harald Welteecb254b2018-01-29 22:01:54 +0100254template (value) PDU_ML3_MS_NW ts_RRM_AssignmentComplete(OCT1 cause) := {
255 discriminator := '0000'B, /* overwritten */
256 tiOrSkip := {
257 skipIndicator := '0000'B
258 },
259 msgs := {
260 rrm := {
261 assignmentComplete := {
262 messageType := '00101001'B,
263 rR_Cause := {
264 valuePart := cause
265 }
266 }
267 }
268 }
269}
Harald Welte15166142017-12-16 23:02:08 +0100270
Harald Weltecb6cc332018-01-21 13:59:08 +0100271template PDU_ML3_MS_NW ts_ML3_MO := {
272 discriminator := '0000'B,
273 tiOrSkip := {
274 skipIndicator := '0000'B
275 },
276 msgs := ?
277}
278
279template LocationUpdatingType ts_ML3_IE_LuType := {
280 lut := ?,
281 spare1_1 := '0'B,
282 fop := '0'B
283}
284
285template LocationUpdatingType ts_ML3_IE_LuType_Normal modifies ts_ML3_IE_LuType := {
286 lut := '00'B
287}
288
289template LocationUpdatingType ts_ML3_IE_LuType_Periodic modifies ts_ML3_IE_LuType := {
290 lut := '01'B
291}
292
293template LocationUpdatingType ts_ML3_IE_LuType_Attach modifies ts_ML3_IE_LuType := {
294 lut := '10'B
295}
296
297template CipheringKeySequenceNumberV ts_ML3_IE_CKSN(integer cksn) := {
298 keySequence := int2bit(cksn, 3),
299 spare := '0'B
300}
301
302template PDU_ML3_MS_NW ts_ML3_MO_LU_Req(LocationUpdatingType lu_type, LocationAreaIdentification_V lai,
303 MobileIdentityLV mi, MobileStationClassmark1_V cm1)
304modifies ts_ML3_MO := {
305 msgs := {
306 mm := {
307 locationUpdateRequest := {
308 messageType := '001000'B,
309 nsd := '00'B, /* ? */
310 locationUpdatingType := lu_type,
311 cipheringKeySequenceNumber := ts_ML3_IE_CKSN(0),
312 locationAreaIdentification := lai,
313 mobileStationClassmark1 := cm1,
314 mobileIdentityLV := mi,
315 classmarkInformationType2_forUMTS := omit,
316 additionalUpdateParameterTV := omit,
317 deviceProperties := omit,
318 mS_NetworkFeatureSupport := omit
319 }
320 }
321 }
322}
323
Harald Welte6ff81902018-01-21 19:09:08 +0100324template PDU_ML3_MS_NW ts_ML3_MO_TmsiRealloc_Cmpl modifies ts_ML3_MO := {
325 msgs := {
326 mm := {
327 tmsiReallocComplete := {
328 messageType := '011011'B,
329 nsd := '00'B
330 }
331 }
332 }
333}
334
335template PDU_ML3_NW_MS tr_ML3_MT_LU_Acc := {
336 discriminator := '0101'B,
337 tiOrSkip := {
338 skipIndicator := '0000'B
339 },
340 msgs := {
341 mm := {
342 locationUpdateAccept := {
343 messageType := '000010'B,
344 nsd := '00'B,
345 locationAreaIdentification := ?,
346 mobileIdentityTLV := *,
347 followOnProceed := *,
348 cTS_Permission := *,
349 equivalentPLMNs := *,
350 emergencyNumberList := *,
351 perMS_T3212 := *
352 }
353 }
354 }
355}
356
357template PDU_ML3_NW_MS tr_ML3_MT_LU_Rej(template OCT1 cause := ?) := {
358 discriminator := '0101'B,
359 tiOrSkip := {
360 skipIndicator := '0000'B
361 },
362 msgs := {
363 mm := {
364 locationUpdateReject := {
365 messageType := '000100'B,
366 nsd := '00'B,
367 rejectCause := cause,
368 t3246_Value := *
369 }
370 }
371 }
372}
373
Harald Welteba7b6d92018-01-23 21:32:34 +0100374template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := {
375 discriminator := '0101'B,
376 tiOrSkip := {
377 skipIndicator := '0000'B
378 },
379 msgs := {
380 mm := {
381 identityRequest := {
382 messageType := '011000'B,
383 nsd := '00'B,
384 identityType := id_type,
385 spare1_5 := ?
386 }
387 }
388 }
389}
390
391template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies ts_ML3_MO := {
392 msgs := {
393 mm := {
394 identityResponse := {
395 messageType := '011001'B,
396 nsd := '00'B,
397 mobileIdentityLV := mi,
398 p_TMSI_TypeTV := omit,
399 routingAreaIdentification2TLV := omit,
400 p_TMSISignature2TLV := omit
401 }
402 }
403 }
404}
405template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) :=
406 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi)));
407template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) :=
408 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
409
410
Harald Welte45164da2018-01-24 12:51:27 +0100411template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, BIT2 rev := '10'B) := {
412 rf_PowerCapability := '010'B,
413 a5_1 := a5_1_unavail,
414 esind := '1'B,
415 revisionLevel := rev,
416 spare1_1 := '0'B
417}
418
419template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi,
420 template MobileStationClassmark1_V cm1 := ts_CM1)
421modifies ts_ML3_MO := {
422 msgs := {
423 mm := {
424 imsiDetachIndication := {
425 messageType := '000001'B,
426 nsd := '00'B,
427 mobileStationClassmark1 := cm1,
428 mobileIdentityLV := mi
429 }
430 }
431 }
432}
433
Harald Welted748a052018-01-22 02:59:24 +0100434template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
435 discriminator := '0011'B,
436 tiOrSkip := {
437 transactionId := {
438 tio := '000'B,
439 tiFlag := '0'B,
440 tIExtension := omit
441 }
442 }
443}
444
445template (value) CalledPartyBCD_Number ts_Called(hexstring digits) := {
446 elementIdentifier := '5E'O,
447 lengthIndicator := 0, /* overwritten */
448 numberingPlanIdentification := '0000'B,
449 typeOfNumber := '000'B, /* unknown */
450 ext1 := '0'B,
451 digits := digits
452}
453
Harald Welte812f7a42018-01-27 00:49:18 +0100454template CalledPartyBCD_Number tr_Called(template hexstring digits) := {
455 elementIdentifier := '5E'O,
456 lengthIndicator := ?,
457 numberingPlanIdentification := ?,
458 typeOfNumber := ?,
459 ext1 := ?,
460 digits := digits
461}
462
463template CallingPartyBCD_Number tr_Calling(template hexstring digits) := {
464 elementIdentifier := '5C'O,
465 lengthIndicator := ?,
466 oct3 := ?,
467 digits := digits
468}
469
Harald Welte4b2b3a62018-01-26 10:32:39 +0100470type integer SpeechVer;
471
472template (value) Speech_AuxiliarySpeech ts_SpeechAux(SpeechVer ver, BIT1 suffix) := {
473 speechVersionIndication := int2bit(ver-1,3) & suffix,
474 spare1_1 := '0'B,
475 cTM_or_Spare := '0'B,
476 coding := '0'B,
477 extension_octet_3a_3b := '0'B
478}
479
480template (value) Speech_AuxiliarySpeech ts_SpeechAuxFR(SpeechVer ver) := ts_SpeechAux(ver, '0'B);
481template (value) Speech_AuxiliarySpeech ts_SpeechAuxHR(SpeechVer ver) := ts_SpeechAux(ver, '1'B);
482
Harald Welted748a052018-01-22 02:59:24 +0100483template (value) BearerCapability_TLV ts_Bcap_voice := {
484 elementIdentifier := '04'O,
485 lengthIndicator := 0, /* overwritten */
486 octet3 := {
487 informationTransferCapability := '000'B,
488 transferMode := '0'B,
489 codingStandard := '0'B,
490 radioChannelRequirement := '11'B, /* FR preferred */
491 extension_octet_3 := '0'B, /* overwritten */
Harald Welte4b2b3a62018-01-26 10:32:39 +0100492 speech_aux_3a_3b := {
493 valueof(ts_SpeechAuxHR(3)),
494 valueof(ts_SpeechAuxFR(3)),
495 valueof(ts_SpeechAuxFR(2)),
496 valueof(ts_SpeechAuxFR(1)),
497 valueof(ts_SpeechAuxHR(1))
498 }
Harald Welted748a052018-01-22 02:59:24 +0100499 },
500 octet4 := omit,
501 octet5 := omit,
502 octet6 := omit,
503 octet7 := omit
504}
505
506template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
507 discriminator := '0011'B,
508 tiOrSkip := {
509 transactionId := {
510 tio := int2bit(tid, 3),
511 tiFlag := '0'B,
512 tIExtension := omit
513 }
514 },
515 msgs := {
516 cc := {
517 setup_MS_NW := {
518 messageType := '000101'B,
519 nsd := '00'B,
520 bcRepeatIndicator := omit,
521 bearerCapability1 := bcap,
522 bearerCapability2 := omit,
523 facility := omit,
524 callingPartySubAddress := omit,
525 calledPartyBCD_Number := ts_Called(called),
526 calledPartySubAddress := omit,
527 llc_RepeatIndicator := omit,
528 lowLayerCompatibility1 := omit,
529 lowLayerCompatibility2 := omit,
530 hlc_RepeatIndicator := omit,
531 highLayerCompatibility1 := omit,
532 highLayerCompatibility2 := omit,
533 user_user := omit,
534 ss_VersionIndicator := omit,
535 clir_Suppression := omit,
536 clir_Invocation := omit,
537 cC_Capabilities := omit,
538 facility_ccbs1 := omit,
539 facility_ccbs2 := omit,
540 streamIdentifier := omit,
541 supportedCodecs := omit,
542 redial := omit
543 }
544 }
545 }
546}
547
Harald Welte45164da2018-01-24 12:51:27 +0100548template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
549 discriminator := '0011'B,
550 tiOrSkip := {
551 transactionId := {
552 tio := int2bit(tid, 3),
553 tiFlag := '0'B,
554 tIExtension := omit
555 }
556 },
557 msgs := {
558 cc := {
559 emergencySetup := {
560 messageType := '001110'B,
561 nsd := '00'B,
562 bearerCapability := bcap,
563 streamIdentifier := omit,
564 supportedCodecs := omit,
565 emergencyCategory := omit
566 }
567 }
568 }
569}
570
571
Harald Welted748a052018-01-22 02:59:24 +0100572template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := {
573 discriminator := '0011'B,
574 tiOrSkip := {
575 transactionId := {
576 tio := int2bit(tid, 3),
577 tiFlag := ?,
578 tIExtension := omit
579 }
580 },
581 msgs := {
582 cc := {
583 callProceeding := {
584 messageType := '000010'B,
585 nsd := '00'B,
586 repeatIndicator := *,
587 bearerCapability1 := *,
588 bearerCapability2 := *,
589 facility := *,
590 progressIndicator := *,
591 priorityGranted := *,
592 networkCCCapabilities := *
593 }
594 }
595 }
596}
597
598template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := {
599 discriminator := '0011'B,
600 tiOrSkip := {
601 transactionId := {
602 tio := int2bit(tid, 3),
603 tiFlag := ?,
604 tIExtension := omit
605 }
606 },
607 msgs := {
608 cc := {
609 alerting_NW_MS := {
610 messageType := '000001'B,
611 nsd := '00'B,
612 facility := *,
613 progressIndicator := *,
614 user_user := *
615 }
616 }
617 }
618}
619
Harald Welte4017d552018-01-26 21:40:05 +0100620template PDU_ML3_NW_MS tr_ML3_MT_CC_CONNECT(integer tid) := {
621 discriminator := '0011'B,
622 tiOrSkip := {
623 transactionId := {
624 tio := int2bit(tid, 3),
625 tiFlag := '1'B,
626 tIExtension := omit
627 }
628 },
629 msgs := {
630 cc := {
631 connect_NW_MS := {
632 messageType := '000111'B,
633 nsd := '00'B,
634 facility := *,
635 progressIndicator := *,
636 connectedNumber := *,
637 connectedSubAddress := *,
638 user_user := *
639 }
640 }
641 }
642}
643
644template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_CONNECT_ACK(integer tid) := {
645 discriminator := '0011'B,
646 tiOrSkip := {
647 transactionId := {
648 tio := int2bit(tid, 3),
649 tiFlag := '0'B,
650 tIExtension := omit
651 }
652 },
653 msgs := {
654 cc := {
655 connectAck := {
656 messageType := '001111'B,
657 nsd := '00'B
658 }
659 }
660 }
661}
662
Harald Welte2bb825f2018-01-22 11:31:18 +0100663template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := {
664 discriminator := '0011'B,
665 tiOrSkip := {
666 transactionId := {
667 tio := int2bit(tid, 3),
668 tiFlag := ?,
669 tIExtension := omit
670 }
671 },
672 msgs := {
673 cc := {
674 disconnect_NW_MS := {
675 messageType := '100101'B,
676 nsd := '00'B,
677 cause := ?,
678 facility := *,
679 progressIndicator := *,
680 user_user := *,
681 allowedActions := *
682 }
683 }
684 }
685}
686
687template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := {
688 discriminator := '0011'B,
689 tiOrSkip := {
690 transactionId := {
691 tio := int2bit(tid, 3),
692 tiFlag := ?,
693 tIExtension := omit
694 }
695 },
696 msgs := {
697 cc := {
698 release_NW_MS := {
699 messageType := '101101'B,
700 nsd := '00'B,
701 cause := ?,
702 secondCause := *,
703 facility := *,
704 user_user := *
705 }
706 }
707 }
708}
Harald Welted748a052018-01-22 02:59:24 +0100709
Harald Welteb71901a2018-01-26 19:16:05 +0100710template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := {
711 discriminator := '0011'B,
712 tiOrSkip := {
713 transactionId := {
714 tio := int2bit(tid, 3),
715 tiFlag := '0'B,
716 tIExtension := omit
717 }
718 },
719 msgs := {
720 cc := {
721 releaseComplete_MS_NW := {
722 messageType := '101010'B,
723 nsd := '00'B,
724 cause := omit,
725 facility := omit,
726 user_user := omit,
727 ss_VersionIndicator := omit
728 }
729 }
730 }
731}
732
733
Harald Welte77a8eba2018-01-22 21:22:32 +0100734template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := {
735 discriminator := '0101'B,
736 tiOrSkip := {
737 skipIndicator := '0000'B
738 },
739 msgs := {
740 mm := {
741 authenticationRequest := {
742 messageType := '010010'B,
743 nsd := '00'B,
744 cipheringKeySequenceNumber := ?,
745 spare2_4 := ?,
746 authenticationParRAND := rand,
747 authenticationParAUTN := *
748 }
749 }
750 }
751}
752
753template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := {
754 discriminator := '0101'B,
755 tiOrSkip := {
756 skipIndicator := '0000'B
757 },
758 msgs := {
759 mm := {
760 authenticationResponse := {
761 messageType := '010100'B,
762 nsd := '00'B,
763 authenticationParSRES := sres,
764 authenticationParSRESext := omit
765 }
766 }
767 }
768}
769
770template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := {
771 discriminator := '0101'B,
772 tiOrSkip := {
773 skipIndicator := '0000'B
774 },
775 msgs := {
776 mm := {
777 authenticationResponse := {
778 messageType := '010100'B,
779 nsd := '00'B,
780 authenticationParSRES := sres,
781 authenticationParSRESext := {
782 elementIdentifier := '21'O,
783 lengthIndicator := 0, /* overwritten */
784 valueField := res
785 }
786 }
787 }
788 }
789}
Harald Weltecb6cc332018-01-21 13:59:08 +0100790
Harald Welte812f7a42018-01-27 00:49:18 +0100791template PDU_ML3_MS_NW ts_ML3_MO_CC_CALL_CONF(integer tid,
792 template BearerCapability_TLV bcap := omit) := {
793 discriminator := '0011'B,
794 tiOrSkip := {
795 transactionId := {
796 tio := int2bit(tid, 3),
797 tiFlag := '1'B, /* response from destination */
798 tIExtension := omit
799 }
800 },
801 msgs := {
802 cc := {
803 callConfirmed := {
804 messageType := '001000'B,
805 nsd := '00'B,
806 repeatIndicator := omit,
807 bearerCapability1 := bcap,
808 bearerCapability2 := omit,
809 cause := omit,
810 cC_Capabilities := omit,
811 streamIdentifier := omit,
812 supportedCodecs := omit
813 }
814 }
815 }
816}
817
818
819template PDU_ML3_NW_MS tr_ML3_MT_CC_SETUP(integer tid, template hexstring called := *,
820 template hexstring calling := *,
821 template BearerCapability_TLV bcap := *) := {
822 discriminator := '0011'B,
823 tiOrSkip := {
824 transactionId := {
825 tio := int2bit(tid, 3),
826 tiFlag := '0'B, /* from originator */
827 tIExtension := omit
828 }
829 },
830 msgs := {
831 cc := {
832 setup_NW_MS := {
833 messageType := '000101'B,
834 nsd := '00'B,
835 bcRepeatIndicator := *,
836 bearerCapability1 := bcap,
837 bearerCapability2 := *,
838 facility := *,
839 progressIndicator := *,
840 signal := *,
841 callingPartyBCD_Number := tr_Calling(calling) ifpresent,
842 callingPartySubAddress := *,
843 calledPartyBCD_Number := tr_Called(called) ifpresent,
844 calledPartySubAddress := *,
845 redirectingPartyBCDNumber := *,
846 redirectingPartySubaddress := *,
847 llc_RepeatIndicator := *,
848 lowLayerCompatibility1 := *,
849 lowLayerCompatibility2 := *,
850 hlc_RepeatIndicator := *,
851 highLayerCompatibility1 := *,
852 highLayerCompatibility2 := *,
853 user_user := *,
854 priority := *,
855 alert := *,
856 networkCCCapabilities := *,
857 causeofNoCli := *,
858 backupBearerCapacity := *
859 }
860 }
861 }
862}
863
864
Harald Weltecb6cc332018-01-21 13:59:08 +0100865
Harald Weltec76f29f2017-11-22 12:46:46 +0100866}