Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 1 | module L3_Templates { |
| 2 | |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 3 | /* 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 Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 12 | import from General_Types all; |
| 13 | import from MobileL3_Types all; |
| 14 | import from MobileL3_CommonIE_Types all; |
| 15 | import from MobileL3_MM_Types all; |
| 16 | import from MobileL3_RRM_Types all; |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 17 | import from MobileL3_CC_Types all; |
| 18 | //import from MobileL3_GMM_SM_Types all; |
| 19 | //import from MobileL3_SMS_Types all; |
| 20 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 21 | |
| 22 | type enumerated CmServiceType { |
| 23 | CM_TYPE_MO_CALL ('0001'B), |
| 24 | CM_TYPE_EMERG_CALL ('0010'B), |
| 25 | CM_TYPE_MO_SMS ('0100'B), |
Harald Welte | 6ed6bf9 | 2018-01-24 21:09:15 +0100 | [diff] [blame] | 26 | 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 Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | |
| 33 | /* send template fro Mobile Identity (TMSI) */ |
| 34 | template 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 | |
| 48 | private 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 Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 52 | l3.oddevenIndicator := '1'B; |
Harald Welte | ae13625 | 2018-01-24 20:53:21 +0100 | [diff] [blame] | 53 | l3.fillerDigit := omit; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 54 | } else { |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 55 | l3.oddevenIndicator := '0'B; |
Harald Welte | ae13625 | 2018-01-24 20:53:21 +0100 | [diff] [blame] | 56 | l3.fillerDigit := '1111'B; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 57 | } |
| 58 | l3.digits := digits; |
| 59 | return l3; |
| 60 | } |
| 61 | |
Harald Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 62 | private 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 Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 74 | /* send template fro Mobile Identity (IMSI) */ |
| 75 | template (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 Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 85 | /* send template fro Mobile Identity (IMEI) */ |
| 86 | template (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 Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 97 | /* Send template for Classmark 2 */ |
| 98 | template (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 Welte | 6ed6bf9 | 2018-01-24 21:09:15 +0100 | [diff] [blame] | 110 | template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, MobileIdentityLV mi_lv) := { |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 111 | 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 Welte | 6ed6bf9 | 2018-01-24 21:09:15 +0100 | [diff] [blame] | 120 | cm_ServiceType := int2bit(enum2int(serv_type), 4), |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 121 | 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 Welte | 0195ab1 | 2018-01-24 21:50:20 +0100 | [diff] [blame] | 132 | template (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 */ |
| 138 | template (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 Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 160 | template 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 | |
| 169 | template 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 Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 185 | template 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 Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 202 | /* Send template for PAGING RESPONSE */ |
| 203 | template (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 Welte | 1516614 | 2017-12-16 23:02:08 +0100 | [diff] [blame] | 222 | template (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 Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 239 | template (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 Welte | 1516614 | 2017-12-16 23:02:08 +0100 | [diff] [blame] | 254 | |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 255 | template PDU_ML3_MS_NW ts_ML3_MO := { |
| 256 | discriminator := '0000'B, |
| 257 | tiOrSkip := { |
| 258 | skipIndicator := '0000'B |
| 259 | }, |
| 260 | msgs := ? |
| 261 | } |
| 262 | |
| 263 | template LocationUpdatingType ts_ML3_IE_LuType := { |
| 264 | lut := ?, |
| 265 | spare1_1 := '0'B, |
| 266 | fop := '0'B |
| 267 | } |
| 268 | |
| 269 | template LocationUpdatingType ts_ML3_IE_LuType_Normal modifies ts_ML3_IE_LuType := { |
| 270 | lut := '00'B |
| 271 | } |
| 272 | |
| 273 | template LocationUpdatingType ts_ML3_IE_LuType_Periodic modifies ts_ML3_IE_LuType := { |
| 274 | lut := '01'B |
| 275 | } |
| 276 | |
| 277 | template LocationUpdatingType ts_ML3_IE_LuType_Attach modifies ts_ML3_IE_LuType := { |
| 278 | lut := '10'B |
| 279 | } |
| 280 | |
| 281 | template CipheringKeySequenceNumberV ts_ML3_IE_CKSN(integer cksn) := { |
| 282 | keySequence := int2bit(cksn, 3), |
| 283 | spare := '0'B |
| 284 | } |
| 285 | |
| 286 | template PDU_ML3_MS_NW ts_ML3_MO_LU_Req(LocationUpdatingType lu_type, LocationAreaIdentification_V lai, |
| 287 | MobileIdentityLV mi, MobileStationClassmark1_V cm1) |
| 288 | modifies 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 Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 308 | template 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 | |
| 319 | template 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 | |
| 341 | template 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 Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 358 | template 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 | |
| 375 | template 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 | } |
| 389 | template 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))); |
| 391 | template 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 Welte | 45164da | 2018-01-24 12:51:27 +0100 | [diff] [blame] | 395 | template (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 | |
| 403 | template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi, |
| 404 | template MobileStationClassmark1_V cm1 := ts_CM1) |
| 405 | modifies 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 Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 418 | template 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 | |
| 429 | template (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 Welte | 4b2b3a6 | 2018-01-26 10:32:39 +0100 | [diff] [blame] | 438 | type integer SpeechVer; |
| 439 | |
| 440 | template (value) Speech_AuxiliarySpeech ts_SpeechAux(SpeechVer ver, BIT1 suffix) := { |
| 441 | speechVersionIndication := int2bit(ver-1,3) & suffix, |
| 442 | spare1_1 := '0'B, |
| 443 | cTM_or_Spare := '0'B, |
| 444 | coding := '0'B, |
| 445 | extension_octet_3a_3b := '0'B |
| 446 | } |
| 447 | |
| 448 | template (value) Speech_AuxiliarySpeech ts_SpeechAuxFR(SpeechVer ver) := ts_SpeechAux(ver, '0'B); |
| 449 | template (value) Speech_AuxiliarySpeech ts_SpeechAuxHR(SpeechVer ver) := ts_SpeechAux(ver, '1'B); |
| 450 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 451 | template (value) BearerCapability_TLV ts_Bcap_voice := { |
| 452 | elementIdentifier := '04'O, |
| 453 | lengthIndicator := 0, /* overwritten */ |
| 454 | octet3 := { |
| 455 | informationTransferCapability := '000'B, |
| 456 | transferMode := '0'B, |
| 457 | codingStandard := '0'B, |
| 458 | radioChannelRequirement := '11'B, /* FR preferred */ |
| 459 | extension_octet_3 := '0'B, /* overwritten */ |
Harald Welte | 4b2b3a6 | 2018-01-26 10:32:39 +0100 | [diff] [blame] | 460 | speech_aux_3a_3b := { |
| 461 | valueof(ts_SpeechAuxHR(3)), |
| 462 | valueof(ts_SpeechAuxFR(3)), |
| 463 | valueof(ts_SpeechAuxFR(2)), |
| 464 | valueof(ts_SpeechAuxFR(1)), |
| 465 | valueof(ts_SpeechAuxHR(1)) |
| 466 | } |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 467 | }, |
| 468 | octet4 := omit, |
| 469 | octet5 := omit, |
| 470 | octet6 := omit, |
| 471 | octet7 := omit |
| 472 | } |
| 473 | |
| 474 | template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := { |
| 475 | discriminator := '0011'B, |
| 476 | tiOrSkip := { |
| 477 | transactionId := { |
| 478 | tio := int2bit(tid, 3), |
| 479 | tiFlag := '0'B, |
| 480 | tIExtension := omit |
| 481 | } |
| 482 | }, |
| 483 | msgs := { |
| 484 | cc := { |
| 485 | setup_MS_NW := { |
| 486 | messageType := '000101'B, |
| 487 | nsd := '00'B, |
| 488 | bcRepeatIndicator := omit, |
| 489 | bearerCapability1 := bcap, |
| 490 | bearerCapability2 := omit, |
| 491 | facility := omit, |
| 492 | callingPartySubAddress := omit, |
| 493 | calledPartyBCD_Number := ts_Called(called), |
| 494 | calledPartySubAddress := omit, |
| 495 | llc_RepeatIndicator := omit, |
| 496 | lowLayerCompatibility1 := omit, |
| 497 | lowLayerCompatibility2 := omit, |
| 498 | hlc_RepeatIndicator := omit, |
| 499 | highLayerCompatibility1 := omit, |
| 500 | highLayerCompatibility2 := omit, |
| 501 | user_user := omit, |
| 502 | ss_VersionIndicator := omit, |
| 503 | clir_Suppression := omit, |
| 504 | clir_Invocation := omit, |
| 505 | cC_Capabilities := omit, |
| 506 | facility_ccbs1 := omit, |
| 507 | facility_ccbs2 := omit, |
| 508 | streamIdentifier := omit, |
| 509 | supportedCodecs := omit, |
| 510 | redial := omit |
| 511 | } |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | |
Harald Welte | 45164da | 2018-01-24 12:51:27 +0100 | [diff] [blame] | 516 | template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := { |
| 517 | discriminator := '0011'B, |
| 518 | tiOrSkip := { |
| 519 | transactionId := { |
| 520 | tio := int2bit(tid, 3), |
| 521 | tiFlag := '0'B, |
| 522 | tIExtension := omit |
| 523 | } |
| 524 | }, |
| 525 | msgs := { |
| 526 | cc := { |
| 527 | emergencySetup := { |
| 528 | messageType := '001110'B, |
| 529 | nsd := '00'B, |
| 530 | bearerCapability := bcap, |
| 531 | streamIdentifier := omit, |
| 532 | supportedCodecs := omit, |
| 533 | emergencyCategory := omit |
| 534 | } |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | |
| 539 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 540 | template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := { |
| 541 | discriminator := '0011'B, |
| 542 | tiOrSkip := { |
| 543 | transactionId := { |
| 544 | tio := int2bit(tid, 3), |
| 545 | tiFlag := ?, |
| 546 | tIExtension := omit |
| 547 | } |
| 548 | }, |
| 549 | msgs := { |
| 550 | cc := { |
| 551 | callProceeding := { |
| 552 | messageType := '000010'B, |
| 553 | nsd := '00'B, |
| 554 | repeatIndicator := *, |
| 555 | bearerCapability1 := *, |
| 556 | bearerCapability2 := *, |
| 557 | facility := *, |
| 558 | progressIndicator := *, |
| 559 | priorityGranted := *, |
| 560 | networkCCCapabilities := * |
| 561 | } |
| 562 | } |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := { |
| 567 | discriminator := '0011'B, |
| 568 | tiOrSkip := { |
| 569 | transactionId := { |
| 570 | tio := int2bit(tid, 3), |
| 571 | tiFlag := ?, |
| 572 | tIExtension := omit |
| 573 | } |
| 574 | }, |
| 575 | msgs := { |
| 576 | cc := { |
| 577 | alerting_NW_MS := { |
| 578 | messageType := '000001'B, |
| 579 | nsd := '00'B, |
| 580 | facility := *, |
| 581 | progressIndicator := *, |
| 582 | user_user := * |
| 583 | } |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | |
Harald Welte | 2bb825f | 2018-01-22 11:31:18 +0100 | [diff] [blame] | 588 | template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := { |
| 589 | discriminator := '0011'B, |
| 590 | tiOrSkip := { |
| 591 | transactionId := { |
| 592 | tio := int2bit(tid, 3), |
| 593 | tiFlag := ?, |
| 594 | tIExtension := omit |
| 595 | } |
| 596 | }, |
| 597 | msgs := { |
| 598 | cc := { |
| 599 | disconnect_NW_MS := { |
| 600 | messageType := '100101'B, |
| 601 | nsd := '00'B, |
| 602 | cause := ?, |
| 603 | facility := *, |
| 604 | progressIndicator := *, |
| 605 | user_user := *, |
| 606 | allowedActions := * |
| 607 | } |
| 608 | } |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := { |
| 613 | discriminator := '0011'B, |
| 614 | tiOrSkip := { |
| 615 | transactionId := { |
| 616 | tio := int2bit(tid, 3), |
| 617 | tiFlag := ?, |
| 618 | tIExtension := omit |
| 619 | } |
| 620 | }, |
| 621 | msgs := { |
| 622 | cc := { |
| 623 | release_NW_MS := { |
| 624 | messageType := '101101'B, |
| 625 | nsd := '00'B, |
| 626 | cause := ?, |
| 627 | secondCause := *, |
| 628 | facility := *, |
| 629 | user_user := * |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | } |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 634 | |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 635 | template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := { |
| 636 | discriminator := '0101'B, |
| 637 | tiOrSkip := { |
| 638 | skipIndicator := '0000'B |
| 639 | }, |
| 640 | msgs := { |
| 641 | mm := { |
| 642 | authenticationRequest := { |
| 643 | messageType := '010010'B, |
| 644 | nsd := '00'B, |
| 645 | cipheringKeySequenceNumber := ?, |
| 646 | spare2_4 := ?, |
| 647 | authenticationParRAND := rand, |
| 648 | authenticationParAUTN := * |
| 649 | } |
| 650 | } |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := { |
| 655 | discriminator := '0101'B, |
| 656 | tiOrSkip := { |
| 657 | skipIndicator := '0000'B |
| 658 | }, |
| 659 | msgs := { |
| 660 | mm := { |
| 661 | authenticationResponse := { |
| 662 | messageType := '010100'B, |
| 663 | nsd := '00'B, |
| 664 | authenticationParSRES := sres, |
| 665 | authenticationParSRESext := omit |
| 666 | } |
| 667 | } |
| 668 | } |
| 669 | } |
| 670 | |
| 671 | template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := { |
| 672 | discriminator := '0101'B, |
| 673 | tiOrSkip := { |
| 674 | skipIndicator := '0000'B |
| 675 | }, |
| 676 | msgs := { |
| 677 | mm := { |
| 678 | authenticationResponse := { |
| 679 | messageType := '010100'B, |
| 680 | nsd := '00'B, |
| 681 | authenticationParSRES := sres, |
| 682 | authenticationParSRESext := { |
| 683 | elementIdentifier := '21'O, |
| 684 | lengthIndicator := 0, /* overwritten */ |
| 685 | valueField := res |
| 686 | } |
| 687 | } |
| 688 | } |
| 689 | } |
| 690 | } |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 691 | |
| 692 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 693 | } |