blob: 7736ff593a22251f294c6b06d1a8b16acf78cc32 [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 Welte15166142017-12-16 23:02:08 +0100254
Harald Weltecb6cc332018-01-21 13:59:08 +0100255template PDU_ML3_MS_NW ts_ML3_MO := {
256 discriminator := '0000'B,
257 tiOrSkip := {
258 skipIndicator := '0000'B
259 },
260 msgs := ?
261}
262
263template LocationUpdatingType ts_ML3_IE_LuType := {
264 lut := ?,
265 spare1_1 := '0'B,
266 fop := '0'B
267}
268
269template LocationUpdatingType ts_ML3_IE_LuType_Normal modifies ts_ML3_IE_LuType := {
270 lut := '00'B
271}
272
273template LocationUpdatingType ts_ML3_IE_LuType_Periodic modifies ts_ML3_IE_LuType := {
274 lut := '01'B
275}
276
277template LocationUpdatingType ts_ML3_IE_LuType_Attach modifies ts_ML3_IE_LuType := {
278 lut := '10'B
279}
280
281template CipheringKeySequenceNumberV ts_ML3_IE_CKSN(integer cksn) := {
282 keySequence := int2bit(cksn, 3),
283 spare := '0'B
284}
285
286template PDU_ML3_MS_NW ts_ML3_MO_LU_Req(LocationUpdatingType lu_type, LocationAreaIdentification_V lai,
287 MobileIdentityLV mi, MobileStationClassmark1_V cm1)
288modifies ts_ML3_MO := {
289 msgs := {
290 mm := {
291 locationUpdateRequest := {
292 messageType := '001000'B,
293 nsd := '00'B, /* ? */
294 locationUpdatingType := lu_type,
295 cipheringKeySequenceNumber := ts_ML3_IE_CKSN(0),
296 locationAreaIdentification := lai,
297 mobileStationClassmark1 := cm1,
298 mobileIdentityLV := mi,
299 classmarkInformationType2_forUMTS := omit,
300 additionalUpdateParameterTV := omit,
301 deviceProperties := omit,
302 mS_NetworkFeatureSupport := omit
303 }
304 }
305 }
306}
307
Harald Welte6ff81902018-01-21 19:09:08 +0100308template PDU_ML3_MS_NW ts_ML3_MO_TmsiRealloc_Cmpl modifies ts_ML3_MO := {
309 msgs := {
310 mm := {
311 tmsiReallocComplete := {
312 messageType := '011011'B,
313 nsd := '00'B
314 }
315 }
316 }
317}
318
319template PDU_ML3_NW_MS tr_ML3_MT_LU_Acc := {
320 discriminator := '0101'B,
321 tiOrSkip := {
322 skipIndicator := '0000'B
323 },
324 msgs := {
325 mm := {
326 locationUpdateAccept := {
327 messageType := '000010'B,
328 nsd := '00'B,
329 locationAreaIdentification := ?,
330 mobileIdentityTLV := *,
331 followOnProceed := *,
332 cTS_Permission := *,
333 equivalentPLMNs := *,
334 emergencyNumberList := *,
335 perMS_T3212 := *
336 }
337 }
338 }
339}
340
341template PDU_ML3_NW_MS tr_ML3_MT_LU_Rej(template OCT1 cause := ?) := {
342 discriminator := '0101'B,
343 tiOrSkip := {
344 skipIndicator := '0000'B
345 },
346 msgs := {
347 mm := {
348 locationUpdateReject := {
349 messageType := '000100'B,
350 nsd := '00'B,
351 rejectCause := cause,
352 t3246_Value := *
353 }
354 }
355 }
356}
357
Harald Welteba7b6d92018-01-23 21:32:34 +0100358template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := {
359 discriminator := '0101'B,
360 tiOrSkip := {
361 skipIndicator := '0000'B
362 },
363 msgs := {
364 mm := {
365 identityRequest := {
366 messageType := '011000'B,
367 nsd := '00'B,
368 identityType := id_type,
369 spare1_5 := ?
370 }
371 }
372 }
373}
374
375template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies ts_ML3_MO := {
376 msgs := {
377 mm := {
378 identityResponse := {
379 messageType := '011001'B,
380 nsd := '00'B,
381 mobileIdentityLV := mi,
382 p_TMSI_TypeTV := omit,
383 routingAreaIdentification2TLV := omit,
384 p_TMSISignature2TLV := omit
385 }
386 }
387 }
388}
389template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) :=
390 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi)));
391template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) :=
392 ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
393
394
Harald Welte45164da2018-01-24 12:51:27 +0100395template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, BIT2 rev := '10'B) := {
396 rf_PowerCapability := '010'B,
397 a5_1 := a5_1_unavail,
398 esind := '1'B,
399 revisionLevel := rev,
400 spare1_1 := '0'B
401}
402
403template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi,
404 template MobileStationClassmark1_V cm1 := ts_CM1)
405modifies ts_ML3_MO := {
406 msgs := {
407 mm := {
408 imsiDetachIndication := {
409 messageType := '000001'B,
410 nsd := '00'B,
411 mobileStationClassmark1 := cm1,
412 mobileIdentityLV := mi
413 }
414 }
415 }
416}
417
Harald Welted748a052018-01-22 02:59:24 +0100418template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
419 discriminator := '0011'B,
420 tiOrSkip := {
421 transactionId := {
422 tio := '000'B,
423 tiFlag := '0'B,
424 tIExtension := omit
425 }
426 }
427}
428
429template (value) CalledPartyBCD_Number ts_Called(hexstring digits) := {
430 elementIdentifier := '5E'O,
431 lengthIndicator := 0, /* overwritten */
432 numberingPlanIdentification := '0000'B,
433 typeOfNumber := '000'B, /* unknown */
434 ext1 := '0'B,
435 digits := digits
436}
437
Harald Welte812f7a42018-01-27 00:49:18 +0100438template CalledPartyBCD_Number tr_Called(template hexstring digits) := {
439 elementIdentifier := '5E'O,
440 lengthIndicator := ?,
441 numberingPlanIdentification := ?,
442 typeOfNumber := ?,
443 ext1 := ?,
444 digits := digits
445}
446
447template CallingPartyBCD_Number tr_Calling(template hexstring digits) := {
448 elementIdentifier := '5C'O,
449 lengthIndicator := ?,
450 oct3 := ?,
451 digits := digits
452}
453
Harald Welte4b2b3a62018-01-26 10:32:39 +0100454type integer SpeechVer;
455
456template (value) Speech_AuxiliarySpeech ts_SpeechAux(SpeechVer ver, BIT1 suffix) := {
457 speechVersionIndication := int2bit(ver-1,3) & suffix,
458 spare1_1 := '0'B,
459 cTM_or_Spare := '0'B,
460 coding := '0'B,
461 extension_octet_3a_3b := '0'B
462}
463
464template (value) Speech_AuxiliarySpeech ts_SpeechAuxFR(SpeechVer ver) := ts_SpeechAux(ver, '0'B);
465template (value) Speech_AuxiliarySpeech ts_SpeechAuxHR(SpeechVer ver) := ts_SpeechAux(ver, '1'B);
466
Harald Welted748a052018-01-22 02:59:24 +0100467template (value) BearerCapability_TLV ts_Bcap_voice := {
468 elementIdentifier := '04'O,
469 lengthIndicator := 0, /* overwritten */
470 octet3 := {
471 informationTransferCapability := '000'B,
472 transferMode := '0'B,
473 codingStandard := '0'B,
474 radioChannelRequirement := '11'B, /* FR preferred */
475 extension_octet_3 := '0'B, /* overwritten */
Harald Welte4b2b3a62018-01-26 10:32:39 +0100476 speech_aux_3a_3b := {
477 valueof(ts_SpeechAuxHR(3)),
478 valueof(ts_SpeechAuxFR(3)),
479 valueof(ts_SpeechAuxFR(2)),
480 valueof(ts_SpeechAuxFR(1)),
481 valueof(ts_SpeechAuxHR(1))
482 }
Harald Welted748a052018-01-22 02:59:24 +0100483 },
484 octet4 := omit,
485 octet5 := omit,
486 octet6 := omit,
487 octet7 := omit
488}
489
490template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
491 discriminator := '0011'B,
492 tiOrSkip := {
493 transactionId := {
494 tio := int2bit(tid, 3),
495 tiFlag := '0'B,
496 tIExtension := omit
497 }
498 },
499 msgs := {
500 cc := {
501 setup_MS_NW := {
502 messageType := '000101'B,
503 nsd := '00'B,
504 bcRepeatIndicator := omit,
505 bearerCapability1 := bcap,
506 bearerCapability2 := omit,
507 facility := omit,
508 callingPartySubAddress := omit,
509 calledPartyBCD_Number := ts_Called(called),
510 calledPartySubAddress := omit,
511 llc_RepeatIndicator := omit,
512 lowLayerCompatibility1 := omit,
513 lowLayerCompatibility2 := omit,
514 hlc_RepeatIndicator := omit,
515 highLayerCompatibility1 := omit,
516 highLayerCompatibility2 := omit,
517 user_user := omit,
518 ss_VersionIndicator := omit,
519 clir_Suppression := omit,
520 clir_Invocation := omit,
521 cC_Capabilities := omit,
522 facility_ccbs1 := omit,
523 facility_ccbs2 := omit,
524 streamIdentifier := omit,
525 supportedCodecs := omit,
526 redial := omit
527 }
528 }
529 }
530}
531
Harald Welte45164da2018-01-24 12:51:27 +0100532template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := {
533 discriminator := '0011'B,
534 tiOrSkip := {
535 transactionId := {
536 tio := int2bit(tid, 3),
537 tiFlag := '0'B,
538 tIExtension := omit
539 }
540 },
541 msgs := {
542 cc := {
543 emergencySetup := {
544 messageType := '001110'B,
545 nsd := '00'B,
546 bearerCapability := bcap,
547 streamIdentifier := omit,
548 supportedCodecs := omit,
549 emergencyCategory := omit
550 }
551 }
552 }
553}
554
555
Harald Welted748a052018-01-22 02:59:24 +0100556template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := {
557 discriminator := '0011'B,
558 tiOrSkip := {
559 transactionId := {
560 tio := int2bit(tid, 3),
561 tiFlag := ?,
562 tIExtension := omit
563 }
564 },
565 msgs := {
566 cc := {
567 callProceeding := {
568 messageType := '000010'B,
569 nsd := '00'B,
570 repeatIndicator := *,
571 bearerCapability1 := *,
572 bearerCapability2 := *,
573 facility := *,
574 progressIndicator := *,
575 priorityGranted := *,
576 networkCCCapabilities := *
577 }
578 }
579 }
580}
581
582template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := {
583 discriminator := '0011'B,
584 tiOrSkip := {
585 transactionId := {
586 tio := int2bit(tid, 3),
587 tiFlag := ?,
588 tIExtension := omit
589 }
590 },
591 msgs := {
592 cc := {
593 alerting_NW_MS := {
594 messageType := '000001'B,
595 nsd := '00'B,
596 facility := *,
597 progressIndicator := *,
598 user_user := *
599 }
600 }
601 }
602}
603
Harald Welte4017d552018-01-26 21:40:05 +0100604template PDU_ML3_NW_MS tr_ML3_MT_CC_CONNECT(integer tid) := {
605 discriminator := '0011'B,
606 tiOrSkip := {
607 transactionId := {
608 tio := int2bit(tid, 3),
609 tiFlag := '1'B,
610 tIExtension := omit
611 }
612 },
613 msgs := {
614 cc := {
615 connect_NW_MS := {
616 messageType := '000111'B,
617 nsd := '00'B,
618 facility := *,
619 progressIndicator := *,
620 connectedNumber := *,
621 connectedSubAddress := *,
622 user_user := *
623 }
624 }
625 }
626}
627
628template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_CONNECT_ACK(integer tid) := {
629 discriminator := '0011'B,
630 tiOrSkip := {
631 transactionId := {
632 tio := int2bit(tid, 3),
633 tiFlag := '0'B,
634 tIExtension := omit
635 }
636 },
637 msgs := {
638 cc := {
639 connectAck := {
640 messageType := '001111'B,
641 nsd := '00'B
642 }
643 }
644 }
645}
646
Harald Welte2bb825f2018-01-22 11:31:18 +0100647template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := {
648 discriminator := '0011'B,
649 tiOrSkip := {
650 transactionId := {
651 tio := int2bit(tid, 3),
652 tiFlag := ?,
653 tIExtension := omit
654 }
655 },
656 msgs := {
657 cc := {
658 disconnect_NW_MS := {
659 messageType := '100101'B,
660 nsd := '00'B,
661 cause := ?,
662 facility := *,
663 progressIndicator := *,
664 user_user := *,
665 allowedActions := *
666 }
667 }
668 }
669}
670
671template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := {
672 discriminator := '0011'B,
673 tiOrSkip := {
674 transactionId := {
675 tio := int2bit(tid, 3),
676 tiFlag := ?,
677 tIExtension := omit
678 }
679 },
680 msgs := {
681 cc := {
682 release_NW_MS := {
683 messageType := '101101'B,
684 nsd := '00'B,
685 cause := ?,
686 secondCause := *,
687 facility := *,
688 user_user := *
689 }
690 }
691 }
692}
Harald Welted748a052018-01-22 02:59:24 +0100693
Harald Welteb71901a2018-01-26 19:16:05 +0100694template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := {
695 discriminator := '0011'B,
696 tiOrSkip := {
697 transactionId := {
698 tio := int2bit(tid, 3),
699 tiFlag := '0'B,
700 tIExtension := omit
701 }
702 },
703 msgs := {
704 cc := {
705 releaseComplete_MS_NW := {
706 messageType := '101010'B,
707 nsd := '00'B,
708 cause := omit,
709 facility := omit,
710 user_user := omit,
711 ss_VersionIndicator := omit
712 }
713 }
714 }
715}
716
717
Harald Welte77a8eba2018-01-22 21:22:32 +0100718template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := {
719 discriminator := '0101'B,
720 tiOrSkip := {
721 skipIndicator := '0000'B
722 },
723 msgs := {
724 mm := {
725 authenticationRequest := {
726 messageType := '010010'B,
727 nsd := '00'B,
728 cipheringKeySequenceNumber := ?,
729 spare2_4 := ?,
730 authenticationParRAND := rand,
731 authenticationParAUTN := *
732 }
733 }
734 }
735}
736
737template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := {
738 discriminator := '0101'B,
739 tiOrSkip := {
740 skipIndicator := '0000'B
741 },
742 msgs := {
743 mm := {
744 authenticationResponse := {
745 messageType := '010100'B,
746 nsd := '00'B,
747 authenticationParSRES := sres,
748 authenticationParSRESext := omit
749 }
750 }
751 }
752}
753
754template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := {
755 discriminator := '0101'B,
756 tiOrSkip := {
757 skipIndicator := '0000'B
758 },
759 msgs := {
760 mm := {
761 authenticationResponse := {
762 messageType := '010100'B,
763 nsd := '00'B,
764 authenticationParSRES := sres,
765 authenticationParSRESext := {
766 elementIdentifier := '21'O,
767 lengthIndicator := 0, /* overwritten */
768 valueField := res
769 }
770 }
771 }
772 }
773}
Harald Weltecb6cc332018-01-21 13:59:08 +0100774
Harald Welte812f7a42018-01-27 00:49:18 +0100775template PDU_ML3_MS_NW ts_ML3_MO_CC_CALL_CONF(integer tid,
776 template BearerCapability_TLV bcap := omit) := {
777 discriminator := '0011'B,
778 tiOrSkip := {
779 transactionId := {
780 tio := int2bit(tid, 3),
781 tiFlag := '1'B, /* response from destination */
782 tIExtension := omit
783 }
784 },
785 msgs := {
786 cc := {
787 callConfirmed := {
788 messageType := '001000'B,
789 nsd := '00'B,
790 repeatIndicator := omit,
791 bearerCapability1 := bcap,
792 bearerCapability2 := omit,
793 cause := omit,
794 cC_Capabilities := omit,
795 streamIdentifier := omit,
796 supportedCodecs := omit
797 }
798 }
799 }
800}
801
802
803template PDU_ML3_NW_MS tr_ML3_MT_CC_SETUP(integer tid, template hexstring called := *,
804 template hexstring calling := *,
805 template BearerCapability_TLV bcap := *) := {
806 discriminator := '0011'B,
807 tiOrSkip := {
808 transactionId := {
809 tio := int2bit(tid, 3),
810 tiFlag := '0'B, /* from originator */
811 tIExtension := omit
812 }
813 },
814 msgs := {
815 cc := {
816 setup_NW_MS := {
817 messageType := '000101'B,
818 nsd := '00'B,
819 bcRepeatIndicator := *,
820 bearerCapability1 := bcap,
821 bearerCapability2 := *,
822 facility := *,
823 progressIndicator := *,
824 signal := *,
825 callingPartyBCD_Number := tr_Calling(calling) ifpresent,
826 callingPartySubAddress := *,
827 calledPartyBCD_Number := tr_Called(called) ifpresent,
828 calledPartySubAddress := *,
829 redirectingPartyBCDNumber := *,
830 redirectingPartySubaddress := *,
831 llc_RepeatIndicator := *,
832 lowLayerCompatibility1 := *,
833 lowLayerCompatibility2 := *,
834 hlc_RepeatIndicator := *,
835 highLayerCompatibility1 := *,
836 highLayerCompatibility2 := *,
837 user_user := *,
838 priority := *,
839 alert := *,
840 networkCCCapabilities := *,
841 causeofNoCli := *,
842 backupBearerCapacity := *
843 }
844 }
845 }
846}
847
848
Harald Weltecb6cc332018-01-21 13:59:08 +0100849
Harald Weltec76f29f2017-11-22 12:46:46 +0100850}