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 | |
| 438 | template (value) BearerCapability_TLV ts_Bcap_voice := { |
| 439 | elementIdentifier := '04'O, |
| 440 | lengthIndicator := 0, /* overwritten */ |
| 441 | octet3 := { |
| 442 | informationTransferCapability := '000'B, |
| 443 | transferMode := '0'B, |
| 444 | codingStandard := '0'B, |
| 445 | radioChannelRequirement := '11'B, /* FR preferred */ |
| 446 | extension_octet_3 := '0'B, /* overwritten */ |
| 447 | speech_aux_3a_3b := omit |
| 448 | }, |
| 449 | octet4 := omit, |
| 450 | octet5 := omit, |
| 451 | octet6 := omit, |
| 452 | octet7 := omit |
| 453 | } |
| 454 | |
| 455 | template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := { |
| 456 | discriminator := '0011'B, |
| 457 | tiOrSkip := { |
| 458 | transactionId := { |
| 459 | tio := int2bit(tid, 3), |
| 460 | tiFlag := '0'B, |
| 461 | tIExtension := omit |
| 462 | } |
| 463 | }, |
| 464 | msgs := { |
| 465 | cc := { |
| 466 | setup_MS_NW := { |
| 467 | messageType := '000101'B, |
| 468 | nsd := '00'B, |
| 469 | bcRepeatIndicator := omit, |
| 470 | bearerCapability1 := bcap, |
| 471 | bearerCapability2 := omit, |
| 472 | facility := omit, |
| 473 | callingPartySubAddress := omit, |
| 474 | calledPartyBCD_Number := ts_Called(called), |
| 475 | calledPartySubAddress := omit, |
| 476 | llc_RepeatIndicator := omit, |
| 477 | lowLayerCompatibility1 := omit, |
| 478 | lowLayerCompatibility2 := omit, |
| 479 | hlc_RepeatIndicator := omit, |
| 480 | highLayerCompatibility1 := omit, |
| 481 | highLayerCompatibility2 := omit, |
| 482 | user_user := omit, |
| 483 | ss_VersionIndicator := omit, |
| 484 | clir_Suppression := omit, |
| 485 | clir_Invocation := omit, |
| 486 | cC_Capabilities := omit, |
| 487 | facility_ccbs1 := omit, |
| 488 | facility_ccbs2 := omit, |
| 489 | streamIdentifier := omit, |
| 490 | supportedCodecs := omit, |
| 491 | redial := omit |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | } |
| 496 | |
Harald Welte | 45164da | 2018-01-24 12:51:27 +0100 | [diff] [blame] | 497 | template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := { |
| 498 | discriminator := '0011'B, |
| 499 | tiOrSkip := { |
| 500 | transactionId := { |
| 501 | tio := int2bit(tid, 3), |
| 502 | tiFlag := '0'B, |
| 503 | tIExtension := omit |
| 504 | } |
| 505 | }, |
| 506 | msgs := { |
| 507 | cc := { |
| 508 | emergencySetup := { |
| 509 | messageType := '001110'B, |
| 510 | nsd := '00'B, |
| 511 | bearerCapability := bcap, |
| 512 | streamIdentifier := omit, |
| 513 | supportedCodecs := omit, |
| 514 | emergencyCategory := omit |
| 515 | } |
| 516 | } |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 521 | template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := { |
| 522 | discriminator := '0011'B, |
| 523 | tiOrSkip := { |
| 524 | transactionId := { |
| 525 | tio := int2bit(tid, 3), |
| 526 | tiFlag := ?, |
| 527 | tIExtension := omit |
| 528 | } |
| 529 | }, |
| 530 | msgs := { |
| 531 | cc := { |
| 532 | callProceeding := { |
| 533 | messageType := '000010'B, |
| 534 | nsd := '00'B, |
| 535 | repeatIndicator := *, |
| 536 | bearerCapability1 := *, |
| 537 | bearerCapability2 := *, |
| 538 | facility := *, |
| 539 | progressIndicator := *, |
| 540 | priorityGranted := *, |
| 541 | networkCCCapabilities := * |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | } |
| 546 | |
| 547 | template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := { |
| 548 | discriminator := '0011'B, |
| 549 | tiOrSkip := { |
| 550 | transactionId := { |
| 551 | tio := int2bit(tid, 3), |
| 552 | tiFlag := ?, |
| 553 | tIExtension := omit |
| 554 | } |
| 555 | }, |
| 556 | msgs := { |
| 557 | cc := { |
| 558 | alerting_NW_MS := { |
| 559 | messageType := '000001'B, |
| 560 | nsd := '00'B, |
| 561 | facility := *, |
| 562 | progressIndicator := *, |
| 563 | user_user := * |
| 564 | } |
| 565 | } |
| 566 | } |
| 567 | } |
| 568 | |
Harald Welte | 2bb825f | 2018-01-22 11:31:18 +0100 | [diff] [blame] | 569 | template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := { |
| 570 | discriminator := '0011'B, |
| 571 | tiOrSkip := { |
| 572 | transactionId := { |
| 573 | tio := int2bit(tid, 3), |
| 574 | tiFlag := ?, |
| 575 | tIExtension := omit |
| 576 | } |
| 577 | }, |
| 578 | msgs := { |
| 579 | cc := { |
| 580 | disconnect_NW_MS := { |
| 581 | messageType := '100101'B, |
| 582 | nsd := '00'B, |
| 583 | cause := ?, |
| 584 | facility := *, |
| 585 | progressIndicator := *, |
| 586 | user_user := *, |
| 587 | allowedActions := * |
| 588 | } |
| 589 | } |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := { |
| 594 | discriminator := '0011'B, |
| 595 | tiOrSkip := { |
| 596 | transactionId := { |
| 597 | tio := int2bit(tid, 3), |
| 598 | tiFlag := ?, |
| 599 | tIExtension := omit |
| 600 | } |
| 601 | }, |
| 602 | msgs := { |
| 603 | cc := { |
| 604 | release_NW_MS := { |
| 605 | messageType := '101101'B, |
| 606 | nsd := '00'B, |
| 607 | cause := ?, |
| 608 | secondCause := *, |
| 609 | facility := *, |
| 610 | user_user := * |
| 611 | } |
| 612 | } |
| 613 | } |
| 614 | } |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 615 | |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 616 | template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := { |
| 617 | discriminator := '0101'B, |
| 618 | tiOrSkip := { |
| 619 | skipIndicator := '0000'B |
| 620 | }, |
| 621 | msgs := { |
| 622 | mm := { |
| 623 | authenticationRequest := { |
| 624 | messageType := '010010'B, |
| 625 | nsd := '00'B, |
| 626 | cipheringKeySequenceNumber := ?, |
| 627 | spare2_4 := ?, |
| 628 | authenticationParRAND := rand, |
| 629 | authenticationParAUTN := * |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := { |
| 636 | discriminator := '0101'B, |
| 637 | tiOrSkip := { |
| 638 | skipIndicator := '0000'B |
| 639 | }, |
| 640 | msgs := { |
| 641 | mm := { |
| 642 | authenticationResponse := { |
| 643 | messageType := '010100'B, |
| 644 | nsd := '00'B, |
| 645 | authenticationParSRES := sres, |
| 646 | authenticationParSRESext := omit |
| 647 | } |
| 648 | } |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := { |
| 653 | discriminator := '0101'B, |
| 654 | tiOrSkip := { |
| 655 | skipIndicator := '0000'B |
| 656 | }, |
| 657 | msgs := { |
| 658 | mm := { |
| 659 | authenticationResponse := { |
| 660 | messageType := '010100'B, |
| 661 | nsd := '00'B, |
| 662 | authenticationParSRES := sres, |
| 663 | authenticationParSRESext := { |
| 664 | elementIdentifier := '21'O, |
| 665 | lengthIndicator := 0, /* overwritten */ |
| 666 | valueField := res |
| 667 | } |
| 668 | } |
| 669 | } |
| 670 | } |
| 671 | } |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 672 | |
| 673 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 674 | } |