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; |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 13 | import from Osmocom_Types all; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 14 | import from MobileL3_Types all; |
| 15 | import from MobileL3_CommonIE_Types all; |
| 16 | import from MobileL3_MM_Types all; |
| 17 | import from MobileL3_RRM_Types all; |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 18 | import from MobileL3_CC_Types all; |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 19 | import from MobileL3_GMM_SM_Types all; |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 20 | //import from MobileL3_SMS_Types all; |
| 21 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 22 | |
| 23 | type enumerated CmServiceType { |
| 24 | CM_TYPE_MO_CALL ('0001'B), |
| 25 | CM_TYPE_EMERG_CALL ('0010'B), |
| 26 | CM_TYPE_MO_SMS ('0100'B), |
Harald Welte | 6ed6bf9 | 2018-01-24 21:09:15 +0100 | [diff] [blame] | 27 | CM_TYPE_SS_ACT ('1000'B), |
| 28 | CM_TYPE_VGCS ('1001'B), |
| 29 | CM_TYPE_VBS ('1010'B), |
| 30 | CM_TYPE_LCS ('1011'B) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 31 | } |
| 32 | |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 33 | template ML3_Cause_TLV ts_ML3_Cause(BIT7 cause, BIT4 loc := '0001'B, BIT2 std := '11'B) := { |
| 34 | elementIdentifier := '08'O, |
| 35 | lengthIndicator := 0, /* overwritten */ |
| 36 | oct3 := { |
| 37 | location := loc, |
| 38 | spare1_1 := '0'B, |
| 39 | codingStandard := std, |
| 40 | ext1 := '0'B, |
| 41 | recommendation := omit, |
| 42 | ext2 := omit |
| 43 | }, |
| 44 | oct4 := { |
| 45 | causeValue := cause, |
| 46 | ext3 := '1'B |
| 47 | }, |
| 48 | diagnostics := omit |
| 49 | } |
| 50 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 51 | |
| 52 | /* send template fro Mobile Identity (TMSI) */ |
| 53 | template MobileIdentityLV ts_MI_TMSI_LV(OCT4 tmsi) := { |
| 54 | lengthIndicator := 0, /* overwritten */ |
| 55 | mobileIdentityV := { |
| 56 | typeOfIdentity := '000'B, /* overwritten */ |
| 57 | oddEvenInd_identity := { |
| 58 | tmsi_ptmsi := { |
| 59 | oddevenIndicator := '0'B, |
| 60 | fillerDigit := '1111'B, |
| 61 | octets := tmsi |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 67 | /* send template fro Mobile Identity (TMSI) */ |
Harald Welte | 6abb9fe | 2018-02-17 15:24:48 +0100 | [diff] [blame] | 68 | function ts_MI_TMSI_TLV(template (omit) OCT4 tmsi) return template (omit) MobileIdentityTLV { |
| 69 | var template (omit) MobileIdentityTLV ret; |
| 70 | if (istemplatekind(tmsi, "omit")) { |
| 71 | return omit; |
| 72 | } else { |
| 73 | ret := { |
| 74 | elementIdentifier := '0100011'B, |
| 75 | spare1 := '0'B, |
| 76 | mobileIdentityLV := ts_MI_TMSI_LV(valueof(tmsi)) |
| 77 | } |
| 78 | return ret; |
| 79 | } |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 80 | } |
| 81 | |
Harald Welte | b0386df | 2018-02-16 18:14:28 +0100 | [diff] [blame] | 82 | template MobileIdentityTLV ts_MI_IMEISV_TLV(hexstring imeisv) := { |
| 83 | elementIdentifier := '0100011'B, |
| 84 | spare1 := '0'B, |
| 85 | mobileIdentityLV := ts_MI_IMEISV_LV(imeisv) |
| 86 | } |
| 87 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 88 | private function f_enc_IMSI_L3(hexstring digits) return IMSI_L3 { |
| 89 | var IMSI_L3 l3; |
| 90 | var integer len := lengthof(digits); |
| 91 | if (len rem 2 == 1) { /* modulo remainder */ |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 92 | l3.oddevenIndicator := '1'B; |
Harald Welte | ae13625 | 2018-01-24 20:53:21 +0100 | [diff] [blame] | 93 | l3.fillerDigit := omit; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 94 | } else { |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 95 | l3.oddevenIndicator := '0'B; |
Harald Welte | ae13625 | 2018-01-24 20:53:21 +0100 | [diff] [blame] | 96 | l3.fillerDigit := '1111'B; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 97 | } |
| 98 | l3.digits := digits; |
| 99 | return l3; |
| 100 | } |
| 101 | |
Harald Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 102 | private function f_enc_IMEI_L3(hexstring digits) return IMEI_L3 { |
| 103 | var IMEI_L3 l3; |
| 104 | var integer len := lengthof(digits); |
| 105 | if (len rem 2 == 1) { /* modulo remainder */ |
| 106 | l3.oddevenIndicator := '1'B; |
| 107 | } else { |
| 108 | l3.oddevenIndicator := '0'B; |
| 109 | } |
| 110 | l3.digits := digits; |
| 111 | return l3; |
| 112 | } |
| 113 | |
Harald Welte | b0386df | 2018-02-16 18:14:28 +0100 | [diff] [blame] | 114 | private function f_enc_IMEI_SV(hexstring digits) return IMEI_SV { |
| 115 | var IMEI_SV l3; |
| 116 | var integer len := lengthof(digits); |
| 117 | if (len rem 2 == 1) { /* modulo remainder */ |
| 118 | l3.oddevenIndicator := '1'B; |
| 119 | } else { |
| 120 | l3.oddevenIndicator := '0'B; |
| 121 | } |
| 122 | l3.digits := digits; |
| 123 | l3.fillerDigit := '1111'B; |
| 124 | return l3; |
| 125 | } |
| 126 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 127 | /* send template fro Mobile Identity (IMSI) */ |
| 128 | template (value) MobileIdentityLV ts_MI_IMSI_LV(hexstring imsi_digits) := { |
| 129 | lengthIndicator := 0, /* overwritten */ |
| 130 | mobileIdentityV := { |
Harald Welte | 519db89 | 2018-02-16 18:15:22 +0100 | [diff] [blame] | 131 | typeOfIdentity := '001'B, |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 132 | oddEvenInd_identity := { |
| 133 | imsi := f_enc_IMSI_L3(imsi_digits) |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
Harald Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 138 | /* send template fro Mobile Identity (IMEI) */ |
| 139 | template (value) MobileIdentityLV ts_MI_IMEI_LV(hexstring imei_digits) := { |
| 140 | lengthIndicator := 0, /* overwritten */ |
| 141 | mobileIdentityV := { |
Harald Welte | 519db89 | 2018-02-16 18:15:22 +0100 | [diff] [blame] | 142 | typeOfIdentity := '010'B, |
Harald Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 143 | oddEvenInd_identity := { |
| 144 | imei := f_enc_IMEI_L3(imei_digits) |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
Harald Welte | b0386df | 2018-02-16 18:14:28 +0100 | [diff] [blame] | 149 | /* send template fro Mobile Identity (IMEISV) */ |
| 150 | template (value) MobileIdentityLV ts_MI_IMEISV_LV(hexstring imei_digits) := { |
| 151 | lengthIndicator := 0, /* overwritten */ |
| 152 | mobileIdentityV := { |
| 153 | typeOfIdentity := '011'B, |
| 154 | oddEvenInd_identity := { |
| 155 | imei_sv := f_enc_IMEI_SV(imei_digits) |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | |
Harald Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 160 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 161 | /* Send template for Classmark 2 */ |
| 162 | template (value) MobileStationClassmark2_LV ts_CM2 := { |
| 163 | lengthIndicator := 0, |
| 164 | rf_PowerCapability := '000'B, |
| 165 | a5_1 := '0'B, |
| 166 | esind := '1'B, |
| 167 | revisionLevel := '10'B, |
| 168 | spare1_1 := '0'B, |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 169 | mobileStationClassmark2_oct4 := { |
| 170 | fc := '1'B, |
| 171 | vgcs := '0'B, |
| 172 | vbs := '0'B, |
| 173 | sm_Capability := '1'B, |
| 174 | ss_ScreenIndicator := '01'B, |
| 175 | ps_Capability := '1'B, |
| 176 | spare2_1 := '0'B |
| 177 | }, |
| 178 | mobileStationClassmark2_oct5 := { |
| 179 | a5_2 := '0'B, |
| 180 | a5_3 := '1'B, |
| 181 | cmsp := '0'B, |
| 182 | solsa := '0'B, |
| 183 | ucs2 := '0'B, |
| 184 | lcsva_cap := '0'B, |
| 185 | spare5_7 :='0'B, |
| 186 | cm3 := '0'B |
| 187 | } |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 188 | }; |
| 189 | |
| 190 | /* Send template for CM SERVICE REQUEST */ |
Harald Welte | 6ed6bf9 | 2018-01-24 21:09:15 +0100 | [diff] [blame] | 191 | 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] | 192 | discriminator := '0000'B, /* overwritten */ |
| 193 | tiOrSkip := { |
| 194 | skipIndicator := '0000'B |
| 195 | }, |
| 196 | msgs := { |
| 197 | mm := { |
| 198 | cMServiceRequest := { |
| 199 | messageType := '000000'B, /* overwritten */ |
| 200 | nsd := '00'B, |
Harald Welte | 6ed6bf9 | 2018-01-24 21:09:15 +0100 | [diff] [blame] | 201 | cm_ServiceType := int2bit(enum2int(serv_type), 4), |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 202 | cipheringKeySequenceNumber := { '000'B, '0'B }, |
| 203 | mobileStationClassmark2 := ts_CM2, |
| 204 | mobileIdentity := mi_lv, |
| 205 | priorityLevel := omit, |
| 206 | additionalUpdateParameterTV := omit, |
| 207 | deviceProperties := omit |
| 208 | } |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | |
Harald Welte | 0195ab1 | 2018-01-24 21:50:20 +0100 | [diff] [blame] | 213 | template (value) CipheringKeySequenceNumberV ts_CKSN(integer key_seq) := { |
| 214 | keySequence := int2bit(key_seq, 3), |
| 215 | spare := '0'B |
| 216 | } |
| 217 | |
| 218 | /* Send template for CM RE-ESTABLISH REQUEST */ |
| 219 | template (value) PDU_ML3_MS_NW ts_CM_REEST_REQ(integer cksn, MobileIdentityLV mi_lv) := { |
| 220 | discriminator := '0000'B, /* overwritten */ |
| 221 | tiOrSkip := { |
| 222 | skipIndicator := '0000'B |
| 223 | }, |
| 224 | msgs := { |
| 225 | mm := { |
| 226 | cMReEstablReq := { |
| 227 | messageType := '101000'B, /* overwritten */ |
| 228 | nsd := '00'B, |
| 229 | cipheringKeySequenceNumber := ts_CKSN(cksn), |
| 230 | spare := '0000'B, |
| 231 | mobileStationClassmark2 := ts_CM2, |
| 232 | mobileIdentityLV := mi_lv, |
| 233 | locationAreaIdentification := omit, |
| 234 | deviceProperties := omit |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | |
Harald Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 241 | template PDU_ML3_NW_MS tr_MT_simple(template BIT4 discr := ?) := { |
| 242 | discriminator := discr, |
| 243 | tiOrSkip := { |
| 244 | skipIndicator := '0000'B |
| 245 | }, |
| 246 | msgs := ? |
| 247 | } |
| 248 | |
| 249 | |
| 250 | template PDU_ML3_NW_MS tr_CM_SERV_ACC := { |
| 251 | discriminator := '0101'B, |
| 252 | tiOrSkip := { |
| 253 | skipIndicator := '0000'B |
| 254 | }, |
| 255 | msgs := { |
| 256 | mm := { |
| 257 | cMServiceAccept := { |
| 258 | messageType := '100001'B, |
| 259 | nsd := ? |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 266 | template PDU_ML3_NW_MS tr_CM_SERV_REJ(template OCT1 rej_cause := ?) := { |
| 267 | discriminator := '0101'B, |
| 268 | tiOrSkip := { |
| 269 | skipIndicator := '0000'B |
| 270 | }, |
| 271 | msgs := { |
| 272 | mm := { |
| 273 | cMServiceReject := { |
| 274 | messageType := '100010'B, |
| 275 | nsd := ?, |
| 276 | rejectCause := rej_cause, |
| 277 | t3246_Value := * |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | } |
| 282 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 283 | /* Send template for PAGING RESPONSE */ |
| 284 | template (value) PDU_ML3_MS_NW ts_PAG_RESP(MobileIdentityLV mi_lv) := { |
| 285 | discriminator := '0000'B, /* overwritten */ |
| 286 | tiOrSkip := { |
| 287 | skipIndicator := '0000'B |
| 288 | }, |
| 289 | msgs := { |
| 290 | rrm := { |
| 291 | pagingResponse := { |
| 292 | messageType := '00000000'B, /* overwritten */ |
| 293 | cipheringKeySequenceNumber := { '000'B, '0'B }, |
| 294 | spare1_4 := '0000'B, |
| 295 | mobileStationClassmark := ts_CM2, |
| 296 | mobileIdentity := mi_lv, |
| 297 | additionalUpdateParameters := omit |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | |
Harald Welte | 1516614 | 2017-12-16 23:02:08 +0100 | [diff] [blame] | 303 | template (value) PDU_ML3_MS_NW ts_RRM_ModeModifyAck(ChannelDescription2_V desc, ChannelMode_V mode) := { |
| 304 | discriminator := '0000'B, /* overwritten */ |
| 305 | tiOrSkip := { |
| 306 | skipIndicator := '0000'B |
| 307 | }, |
| 308 | msgs := { |
| 309 | rrm := { |
| 310 | channelModeModifyAck := { |
| 311 | messageType := '00010111'B, |
| 312 | channelDescription := desc, |
| 313 | channelMode := mode, |
| 314 | extendedTSCSet := omit |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | } |
| 319 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 320 | template (value) PDU_ML3_MS_NW ts_RRM_CiphModeCompl := { |
| 321 | discriminator := '0000'B, /* overwritten */ |
| 322 | tiOrSkip := { |
| 323 | skipIndicator := '0000'B |
| 324 | }, |
| 325 | msgs := { |
| 326 | rrm := { |
| 327 | cipheringModeComplete := { |
| 328 | messageType := '00110010'B, |
| 329 | mobileEquipmentIdentity := omit |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
Harald Welte | ecb254b | 2018-01-29 22:01:54 +0100 | [diff] [blame] | 335 | template (value) PDU_ML3_MS_NW ts_RRM_AssignmentComplete(OCT1 cause) := { |
| 336 | discriminator := '0000'B, /* overwritten */ |
| 337 | tiOrSkip := { |
| 338 | skipIndicator := '0000'B |
| 339 | }, |
| 340 | msgs := { |
| 341 | rrm := { |
| 342 | assignmentComplete := { |
| 343 | messageType := '00101001'B, |
| 344 | rR_Cause := { |
| 345 | valuePart := cause |
| 346 | } |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | } |
Harald Welte | 1516614 | 2017-12-16 23:02:08 +0100 | [diff] [blame] | 351 | |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 352 | template (value) PDU_ML3_MS_NW ts_RRM_AssignmentFailure(OCT1 cause) := { |
| 353 | discriminator := '0000'B, /* overwritten */ |
| 354 | tiOrSkip := { |
| 355 | skipIndicator := '0000'B |
| 356 | }, |
| 357 | msgs := { |
| 358 | rrm := { |
| 359 | assignmentFailure := { |
| 360 | messageType := '00101111'B, |
| 361 | rR_Cause := { |
| 362 | valuePart := cause |
| 363 | } |
| 364 | } |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | |
Harald Welte | fbf9b5e | 2018-01-31 20:41:23 +0100 | [diff] [blame] | 369 | template (value) PDU_ML3_MS_NW ts_RRM_HandoverFailure(OCT1 cause) := { |
| 370 | discriminator := '0000'B, /* overwritten */ |
| 371 | tiOrSkip := { |
| 372 | skipIndicator := '0000'B |
| 373 | }, |
| 374 | msgs := { |
| 375 | rrm := { |
| 376 | handoverFailure := { |
| 377 | messageType := '00101000'B, |
| 378 | rRCause := { |
| 379 | valuePart := cause |
| 380 | }, |
| 381 | pSCause := omit |
| 382 | } |
| 383 | } |
| 384 | } |
| 385 | } |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 386 | |
Harald Welte | 261af4b | 2018-02-12 21:20:39 +0100 | [diff] [blame] | 387 | template (value) PDU_ML3_MS_NW ts_RRM_HandoverComplete(OCT1 cause) := { |
| 388 | discriminator := '0000'B, /* overwritten */ |
| 389 | tiOrSkip := { |
| 390 | skipIndicator := '0000'B |
| 391 | }, |
| 392 | msgs := { |
| 393 | rrm := { |
| 394 | handoverComplete := { |
| 395 | messageType := '00101100'B, |
| 396 | rRCause := { |
| 397 | valuePart := cause |
| 398 | }, |
| 399 | mobileObsservedTimeDiff := omit, |
| 400 | mobileTimeDifferenceHyperframe := omit |
| 401 | } |
| 402 | } |
| 403 | } |
| 404 | } |
| 405 | |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 406 | function ts_CM3_TLV(template (omit) OCTN cm3) return template MobileStationClassmark3_TLV { |
| 407 | if (not isvalue(cm3)) { |
| 408 | return omit; |
| 409 | } |
| 410 | var template MobileStationClassmark3_TLV ret := { |
| 411 | elementIdentifier := '20'O, |
| 412 | lengthIndicator := 0, /* overwritten */ |
| 413 | valuePart := cm3 |
| 414 | } |
| 415 | return ret; |
| 416 | } |
| 417 | |
| 418 | template (value) PDU_ML3_MS_NW ts_RRM_CM_CHG(MobileStationClassmark2_LV cm2, |
| 419 | template (omit) MobileStationClassmark3_TLV cm3 := omit) := { |
| 420 | discriminator := '0110'B, |
| 421 | tiOrSkip := { |
| 422 | skipIndicator := '0000'B |
| 423 | }, |
| 424 | msgs := { |
| 425 | rrm := { |
| 426 | classmarkChange := { |
| 427 | messageType := '00010110'B, |
| 428 | mobileStationClassmark2 := cm2, |
| 429 | mobileStationClassmark3 := cm3 |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | } |
| 434 | |
Harald Welte | e3bd658 | 2018-01-31 22:51:25 +0100 | [diff] [blame] | 435 | template (value) PDU_ML3_MS_NW ts_RRM_UL_REL(OCT1 cause) := { |
| 436 | discriminator := '0110'B, |
| 437 | tiOrSkip := { |
| 438 | skipIndicator := '0000'B |
| 439 | }, |
| 440 | msgs := { |
| 441 | rrm := { |
| 442 | uplinkRelease := { |
| 443 | messageType := '00001110'B, |
| 444 | rR_Cause := { |
| 445 | valuePart := cause |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | template PDU_ML3_MS_NW tr_RRM_RR_STATUS(template OCT1 cause := ?) := { |
| 453 | discriminator := '0110'B, |
| 454 | tiOrSkip := { |
| 455 | skipIndicator := '0000'B |
| 456 | }, |
| 457 | msgs := { |
| 458 | rrm := { |
| 459 | rR_Status := { |
| 460 | messageType := '00010010'B, |
| 461 | rR_Cause := { |
| 462 | valuePart := cause |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | |
| 470 | |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 471 | template PDU_ML3_MS_NW ts_ML3_MO := { |
| 472 | discriminator := '0000'B, |
| 473 | tiOrSkip := { |
| 474 | skipIndicator := '0000'B |
| 475 | }, |
| 476 | msgs := ? |
| 477 | } |
| 478 | |
| 479 | template LocationUpdatingType ts_ML3_IE_LuType := { |
| 480 | lut := ?, |
| 481 | spare1_1 := '0'B, |
| 482 | fop := '0'B |
| 483 | } |
| 484 | |
| 485 | template LocationUpdatingType ts_ML3_IE_LuType_Normal modifies ts_ML3_IE_LuType := { |
| 486 | lut := '00'B |
| 487 | } |
| 488 | |
| 489 | template LocationUpdatingType ts_ML3_IE_LuType_Periodic modifies ts_ML3_IE_LuType := { |
| 490 | lut := '01'B |
| 491 | } |
| 492 | |
| 493 | template LocationUpdatingType ts_ML3_IE_LuType_Attach modifies ts_ML3_IE_LuType := { |
| 494 | lut := '10'B |
| 495 | } |
| 496 | |
| 497 | template CipheringKeySequenceNumberV ts_ML3_IE_CKSN(integer cksn) := { |
| 498 | keySequence := int2bit(cksn, 3), |
| 499 | spare := '0'B |
| 500 | } |
| 501 | |
| 502 | template PDU_ML3_MS_NW ts_ML3_MO_LU_Req(LocationUpdatingType lu_type, LocationAreaIdentification_V lai, |
| 503 | MobileIdentityLV mi, MobileStationClassmark1_V cm1) |
| 504 | modifies ts_ML3_MO := { |
| 505 | msgs := { |
| 506 | mm := { |
| 507 | locationUpdateRequest := { |
| 508 | messageType := '001000'B, |
| 509 | nsd := '00'B, /* ? */ |
| 510 | locationUpdatingType := lu_type, |
| 511 | cipheringKeySequenceNumber := ts_ML3_IE_CKSN(0), |
| 512 | locationAreaIdentification := lai, |
| 513 | mobileStationClassmark1 := cm1, |
| 514 | mobileIdentityLV := mi, |
| 515 | classmarkInformationType2_forUMTS := omit, |
| 516 | additionalUpdateParameterTV := omit, |
| 517 | deviceProperties := omit, |
| 518 | mS_NetworkFeatureSupport := omit |
| 519 | } |
| 520 | } |
| 521 | } |
| 522 | } |
| 523 | |
Harald Welte | 6ff8190 | 2018-01-21 19:09:08 +0100 | [diff] [blame] | 524 | template PDU_ML3_MS_NW ts_ML3_MO_TmsiRealloc_Cmpl modifies ts_ML3_MO := { |
| 525 | msgs := { |
| 526 | mm := { |
| 527 | tmsiReallocComplete := { |
| 528 | messageType := '011011'B, |
| 529 | nsd := '00'B |
| 530 | } |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | template PDU_ML3_NW_MS tr_ML3_MT_LU_Acc := { |
| 536 | discriminator := '0101'B, |
| 537 | tiOrSkip := { |
| 538 | skipIndicator := '0000'B |
| 539 | }, |
| 540 | msgs := { |
| 541 | mm := { |
| 542 | locationUpdateAccept := { |
| 543 | messageType := '000010'B, |
| 544 | nsd := '00'B, |
| 545 | locationAreaIdentification := ?, |
| 546 | mobileIdentityTLV := *, |
| 547 | followOnProceed := *, |
| 548 | cTS_Permission := *, |
| 549 | equivalentPLMNs := *, |
| 550 | emergencyNumberList := *, |
| 551 | perMS_T3212 := * |
| 552 | } |
| 553 | } |
| 554 | } |
| 555 | } |
| 556 | |
| 557 | template PDU_ML3_NW_MS tr_ML3_MT_LU_Rej(template OCT1 cause := ?) := { |
| 558 | discriminator := '0101'B, |
| 559 | tiOrSkip := { |
| 560 | skipIndicator := '0000'B |
| 561 | }, |
| 562 | msgs := { |
| 563 | mm := { |
| 564 | locationUpdateReject := { |
| 565 | messageType := '000100'B, |
| 566 | nsd := '00'B, |
| 567 | rejectCause := cause, |
| 568 | t3246_Value := * |
| 569 | } |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | |
Harald Welte | ba7b6d9 | 2018-01-23 21:32:34 +0100 | [diff] [blame] | 574 | template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := { |
| 575 | discriminator := '0101'B, |
| 576 | tiOrSkip := { |
| 577 | skipIndicator := '0000'B |
| 578 | }, |
| 579 | msgs := { |
| 580 | mm := { |
| 581 | identityRequest := { |
| 582 | messageType := '011000'B, |
| 583 | nsd := '00'B, |
| 584 | identityType := id_type, |
| 585 | spare1_5 := ? |
| 586 | } |
| 587 | } |
| 588 | } |
| 589 | } |
| 590 | |
| 591 | template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies ts_ML3_MO := { |
| 592 | msgs := { |
| 593 | mm := { |
| 594 | identityResponse := { |
| 595 | messageType := '011001'B, |
| 596 | nsd := '00'B, |
| 597 | mobileIdentityLV := mi, |
| 598 | p_TMSI_TypeTV := omit, |
| 599 | routingAreaIdentification2TLV := omit, |
| 600 | p_TMSISignature2TLV := omit |
| 601 | } |
| 602 | } |
| 603 | } |
| 604 | } |
| 605 | template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) := |
| 606 | ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi))); |
| 607 | template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) := |
| 608 | ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei))); |
| 609 | |
| 610 | |
Harald Welte | 45164da | 2018-01-24 12:51:27 +0100 | [diff] [blame] | 611 | template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, BIT2 rev := '10'B) := { |
| 612 | rf_PowerCapability := '010'B, |
| 613 | a5_1 := a5_1_unavail, |
| 614 | esind := '1'B, |
| 615 | revisionLevel := rev, |
| 616 | spare1_1 := '0'B |
| 617 | } |
| 618 | |
| 619 | template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi, |
| 620 | template MobileStationClassmark1_V cm1 := ts_CM1) |
| 621 | modifies ts_ML3_MO := { |
| 622 | msgs := { |
| 623 | mm := { |
| 624 | imsiDetachIndication := { |
| 625 | messageType := '000001'B, |
| 626 | nsd := '00'B, |
| 627 | mobileStationClassmark1 := cm1, |
| 628 | mobileIdentityLV := mi |
| 629 | } |
| 630 | } |
| 631 | } |
| 632 | } |
| 633 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 634 | template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := { |
| 635 | discriminator := '0011'B, |
| 636 | tiOrSkip := { |
| 637 | transactionId := { |
Daniel Willmann | dcf9eb9 | 2018-02-02 20:07:52 +0100 | [diff] [blame] | 638 | tio := int2bit(tid, 3), |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 639 | tiFlag := '0'B, |
| 640 | tIExtension := omit |
| 641 | } |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | template (value) CalledPartyBCD_Number ts_Called(hexstring digits) := { |
| 646 | elementIdentifier := '5E'O, |
| 647 | lengthIndicator := 0, /* overwritten */ |
| 648 | numberingPlanIdentification := '0000'B, |
| 649 | typeOfNumber := '000'B, /* unknown */ |
| 650 | ext1 := '0'B, |
| 651 | digits := digits |
| 652 | } |
| 653 | |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 654 | template CalledPartyBCD_Number tr_Called(template hexstring digits) := { |
| 655 | elementIdentifier := '5E'O, |
| 656 | lengthIndicator := ?, |
| 657 | numberingPlanIdentification := ?, |
| 658 | typeOfNumber := ?, |
| 659 | ext1 := ?, |
| 660 | digits := digits |
| 661 | } |
| 662 | |
| 663 | template CallingPartyBCD_Number tr_Calling(template hexstring digits) := { |
| 664 | elementIdentifier := '5C'O, |
| 665 | lengthIndicator := ?, |
| 666 | oct3 := ?, |
| 667 | digits := digits |
| 668 | } |
| 669 | |
Harald Welte | 4b2b3a6 | 2018-01-26 10:32:39 +0100 | [diff] [blame] | 670 | type integer SpeechVer; |
| 671 | |
| 672 | template (value) Speech_AuxiliarySpeech ts_SpeechAux(SpeechVer ver, BIT1 suffix) := { |
| 673 | speechVersionIndication := int2bit(ver-1,3) & suffix, |
| 674 | spare1_1 := '0'B, |
| 675 | cTM_or_Spare := '0'B, |
| 676 | coding := '0'B, |
| 677 | extension_octet_3a_3b := '0'B |
| 678 | } |
| 679 | |
| 680 | template (value) Speech_AuxiliarySpeech ts_SpeechAuxFR(SpeechVer ver) := ts_SpeechAux(ver, '0'B); |
| 681 | template (value) Speech_AuxiliarySpeech ts_SpeechAuxHR(SpeechVer ver) := ts_SpeechAux(ver, '1'B); |
| 682 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 683 | template (value) BearerCapability_TLV ts_Bcap_voice := { |
| 684 | elementIdentifier := '04'O, |
| 685 | lengthIndicator := 0, /* overwritten */ |
| 686 | octet3 := { |
| 687 | informationTransferCapability := '000'B, |
| 688 | transferMode := '0'B, |
| 689 | codingStandard := '0'B, |
| 690 | radioChannelRequirement := '11'B, /* FR preferred */ |
| 691 | extension_octet_3 := '0'B, /* overwritten */ |
Harald Welte | 4b2b3a6 | 2018-01-26 10:32:39 +0100 | [diff] [blame] | 692 | speech_aux_3a_3b := { |
| 693 | valueof(ts_SpeechAuxHR(3)), |
| 694 | valueof(ts_SpeechAuxFR(3)), |
| 695 | valueof(ts_SpeechAuxFR(2)), |
| 696 | valueof(ts_SpeechAuxFR(1)), |
| 697 | valueof(ts_SpeechAuxHR(1)) |
| 698 | } |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 699 | }, |
| 700 | octet4 := omit, |
| 701 | octet5 := omit, |
| 702 | octet6 := omit, |
| 703 | octet7 := omit |
| 704 | } |
| 705 | |
| 706 | template PDU_ML3_MS_NW ts_ML3_MO_CC_SETUP(integer tid, hexstring called, template BearerCapability_TLV bcap := ts_Bcap_voice) := { |
| 707 | discriminator := '0011'B, |
| 708 | tiOrSkip := { |
| 709 | transactionId := { |
| 710 | tio := int2bit(tid, 3), |
| 711 | tiFlag := '0'B, |
| 712 | tIExtension := omit |
| 713 | } |
| 714 | }, |
| 715 | msgs := { |
| 716 | cc := { |
| 717 | setup_MS_NW := { |
| 718 | messageType := '000101'B, |
| 719 | nsd := '00'B, |
| 720 | bcRepeatIndicator := omit, |
| 721 | bearerCapability1 := bcap, |
| 722 | bearerCapability2 := omit, |
| 723 | facility := omit, |
| 724 | callingPartySubAddress := omit, |
| 725 | calledPartyBCD_Number := ts_Called(called), |
| 726 | calledPartySubAddress := omit, |
| 727 | llc_RepeatIndicator := omit, |
| 728 | lowLayerCompatibility1 := omit, |
| 729 | lowLayerCompatibility2 := omit, |
| 730 | hlc_RepeatIndicator := omit, |
| 731 | highLayerCompatibility1 := omit, |
| 732 | highLayerCompatibility2 := omit, |
| 733 | user_user := omit, |
| 734 | ss_VersionIndicator := omit, |
| 735 | clir_Suppression := omit, |
| 736 | clir_Invocation := omit, |
| 737 | cC_Capabilities := omit, |
| 738 | facility_ccbs1 := omit, |
| 739 | facility_ccbs2 := omit, |
| 740 | streamIdentifier := omit, |
| 741 | supportedCodecs := omit, |
| 742 | redial := omit |
| 743 | } |
| 744 | } |
| 745 | } |
| 746 | } |
| 747 | |
Harald Welte | 45164da | 2018-01-24 12:51:27 +0100 | [diff] [blame] | 748 | template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template BearerCapability_TLV bcap := ts_Bcap_voice) := { |
| 749 | discriminator := '0011'B, |
| 750 | tiOrSkip := { |
| 751 | transactionId := { |
| 752 | tio := int2bit(tid, 3), |
| 753 | tiFlag := '0'B, |
| 754 | tIExtension := omit |
| 755 | } |
| 756 | }, |
| 757 | msgs := { |
| 758 | cc := { |
| 759 | emergencySetup := { |
| 760 | messageType := '001110'B, |
| 761 | nsd := '00'B, |
| 762 | bearerCapability := bcap, |
| 763 | streamIdentifier := omit, |
| 764 | supportedCodecs := omit, |
| 765 | emergencyCategory := omit |
| 766 | } |
| 767 | } |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 772 | template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := { |
| 773 | discriminator := '0011'B, |
| 774 | tiOrSkip := { |
| 775 | transactionId := { |
| 776 | tio := int2bit(tid, 3), |
| 777 | tiFlag := ?, |
| 778 | tIExtension := omit |
| 779 | } |
| 780 | }, |
| 781 | msgs := { |
| 782 | cc := { |
| 783 | callProceeding := { |
| 784 | messageType := '000010'B, |
| 785 | nsd := '00'B, |
| 786 | repeatIndicator := *, |
| 787 | bearerCapability1 := *, |
| 788 | bearerCapability2 := *, |
| 789 | facility := *, |
| 790 | progressIndicator := *, |
| 791 | priorityGranted := *, |
| 792 | networkCCCapabilities := * |
| 793 | } |
| 794 | } |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | template PDU_ML3_NW_MS tr_ML3_MT_CC_ALERTING(integer tid) := { |
| 799 | discriminator := '0011'B, |
| 800 | tiOrSkip := { |
| 801 | transactionId := { |
| 802 | tio := int2bit(tid, 3), |
| 803 | tiFlag := ?, |
| 804 | tIExtension := omit |
| 805 | } |
| 806 | }, |
| 807 | msgs := { |
| 808 | cc := { |
| 809 | alerting_NW_MS := { |
| 810 | messageType := '000001'B, |
| 811 | nsd := '00'B, |
| 812 | facility := *, |
| 813 | progressIndicator := *, |
| 814 | user_user := * |
| 815 | } |
| 816 | } |
| 817 | } |
| 818 | } |
| 819 | |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 820 | template PDU_ML3_MS_NW ts_ML3_MO_CC_ALERTING(integer tid) := { |
| 821 | discriminator := '0011'B, |
| 822 | tiOrSkip := { |
| 823 | transactionId := { |
| 824 | tio := int2bit(tid, 3), |
| 825 | tiFlag := '1'B, |
| 826 | tIExtension := omit |
| 827 | } |
| 828 | }, |
| 829 | msgs := { |
| 830 | cc := { |
| 831 | alerting_MS_NW := { |
| 832 | messageType := '000001'B, |
| 833 | nsd := '00'B, |
| 834 | facility := omit, |
| 835 | user_user := omit, |
| 836 | ss_VersionIndicator := omit |
| 837 | } |
| 838 | } |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | template PDU_ML3_MS_NW ts_ML3_MT_CC_ALERTING(integer tid) := { |
| 843 | discriminator := '0011'B, |
| 844 | tiOrSkip := { |
| 845 | transactionId := { |
| 846 | tio := int2bit(tid, 3), |
| 847 | tiFlag := '1'B, |
| 848 | tIExtension := omit |
| 849 | } |
| 850 | }, |
| 851 | msgs := { |
| 852 | cc := { |
| 853 | alerting_MS_NW := { |
| 854 | messageType := '000001'B, |
| 855 | nsd := '00'B, |
| 856 | facility := omit, |
| 857 | user_user := omit, |
| 858 | ss_VersionIndicator := omit |
| 859 | } |
| 860 | } |
| 861 | } |
| 862 | } |
| 863 | |
| 864 | template PDU_ML3_MS_NW ts_ML3_MO_CC_CONNECT(integer tid) := { |
| 865 | discriminator := '0011'B, |
| 866 | tiOrSkip := { |
| 867 | transactionId := { |
| 868 | tio := int2bit(tid, 3), |
| 869 | tiFlag := '1'B, |
| 870 | tIExtension := omit |
| 871 | } |
| 872 | }, |
| 873 | msgs := { |
| 874 | cc := { |
| 875 | connect_MS_NW := { |
| 876 | messageType := '000111'B, |
| 877 | nsd := '00'B, |
| 878 | facility := omit, |
| 879 | connectedSubAddress := omit, |
| 880 | user_user := omit, |
| 881 | ss_VersionIndicator := omit, |
| 882 | streamIdentifier := omit |
| 883 | } |
| 884 | } |
| 885 | } |
| 886 | } |
| 887 | |
Harald Welte | 4017d55 | 2018-01-26 21:40:05 +0100 | [diff] [blame] | 888 | template PDU_ML3_NW_MS tr_ML3_MT_CC_CONNECT(integer tid) := { |
| 889 | discriminator := '0011'B, |
| 890 | tiOrSkip := { |
| 891 | transactionId := { |
| 892 | tio := int2bit(tid, 3), |
| 893 | tiFlag := '1'B, |
| 894 | tIExtension := omit |
| 895 | } |
| 896 | }, |
| 897 | msgs := { |
| 898 | cc := { |
| 899 | connect_NW_MS := { |
| 900 | messageType := '000111'B, |
| 901 | nsd := '00'B, |
| 902 | facility := *, |
| 903 | progressIndicator := *, |
| 904 | connectedNumber := *, |
| 905 | connectedSubAddress := *, |
| 906 | user_user := * |
| 907 | } |
| 908 | } |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_CONNECT_ACK(integer tid) := { |
| 913 | discriminator := '0011'B, |
| 914 | tiOrSkip := { |
| 915 | transactionId := { |
| 916 | tio := int2bit(tid, 3), |
| 917 | tiFlag := '0'B, |
| 918 | tIExtension := omit |
| 919 | } |
| 920 | }, |
| 921 | msgs := { |
| 922 | cc := { |
| 923 | connectAck := { |
| 924 | messageType := '001111'B, |
| 925 | nsd := '00'B |
| 926 | } |
| 927 | } |
| 928 | } |
| 929 | } |
| 930 | |
Daniel Willmann | 8b08437 | 2018-02-04 13:35:26 +0100 | [diff] [blame] | 931 | template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_START_DTMF(integer tid, charstring number) := { |
| 932 | discriminator := '0011'B, |
| 933 | tiOrSkip := { |
| 934 | transactionId := { |
| 935 | tio := int2bit(tid, 3), |
| 936 | tiFlag := '0'B, |
| 937 | tIExtension := omit |
| 938 | } |
| 939 | }, |
| 940 | msgs := { |
| 941 | cc := { |
| 942 | startDTMF := { |
| 943 | messageType := '110101'B, |
| 944 | nsd := '00'B, |
| 945 | keypadFacility := { |
| 946 | elementIdentifier := '2C'O, |
| 947 | keypadInformation := int2bit(char2int(number), 7), |
| 948 | spare_1 := '0'B |
| 949 | } |
| 950 | } |
| 951 | } |
| 952 | } |
| 953 | } |
| 954 | |
Harald Welte | 2bb825f | 2018-01-22 11:31:18 +0100 | [diff] [blame] | 955 | template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := { |
| 956 | discriminator := '0011'B, |
| 957 | tiOrSkip := { |
| 958 | transactionId := { |
| 959 | tio := int2bit(tid, 3), |
| 960 | tiFlag := ?, |
| 961 | tIExtension := omit |
| 962 | } |
| 963 | }, |
| 964 | msgs := { |
| 965 | cc := { |
| 966 | disconnect_NW_MS := { |
| 967 | messageType := '100101'B, |
| 968 | nsd := '00'B, |
| 969 | cause := ?, |
| 970 | facility := *, |
| 971 | progressIndicator := *, |
| 972 | user_user := *, |
| 973 | allowedActions := * |
| 974 | } |
| 975 | } |
| 976 | } |
| 977 | } |
| 978 | |
| 979 | template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := { |
| 980 | discriminator := '0011'B, |
| 981 | tiOrSkip := { |
| 982 | transactionId := { |
| 983 | tio := int2bit(tid, 3), |
| 984 | tiFlag := ?, |
| 985 | tIExtension := omit |
| 986 | } |
| 987 | }, |
| 988 | msgs := { |
| 989 | cc := { |
| 990 | release_NW_MS := { |
| 991 | messageType := '101101'B, |
| 992 | nsd := '00'B, |
| 993 | cause := ?, |
| 994 | secondCause := *, |
| 995 | facility := *, |
| 996 | user_user := * |
| 997 | } |
| 998 | } |
| 999 | } |
| 1000 | } |
Harald Welte | d748a05 | 2018-01-22 02:59:24 +0100 | [diff] [blame] | 1001 | |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 1002 | template PDU_ML3_MS_NW ts_ML3_MO_CC_RELEASE(integer tid, BIT1 tid_remote, BIT7 cause) := { |
| 1003 | discriminator := '0011'B, |
| 1004 | tiOrSkip := { |
| 1005 | transactionId := { |
| 1006 | tio := int2bit(tid, 3), |
| 1007 | tiFlag := tid_remote, |
| 1008 | tIExtension := omit |
| 1009 | } |
| 1010 | }, |
| 1011 | msgs := { |
| 1012 | cc := { |
| 1013 | release_MS_NW := { |
| 1014 | messageType := '101101'B, |
| 1015 | nsd := '00'B, |
| 1016 | cause := ts_ML3_Cause(cause), |
| 1017 | secondCause := omit, |
| 1018 | facility := omit, |
| 1019 | user_user := omit, |
| 1020 | ss_VersionIndicator := omit |
| 1021 | } |
| 1022 | } |
| 1023 | } |
| 1024 | } |
| 1025 | |
| 1026 | |
Harald Welte | b71901a | 2018-01-26 19:16:05 +0100 | [diff] [blame] | 1027 | template (value) PDU_ML3_MS_NW ts_ML3_MO_CC_REL_COMPL(integer tid) := { |
| 1028 | discriminator := '0011'B, |
| 1029 | tiOrSkip := { |
| 1030 | transactionId := { |
| 1031 | tio := int2bit(tid, 3), |
| 1032 | tiFlag := '0'B, |
| 1033 | tIExtension := omit |
| 1034 | } |
| 1035 | }, |
| 1036 | msgs := { |
| 1037 | cc := { |
| 1038 | releaseComplete_MS_NW := { |
| 1039 | messageType := '101010'B, |
| 1040 | nsd := '00'B, |
| 1041 | cause := omit, |
| 1042 | facility := omit, |
| 1043 | user_user := omit, |
| 1044 | ss_VersionIndicator := omit |
| 1045 | } |
| 1046 | } |
| 1047 | } |
| 1048 | } |
| 1049 | |
Harald Welte | 33ec09b | 2018-02-10 15:34:46 +0100 | [diff] [blame] | 1050 | template PDU_ML3_NW_MS tr_ML3_MT_CC_REL_COMPL(integer tid) := { |
| 1051 | discriminator := '0011'B, |
| 1052 | tiOrSkip := { |
| 1053 | transactionId := { |
| 1054 | tio := int2bit(tid, 3), |
| 1055 | tiFlag := ?, |
| 1056 | tIExtension := omit |
| 1057 | } |
| 1058 | }, |
| 1059 | msgs := { |
| 1060 | cc := { |
| 1061 | releaseComplete_NW_MS := { |
| 1062 | messageType := '101010'B, |
| 1063 | nsd := '00'B, |
| 1064 | cause := *, |
| 1065 | facility := *, |
| 1066 | user_user := * |
| 1067 | } |
| 1068 | } |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | |
Harald Welte | b71901a | 2018-01-26 19:16:05 +0100 | [diff] [blame] | 1073 | |
Harald Welte | 77a8eba | 2018-01-22 21:22:32 +0100 | [diff] [blame] | 1074 | template PDU_ML3_NW_MS tr_ML3_MT_MM_AUTH_REQ(template OCT16 rand := ?) := { |
| 1075 | discriminator := '0101'B, |
| 1076 | tiOrSkip := { |
| 1077 | skipIndicator := '0000'B |
| 1078 | }, |
| 1079 | msgs := { |
| 1080 | mm := { |
| 1081 | authenticationRequest := { |
| 1082 | messageType := '010010'B, |
| 1083 | nsd := '00'B, |
| 1084 | cipheringKeySequenceNumber := ?, |
| 1085 | spare2_4 := ?, |
| 1086 | authenticationParRAND := rand, |
| 1087 | authenticationParAUTN := * |
| 1088 | } |
| 1089 | } |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_2G(OCT4 sres) := { |
| 1094 | discriminator := '0101'B, |
| 1095 | tiOrSkip := { |
| 1096 | skipIndicator := '0000'B |
| 1097 | }, |
| 1098 | msgs := { |
| 1099 | mm := { |
| 1100 | authenticationResponse := { |
| 1101 | messageType := '010100'B, |
| 1102 | nsd := '00'B, |
| 1103 | authenticationParSRES := sres, |
| 1104 | authenticationParSRESext := omit |
| 1105 | } |
| 1106 | } |
| 1107 | } |
| 1108 | } |
| 1109 | |
| 1110 | template (value) PDU_ML3_MS_NW ts_ML3_MT_MM_AUTH_RESP_3G(OCT4 sres, octetstring res) := { |
| 1111 | discriminator := '0101'B, |
| 1112 | tiOrSkip := { |
| 1113 | skipIndicator := '0000'B |
| 1114 | }, |
| 1115 | msgs := { |
| 1116 | mm := { |
| 1117 | authenticationResponse := { |
| 1118 | messageType := '010100'B, |
| 1119 | nsd := '00'B, |
| 1120 | authenticationParSRES := sres, |
| 1121 | authenticationParSRESext := { |
| 1122 | elementIdentifier := '21'O, |
| 1123 | lengthIndicator := 0, /* overwritten */ |
| 1124 | valueField := res |
| 1125 | } |
| 1126 | } |
| 1127 | } |
| 1128 | } |
| 1129 | } |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 1130 | |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 1131 | template PDU_ML3_MS_NW ts_ML3_MO_CC_CALL_CONF(integer tid, |
| 1132 | template BearerCapability_TLV bcap := omit) := { |
| 1133 | discriminator := '0011'B, |
| 1134 | tiOrSkip := { |
| 1135 | transactionId := { |
| 1136 | tio := int2bit(tid, 3), |
| 1137 | tiFlag := '1'B, /* response from destination */ |
| 1138 | tIExtension := omit |
| 1139 | } |
| 1140 | }, |
| 1141 | msgs := { |
| 1142 | cc := { |
| 1143 | callConfirmed := { |
| 1144 | messageType := '001000'B, |
| 1145 | nsd := '00'B, |
| 1146 | repeatIndicator := omit, |
| 1147 | bearerCapability1 := bcap, |
| 1148 | bearerCapability2 := omit, |
| 1149 | cause := omit, |
| 1150 | cC_Capabilities := omit, |
| 1151 | streamIdentifier := omit, |
| 1152 | supportedCodecs := omit |
| 1153 | } |
| 1154 | } |
| 1155 | } |
| 1156 | } |
| 1157 | |
| 1158 | |
| 1159 | template PDU_ML3_NW_MS tr_ML3_MT_CC_SETUP(integer tid, template hexstring called := *, |
| 1160 | template hexstring calling := *, |
| 1161 | template BearerCapability_TLV bcap := *) := { |
| 1162 | discriminator := '0011'B, |
| 1163 | tiOrSkip := { |
| 1164 | transactionId := { |
| 1165 | tio := int2bit(tid, 3), |
| 1166 | tiFlag := '0'B, /* from originator */ |
| 1167 | tIExtension := omit |
| 1168 | } |
| 1169 | }, |
| 1170 | msgs := { |
| 1171 | cc := { |
| 1172 | setup_NW_MS := { |
| 1173 | messageType := '000101'B, |
| 1174 | nsd := '00'B, |
| 1175 | bcRepeatIndicator := *, |
| 1176 | bearerCapability1 := bcap, |
| 1177 | bearerCapability2 := *, |
| 1178 | facility := *, |
| 1179 | progressIndicator := *, |
| 1180 | signal := *, |
| 1181 | callingPartyBCD_Number := tr_Calling(calling) ifpresent, |
| 1182 | callingPartySubAddress := *, |
| 1183 | calledPartyBCD_Number := tr_Called(called) ifpresent, |
| 1184 | calledPartySubAddress := *, |
| 1185 | redirectingPartyBCDNumber := *, |
| 1186 | redirectingPartySubaddress := *, |
| 1187 | llc_RepeatIndicator := *, |
| 1188 | lowLayerCompatibility1 := *, |
| 1189 | lowLayerCompatibility2 := *, |
| 1190 | hlc_RepeatIndicator := *, |
| 1191 | highLayerCompatibility1 := *, |
| 1192 | highLayerCompatibility2 := *, |
| 1193 | user_user := *, |
| 1194 | priority := *, |
| 1195 | alert := *, |
| 1196 | networkCCCapabilities := *, |
| 1197 | causeofNoCli := *, |
| 1198 | backupBearerCapacity := * |
| 1199 | } |
| 1200 | } |
| 1201 | } |
| 1202 | } |
| 1203 | |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1204 | /*********************************************************************** |
| 1205 | * GPRS Mobility Management |
| 1206 | ***********************************************************************/ |
| 1207 | |
| 1208 | template (value) MSNetworkCapabilityV ts_GMM_MsNetCapV := { |
| 1209 | gea1bit := '1'B, |
| 1210 | smCapabilitiesviaDedicatedChannels := '1'B, |
| 1211 | smCapabilitiesviaGPRSChannels := '0'B, |
| 1212 | ucs2Support := '1'B, |
| 1213 | ssScreeningIndicator := '01'B, |
| 1214 | solSACapability := omit, |
| 1215 | revisionLevelIndicatior := omit, |
| 1216 | pFCFeatureMode := omit, |
| 1217 | extendedGEAbits := omit, |
| 1218 | lcsVAcapability := omit, |
| 1219 | pSInterRATHOtoUTRANIuModeCapability := omit, |
| 1220 | pSInterRATHOtoEUTRANS1ModeCapability := omit, |
| 1221 | eMMCombinedProceduresCapability := omit, |
| 1222 | iSRSupport := omit, |
| 1223 | sRVCCtoGERANUTRANCapability := omit, |
| 1224 | ePCCapability := omit, |
| 1225 | nFCapability := omit, |
| 1226 | gERANNertworkSharingCapability := omit, |
| 1227 | spare_octets := omit |
| 1228 | }; |
| 1229 | |
| 1230 | template (value) MSNetworkCapabilityLV ts_GMM_MsNetCapLV := { |
| 1231 | lengthIndicator := 0, /* overwritten */ |
| 1232 | msNetworkCapabilityV := ts_GMM_MsNetCapV |
| 1233 | }; |
| 1234 | |
| 1235 | type enumerated GprsAttachType { |
| 1236 | GPRS_ATT_T_GPRS, |
| 1237 | GPRS_ATT_T_GPRS_IMSI_COMBINED |
| 1238 | }; |
| 1239 | |
| 1240 | function ts_GMM_AttachType(boolean combined := false, boolean follow_on_pending := false) |
| 1241 | return AttachTypeV { |
| 1242 | var AttachTypeV att; |
| 1243 | if (combined) { |
| 1244 | att.attachType := '011'B; |
| 1245 | } else { |
| 1246 | att.attachType := '001'B; |
| 1247 | } |
| 1248 | att.for_l3 := bool2bit(combined); |
| 1249 | return att; |
| 1250 | } |
| 1251 | |
| 1252 | type enumerated GprsUpdateType { |
| 1253 | GPRS_UPD_T_RA ('000'B), |
| 1254 | GPRS_UPD_T_RA_LA_COMBINED ('001'B), |
| 1255 | GPRS_UPD_T_RA_LA_COMBINED_IMSI_ATT ('010'B), |
| 1256 | GPRS_UPD_T_PERIODIC ('011'B) |
| 1257 | }; |
| 1258 | |
| 1259 | /* 10.5.5.18 Update Type */ |
| 1260 | template UpdateTypeV ts_GMM_UpdateType(GprsUpdateType upd_t, boolean combined := false, |
| 1261 | boolean follow_on_pending := false) := { |
| 1262 | valueField := int2bit(enum2int(upd_t), 3), |
| 1263 | for_l3 := bool2bit(combined) |
| 1264 | } |
| 1265 | |
| 1266 | template (value) DRXParameterV ts_DrxParameterV := { |
| 1267 | splitPGCycleCode := '00'O, /* no DRX */ |
| 1268 | nonDRXTimer := '000'B, /* no non-DRX mode */ |
| 1269 | splitOnCCCH := '0'B, /* not supported */ |
| 1270 | cnSpecificDRXCycleLength := '0000'B /* SI value used */ |
| 1271 | }; |
| 1272 | |
| 1273 | template (value) AccessCapabilitiesStruct ts_AccesssCap := { |
| 1274 | lengthIndicator := 0, /* overwritten */ |
| 1275 | accessCapabilities := { |
| 1276 | rfPowerCapability := '001'B, /* FIXME */ |
| 1277 | presenceBitA5 := '0'B, |
| 1278 | a5bits := omit, |
| 1279 | esind := '1'B, |
| 1280 | psbit := '0'B, |
| 1281 | vgcs := '0'B, |
| 1282 | vbs := '0'B, |
| 1283 | presenceBitMultislot := '0'B, |
| 1284 | multislotcap := omit, |
| 1285 | accessCapAdditionsAfterRel97 := omit |
| 1286 | }, |
| 1287 | spare_bits := omit |
| 1288 | } |
| 1289 | |
| 1290 | template (value) MSRACapabilityValuesRecord ts_RaCapRec(BIT4 att) := { |
| 1291 | mSRACapabilityValues := { |
| 1292 | mSRACapabilityValuesExclude1111 := { |
| 1293 | accessTechnType := '0001'B, /* E-GSM */ |
| 1294 | accessCapabilities := ts_AccesssCap |
| 1295 | } |
| 1296 | }, |
| 1297 | presenceBitMSRACap := '0'B |
| 1298 | }; |
| 1299 | |
| 1300 | template (value) MSRadioAccessCapabilityLV ts_MS_RaCapa := { |
| 1301 | lengthIndicator := 0, /* overwritten */ |
| 1302 | msRadioAccessCapabilityV := { |
| 1303 | ts_RaCapRec('0001'B) /* E-GSM */ |
| 1304 | } |
| 1305 | } |
| 1306 | |
| 1307 | template (value) PDU_L3_MS_SGSN |
| 1308 | ts_GMM_ATTACH_REQ(MobileIdentityLV mi_lv, RoutingAreaIdentificationV old_ra, |
| 1309 | boolean combined := false, boolean follow_on_pending := false, |
| 1310 | template (omit) MobileStationClassmark2_TLV cm2_tlv, |
| 1311 | template (omit) MobileStationClassmark3_TLV cm3_tlv |
| 1312 | ) := { |
| 1313 | discriminator := '0000'B, /* overwritten */ |
| 1314 | tiOrSkip := { |
| 1315 | skipIndicator := '0000'B |
| 1316 | }, |
| 1317 | msgs := { |
| 1318 | gprs_mm := { |
| 1319 | attachRequest := { |
| 1320 | messageType := '00000000'B, /* overwritten */ |
| 1321 | msNetworkCapability := ts_GMM_MsNetCapLV, |
| 1322 | attachType := valueof(ts_GMM_AttachType(combined, follow_on_pending)), |
| 1323 | gprsCKSN := { '111'B, '0'B }, |
| 1324 | drxParam := ts_DrxParameterV, |
| 1325 | mobileIdentity := mi_lv, |
| 1326 | oldRoutingAreaID := old_ra, |
| 1327 | msRACap := ts_MS_RaCapa, |
| 1328 | ptmsiSignature := omit, /* TODO */ |
| 1329 | reqGPRStimer := omit, |
| 1330 | tmsiStatus := omit, |
| 1331 | pC_LCSCapability := omit, |
| 1332 | mobileStationClassmark2 := cm2_tlv, |
| 1333 | mobileStationClassmark3 := cm3_tlv, |
| 1334 | supportedCodecs := omit, |
| 1335 | uENetworkCapability := omit, |
| 1336 | additionalMobileIdentity := omit, |
| 1337 | routingAreaIdentification2 := omit, |
| 1338 | voiceDomainandUEsUsageSetting := omit, |
| 1339 | deviceProperties := omit, |
| 1340 | p_TMSI_Type := omit, |
| 1341 | mS_NetworkFeatureSupport := omit, |
| 1342 | oldLocationAreaIdentification := omit, |
| 1343 | additionalUpdateType := omit, |
| 1344 | tMSIBasedNRIcontainer := omit, |
| 1345 | t3324 := omit, |
| 1346 | t3312_ExtendedValue := omit, |
| 1347 | extendedDRXParameters := omit |
| 1348 | } |
| 1349 | } |
| 1350 | } |
| 1351 | } |
| 1352 | |
Harald Welte | b0386df | 2018-02-16 18:14:28 +0100 | [diff] [blame] | 1353 | private function tr_MI_TMSI_TLV(template OCT4 tmsi) return template MobileIdentityTLV { |
| 1354 | if (istemplatekind(tmsi, "*")) { |
| 1355 | return *; |
| 1356 | } else if (istemplatekind(tmsi, "?")) { |
| 1357 | return ?; |
| 1358 | } else { |
| 1359 | var template MobileIdentityTLV mi := { |
| 1360 | elementIdentifier := '0011000'B, |
| 1361 | spare1 := '0'B, |
| 1362 | mobileIdentityLV := { |
| 1363 | lengthIndicator := 4, |
| 1364 | mobileIdentityV := { |
| 1365 | typeOfIdentity := '100'B, |
| 1366 | oddEvenInd_identity := { |
| 1367 | tmsi_ptmsi := { |
| 1368 | oddevenIndicator := '1'B, |
| 1369 | fillerDigit := '1111'B, |
| 1370 | octets := tmsi |
| 1371 | } |
| 1372 | } |
| 1373 | } |
| 1374 | } |
| 1375 | }; |
| 1376 | return mi; |
| 1377 | } |
| 1378 | } |
| 1379 | |
| 1380 | template PDU_L3_SGSN_MS tr_GMM_ATTACH_ACCEPT(template BIT3 res := ?, |
| 1381 | template RoutingAreaIdentificationV ra := ?, |
| 1382 | template OCT4 ptmsi := *) := { |
| 1383 | discriminator := '1000'B, |
| 1384 | tiOrSkip := { |
| 1385 | skipIndicator := '0000'B |
| 1386 | }, |
| 1387 | msgs := { |
| 1388 | gprs_mm := { |
| 1389 | attachAccept := { |
| 1390 | messageType := '00000010'B, |
| 1391 | attachResult := { res, ? }, |
| 1392 | forceToStandby := ?, |
| 1393 | updateTimer := ?, |
| 1394 | radioPriority := ?, |
| 1395 | radioPriorityTOM8 := ?, |
| 1396 | routingAreaIdentification := ra, |
| 1397 | ptmsiSignature := *, |
| 1398 | readyTimer := *, |
| 1399 | allocatedPTMSI := tr_MI_TMSI_TLV(ptmsi), |
| 1400 | msIdentity := *, |
| 1401 | gmmCause := *, |
| 1402 | t3302 := *, |
| 1403 | cellNotification := *, |
| 1404 | equivalentPLMNs := *, |
| 1405 | networkFeatureSupport := *, |
| 1406 | emergencyNumberList := *, |
| 1407 | requestedMSInformation := *, |
| 1408 | t3319 := *, |
| 1409 | t3323 := *, |
| 1410 | t3312_ExtendedValue := *, |
| 1411 | additionalNetworkFeatureSupport := *, |
| 1412 | t3324 := *, |
| 1413 | extendedDRXParameters := * |
| 1414 | } |
| 1415 | } |
| 1416 | } |
| 1417 | } |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1418 | |
Harald Welte | 5b7c812 | 2018-02-16 21:48:17 +0100 | [diff] [blame] | 1419 | template PDU_L3_SGSN_MS tr_GMM_ATTACH_REJECT(template OCT1 cause) := { |
| 1420 | discriminator := '1000'B, |
| 1421 | tiOrSkip := { |
| 1422 | skipIndicator := '0000'B |
| 1423 | }, |
| 1424 | msgs := { |
| 1425 | gprs_mm := { |
| 1426 | attachReject := { |
| 1427 | messageType := '00000100'B, |
| 1428 | gmmCause := { |
| 1429 | causeValue := cause |
| 1430 | }, |
| 1431 | t3302 := *, |
| 1432 | t3346 := * |
| 1433 | } |
| 1434 | } |
| 1435 | } |
| 1436 | } |
| 1437 | |
| 1438 | |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1439 | template (value) PDU_L3_MS_SGSN ts_GMM_ATTACH_COMPL := { |
| 1440 | discriminator := '0000'B, /* overwritten */ |
| 1441 | tiOrSkip := { |
| 1442 | skipIndicator := '0000'B |
| 1443 | }, |
| 1444 | msgs := { |
| 1445 | gprs_mm := { |
| 1446 | attachComplete := { |
| 1447 | messageType := '00000000'B, /* overwritten */ |
| 1448 | interRATHandoverInformation := omit, |
| 1449 | eUTRANinterRATHandoverInformation := omit |
| 1450 | } |
| 1451 | } |
| 1452 | } |
| 1453 | } |
| 1454 | |
| 1455 | template (value) PDU_L3_MS_SGSN |
| 1456 | ts_GMM_RAU_REQ(MobileIdentityLV mi_lv, GprsUpdateType upd_type, |
| 1457 | RoutingAreaIdentificationV old_ra, |
| 1458 | boolean follow_on_pending := false, |
| 1459 | template (omit) MobileStationClassmark2_TLV cm2_tlv, |
| 1460 | template (omit) MobileStationClassmark3_TLV cm3_tlv |
| 1461 | ) := { |
| 1462 | discriminator := '0000'B, /* overwritten */ |
| 1463 | tiOrSkip := { |
| 1464 | skipIndicator := '0000'B |
| 1465 | }, |
| 1466 | msgs := { |
| 1467 | gprs_mm := { |
| 1468 | routingAreaUpdateRequest := { |
| 1469 | messageType := '00000000'B, /* overwritten */ |
| 1470 | updateType := ts_GMM_UpdateType(upd_type, follow_on_pending), |
| 1471 | gprsCKSN := { '111'B, '0'B }, |
| 1472 | oldRoutingAreaId := old_ra, |
| 1473 | msRACap := ts_MS_RaCapa, |
| 1474 | oldPTMSISignature := omit, /* TODO */ |
| 1475 | readyTimerValue := omit, |
| 1476 | drxParameter := omit, |
| 1477 | tmsiStatus := omit, |
| 1478 | ptmsi := omit, |
| 1479 | mSNetworkCapability := omit, |
| 1480 | pdpContextStatus := omit, /* TODO */ |
| 1481 | pC_LCSCapability := omit, |
Harald Welte | 04683d0 | 2018-02-16 22:43:45 +0100 | [diff] [blame] | 1482 | mBMS_ContextStatus := omit, |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1483 | uENetworkCapability := omit, |
| 1484 | additionalMobileIdentity := omit, |
| 1485 | oldRoutingAreaIdentification2 := omit, |
| 1486 | mobileStationClassmark2 := cm2_tlv, |
| 1487 | mobileStationClassmark3 := cm3_tlv, |
| 1488 | supportedCodecs := omit, |
| 1489 | voiceDomainUEUsageSetting := omit, |
| 1490 | p_TMSI_Type := omit, |
| 1491 | deviceProperties := omit, |
| 1492 | mS_NetworkFeatureSupport := omit, |
| 1493 | oldLocationAreaIdentification := omit, |
| 1494 | additionalUpdateType := omit, |
| 1495 | tMSIBasedNRIcontainer := omit, |
| 1496 | t3324 := omit, |
| 1497 | t3312_ExtendedValue := omit, |
| 1498 | extendedDRXParameters := omit |
| 1499 | } |
| 1500 | } |
| 1501 | } |
| 1502 | } |
| 1503 | |
Harald Welte | 04683d0 | 2018-02-16 22:43:45 +0100 | [diff] [blame] | 1504 | template PDU_L3_SGSN_MS tr_GMM_RAU_REJECT(template OCT1 cause := ?) := { |
| 1505 | discriminator := '1000'B, |
| 1506 | tiOrSkip := { |
| 1507 | skipIndicator := '0000'B |
| 1508 | }, |
| 1509 | msgs := { |
| 1510 | gprs_mm := { |
| 1511 | routingAreaUpdateReject := { |
| 1512 | messageType := '00001011'B, |
| 1513 | gmmCause := { |
| 1514 | causeValue := cause |
| 1515 | }, |
| 1516 | forceToStandby := ?, |
| 1517 | spare := '0000'B, |
| 1518 | t3302 := *, |
| 1519 | t3346 := * |
| 1520 | } |
| 1521 | } |
| 1522 | } |
| 1523 | } |
| 1524 | |
Harald Welte | 91636de | 2018-02-17 10:16:14 +0100 | [diff] [blame] | 1525 | template PDU_L3_SGSN_MS tr_GMM_RAU_ACCEPT(template BIT3 res := ?, |
| 1526 | template RoutingAreaIdentificationV ra := ?, |
| 1527 | template OCT4 ptmsi := *) := { |
| 1528 | discriminator := '1000'B, |
| 1529 | tiOrSkip := { |
| 1530 | skipIndicator := '0000'B |
| 1531 | }, |
| 1532 | msgs := { |
| 1533 | gprs_mm := { |
| 1534 | routingAreaUpdateAccept := { |
| 1535 | messageType := '00001001'B, |
| 1536 | forceToStandby := ?, |
| 1537 | updateResult := { res, ? }, |
| 1538 | raUpdateTimer := ?, |
| 1539 | routingAreaId := ra, |
| 1540 | ptmsiSignature := *, |
| 1541 | allocatedPTMSI := tr_MI_TMSI_TLV(ptmsi), |
| 1542 | msIdentity := *, |
| 1543 | receiveNPDUNumbers := *, |
| 1544 | readyTimer := *, |
| 1545 | gmmCause := *, |
| 1546 | t3302 := *, |
| 1547 | cellNotification := *, |
| 1548 | equivalentPLMNs := *, |
| 1549 | pdpContextStatus := *, |
| 1550 | networkFeatureSupport := *, |
| 1551 | emergencyNumberList := *, |
| 1552 | mBMS_ContextStatus := *, |
| 1553 | requestedMSInformation := *, |
| 1554 | t3319 := *, |
| 1555 | t3323 := *, |
| 1556 | t3312_ExtendedValue := *, |
| 1557 | additionalNetworkFeatureSupport := *, |
| 1558 | t3324 := *, |
| 1559 | extendedDRXParameters := * |
| 1560 | } |
| 1561 | } |
| 1562 | } |
| 1563 | } |
Harald Welte | 04683d0 | 2018-02-16 22:43:45 +0100 | [diff] [blame] | 1564 | |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1565 | template (value) PDU_L3_MS_SGSN ts_GMM_RAU_COMPL := { |
| 1566 | discriminator := '0000'B, /* overwritten */ |
| 1567 | tiOrSkip := { |
| 1568 | skipIndicator := '0000'B |
| 1569 | }, |
| 1570 | msgs := { |
| 1571 | gprs_mm := { |
| 1572 | routingAreaUpdateComplete := { |
| 1573 | messageType := '00000000'B, /* overwritten */ |
| 1574 | receiveNPDUNumbers := omit, |
| 1575 | interRATHandoverInformation := omit, |
| 1576 | eUTRANinterRATHandoverInformation := omit |
| 1577 | } |
| 1578 | } |
| 1579 | } |
| 1580 | } |
| 1581 | |
| 1582 | template (value) PDU_L3_MS_SGSN ts_GMM_PTMSI_REALL_COMPL := { |
| 1583 | discriminator := '0000'B, /* overwritten */ |
| 1584 | tiOrSkip := { |
| 1585 | skipIndicator := '0000'B |
| 1586 | }, |
| 1587 | msgs := { |
| 1588 | gprs_mm := { |
| 1589 | p_TMSIReallocationComplete := { |
| 1590 | messageType := '00000000'B /* overwritten */ |
| 1591 | } |
| 1592 | } |
| 1593 | } |
| 1594 | } |
| 1595 | |
| 1596 | template (value) PDU_L3_MS_SGSN ts_GMM_AUTH_CIPH_COMPL(ACReferenceNumberV ref, OCT4 res) := { |
| 1597 | discriminator := '0000'B, /* overwritten */ |
| 1598 | tiOrSkip := { |
| 1599 | skipIndicator := '0000'B |
| 1600 | }, |
| 1601 | msgs := { |
| 1602 | gprs_mm := { |
| 1603 | authenticationAndCipheringResponse := { |
| 1604 | messageType := '00000000'B, /* overwritten */ |
| 1605 | acReferenceNumber := ref, |
| 1606 | spare := '0000'B, |
| 1607 | authenticationParResp := { |
| 1608 | elementIdentifier := '22'O, |
| 1609 | valueField := res |
| 1610 | }, |
| 1611 | imeisv := omit, |
| 1612 | authenticationRespParExt := omit |
| 1613 | } |
| 1614 | } |
| 1615 | } |
| 1616 | } |
| 1617 | |
Harald Welte | b0386df | 2018-02-16 18:14:28 +0100 | [diff] [blame] | 1618 | template PDU_L3_SGSN_MS tr_GMM_ID_REQ(template BIT3 id_type := ?) := { |
| 1619 | discriminator := '1000'B, |
| 1620 | tiOrSkip := { |
| 1621 | skipIndicator := '0000'B |
| 1622 | }, |
| 1623 | msgs := { |
| 1624 | gprs_mm := { |
| 1625 | identityRequest := { |
| 1626 | messageType := '00010101'B, |
| 1627 | identityType := { id_type, '0'B }, |
| 1628 | forceToStandby := ? |
| 1629 | } |
| 1630 | } |
| 1631 | } |
| 1632 | } |
| 1633 | |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1634 | template (value) PDU_L3_MS_SGSN ts_GMM_ID_RESP(MobileIdentityLV mi_lv) := { |
| 1635 | discriminator := '0000'B, /* overwritten */ |
| 1636 | tiOrSkip := { |
| 1637 | skipIndicator := '0000'B |
| 1638 | }, |
| 1639 | msgs := { |
| 1640 | gprs_mm := { |
| 1641 | identityResponse := { |
| 1642 | messageType := '00000000'B, /* overwritten */ |
| 1643 | mobileIdentity := mi_lv |
| 1644 | } |
| 1645 | } |
| 1646 | } |
| 1647 | } |
| 1648 | |
Harald Welte | b0386df | 2018-02-16 18:14:28 +0100 | [diff] [blame] | 1649 | template PDU_L3_SGSN_MS tr_GMM_AUTH_REQ(template OCT16 rand := ?, template BIT3 ciph_alg := ?) := { |
| 1650 | discriminator := '1000'B, |
| 1651 | tiOrSkip := { |
| 1652 | skipIndicator := '0000'B |
| 1653 | }, |
| 1654 | msgs := { |
| 1655 | gprs_mm := { |
| 1656 | authenticationAndCipheringRequest := { |
| 1657 | messageType := '00010010'B, |
| 1658 | cipheringAlgorithm := { ciph_alg, '0'B }, |
| 1659 | imeisvRequest := ?, |
| 1660 | forceToStandby := ?, |
| 1661 | acReferenceNumber := ?, |
| 1662 | authenticationParameterRAND := { |
| 1663 | elementIdentifier := '21'O, |
| 1664 | randValue := rand |
| 1665 | }, |
| 1666 | cipheringKeySequenceNumber := *, |
| 1667 | authenticationParameterAUTN := * |
| 1668 | } |
| 1669 | } |
| 1670 | } |
| 1671 | } |
| 1672 | |
| 1673 | template (value) PDU_L3_MS_SGSN ts_GMM_AUTH_RESP_2G(BIT4 ac_ref, OCT4 sres) := { |
| 1674 | discriminator := '1000'B, |
| 1675 | tiOrSkip := { |
| 1676 | skipIndicator := '0000'B |
| 1677 | }, |
| 1678 | msgs := { |
| 1679 | gprs_mm := { |
| 1680 | authenticationAndCipheringResponse := { |
| 1681 | messageType := '00010011'B, |
| 1682 | acReferenceNumber := { valueField := ac_ref }, |
| 1683 | spare := '0000'B, |
| 1684 | authenticationParResp := { |
| 1685 | elementIdentifier := '22'O, |
| 1686 | valueField := sres |
| 1687 | }, |
| 1688 | imeisv := omit, |
| 1689 | authenticationRespParExt := omit |
| 1690 | } |
| 1691 | } |
| 1692 | } |
| 1693 | } |
| 1694 | |
| 1695 | |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1696 | const BIT3 c_GMM_DTT_MO_GPRS := '001'B; |
| 1697 | const BIT3 c_GMM_DTT_MO_IMSI := '010'B; |
| 1698 | const BIT3 c_GMM_DTT_MO_GPRS_IMSI_COMBINED := '011'B; |
| 1699 | |
Harald Welte | 6abb9fe | 2018-02-17 15:24:48 +0100 | [diff] [blame] | 1700 | template (value) DetachTypeV ts_GMM_DetType(BIT3 dtt, boolean power_off := false) := { |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1701 | detachType := dtt, |
Harald Welte | 6abb9fe | 2018-02-17 15:24:48 +0100 | [diff] [blame] | 1702 | powerOffFlag := bool2bit(power_off) |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1703 | } |
| 1704 | |
Harald Welte | 6abb9fe | 2018-02-17 15:24:48 +0100 | [diff] [blame] | 1705 | function ts_PtmsiSigTV(template (omit) OCT3 val) return template (omit) P_TMSISignatureTV { |
| 1706 | var template (omit) P_TMSISignatureTV ret; |
| 1707 | if (istemplatekind(val, "omit")) { |
| 1708 | return omit; |
| 1709 | } else { |
| 1710 | ret := { |
| 1711 | elementIdentifier := '19'O, |
| 1712 | valueField := valueof(val) |
| 1713 | } |
| 1714 | return ret; |
| 1715 | } |
| 1716 | } |
| 1717 | |
| 1718 | function ts_PtmsiSigTLV(template (omit) OCT3 val) return template (omit) P_TMSISignature2TLV { |
| 1719 | var template (omit) P_TMSISignature2TLV ret; |
| 1720 | if (istemplatekind(val, "omit")) { |
| 1721 | return omit; |
| 1722 | } else { |
| 1723 | ret := { |
| 1724 | elementIdentifier := '19'O, |
| 1725 | lengthIndicator := 3, |
| 1726 | valueField := valueof(val) |
| 1727 | } |
| 1728 | return ret; |
| 1729 | } |
| 1730 | } |
| 1731 | |
| 1732 | template (value) PDU_L3_MS_SGSN ts_GMM_DET_REQ_MO(BIT3 dtt := c_GMM_DTT_MO_GPRS, |
| 1733 | boolean power_off := false, |
| 1734 | template (omit) OCT4 p_tmsi := omit, |
| 1735 | template (omit) OCT3 p_tmsi_sig := omit) := { |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1736 | discriminator := '0000'B, /* overwritten */ |
| 1737 | tiOrSkip := { |
| 1738 | skipIndicator := '0000'B |
| 1739 | }, |
| 1740 | msgs := { |
| 1741 | gprs_mm := { |
| 1742 | detachRequest_MS_SGSN := { |
| 1743 | messageType := '00000000'B, /* overwritten */ |
Harald Welte | 6abb9fe | 2018-02-17 15:24:48 +0100 | [diff] [blame] | 1744 | detachType := valueof(ts_GMM_DetType(dtt, power_off)), |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1745 | spare := '0000'B, |
Harald Welte | 6abb9fe | 2018-02-17 15:24:48 +0100 | [diff] [blame] | 1746 | ptmsi := ts_MI_TMSI_TLV(p_tmsi), |
| 1747 | ptmsiSignature := ts_PtmsiSigTLV(p_tmsi_sig) |
| 1748 | } |
| 1749 | } |
| 1750 | } |
| 1751 | } |
| 1752 | |
| 1753 | template PDU_L3_SGSN_MS tr_GMM_DET_ACCEPT_MT := { |
| 1754 | discriminator := '1000'B, |
| 1755 | tiOrSkip := { |
| 1756 | skipIndicator := '0000'B |
| 1757 | }, |
| 1758 | msgs := { |
| 1759 | gprs_mm := { |
| 1760 | detachAccept_SGSN_MS := { |
| 1761 | messageType := '00000110'B, |
| 1762 | forceToStandby := ?, |
| 1763 | spare := '0000'B |
Harald Welte | 38575a7 | 2018-02-15 20:41:37 +0100 | [diff] [blame] | 1764 | } |
| 1765 | } |
| 1766 | } |
| 1767 | } |
Harald Welte | 812f7a4 | 2018-01-27 00:49:18 +0100 | [diff] [blame] | 1768 | |
Harald Welte | 835b15f | 2018-02-18 14:39:11 +0100 | [diff] [blame] | 1769 | template PDU_L3_SGSN_MS tr_GMM_DET_REQ_MT(template BIT3 dtt := ?, template boolean power_off := ?) := { |
| 1770 | discriminator := '1000'B, |
| 1771 | tiOrSkip := { |
| 1772 | skipIndicator := '0000'B |
| 1773 | }, |
| 1774 | msgs := { |
| 1775 | gprs_mm := { |
| 1776 | detachRequest_SGSN_MS := { |
| 1777 | messageType := '00000101'B, |
| 1778 | detachType := { dtt, bool2bit_tmpl(power_off) }, |
| 1779 | forceToStandby := ?, |
| 1780 | gmmCause := * |
| 1781 | } |
| 1782 | } |
| 1783 | } |
| 1784 | } |
Harald Welte | eded9ad | 2018-02-17 20:57:34 +0100 | [diff] [blame] | 1785 | |
| 1786 | function ts_ApnTLV(template (omit) octetstring apn) return template (omit) AccessPointNameTLV { |
| 1787 | if (istemplatekind(apn, "omit")) { |
| 1788 | return omit; |
| 1789 | } else { |
| 1790 | var template (omit) AccessPointNameTLV ret := { |
| 1791 | elementIdentifier := '28'O, |
| 1792 | lengthIndicator := 0, /* overwritten */ |
| 1793 | accessPointNameValue := apn |
| 1794 | } |
| 1795 | return ret; |
| 1796 | } |
| 1797 | } |
| 1798 | |
| 1799 | function ts_PcoTLV(template (omit) ProtocolConfigOptionsV pco) |
| 1800 | return template (omit) ProtocolConfigOptionsTLV { |
| 1801 | if (istemplatekind(pco, "omit")) { |
| 1802 | return omit; |
| 1803 | } else { |
| 1804 | var template (omit) ProtocolConfigOptionsTLV ret := { |
| 1805 | elementIdentifier := '27'O, |
| 1806 | lengthIndicator := 0, /* overwritten */ |
| 1807 | protocolConfigOptionsV := pco |
| 1808 | } |
| 1809 | return ret; |
| 1810 | } |
| 1811 | } |
| 1812 | |
| 1813 | template (value) PDU_L3_MS_SGSN ts_SM_ACT_PDP_REQ(BIT3 tid, BIT4 nsapi, BIT4 sapi, QoSV qos, |
| 1814 | PDPAddressV addr, |
| 1815 | template (omit) octetstring apn := omit, |
| 1816 | template (omit) ProtocolConfigOptionsV pco := omit |
| 1817 | ) := { |
| 1818 | discriminator := '0000'B, /* overwritten */ |
| 1819 | tiOrSkip := { |
| 1820 | transactionId := { |
| 1821 | tio := tid, |
| 1822 | tiFlag := '0'B, |
| 1823 | tIExtension := omit |
| 1824 | } |
| 1825 | }, |
| 1826 | msgs := { |
| 1827 | gprs_sm := { |
| 1828 | activatePDPContextRequest := { |
| 1829 | messageType := '00000000'B, /* overwritten */ |
| 1830 | requestedNSAPI := { nsapi, '0000'B }, |
| 1831 | requestedLLCSAPI := { sapi, '0000'B }, |
| 1832 | requestedQoS := { |
| 1833 | lengthIndicator := 0, /* overwritten */ |
| 1834 | qoSV := qos |
| 1835 | }, |
| 1836 | requestedPDPaddress := { |
| 1837 | lengthIndicator := 0, /* overwritten */ |
| 1838 | pdpAddressV := addr |
| 1839 | }, |
| 1840 | accessPointName := ts_ApnTLV(apn), |
| 1841 | protocolConfigOpts := ts_PcoTLV(pco), |
| 1842 | requestType := omit, |
| 1843 | deviceProperties := omit, |
| 1844 | nBIFOM_Container := omit |
| 1845 | } |
| 1846 | } |
| 1847 | } |
| 1848 | } |
| 1849 | |
| 1850 | template PDU_L3_SGSN_MS tr_SM_ACT_PDP_REJ(template BIT3 tid := ?, template OCT1 cause := ?) := { |
| 1851 | discriminator := '1010'B, |
| 1852 | tiOrSkip := { |
| 1853 | transactionId := { |
| 1854 | tio := tid, |
| 1855 | tiFlag := '1'B, |
| 1856 | tIExtension := omit |
| 1857 | } |
| 1858 | }, |
| 1859 | msgs := { |
| 1860 | gprs_sm := { |
| 1861 | activatePDPContextReject := { |
Harald Welte | 4aacdd8 | 2018-02-18 21:24:05 +0100 | [diff] [blame] | 1862 | messageType := '01000011'B, |
Harald Welte | eded9ad | 2018-02-17 20:57:34 +0100 | [diff] [blame] | 1863 | smCause := cause, |
| 1864 | protocolConfigOpts := *, |
| 1865 | backOffTimer := *, |
| 1866 | reAttemptIndicator := *, |
| 1867 | nBIFOM_Container := * |
| 1868 | } |
| 1869 | } |
| 1870 | } |
| 1871 | } |
| 1872 | |
| 1873 | template PDU_L3_SGSN_MS tr_SM_ACT_PDP_ACCEPT(template BIT3 tid := ?, template BIT4 sapi := ?, |
| 1874 | template QoSV qos := ?) |
| 1875 | := { |
| 1876 | discriminator := '1010'B, |
| 1877 | tiOrSkip := { |
| 1878 | transactionId := { |
| 1879 | tio := tid, |
| 1880 | tiFlag := '1'B, |
| 1881 | tIExtension := omit |
| 1882 | } |
| 1883 | }, |
| 1884 | msgs := { |
| 1885 | gprs_sm := { |
| 1886 | activatePDPContextAccept := { |
| 1887 | messageType := '01000010'B, |
| 1888 | negotiatedLLCSAPI := { sapi, '0000'B }, |
| 1889 | negotiatedQoS := { |
| 1890 | lengthIndicator := ?, |
| 1891 | qoSV := qos |
| 1892 | }, |
| 1893 | radioPriority := ?, |
| 1894 | spare := '0000'B, |
| 1895 | pdpAddress := *, |
| 1896 | protocolConfigOpts := *, |
| 1897 | packetFlowID := *, |
| 1898 | sMCause2 := *, |
| 1899 | connectivityType := *, |
| 1900 | wLANOffloadIndication := *, |
| 1901 | nBIFOM_Container := * |
| 1902 | } |
| 1903 | } |
| 1904 | } |
| 1905 | } |
| 1906 | |
Harald Welte | 6f20316 | 2018-02-18 22:04:55 +0100 | [diff] [blame] | 1907 | template (value) PDU_L3_MS_SGSN ts_SM_DEACT_PDP_REQ_MO(BIT3 tid, OCT1 cause, boolean tdown := false, |
| 1908 | template (omit) ProtocolConfigOptionsV pco := omit |
| 1909 | ) := { |
| 1910 | discriminator := '0000'B, /* overwritten */ |
| 1911 | tiOrSkip := { |
| 1912 | transactionId := { |
| 1913 | tio := tid, |
| 1914 | tiFlag := '0'B, |
| 1915 | tIExtension := omit |
| 1916 | } |
| 1917 | }, |
| 1918 | msgs := { |
| 1919 | gprs_sm := { |
| 1920 | deactivatePDPContextRequest := { |
| 1921 | messageType := '00000000'B, /* overwritten */ |
| 1922 | smCause := cause, |
| 1923 | tearDownIndicator := { |
| 1924 | tearDownIndicatorV := { |
| 1925 | tdi_flag := bool2bit(tdown), |
| 1926 | spare := '000'B |
| 1927 | }, |
| 1928 | elementIdentifier := '1001'B |
| 1929 | }, |
| 1930 | protocolConfigOpts := ts_PcoTLV(pco), |
| 1931 | mBMSprotocolConfigOptions := omit, |
| 1932 | t3396 := omit, |
| 1933 | wLANOffloadIndication := omit, |
| 1934 | nBIFOM_Container := omit |
| 1935 | } |
| 1936 | } |
| 1937 | } |
| 1938 | } |
| 1939 | |
Harald Welte | 57b9b7f | 2018-02-18 22:28:13 +0100 | [diff] [blame] | 1940 | template (value) PDU_L3_SGSN_MS ts_SM_DEACT_PDP_REQ_MT(BIT3 tid, OCT1 cause, boolean tdown := false, |
| 1941 | template (omit) ProtocolConfigOptionsV pco := omit |
| 1942 | ) := { |
| 1943 | discriminator := '0000'B, /* overwritten */ |
| 1944 | tiOrSkip := { |
| 1945 | transactionId := { |
| 1946 | tio := tid, |
| 1947 | tiFlag := '1'B, |
| 1948 | tIExtension := omit |
| 1949 | } |
| 1950 | }, |
| 1951 | msgs := { |
| 1952 | gprs_sm := { |
| 1953 | deactivatePDPContextRequest := { |
| 1954 | messageType := '00000000'B, /* overwritten */ |
| 1955 | smCause := cause, |
| 1956 | tearDownIndicator := { |
| 1957 | tearDownIndicatorV := { |
| 1958 | tdi_flag := bool2bit(tdown), |
| 1959 | spare := '000'B |
| 1960 | }, |
| 1961 | elementIdentifier := '1001'B |
| 1962 | }, |
| 1963 | protocolConfigOpts := ts_PcoTLV(pco), |
| 1964 | mBMSprotocolConfigOptions := omit, |
| 1965 | t3396 := omit, |
| 1966 | wLANOffloadIndication := omit, |
| 1967 | nBIFOM_Container := omit |
| 1968 | } |
| 1969 | } |
| 1970 | } |
| 1971 | } |
| 1972 | |
| 1973 | template PDU_L3_SGSN_MS tr_SM_DEACT_PDP_REQ_MT(template BIT3 tid, template OCT1 cause, |
| 1974 | template boolean tdown := false, |
| 1975 | template (omit) ProtocolConfigOptionsV pco := omit |
| 1976 | ) := { |
| 1977 | discriminator := '0000'B, /* overwritten */ |
| 1978 | tiOrSkip := { |
| 1979 | transactionId := { |
| 1980 | tio := tid, |
| 1981 | tiFlag := '1'B, |
| 1982 | tIExtension := omit |
| 1983 | } |
| 1984 | }, |
| 1985 | msgs := { |
| 1986 | gprs_sm := { |
| 1987 | deactivatePDPContextRequest := { |
| 1988 | messageType := '00000000'B, /* overwritten */ |
| 1989 | smCause := cause, |
| 1990 | tearDownIndicator := { |
| 1991 | tearDownIndicatorV := { |
| 1992 | tdi_flag := bool2bit_tmpl(tdown), |
| 1993 | spare := '000'B |
| 1994 | }, |
| 1995 | elementIdentifier := '1001'B |
| 1996 | }, |
| 1997 | protocolConfigOpts := *, |
| 1998 | mBMSprotocolConfigOptions := *, |
| 1999 | t3396 := *, |
| 2000 | wLANOffloadIndication := *, |
| 2001 | nBIFOM_Container := * |
| 2002 | } |
| 2003 | } |
| 2004 | } |
| 2005 | } |
| 2006 | |
| 2007 | |
Harald Welte | 6f20316 | 2018-02-18 22:04:55 +0100 | [diff] [blame] | 2008 | template PDU_L3_SGSN_MS tr_SM_DEACT_PDP_ACCEPT_MT(template BIT3 tid := ?) |
| 2009 | := { |
| 2010 | discriminator := '1010'B, |
| 2011 | tiOrSkip := { |
| 2012 | transactionId := { |
| 2013 | tio := tid, |
| 2014 | tiFlag := '1'B, |
| 2015 | tIExtension := omit |
| 2016 | } |
| 2017 | }, |
| 2018 | msgs := { |
| 2019 | gprs_sm := { |
| 2020 | deactivatePDPContextAccept := { |
| 2021 | messageType := '01000111'B, |
| 2022 | protocolConfigOpts := *, |
| 2023 | mBMSprotocolConfigOptions := *, |
| 2024 | nBIFOM_Container := * |
| 2025 | } |
| 2026 | } |
| 2027 | } |
| 2028 | } |
| 2029 | |
Harald Welte | 57b9b7f | 2018-02-18 22:28:13 +0100 | [diff] [blame] | 2030 | template PDU_L3_MS_SGSN tr_SM_DEACT_PDP_ACCEPT_MO(template BIT3 tid := ?) |
| 2031 | := { |
| 2032 | discriminator := '1010'B, |
| 2033 | tiOrSkip := { |
| 2034 | transactionId := { |
| 2035 | tio := tid, |
| 2036 | tiFlag := '0'B, |
| 2037 | tIExtension := omit |
| 2038 | } |
| 2039 | }, |
| 2040 | msgs := { |
| 2041 | gprs_sm := { |
| 2042 | deactivatePDPContextAccept := { |
| 2043 | messageType := '01000111'B, |
| 2044 | protocolConfigOpts := *, |
| 2045 | mBMSprotocolConfigOptions := *, |
| 2046 | nBIFOM_Container := * |
| 2047 | } |
| 2048 | } |
| 2049 | } |
| 2050 | } |
| 2051 | |
| 2052 | template (value) PDU_L3_MS_SGSN ts_SM_DEACT_PDP_ACCEPT_MO(BIT3 tid) |
| 2053 | := { |
| 2054 | discriminator := '1010'B, |
| 2055 | tiOrSkip := { |
| 2056 | transactionId := { |
| 2057 | tio := tid, |
| 2058 | tiFlag := '0'B, |
| 2059 | tIExtension := omit |
| 2060 | } |
| 2061 | }, |
| 2062 | msgs := { |
| 2063 | gprs_sm := { |
| 2064 | deactivatePDPContextAccept := { |
| 2065 | messageType := '01000111'B, |
| 2066 | protocolConfigOpts := omit, |
| 2067 | mBMSprotocolConfigOptions := omit, |
| 2068 | nBIFOM_Container := omit |
| 2069 | } |
| 2070 | } |
| 2071 | } |
| 2072 | } |
| 2073 | |
Harald Welte | eded9ad | 2018-02-17 20:57:34 +0100 | [diff] [blame] | 2074 | |
| 2075 | |
Harald Welte | e5695f5 | 2018-02-16 14:46:15 +0100 | [diff] [blame] | 2076 | private function f_concat_pad(integer tot_len, hexstring prefix, integer suffix) return hexstring { |
| 2077 | var integer suffix_len := tot_len - lengthof(prefix); |
| 2078 | var charstring suffix_ch := int2str(suffix); |
| 2079 | var integer pad_len := suffix_len - lengthof(suffix_ch); |
| 2080 | |
| 2081 | return prefix & int2hex(0, pad_len) & str2hex(suffix_ch); |
| 2082 | } |
| 2083 | |
| 2084 | function f_gen_imei(integer suffix) return hexstring { |
| 2085 | return f_concat_pad(15, '49999'H, suffix); |
| 2086 | } |
| 2087 | |
| 2088 | function f_gen_imsi(integer suffix) return hexstring { |
| 2089 | return f_concat_pad(15, '26242'H, suffix); |
| 2090 | } |
| 2091 | |
| 2092 | function f_gen_msisdn(integer suffix) return hexstring { |
| 2093 | return f_concat_pad(12, '49123'H, suffix); |
| 2094 | } |
| 2095 | |
| 2096 | |
Harald Welte | cb6cc33 | 2018-01-21 13:59:08 +0100 | [diff] [blame] | 2097 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 2098 | } |