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