Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1 | module RANAP_Templates { |
| 2 | |
| 3 | import from General_Types all; |
Daniel Willmann | fc5e17a | 2022-01-28 11:42:40 +0100 | [diff] [blame] | 4 | import from Misc_Helpers all; |
| 5 | import from Native_Functions all; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 6 | |
| 7 | import from RANAP_IEs all; |
| 8 | import from RANAP_CommonDataTypes all; |
| 9 | import from RANAP_Constants all; |
| 10 | import from RANAP_Containers all; |
| 11 | import from RANAP_PDU_Contents all; |
| 12 | import from RANAP_PDU_Descriptions all; |
| 13 | |
| 14 | template (value) Cause ts_RanapCause_om_intervention := { misc := 113 }; |
Harald Welte | 1818834 | 2024-04-04 01:36:56 +0200 | [diff] [blame] | 15 | template (value) Cause ts_RanapCause_nas_normal := { nAS := 83 }; |
| 16 | template (value) Cause ts_RanapCause_radio_conn_lost := { radioNetwork := 46 }; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 17 | |
| 18 | /***************************************************************************************************** |
| 19 | * Reset |
| 20 | *****************************************************************************************************/ |
| 21 | |
| 22 | template (value) RANAP_PDU |
| 23 | ts_RANAP_Reset(template (value) Cause cause, template (value) CN_DomainIndicator dom, |
| 24 | template (omit) Reset.protocolExtensions exts := omit) := { |
| 25 | initiatingMessage := { |
| 26 | procedureCode := id_Reset, |
| 27 | criticality := reject, |
| 28 | value_ := { |
| 29 | Reset := { |
| 30 | protocolIEs := { |
| 31 | { |
| 32 | id := id_Cause, |
| 33 | criticality := ignore, |
| 34 | value_ := { |
| 35 | cause := cause |
| 36 | } |
| 37 | }, { |
| 38 | id := id_CN_DomainIndicator, |
| 39 | criticality := reject, |
| 40 | value_ := { |
| 41 | cN_DomainIndicator := dom |
| 42 | } |
| 43 | } |
| 44 | }, |
| 45 | protocolExtensions := exts |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | template RANAP_PDU |
| 51 | tr_RANAP_Reset(template Cause cause := ?, template CN_DomainIndicator dom := ?, |
| 52 | template Reset.protocolExtensions exts := *) := { |
| 53 | initiatingMessage := { |
| 54 | procedureCode := id_Reset, |
| 55 | criticality := reject, |
| 56 | value_ := { |
| 57 | Reset := { |
| 58 | protocolIEs := { |
| 59 | { |
| 60 | id := id_Cause, |
| 61 | criticality := ignore, |
| 62 | value_ := { |
| 63 | cause := cause |
| 64 | } |
| 65 | }, { |
| 66 | id := id_CN_DomainIndicator, |
| 67 | criticality := reject, |
| 68 | value_ := { |
| 69 | cN_DomainIndicator := dom |
| 70 | } |
| 71 | }, * |
| 72 | }, |
| 73 | protocolExtensions := exts |
| 74 | } |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | template (value) RANAP_PDU |
| 80 | ts_RANAP_ResetAck(template (value) CN_DomainIndicator dom, |
| 81 | template (omit) ResetAcknowledge.protocolExtensions exts := omit) := { |
| 82 | successfulOutcome := { |
| 83 | procedureCode := id_Reset, |
| 84 | criticality := reject, |
| 85 | value_ := { |
| 86 | ResetAcknowledge := { |
| 87 | protocolIEs := { |
| 88 | { |
| 89 | id := id_CN_DomainIndicator, |
| 90 | criticality := reject, |
| 91 | value_ := { |
| 92 | cN_DomainIndicator := dom |
| 93 | } |
| 94 | } |
| 95 | }, |
| 96 | protocolExtensions := exts |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | template RANAP_PDU |
| 102 | tr_RANAP_ResetAck(template CN_DomainIndicator dom := ?, |
| 103 | template ResetAcknowledge.protocolExtensions exts := *) := { |
| 104 | successfulOutcome := { |
| 105 | procedureCode := id_Reset, |
| 106 | criticality := reject, |
| 107 | value_ := { |
| 108 | ResetAcknowledge := { |
| 109 | protocolIEs := { |
| 110 | { |
| 111 | id := id_CN_DomainIndicator, |
| 112 | criticality := reject, |
| 113 | value_ := { |
| 114 | cN_DomainIndicator := dom |
| 115 | } |
| 116 | }, * |
| 117 | }, |
| 118 | protocolExtensions := exts |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | /***************************************************************************************************** |
| 125 | * Security Mode Control |
| 126 | *****************************************************************************************************/ |
| 127 | |
| 128 | template (value) RANAP_PDU |
| 129 | ts_RANAP_SecurityModeCmd(template (value) PermittedIntegrityProtectionAlgorithms uia_algs, |
| 130 | template (value) IntegrityProtectionKey uia_key, |
| 131 | template (value) KeyStatus key_sts, |
| 132 | template (omit) SecurityModeCommand.protocolExtensions exts := omit) := { |
| 133 | initiatingMessage := { |
| 134 | procedureCode := id_SecurityModeControl, |
| 135 | criticality := reject, |
| 136 | value_ := { |
| 137 | securityModeCommand := { |
| 138 | protocolIEs := { |
| 139 | { |
| 140 | id := id_IntegrityProtectionInformation, |
| 141 | criticality := reject, |
| 142 | value_ := { |
| 143 | integrityProtectionInformation := { |
| 144 | permittedAlgorithms := uia_algs, |
| 145 | key := uia_key, |
| 146 | iE_Extensions := omit |
| 147 | } |
| 148 | } |
| 149 | }, { |
| 150 | id := id_KeyStatus, |
| 151 | criticality := reject, |
| 152 | value_ := { |
| 153 | keyStatus := key_sts |
| 154 | } |
| 155 | } |
| 156 | }, |
| 157 | protocolExtensions := exts |
| 158 | } |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | template RANAP_PDU |
| 163 | tr_RANAP_SecurityModeCmd(template PermittedIntegrityProtectionAlgorithms uia_algs, |
| 164 | template IntegrityProtectionKey uia_key, |
| 165 | template KeyStatus key_sts, |
| 166 | template SecurityModeCommand.protocolExtensions exts := *) := { |
| 167 | initiatingMessage := { |
| 168 | procedureCode := id_SecurityModeControl, |
| 169 | criticality := reject, |
| 170 | value_ := { |
| 171 | securityModeCommand := { |
| 172 | protocolIEs := { |
| 173 | { |
| 174 | id := id_IntegrityProtectionInformation, |
| 175 | criticality := reject, |
| 176 | value_ := { |
| 177 | integrityProtectionInformation := { |
| 178 | permittedAlgorithms := uia_algs, |
| 179 | key := uia_key, |
| 180 | iE_Extensions := * |
| 181 | } |
| 182 | } |
| 183 | }, { |
| 184 | id := id_KeyStatus, |
| 185 | criticality := reject, |
| 186 | value_ := { |
| 187 | keyStatus := key_sts |
| 188 | } |
| 189 | } |
| 190 | }, |
| 191 | protocolExtensions := exts |
| 192 | } |
| 193 | } |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | template (value) RANAP_PDU |
| 198 | ts_RANAP_SecurityModeCmdEnc(template (value) PermittedIntegrityProtectionAlgorithms uia_algs, |
| 199 | template (value) IntegrityProtectionKey uia_key, |
| 200 | template (value) KeyStatus key_sts, |
| 201 | template (value) PermittedEncryptionAlgorithms uea_algs, |
| 202 | template (value) EncryptionKey uea_key, |
| 203 | template (omit) SecurityModeCommand.protocolExtensions exts := omit) := { |
| 204 | initiatingMessage := { |
| 205 | procedureCode := id_SecurityModeControl, |
| 206 | criticality := reject, |
| 207 | value_ := { |
| 208 | securityModeCommand := { |
| 209 | protocolIEs := { |
| 210 | { |
| 211 | id := id_IntegrityProtectionInformation, |
| 212 | criticality := reject, |
| 213 | value_ := { |
| 214 | integrityProtectionInformation := { |
| 215 | permittedAlgorithms := uia_algs, |
| 216 | key := uia_key, |
| 217 | iE_Extensions := omit |
| 218 | } |
| 219 | } |
| 220 | }, { |
| 221 | id := id_EncryptionInformation, |
| 222 | criticality := ignore, |
| 223 | value_ := { |
| 224 | encryptionInformation := { |
| 225 | permittedAlgorithms := uea_algs, |
| 226 | key := uea_key, |
| 227 | iE_Extensions := omit |
| 228 | } |
| 229 | } |
| 230 | }, { |
| 231 | id := id_KeyStatus, |
| 232 | criticality := reject, |
| 233 | value_ := { |
| 234 | keyStatus := key_sts |
| 235 | } |
| 236 | } |
| 237 | }, |
| 238 | protocolExtensions := exts |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | } |
| 243 | template RANAP_PDU |
| 244 | tr_RANAP_SecurityModeCmdEnc(template PermittedIntegrityProtectionAlgorithms uia_algs, |
| 245 | template IntegrityProtectionKey uia_key, |
| 246 | template KeyStatus key_sts, |
| 247 | template PermittedEncryptionAlgorithms uea_algs, |
| 248 | template EncryptionKey uea_key, |
| 249 | template SecurityModeCommand.protocolExtensions exts := *) := { |
| 250 | initiatingMessage := { |
| 251 | procedureCode := id_SecurityModeControl, |
| 252 | criticality := reject, |
| 253 | value_ := { |
| 254 | securityModeCommand := { |
| 255 | protocolIEs := { |
| 256 | { |
| 257 | id := id_IntegrityProtectionInformation, |
| 258 | criticality := reject, |
| 259 | value_ := { |
| 260 | integrityProtectionInformation := { |
| 261 | permittedAlgorithms := uia_algs, |
| 262 | key := uia_key, |
| 263 | iE_Extensions := * |
| 264 | } |
| 265 | } |
| 266 | }, { |
| 267 | id := id_EncryptionInformation, |
| 268 | criticality := ignore, |
| 269 | value_ := { |
| 270 | encryptionInformation := { |
| 271 | permittedAlgorithms := uea_algs, |
| 272 | key := uea_key, |
| 273 | iE_Extensions := * |
| 274 | } |
| 275 | } |
| 276 | }, { |
| 277 | id := id_KeyStatus, |
| 278 | criticality := reject, |
| 279 | value_ := { |
| 280 | keyStatus := key_sts |
| 281 | } |
| 282 | } |
| 283 | }, |
| 284 | protocolExtensions := exts |
| 285 | } |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | template (value) RANAP_PDU |
| 291 | ts_RANAP_SecurityModeComplete(template (value) IntegrityProtectionAlgorithm uia_alg, |
| 292 | template (omit) SecurityModeComplete.protocolExtensions exts := omit) := { |
| 293 | successfulOutcome := { |
| 294 | procedureCode := id_SecurityModeControl, |
| 295 | criticality := reject, |
| 296 | value_ := { |
| 297 | securityModeComplete := { |
| 298 | protocolIEs := { |
| 299 | { |
| 300 | id := id_ChosenIntegrityProtectionAlgorithm, |
| 301 | criticality := reject, |
| 302 | value_ := { |
| 303 | chosenIntegrityProtectionAlgorithm := uia_alg |
| 304 | } |
| 305 | } |
| 306 | }, |
| 307 | protocolExtensions := exts |
| 308 | } |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | template RANAP_PDU |
| 313 | tr_RANAP_SecurityModeComplete(template IntegrityProtectionAlgorithm uia_alg, |
| 314 | template SecurityModeComplete.protocolExtensions exts := *) := { |
| 315 | successfulOutcome := { |
| 316 | procedureCode := id_SecurityModeControl, |
| 317 | criticality := reject, |
| 318 | value_ := { |
| 319 | securityModeComplete := { |
| 320 | protocolIEs := { |
| 321 | { |
| 322 | id := id_ChosenIntegrityProtectionAlgorithm, |
| 323 | criticality := reject, |
| 324 | value_ := { |
| 325 | chosenIntegrityProtectionAlgorithm := uia_alg |
| 326 | } |
| 327 | } |
| 328 | }, |
| 329 | protocolExtensions := exts |
| 330 | } |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | template (value) RANAP_PDU |
| 336 | ts_RANAP_SecurityModeCompleteEnc(template (value) IntegrityProtectionAlgorithm uia_alg, |
| 337 | template (value) EncryptionAlgorithm uea_alg, |
| 338 | template (omit) SecurityModeComplete.protocolExtensions exts := omit) := { |
| 339 | successfulOutcome := { |
| 340 | procedureCode := id_SecurityModeControl, |
| 341 | criticality := reject, |
| 342 | value_ := { |
| 343 | securityModeComplete := { |
| 344 | protocolIEs := { |
| 345 | { |
| 346 | id := id_ChosenIntegrityProtectionAlgorithm, |
| 347 | criticality := reject, |
| 348 | value_ := { |
| 349 | chosenIntegrityProtectionAlgorithm := uia_alg |
| 350 | } |
| 351 | }, { |
| 352 | id := id_ChosenEncryptionAlgorithm, |
| 353 | criticality := ignore, |
| 354 | value_ := { |
| 355 | chosenEncryptionAlgorithm := uea_alg |
| 356 | } |
| 357 | } |
| 358 | }, |
| 359 | protocolExtensions := exts |
| 360 | } |
| 361 | } |
| 362 | } |
| 363 | } |
| 364 | template RANAP_PDU |
| 365 | tr_RANAP_SecurityModeCompleteEnc(template IntegrityProtectionAlgorithm uia_alg, |
| 366 | template EncryptionAlgorithm uea_alg, |
| 367 | template SecurityModeComplete.protocolExtensions exts := *) := { |
| 368 | successfulOutcome := { |
| 369 | procedureCode := id_SecurityModeControl, |
| 370 | criticality := reject, |
| 371 | value_ := { |
| 372 | securityModeComplete := { |
| 373 | protocolIEs := { |
| 374 | { |
| 375 | id := id_ChosenIntegrityProtectionAlgorithm, |
| 376 | criticality := reject, |
| 377 | value_ := { |
| 378 | chosenIntegrityProtectionAlgorithm := uia_alg |
| 379 | } |
| 380 | }, { |
| 381 | id := id_ChosenEncryptionAlgorithm, |
| 382 | criticality := ignore, |
| 383 | value_ := { |
| 384 | chosenEncryptionAlgorithm := uea_alg |
| 385 | } |
| 386 | } |
| 387 | }, |
| 388 | protocolExtensions := exts |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | template (value) RANAP_PDU |
| 395 | ts_RANAP_SecurityModeReject(template (value) Cause cause, |
| 396 | template (omit) SecurityModeReject.protocolExtensions exts := omit) := { |
| 397 | unsuccessfulOutcome := { |
| 398 | procedureCode := id_SecurityModeControl, |
| 399 | criticality := reject, |
| 400 | value_ := { |
| 401 | securityModeReject := { |
| 402 | protocolIEs := { |
| 403 | { |
| 404 | id := id_Cause, |
| 405 | criticality := ignore, |
| 406 | value_ := { |
| 407 | cause := cause |
| 408 | } |
| 409 | } |
| 410 | }, |
| 411 | protocolExtensions := exts |
| 412 | } |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | template RANAP_PDU |
| 417 | tr_RANAP_SecurityModeReject(template Cause cause, |
| 418 | template SecurityModeReject.protocolExtensions exts := *) := { |
| 419 | unsuccessfulOutcome := { |
| 420 | procedureCode := id_SecurityModeControl, |
| 421 | criticality := reject, |
| 422 | value_ := { |
| 423 | securityModeReject := { |
| 424 | protocolIEs := { |
| 425 | { |
| 426 | id := id_Cause, |
| 427 | criticality := ignore, |
| 428 | value_ := { |
| 429 | cause := cause |
| 430 | } |
| 431 | } |
| 432 | }, |
| 433 | protocolExtensions := exts |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | |
| 440 | |
| 441 | /***************************************************************************************************** |
| 442 | * Iu Release Request |
| 443 | *****************************************************************************************************/ |
| 444 | |
| 445 | template (value) RANAP_PDU |
| 446 | ts_RANAP_IuReleaseRequest(template (value) Cause cause, |
| 447 | template (omit) Iu_ReleaseRequest.protocolExtensions exts := omit) := { |
| 448 | initiatingMessage := { |
| 449 | procedureCode := id_Iu_ReleaseRequest, |
| 450 | criticality := ignore, |
| 451 | value_ := { |
| 452 | iu_ReleaseRequest := { |
| 453 | protocolIEs := { |
| 454 | { |
| 455 | id := id_Cause, |
Daniel Willmann | cd8b71c | 2022-02-22 16:47:44 +0100 | [diff] [blame] | 456 | criticality := ignore, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 457 | value_ := { |
| 458 | cause := cause |
| 459 | } |
| 460 | } |
| 461 | }, |
| 462 | protocolExtensions := exts |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | } |
| 467 | template RANAP_PDU |
| 468 | tr_RANAP_IuReleaseRequest(template Cause cause, |
| 469 | template Iu_ReleaseRequest.protocolExtensions exts := *) := { |
| 470 | initiatingMessage := { |
| 471 | procedureCode := id_Iu_ReleaseRequest, |
| 472 | criticality := ignore, |
| 473 | value_ := { |
| 474 | iu_ReleaseRequest := { |
| 475 | protocolIEs := { |
| 476 | { |
| 477 | id := id_Cause, |
Daniel Willmann | cd8b71c | 2022-02-22 16:47:44 +0100 | [diff] [blame] | 478 | criticality := ignore, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 479 | value_ := { |
| 480 | cause := cause |
| 481 | } |
| 482 | } |
| 483 | }, |
| 484 | protocolExtensions := exts |
| 485 | } |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | /***************************************************************************************************** |
| 491 | * RAB Release |
| 492 | *****************************************************************************************************/ |
| 493 | |
Daniel Willmann | fc5e17a | 2022-01-28 11:42:40 +0100 | [diff] [blame] | 494 | template (value) RAB_ID |
| 495 | t_RAB_id(integer rab_id) := int2bit(rab_id, 8); |
| 496 | |
| 497 | template (value) TransportLayerAddress ts_RAB_TLA4(OCT4 ip) := hex2bit('350001'H & oct2hex(ip) & '00000000000000000000000000'H); |
| 498 | template (value) TransportLayerAddress ts_RAB_TLA6(OCT16 ip) := hex2bit('350000'H & oct2hex(ip) & '00'H); |
| 499 | function f_ts_RAB_TLA(charstring addr) return template (value) TransportLayerAddress { |
| 500 | if (f_addr_is_ipv6(addr)) { |
| 501 | var OCT16 ip6 := f_inet6_addr(addr); |
| 502 | return ts_RAB_TLA6(ip6); |
| 503 | } else { |
| 504 | var OCT4 ip4 := f_inet_addr(addr); |
| 505 | return ts_RAB_TLA4(ip4); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | template (value) BindingID |
| 510 | t_RAB_binding_port(integer prt) := int2oct(prt, 2) & '0000'O; |
| 511 | |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 512 | template (value) RANAP_PDU |
| 513 | ts_RANAP_RabReleaseRequest(template (value) RAB_ID rab_id, template (value) Cause cause, |
| 514 | template (omit) RAB_ReleaseRequest.protocolExtensions exts := omit) := { |
| 515 | initiatingMessage := { |
| 516 | procedureCode := id_RAB_ReleaseRequest, |
| 517 | criticality := ignore, |
| 518 | value_ := { |
| 519 | rAB_ReleaseRequest := { |
| 520 | protocolIEs := { |
| 521 | { |
| 522 | id := id_RAB_ReleaseList, |
| 523 | criticality := ignore, |
| 524 | value_ := { |
| 525 | rAB_ReleaseList := {{ |
| 526 | { |
| 527 | id := id_RAB_ReleaseItem, |
| 528 | criticality := ignore, |
| 529 | value_ := { |
| 530 | rAB_ReleaseItem := { |
| 531 | rAB_ID := rab_id, |
| 532 | cause := cause, |
| 533 | iE_Extensions := omit |
| 534 | } |
| 535 | } |
| 536 | } |
| 537 | }} |
| 538 | } |
| 539 | } |
| 540 | }, |
| 541 | protocolExtensions := exts |
| 542 | } |
| 543 | } |
| 544 | } |
| 545 | } |
| 546 | template RANAP_PDU |
Daniel Willmann | fc5e17a | 2022-01-28 11:42:40 +0100 | [diff] [blame] | 547 | tr_RANAP_RabReleaseRequest(template (present) RAB_ID rab_id, template Cause cause, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 548 | template RAB_ReleaseRequest.protocolExtensions exts := *) := { |
| 549 | initiatingMessage := { |
| 550 | procedureCode := id_RAB_ReleaseRequest, |
| 551 | criticality := ignore, |
| 552 | value_ := { |
| 553 | rAB_ReleaseRequest := { |
| 554 | protocolIEs := { |
| 555 | { |
| 556 | id := id_RAB_ReleaseList, |
| 557 | criticality := ignore, |
| 558 | value_ := { |
| 559 | rAB_ReleaseList := {{ |
| 560 | { |
| 561 | id := id_RAB_ReleaseItem, |
| 562 | criticality := ignore, |
| 563 | value_ := { |
| 564 | rAB_ReleaseItem := { |
| 565 | rAB_ID := rab_id, |
| 566 | cause := cause, |
| 567 | iE_Extensions := * |
| 568 | } |
| 569 | } |
| 570 | } |
| 571 | }} |
| 572 | } |
| 573 | } |
| 574 | }, |
| 575 | protocolExtensions := exts |
| 576 | } |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | |
| 582 | /***************************************************************************************************** |
| 583 | * Iu Release |
| 584 | *****************************************************************************************************/ |
| 585 | |
| 586 | template (value) RANAP_PDU |
| 587 | ts_RANAP_IuReleaseCommand(template (value) Cause cause, |
| 588 | template (omit) Iu_ReleaseCommand.protocolExtensions exts := omit) := { |
| 589 | initiatingMessage := { |
| 590 | procedureCode := id_Iu_Release, |
| 591 | criticality := reject, |
| 592 | value_ := { |
| 593 | iu_ReleaseCommand := { |
| 594 | protocolIEs := { |
| 595 | { |
| 596 | id := id_Cause, |
| 597 | criticality := ignore, |
| 598 | value_ := { |
| 599 | cause := cause |
| 600 | } |
| 601 | } |
| 602 | }, |
| 603 | protocolExtensions := exts |
| 604 | } |
| 605 | } |
| 606 | } |
| 607 | } |
| 608 | template RANAP_PDU |
| 609 | tr_RANAP_IuReleaseCommand(template Cause cause, |
| 610 | template Iu_ReleaseCommand.protocolExtensions exts := *) := { |
| 611 | initiatingMessage := { |
| 612 | procedureCode := id_Iu_Release, |
| 613 | criticality := reject, |
| 614 | value_ := { |
| 615 | iu_ReleaseCommand := { |
| 616 | protocolIEs := { |
| 617 | { |
| 618 | id := id_Cause, |
| 619 | criticality := ignore, |
| 620 | value_ := { |
| 621 | cause := cause |
| 622 | } |
| 623 | } |
| 624 | }, |
| 625 | protocolExtensions := exts |
| 626 | } |
| 627 | } |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | template (value) RANAP_PDU |
| 632 | ts_RANAP_IuReleaseComplete(template (omit) Iu_ReleaseComplete.protocolIEs ies := {}, |
| 633 | template (omit) Iu_ReleaseComplete.protocolExtensions exts := omit) := { |
| 634 | successfulOutcome := { |
| 635 | procedureCode := id_Iu_Release, |
| 636 | criticality := reject, |
| 637 | value_ := { |
| 638 | iu_ReleaseComplete := { |
| 639 | protocolIEs := ies, |
| 640 | protocolExtensions := exts |
| 641 | } |
| 642 | } |
| 643 | } |
| 644 | } |
| 645 | template RANAP_PDU |
| 646 | tr_RANAP_IuReleaseComplete(template Iu_ReleaseComplete.protocolIEs ies := *, |
| 647 | template Iu_ReleaseComplete.protocolExtensions exts := *) := { |
| 648 | successfulOutcome := { |
| 649 | procedureCode := id_Iu_Release, |
| 650 | criticality := reject, |
| 651 | value_ := { |
| 652 | iu_ReleaseComplete:= { |
| 653 | protocolIEs := ies, |
| 654 | protocolExtensions := exts |
| 655 | } |
| 656 | } |
| 657 | } |
| 658 | } |
| 659 | |
| 660 | /***************************************************************************************************** |
| 661 | * Paging |
| 662 | *****************************************************************************************************/ |
| 663 | |
| 664 | template (value) RANAP_PDU |
| 665 | ts_RANAP_Paging(template (value) CN_DomainIndicator dom, template (value) IMSI imsi, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 666 | template (omit) Paging.protocolExtensions exts := omit) := { |
| 667 | initiatingMessage := { |
| 668 | procedureCode := id_Paging, |
| 669 | criticality := ignore, |
| 670 | value_ := { |
| 671 | paging := { |
| 672 | protocolIEs := { |
| 673 | { |
| 674 | id := id_CN_DomainIndicator, |
| 675 | criticality := ignore, |
| 676 | value_ := { |
| 677 | cN_DomainIndicator := dom |
| 678 | } |
| 679 | }, { |
| 680 | id := id_PermanentNAS_UE_ID, |
| 681 | criticality := ignore, |
| 682 | value_ := { |
| 683 | permanentNAS_UE_ID := { |
| 684 | iMSI := imsi |
| 685 | } |
| 686 | } |
| 687 | } |
| 688 | }, |
| 689 | protocolExtensions := exts |
| 690 | } |
| 691 | } |
| 692 | } |
| 693 | } |
| 694 | template RANAP_PDU |
| 695 | tr_RANAP_Paging(template CN_DomainIndicator dom, template IMSI imsi, |
| 696 | template Paging.protocolExtensions exts := *) := { |
| 697 | initiatingMessage := { |
| 698 | procedureCode := id_Paging, |
| 699 | criticality := ignore, |
| 700 | value_ := { |
| 701 | paging := { |
| 702 | protocolIEs := { |
| 703 | { |
| 704 | id := id_CN_DomainIndicator, |
| 705 | criticality := ignore, |
| 706 | value_ := { |
| 707 | cN_DomainIndicator := dom |
| 708 | } |
| 709 | }, { |
| 710 | id := id_PermanentNAS_UE_ID, |
| 711 | criticality := ignore, |
| 712 | value_ := { |
| 713 | permanentNAS_UE_ID := { |
| 714 | iMSI := imsi |
| 715 | } |
| 716 | } |
| 717 | }, * |
| 718 | }, |
| 719 | protocolExtensions := exts |
| 720 | } |
| 721 | } |
| 722 | } |
| 723 | } |
| 724 | |
Neels Hofmeyr | b1bf16d | 2023-06-27 02:10:04 +0200 | [diff] [blame] | 725 | template (value) TemporaryUE_ID ts_RANAP_TemporaryUE_ID_TMSI(octetstring tmsi) := { |
| 726 | tMSI := tmsi |
| 727 | } |
| 728 | |
| 729 | template (value) RANAP_PDU |
| 730 | ts_RANAP_Paging_temp_id(template (value) CN_DomainIndicator dom, template (value) IMSI imsi, |
| 731 | template (value) TemporaryUE_ID temp_id, |
| 732 | template (omit) Paging.protocolExtensions exts := omit) := { |
| 733 | initiatingMessage := { |
| 734 | procedureCode := id_Paging, |
| 735 | criticality := ignore, |
| 736 | value_ := { |
| 737 | paging := { |
| 738 | protocolIEs := { |
| 739 | { |
| 740 | id := id_CN_DomainIndicator, |
| 741 | criticality := ignore, |
| 742 | value_ := { |
| 743 | cN_DomainIndicator := dom |
| 744 | } |
| 745 | }, { |
| 746 | id := id_PermanentNAS_UE_ID, |
| 747 | criticality := ignore, |
| 748 | value_ := { |
| 749 | permanentNAS_UE_ID := { |
| 750 | iMSI := imsi |
| 751 | } |
| 752 | } |
| 753 | }, { |
| 754 | id := id_TemporaryUE_ID, |
| 755 | criticality := ignore, |
| 756 | value_ := { |
| 757 | temporaryUE_ID := temp_id |
| 758 | } |
| 759 | } |
| 760 | }, |
| 761 | protocolExtensions := exts |
| 762 | } |
| 763 | } |
| 764 | } |
| 765 | } |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 766 | |
| 767 | |
| 768 | /***************************************************************************************************** |
| 769 | * Common ID |
| 770 | *****************************************************************************************************/ |
| 771 | |
| 772 | template (value) RANAP_PDU |
| 773 | ts_RANAP_CommonId(template (value) IMSI imsi, |
| 774 | template (omit) CommonID.protocolExtensions exts := omit) := { |
| 775 | initiatingMessage := { |
| 776 | procedureCode := id_CommonID, |
| 777 | criticality := ignore, |
| 778 | value_ := { |
| 779 | commonID := { |
| 780 | protocolIEs := { |
| 781 | { |
| 782 | id := id_PermanentNAS_UE_ID, |
| 783 | criticality := ignore, |
| 784 | value_ := { |
| 785 | permanentNAS_UE_ID := { |
| 786 | iMSI := imsi |
| 787 | } |
| 788 | } |
| 789 | } |
| 790 | }, |
| 791 | protocolExtensions := exts |
| 792 | } |
| 793 | } |
| 794 | } |
| 795 | } |
| 796 | template RANAP_PDU |
| 797 | tr_RANAP_CommonId(template IMSI imsi, |
| 798 | template CommonID.protocolExtensions exts := *) := { |
| 799 | initiatingMessage := { |
| 800 | procedureCode := id_CommonID, |
| 801 | criticality := ignore, |
| 802 | value_ := { |
| 803 | commonID := { |
| 804 | protocolIEs := { |
| 805 | { |
| 806 | id := id_PermanentNAS_UE_ID, |
| 807 | criticality := ignore, |
| 808 | value_ := { |
| 809 | permanentNAS_UE_ID := { |
| 810 | iMSI := imsi |
| 811 | } |
| 812 | } |
| 813 | } |
| 814 | }, |
| 815 | protocolExtensions := exts |
| 816 | } |
| 817 | } |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | /***************************************************************************************************** |
| 822 | * Initial UE Message |
| 823 | *****************************************************************************************************/ |
| 824 | |
| 825 | template (value) RANAP_PDU |
| 826 | ts_RANAP_initialUE_CS(template (value) LAI lai, template (value) SAI sai, |
| 827 | template (value) NAS_PDU nas, |
| 828 | template (value) IuSignallingConnectionIdentifier sigc_id, |
| 829 | template (value) GlobalRNC_ID grnc_id, |
| 830 | template (omit) InitialUE_Message.protocolExtensions exts := omit) := { |
| 831 | initiatingMessage := { |
| 832 | procedureCode := id_InitialUE_Message, |
| 833 | criticality := ignore, |
| 834 | value_ := { |
| 835 | initialUE_Message := { |
| 836 | protocolIEs := { |
| 837 | { |
| 838 | id := id_CN_DomainIndicator, |
| 839 | criticality := ignore, |
| 840 | value_ := { |
| 841 | cN_DomainIndicator := cs_domain |
| 842 | } |
| 843 | }, { |
| 844 | id := id_LAI, |
| 845 | criticality := ignore, |
| 846 | value_ := { |
| 847 | lAI := lai |
| 848 | } |
| 849 | }, { |
| 850 | id := id_SAI, |
| 851 | criticality := ignore, |
| 852 | value_ := { |
| 853 | sAI := sai |
| 854 | } |
| 855 | }, { |
| 856 | id := id_NAS_PDU, |
| 857 | criticality := ignore, |
| 858 | value_ := { |
| 859 | nAS_PDU := nas |
| 860 | } |
| 861 | }, { |
| 862 | id := id_IuSigConId, |
| 863 | criticality := ignore, |
| 864 | value_ := { |
| 865 | iuSignallingConnectionIdentifier := sigc_id |
| 866 | } |
| 867 | }, { |
| 868 | id := id_GlobalRNC_ID, |
| 869 | criticality := ignore, |
| 870 | value_ := { |
| 871 | globalRNC_ID := grnc_id |
| 872 | } |
| 873 | } |
| 874 | }, |
| 875 | protocolExtensions := exts |
| 876 | } |
| 877 | } |
| 878 | } |
| 879 | } |
| 880 | template RANAP_PDU |
| 881 | tr_RANAP_initialUE_CS(template LAI lai, template SAI sai, |
| 882 | template NAS_PDU nas, |
| 883 | template IuSignallingConnectionIdentifier sigc_id, |
| 884 | template GlobalRNC_ID grnc_id, |
| 885 | template InitialUE_Message.protocolExtensions exts := *) := { |
| 886 | initiatingMessage := { |
| 887 | procedureCode := id_InitialUE_Message, |
| 888 | criticality := ignore, |
| 889 | value_ := { |
| 890 | initialUE_Message := { |
| 891 | protocolIEs := { |
| 892 | { |
| 893 | id := id_CN_DomainIndicator, |
| 894 | criticality := ignore, |
| 895 | value_ := { |
| 896 | cN_DomainIndicator := cs_domain |
| 897 | } |
| 898 | }, { |
| 899 | id := id_LAI, |
| 900 | criticality := ignore, |
| 901 | value_ := { |
| 902 | lAI := lai |
| 903 | } |
| 904 | }, { |
| 905 | id := id_SAI, |
| 906 | criticality := ignore, |
| 907 | value_ := { |
| 908 | sAI := sai |
| 909 | } |
| 910 | }, { |
| 911 | id := id_NAS_PDU, |
| 912 | criticality := ignore, |
| 913 | value_ := { |
| 914 | nAS_PDU := nas |
| 915 | } |
| 916 | }, { |
| 917 | id := id_IuSigConId, |
| 918 | criticality := ignore, |
| 919 | value_ := { |
| 920 | iuSignallingConnectionIdentifier := sigc_id |
| 921 | } |
| 922 | }, { |
| 923 | id := id_GlobalRNC_ID, |
| 924 | criticality := ignore, |
| 925 | value_ := { |
| 926 | globalRNC_ID := grnc_id |
| 927 | } |
| 928 | } |
| 929 | }, |
| 930 | protocolExtensions := exts |
| 931 | } |
| 932 | } |
| 933 | } |
| 934 | } |
| 935 | |
| 936 | template (value) RANAP_PDU |
| 937 | ts_RANAP_initialUE_PS(template (value) LAI lai, template (value) RAC rac, template (value) SAI sai, |
| 938 | template (value) NAS_PDU nas, |
| 939 | template (value) IuSignallingConnectionIdentifier sigc_id, |
| 940 | template (value) GlobalRNC_ID grnc_id, |
| 941 | template (omit) InitialUE_Message.protocolExtensions exts := omit) := { |
| 942 | initiatingMessage := { |
| 943 | procedureCode := id_InitialUE_Message, |
| 944 | criticality := ignore, |
| 945 | value_ := { |
| 946 | initialUE_Message := { |
| 947 | protocolIEs := { |
| 948 | { |
| 949 | id := id_CN_DomainIndicator, |
| 950 | criticality := ignore, |
| 951 | value_ := { |
| 952 | cN_DomainIndicator := ps_domain |
| 953 | } |
| 954 | }, { |
| 955 | id := id_LAI, |
| 956 | criticality := ignore, |
| 957 | value_ := { |
| 958 | lAI := lai |
| 959 | } |
| 960 | }, { |
| 961 | id := id_RAC, |
| 962 | criticality := ignore, |
| 963 | value_ := { |
| 964 | rAC := rac |
| 965 | } |
| 966 | }, { |
| 967 | id := id_SAI, |
| 968 | criticality := ignore, |
| 969 | value_ := { |
| 970 | sAI := sai |
| 971 | } |
| 972 | }, { |
| 973 | id := id_NAS_PDU, |
| 974 | criticality := ignore, |
| 975 | value_ := { |
| 976 | nAS_PDU := nas |
| 977 | } |
| 978 | }, { |
| 979 | id := id_IuSigConId, |
| 980 | criticality := ignore, |
| 981 | value_ := { |
| 982 | iuSignallingConnectionIdentifier := sigc_id |
| 983 | } |
| 984 | }, { |
| 985 | id := id_GlobalRNC_ID, |
| 986 | criticality := ignore, |
| 987 | value_ := { |
| 988 | globalRNC_ID := grnc_id |
| 989 | } |
| 990 | } |
| 991 | }, |
| 992 | protocolExtensions := exts |
| 993 | } |
| 994 | } |
| 995 | } |
| 996 | } |
| 997 | template RANAP_PDU |
| 998 | tr_RANAP_initialUE_PS(template LAI lai, template RAC rac, template SAI sai, |
| 999 | template NAS_PDU nas, |
| 1000 | template IuSignallingConnectionIdentifier sigc_id, |
| 1001 | template GlobalRNC_ID grnc_id, |
| 1002 | template InitialUE_Message.protocolExtensions exts := *) := { |
| 1003 | initiatingMessage := { |
| 1004 | procedureCode := id_InitialUE_Message, |
| 1005 | criticality := ignore, |
| 1006 | value_ := { |
| 1007 | initialUE_Message := { |
| 1008 | protocolIEs := { |
| 1009 | { |
| 1010 | id := id_CN_DomainIndicator, |
| 1011 | criticality := ignore, |
| 1012 | value_ := { |
| 1013 | cN_DomainIndicator := ps_domain |
| 1014 | } |
| 1015 | }, { |
| 1016 | id := id_LAI, |
| 1017 | criticality := ignore, |
| 1018 | value_ := { |
| 1019 | lAI := lai |
| 1020 | } |
| 1021 | }, { |
| 1022 | id := id_RAC, |
| 1023 | criticality := ignore, |
| 1024 | value_ := { |
| 1025 | rAC := rac |
| 1026 | } |
| 1027 | }, { |
| 1028 | id := id_SAI, |
| 1029 | criticality := ignore, |
| 1030 | value_ := { |
| 1031 | sAI := sai |
| 1032 | } |
| 1033 | }, { |
| 1034 | id := id_NAS_PDU, |
| 1035 | criticality := ignore, |
| 1036 | value_ := { |
| 1037 | nAS_PDU := nas |
| 1038 | } |
| 1039 | }, { |
| 1040 | id := id_IuSigConId, |
| 1041 | criticality := ignore, |
| 1042 | value_ := { |
| 1043 | iuSignallingConnectionIdentifier := sigc_id |
| 1044 | } |
| 1045 | }, { |
| 1046 | id := id_GlobalRNC_ID, |
| 1047 | criticality := ignore, |
| 1048 | value_ := { |
| 1049 | globalRNC_ID := grnc_id |
| 1050 | } |
| 1051 | } |
| 1052 | }, |
| 1053 | protocolExtensions := exts |
| 1054 | } |
| 1055 | } |
| 1056 | } |
| 1057 | } |
| 1058 | |
| 1059 | /***************************************************************************************************** |
| 1060 | * Direct Transfer |
| 1061 | *****************************************************************************************************/ |
| 1062 | |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1063 | private function f_gen_ts_dt_ies(template (value) NAS_PDU nas, |
| 1064 | template (omit) SAPI sapi, |
| 1065 | template (value) DirectTransfer.protocolIEs opt_ies) |
| 1066 | return DirectTransfer.protocolIEs { |
| 1067 | var DirectTransfer.protocolIEs ies := { |
| 1068 | /* NAS PDU is mandatory */ |
| 1069 | { |
| 1070 | id := id_NAS_PDU, |
| 1071 | criticality := ignore, |
| 1072 | value_ := { |
| 1073 | nAS_PDU := valueof(nas) |
| 1074 | } |
| 1075 | } |
| 1076 | }; |
| 1077 | |
| 1078 | /* Optional IEs, e.g. LAI, RAC, SAI */ |
| 1079 | ies := ies & valueof(opt_ies); |
| 1080 | |
| 1081 | /* Optional SAPI is the last IE */ |
| 1082 | if (isvalue(sapi)) { |
| 1083 | ies := ies & {{ |
| 1084 | id := id_SAPI, |
| 1085 | criticality := ignore, |
| 1086 | value_ := { |
| 1087 | sAPI := valueof(sapi) |
| 1088 | } |
| 1089 | }}; |
| 1090 | } |
| 1091 | |
| 1092 | return ies; |
| 1093 | } |
| 1094 | |
| 1095 | private function f_gen_tr_dt_ies(template NAS_PDU nas, |
| 1096 | template SAPI sapi, |
| 1097 | template DirectTransfer.protocolIEs opt_ies) |
| 1098 | return template DirectTransfer.protocolIEs { |
| 1099 | var template DirectTransfer.protocolIEs ies := { |
| 1100 | /* NAS PDU is mandatory */ |
| 1101 | { |
| 1102 | id := id_NAS_PDU, |
| 1103 | criticality := ignore, |
| 1104 | value_ := { |
| 1105 | nAS_PDU := nas |
| 1106 | } |
| 1107 | } |
| 1108 | }; |
| 1109 | |
| 1110 | /* Optional IEs start from index 1 */ |
| 1111 | var integer idx := 1; |
| 1112 | |
| 1113 | /* Optional IEs, e.g. LAI, RAC, SAI */ |
| 1114 | if (istemplatekind(opt_ies, "*")) { |
| 1115 | ies[idx] := *; |
| 1116 | idx := idx + 1; |
| 1117 | } else if (not istemplatekind(opt_ies, "omit")) { |
| 1118 | for (var integer i := 0; i < lengthof(opt_ies); i := i + 1) { |
| 1119 | ies[idx] := opt_ies[idx]; |
| 1120 | idx := idx + 1; |
| 1121 | } |
| 1122 | } |
| 1123 | |
| 1124 | /* Optional SAPI is the last IE */ |
| 1125 | if (istemplatekind(sapi, "*")) { |
| 1126 | ies[idx] := *; |
| 1127 | } else if (not istemplatekind(sapi, "omit")) { |
| 1128 | ies[idx] := { |
| 1129 | id := id_SAPI, |
| 1130 | criticality := ignore, |
| 1131 | value_ := { |
| 1132 | sAPI := sapi |
| 1133 | } |
| 1134 | }; |
| 1135 | } |
| 1136 | |
| 1137 | return ies; |
| 1138 | } |
| 1139 | |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1140 | template (value) RANAP_PDU |
| 1141 | ts_RANAP_DirectTransfer(template (value) NAS_PDU nas, |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1142 | template (omit) SAPI sapi := omit, |
| 1143 | template (value) DirectTransfer.protocolIEs ies := {}, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1144 | template (omit) DirectTransfer.protocolExtensions exts := omit) := { |
| 1145 | initiatingMessage := { |
| 1146 | procedureCode := id_DirectTransfer, |
| 1147 | criticality := ignore, |
| 1148 | value_ := { |
| 1149 | directTransfer := { |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1150 | protocolIEs := f_gen_ts_dt_ies(nas, sapi, ies), |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1151 | protocolExtensions := exts |
| 1152 | } |
| 1153 | } |
| 1154 | } |
| 1155 | } |
| 1156 | template RANAP_PDU |
| 1157 | tr_RANAP_DirectTransfer(template NAS_PDU nas, |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1158 | template SAPI sapi := *, |
| 1159 | template DirectTransfer.protocolIEs ies := *, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1160 | template DirectTransfer.protocolExtensions exts := *) := { |
| 1161 | initiatingMessage := { |
| 1162 | procedureCode := id_DirectTransfer, |
| 1163 | criticality := ignore, |
| 1164 | value_ := { |
| 1165 | directTransfer := { |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1166 | protocolIEs := f_gen_tr_dt_ies(nas, sapi, ies), |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1167 | protocolExtensions := exts |
| 1168 | } |
| 1169 | } |
| 1170 | } |
| 1171 | } |
| 1172 | |
| 1173 | |
| 1174 | /***************************************************************************************************** |
| 1175 | * RAB Assignment Request |
| 1176 | *****************************************************************************************************/ |
| 1177 | |
| 1178 | template (value) RAB_Parameters ts_RabParams := { |
| 1179 | trafficClass := conversational, |
| 1180 | rAB_AsymmetryIndicator := symmetric_bidirectional, |
| 1181 | maxBitrate := { 12200 }, |
| 1182 | guaranteedBitRate := { 12200 }, |
| 1183 | deliveryOrder := delivery_order_requested, |
| 1184 | maxSDU_Size := 244, |
| 1185 | sDU_Parameters := { |
| 1186 | { |
| 1187 | sDU_ErrorRatio := { mantissa := 1, exponent := 5, iE_Extensions := omit }, |
| 1188 | residualBitErrorRatio := { mantissa := 1, exponent := 6, iE_Extensions := omit }, |
| 1189 | deliveryOfErroneousSDU := yes, |
| 1190 | sDU_FormatInformationParameters := { |
| 1191 | { |
| 1192 | subflowSDU_Size := 81, |
| 1193 | rAB_SubflowCombinationBitRate := omit, |
| 1194 | iE_Extensions := omit |
| 1195 | }, { |
| 1196 | subflowSDU_Size := 39, |
| 1197 | rAB_SubflowCombinationBitRate := omit, |
| 1198 | iE_Extensions := omit |
| 1199 | } |
| 1200 | }, |
| 1201 | iE_Extensions := omit |
| 1202 | }, { |
| 1203 | sDU_ErrorRatio := omit, |
| 1204 | residualBitErrorRatio := { mantissa := 1, exponent := 3, iE_Extensions := omit }, |
| 1205 | deliveryOfErroneousSDU := no_error_detection_consideration, |
| 1206 | sDU_FormatInformationParameters := { |
| 1207 | { |
| 1208 | subflowSDU_Size := 103, |
| 1209 | rAB_SubflowCombinationBitRate := omit, |
| 1210 | iE_Extensions := omit |
| 1211 | }, { |
| 1212 | subflowSDU_Size := 0, |
| 1213 | rAB_SubflowCombinationBitRate := omit, |
| 1214 | iE_Extensions := omit |
| 1215 | } |
| 1216 | }, |
| 1217 | iE_Extensions := omit |
| 1218 | }, { |
| 1219 | sDU_ErrorRatio := omit, |
| 1220 | residualBitErrorRatio := { mantissa := 5, exponent := 3, iE_Extensions := omit }, |
| 1221 | deliveryOfErroneousSDU := no_error_detection_consideration, |
| 1222 | sDU_FormatInformationParameters := { |
| 1223 | { |
| 1224 | subflowSDU_Size := 60, |
| 1225 | rAB_SubflowCombinationBitRate := omit, |
| 1226 | iE_Extensions := omit |
| 1227 | }, { |
| 1228 | subflowSDU_Size := 0, |
| 1229 | rAB_SubflowCombinationBitRate := omit, |
| 1230 | iE_Extensions := omit |
| 1231 | } |
| 1232 | }, |
| 1233 | iE_Extensions := omit |
| 1234 | } |
| 1235 | }, |
| 1236 | transferDelay := 80, |
| 1237 | trafficHandlingPriority := omit, |
| 1238 | allocationOrRetentionPriority := { |
| 1239 | priorityLevel := 15, |
| 1240 | pre_emptionCapability := shall_not_trigger_pre_emption, |
| 1241 | pre_emptionVulnerability := pre_emptable, |
| 1242 | queuingAllowed := queueing_not_allowed, |
| 1243 | iE_Extensions := omit |
| 1244 | }, |
| 1245 | sourceStatisticsDescriptor := omit, |
| 1246 | relocationRequirement := omit, |
| 1247 | iE_Extensions := omit |
| 1248 | } |
| 1249 | |
| 1250 | template (value) UserPlaneInformation ts_UserPlaneInfo := { |
| 1251 | userPlaneMode := support_mode_for_predefined_SDU_sizes, |
| 1252 | uP_ModeVersions := '0000000000000010'B, |
| 1253 | iE_Extensions := omit |
| 1254 | } |
| 1255 | |
| 1256 | template (value) TransportLayerInformation ts_TLI(template (value) TransportLayerAddress tla, |
| 1257 | template (value) BindingID binding_id) := { |
| 1258 | transportLayerAddress := tla, |
| 1259 | iuTransportAssociation := { |
| 1260 | bindingID := binding_id |
| 1261 | }, |
| 1262 | iE_Extensions := omit |
| 1263 | } |
| 1264 | template TransportLayerInformation tr_TLI(template TransportLayerAddress tla, |
| 1265 | template BindingID binding_id) := { |
| 1266 | transportLayerAddress := tla, |
| 1267 | iuTransportAssociation := { |
| 1268 | bindingID := binding_id |
| 1269 | }, |
| 1270 | iE_Extensions := * |
| 1271 | } |
| 1272 | |
| 1273 | template (value) RAB_SetupOrModifyList ts_RAB_SML(template (value) RAB_ID rab_id, |
| 1274 | template (value) TransportLayerAddress tla, |
| 1275 | template (value) BindingID binding_id) := { { |
| 1276 | { |
| 1277 | id := id_RAB_SetupOrModifyItem, |
| 1278 | firstCriticality := reject, |
| 1279 | firstValue := { |
| 1280 | rAB_SetupOrModifyItemFirst := { |
| 1281 | rAB_ID := rab_id, |
| 1282 | nAS_SynchronisationIndicator := omit, |
| 1283 | rAB_Parameters := ts_RabParams, |
| 1284 | userPlaneInformation := ts_UserPlaneInfo, |
| 1285 | transportLayerInformation := ts_TLI(tla, binding_id), |
| 1286 | service_Handover := omit, |
| 1287 | iE_Extensions := omit |
| 1288 | } |
| 1289 | }, |
| 1290 | secondCriticality := ignore, |
| 1291 | secondValue := { |
| 1292 | rAB_SetupOrModifyItemSecond := { |
| 1293 | pDP_TypeInformation := omit, |
| 1294 | dataVolumeReportingIndication := omit, |
| 1295 | dl_GTP_PDU_SequenceNumber := omit, |
| 1296 | ul_GTP_PDU_SequenceNumber := omit, |
| 1297 | dl_N_PDU_SequenceNumber := omit, |
| 1298 | ul_N_PDU_SequenceNumber := omit, |
| 1299 | iE_Extensions := omit |
| 1300 | } |
| 1301 | } |
| 1302 | } |
| 1303 | } } |
Daniel Willmann | 95263ca | 2022-02-15 09:55:18 +0100 | [diff] [blame] | 1304 | template RAB_SetupOrModifyList tr_RAB_SML(template (present) RAB_ID rab_id, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1305 | template TransportLayerAddress tla, |
| 1306 | template BindingID binding_id) := { { |
| 1307 | { |
| 1308 | id := id_RAB_SetupOrModifyItem, |
| 1309 | firstCriticality := reject, |
| 1310 | firstValue := { |
| 1311 | rAB_SetupOrModifyItemFirst := { |
| 1312 | rAB_ID := rab_id, |
| 1313 | nAS_SynchronisationIndicator := *, |
| 1314 | rAB_Parameters := ts_RabParams, |
| 1315 | userPlaneInformation := ts_UserPlaneInfo, |
| 1316 | transportLayerInformation := tr_TLI(tla, binding_id), |
| 1317 | service_Handover := *, |
| 1318 | iE_Extensions := * |
| 1319 | } |
| 1320 | }, |
| 1321 | secondCriticality := ignore, |
| 1322 | secondValue := { |
| 1323 | rAB_SetupOrModifyItemSecond := { |
| 1324 | pDP_TypeInformation := omit, |
| 1325 | dataVolumeReportingIndication := omit, |
| 1326 | dl_GTP_PDU_SequenceNumber := omit, |
| 1327 | ul_GTP_PDU_SequenceNumber := omit, |
| 1328 | dl_N_PDU_SequenceNumber := omit, |
| 1329 | ul_N_PDU_SequenceNumber := omit, |
| 1330 | iE_Extensions := omit |
| 1331 | } |
| 1332 | } |
| 1333 | } |
| 1334 | } } |
| 1335 | |
Neels Hofmeyr | c3c01d3 | 2023-11-07 02:19:00 +0100 | [diff] [blame] | 1336 | /* Like ts_RAB_SML(), but more control on presence/absence of individual IEs */ |
| 1337 | template (value) RAB_SetupOrModifyList ts_RAB_SML2( |
| 1338 | template (value) RAB_ID rab_id, |
| 1339 | template (omit) RAB_Parameters rab_params, |
| 1340 | template (omit) UserPlaneInformation user_plane_info, |
| 1341 | template (omit) TransportLayerInformation transport_layer_info |
| 1342 | ) := { { |
| 1343 | { |
| 1344 | id := id_RAB_SetupOrModifyItem, |
| 1345 | firstCriticality := reject, |
| 1346 | firstValue := { |
| 1347 | rAB_SetupOrModifyItemFirst := { |
| 1348 | rAB_ID := rab_id, |
| 1349 | nAS_SynchronisationIndicator := omit, |
| 1350 | rAB_Parameters := rab_params, |
| 1351 | userPlaneInformation := user_plane_info, |
| 1352 | transportLayerInformation := transport_layer_info, |
| 1353 | service_Handover := omit, |
| 1354 | iE_Extensions := omit |
| 1355 | } |
| 1356 | }, |
| 1357 | secondCriticality := ignore, |
| 1358 | secondValue := { |
| 1359 | rAB_SetupOrModifyItemSecond := { |
| 1360 | pDP_TypeInformation := omit, |
| 1361 | dataVolumeReportingIndication := omit, |
| 1362 | dl_GTP_PDU_SequenceNumber := omit, |
| 1363 | ul_GTP_PDU_SequenceNumber := omit, |
| 1364 | dl_N_PDU_SequenceNumber := omit, |
| 1365 | ul_N_PDU_SequenceNumber := omit, |
| 1366 | iE_Extensions := omit |
| 1367 | } |
| 1368 | } |
| 1369 | } |
| 1370 | } } |
| 1371 | |
Neels Hofmeyr | a56e8fd | 2022-05-08 01:16:55 +0200 | [diff] [blame] | 1372 | template (value) TransportLayerInformation ts_TLI_ps(template (value) TransportLayerAddress tla, |
| 1373 | template (value) GTP_TEI gtp_tei) := { |
| 1374 | transportLayerAddress := tla, |
| 1375 | iuTransportAssociation := { |
| 1376 | gTP_TEI := gtp_tei |
| 1377 | }, |
| 1378 | iE_Extensions := omit |
| 1379 | } |
| 1380 | template TransportLayerInformation tr_TLI_ps(template TransportLayerAddress tla, |
| 1381 | template (value) GTP_TEI gtp_tei) := { |
| 1382 | transportLayerAddress := tla, |
| 1383 | iuTransportAssociation := { |
| 1384 | gTP_TEI := gtp_tei |
| 1385 | }, |
| 1386 | iE_Extensions := * |
| 1387 | } |
| 1388 | |
| 1389 | template (value) RAB_SetupOrModifyList ts_RAB_SML_ps(template (value) RAB_ID rab_id, |
| 1390 | template (value) TransportLayerAddress tla, |
| 1391 | template (value) GTP_TEI gtp_tei) := { { |
| 1392 | { |
| 1393 | id := id_RAB_SetupOrModifyItem, |
| 1394 | firstCriticality := reject, |
| 1395 | firstValue := { |
| 1396 | rAB_SetupOrModifyItemFirst := { |
| 1397 | rAB_ID := rab_id, |
| 1398 | nAS_SynchronisationIndicator := omit, |
| 1399 | rAB_Parameters := ts_RabParams, |
| 1400 | userPlaneInformation := ts_UserPlaneInfo, |
| 1401 | transportLayerInformation := ts_TLI_ps(tla, gtp_tei), |
| 1402 | service_Handover := omit, |
| 1403 | iE_Extensions := omit |
| 1404 | } |
| 1405 | }, |
| 1406 | secondCriticality := ignore, |
| 1407 | secondValue := { |
| 1408 | rAB_SetupOrModifyItemSecond := { |
| 1409 | pDP_TypeInformation := omit, |
| 1410 | dataVolumeReportingIndication := omit, |
| 1411 | dl_GTP_PDU_SequenceNumber := omit, |
| 1412 | ul_GTP_PDU_SequenceNumber := omit, |
| 1413 | dl_N_PDU_SequenceNumber := omit, |
| 1414 | ul_N_PDU_SequenceNumber := omit, |
| 1415 | iE_Extensions := omit |
| 1416 | } |
| 1417 | } |
| 1418 | } |
| 1419 | } } |
| 1420 | template RAB_SetupOrModifyList tr_RAB_SML_ps(template (present) RAB_ID rab_id, |
| 1421 | template TransportLayerAddress tla, |
| 1422 | template (value) GTP_TEI gtp_tei) := { { |
| 1423 | { |
| 1424 | id := id_RAB_SetupOrModifyItem, |
| 1425 | firstCriticality := reject, |
| 1426 | firstValue := { |
| 1427 | rAB_SetupOrModifyItemFirst := { |
| 1428 | rAB_ID := rab_id, |
| 1429 | nAS_SynchronisationIndicator := *, |
| 1430 | rAB_Parameters := ts_RabParams, |
| 1431 | userPlaneInformation := ts_UserPlaneInfo, |
| 1432 | transportLayerInformation := tr_TLI_ps(tla, gtp_tei), |
| 1433 | service_Handover := *, |
| 1434 | iE_Extensions := * |
| 1435 | } |
| 1436 | }, |
| 1437 | secondCriticality := ignore, |
| 1438 | secondValue := { |
| 1439 | rAB_SetupOrModifyItemSecond := { |
| 1440 | pDP_TypeInformation := omit, |
| 1441 | dataVolumeReportingIndication := omit, |
| 1442 | dl_GTP_PDU_SequenceNumber := omit, |
| 1443 | ul_GTP_PDU_SequenceNumber := omit, |
| 1444 | dl_N_PDU_SequenceNumber := omit, |
| 1445 | ul_N_PDU_SequenceNumber := omit, |
| 1446 | iE_Extensions := omit |
| 1447 | } |
| 1448 | } |
| 1449 | } |
| 1450 | } } |
| 1451 | |
Daniel Willmann | fc5e17a | 2022-01-28 11:42:40 +0100 | [diff] [blame] | 1452 | template (value) RAB_SetupOrModifiedList ts_RAB_SMdL(template (value) RAB_ID rab_id, |
| 1453 | template (value) TransportLayerAddress tla, |
| 1454 | template (value) BindingID binding_id) := { { |
| 1455 | { |
| 1456 | id := id_RAB_SetupOrModifiedItem, |
| 1457 | criticality := ignore, |
| 1458 | value_ := { |
| 1459 | rAB_SetupOrModifiedItem := { |
| 1460 | rAB_ID := rab_id, |
| 1461 | transportLayerAddress := tla, |
| 1462 | iuTransportAssociation := { |
| 1463 | bindingID := binding_id |
| 1464 | }, |
| 1465 | dl_dataVolumes := omit, |
| 1466 | iE_Extensions := omit |
| 1467 | } |
| 1468 | } |
| 1469 | } |
| 1470 | } } |
| 1471 | |
Neels Hofmeyr | c3c01d3 | 2023-11-07 02:19:00 +0100 | [diff] [blame] | 1472 | template (value) RAB_SetupOrModifiedList ts_RAB_SMdL_no_tla(template (value) RAB_ID rab_id) := { { |
| 1473 | { |
| 1474 | id := id_RAB_SetupOrModifiedItem, |
| 1475 | criticality := ignore, |
| 1476 | value_ := { |
| 1477 | rAB_SetupOrModifiedItem := { |
| 1478 | rAB_ID := rab_id, |
| 1479 | transportLayerAddress := omit, |
| 1480 | iuTransportAssociation := omit, |
| 1481 | dl_dataVolumes := omit, |
| 1482 | iE_Extensions := omit |
| 1483 | } |
| 1484 | } |
| 1485 | } |
| 1486 | } } |
| 1487 | |
Neels Hofmeyr | a56e8fd | 2022-05-08 01:16:55 +0200 | [diff] [blame] | 1488 | template (value) RAB_SetupOrModifiedList ts_RAB_SMdL_ps(template (value) RAB_ID rab_id, |
| 1489 | template (value) TransportLayerAddress tla, |
| 1490 | template (value) GTP_TEI gtp_tei) := { { |
| 1491 | { |
| 1492 | id := id_RAB_SetupOrModifiedItem, |
| 1493 | criticality := ignore, |
| 1494 | value_ := { |
| 1495 | rAB_SetupOrModifiedItem := { |
| 1496 | rAB_ID := rab_id, |
| 1497 | transportLayerAddress := tla, |
| 1498 | iuTransportAssociation := { |
| 1499 | gTP_TEI := gtp_tei |
| 1500 | }, |
| 1501 | dl_dataVolumes := omit, |
| 1502 | iE_Extensions := omit |
| 1503 | } |
| 1504 | } |
| 1505 | } |
| 1506 | } } |
| 1507 | |
Daniel Willmann | 95263ca | 2022-02-15 09:55:18 +0100 | [diff] [blame] | 1508 | template RAB_SetupOrModifiedList tr_RAB_SMdL(template (present) RAB_ID rab_id, |
Daniel Willmann | fc5e17a | 2022-01-28 11:42:40 +0100 | [diff] [blame] | 1509 | template TransportLayerAddress tla, |
| 1510 | template BindingID binding_id) := { { |
| 1511 | { |
| 1512 | id := id_RAB_SetupOrModifiedItem, |
| 1513 | criticality := ignore, |
| 1514 | value_ := { |
| 1515 | rAB_SetupOrModifiedItem := { |
| 1516 | rAB_ID := rab_id, |
| 1517 | transportLayerAddress := tla, |
| 1518 | iuTransportAssociation := { |
| 1519 | bindingID := binding_id |
| 1520 | }, |
| 1521 | dl_dataVolumes := *, |
| 1522 | iE_Extensions := * |
| 1523 | } |
| 1524 | } |
| 1525 | } |
| 1526 | } } |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1527 | |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1528 | template (value) RAB_FailedList ts_RAB_FL(template (value) RAB_ID rab_id, |
| 1529 | template (value) Cause cause) := { { |
| 1530 | { |
| 1531 | id := id_RAB_FailedItem, |
| 1532 | criticality := ignore, |
| 1533 | value_ := { |
| 1534 | rAB_FailedItem := { |
| 1535 | rAB_ID := rab_id, |
| 1536 | cause := cause, |
| 1537 | iE_Extensions := omit |
| 1538 | } |
| 1539 | } |
| 1540 | } |
| 1541 | } } |
| 1542 | |
| 1543 | template RAB_FailedList tr_RAB_FL(template RAB_ID rab_id, |
| 1544 | template Cause cause) := { { |
| 1545 | { |
| 1546 | id := id_RAB_FailedItem, |
| 1547 | criticality := ignore, |
| 1548 | value_ := { |
| 1549 | rAB_FailedItem := { |
| 1550 | rAB_ID := rab_id, |
| 1551 | cause := cause, |
| 1552 | iE_Extensions := * |
| 1553 | } |
| 1554 | } |
| 1555 | } |
| 1556 | } } |
| 1557 | |
Daniel Willmann | 9e789be | 2022-02-22 13:30:51 +0100 | [diff] [blame] | 1558 | template (value) RAB_ReleaseList ts_RAB_RL(template (value) RAB_ID rab_id, |
| 1559 | template (value) Cause cause) := { { |
| 1560 | { |
| 1561 | id := id_RAB_ReleaseItem, |
| 1562 | criticality := ignore, |
| 1563 | value_ := { |
| 1564 | rAB_ReleaseItem := { |
| 1565 | rAB_ID := rab_id, |
| 1566 | cause := cause, |
| 1567 | iE_Extensions := omit |
| 1568 | } |
| 1569 | } |
| 1570 | } |
| 1571 | } } |
| 1572 | |
| 1573 | template RAB_ReleaseList tr_RAB_RL(template (present) RAB_ID rab_id, |
| 1574 | template Cause cause := ?) := { { |
| 1575 | { |
| 1576 | id := id_RAB_ReleaseItem, |
| 1577 | criticality := ignore, |
| 1578 | value_ := { |
| 1579 | rAB_ReleaseItem := { |
| 1580 | rAB_ID := rab_id, |
| 1581 | cause := cause, |
| 1582 | iE_Extensions := * |
| 1583 | } |
| 1584 | } |
| 1585 | } |
| 1586 | } } |
| 1587 | |
| 1588 | |
| 1589 | function |
| 1590 | ts_RANAP_RabAssReq(template (omit) RAB_SetupOrModifyList rab_sml := omit, |
| 1591 | template (omit) RAB_ReleaseList rab_rl := omit, |
| 1592 | template (omit) RAB_AssignmentRequest.protocolExtensions exts := omit) return template RANAP_PDU { |
| 1593 | var template RANAP_PDU ret; |
| 1594 | var template RAB_AssignmentRequest.protocolIEs protocolIEs := {}; |
| 1595 | var integer ie_pos := 0; |
| 1596 | |
| 1597 | var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_sml; |
| 1598 | var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_rl; |
| 1599 | |
| 1600 | /* RAB-SetupOrModifyList */ |
| 1601 | if (istemplatekind(rab_sml, "value")) { |
| 1602 | protocolIEs_rab_sml := { |
| 1603 | { |
| 1604 | id := id_RAB_SetupOrModifyList, |
| 1605 | criticality := ignore, |
| 1606 | value_ := { |
| 1607 | rAB_SetupOrModifyList := rab_sml |
| 1608 | } |
| 1609 | } |
| 1610 | }; |
| 1611 | protocolIEs[ie_pos] := protocolIEs_rab_sml[0]; |
| 1612 | ie_pos := ie_pos + 1; |
| 1613 | } |
| 1614 | |
| 1615 | /* RAB-ReleaseList */ |
| 1616 | if (istemplatekind(rab_rl, "value")) { |
| 1617 | protocolIEs_rab_rl := { |
| 1618 | { |
| 1619 | id := id_RAB_ReleaseList, |
| 1620 | criticality := ignore, |
| 1621 | value_ := { |
| 1622 | rAB_ReleaseList := rab_rl |
| 1623 | } |
| 1624 | } |
| 1625 | }; |
| 1626 | protocolIEs[ie_pos] := protocolIEs_rab_rl[0]; |
| 1627 | ie_pos := ie_pos + 1; |
| 1628 | } |
| 1629 | |
| 1630 | |
| 1631 | ret.initiatingMessage := { |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1632 | procedureCode := id_RAB_Assignment, |
| 1633 | criticality := reject, |
| 1634 | value_ := { |
| 1635 | rAB_AssignmentRequest := { |
Daniel Willmann | 9e789be | 2022-02-22 13:30:51 +0100 | [diff] [blame] | 1636 | protocolIEs := protocolIEs, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1637 | protocolExtensions := exts |
| 1638 | } |
| 1639 | } |
| 1640 | } |
Daniel Willmann | 9e789be | 2022-02-22 13:30:51 +0100 | [diff] [blame] | 1641 | |
| 1642 | return ret; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1643 | } |
Daniel Willmann | 9e789be | 2022-02-22 13:30:51 +0100 | [diff] [blame] | 1644 | |
| 1645 | function |
| 1646 | tr_RANAP_RabAssReq(template RAB_SetupOrModifyList rab_sml := omit, |
| 1647 | template RAB_ReleaseList rab_rl := omit, |
| 1648 | template RAB_AssignmentRequest.protocolExtensions exts := *) return template RANAP_PDU { |
| 1649 | var template RANAP_PDU ret; |
| 1650 | var template RAB_AssignmentRequest.protocolIEs protocolIEs := {}; |
| 1651 | var integer ie_pos := 0; |
| 1652 | |
| 1653 | var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_sml; |
| 1654 | var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_rl; |
| 1655 | |
| 1656 | /* RAB-SetupOrModifyList */ |
| 1657 | if (not istemplatekind(rab_sml, "omit")) { |
| 1658 | protocolIEs_rab_sml := { |
| 1659 | { |
| 1660 | id := id_RAB_SetupOrModifyList, |
| 1661 | criticality := ignore, |
| 1662 | value_ := { |
| 1663 | rAB_SetupOrModifyList := rab_sml |
| 1664 | } |
| 1665 | } |
| 1666 | }; |
| 1667 | protocolIEs[ie_pos] := protocolIEs_rab_sml[0]; |
| 1668 | ie_pos := ie_pos + 1; |
| 1669 | } |
| 1670 | |
| 1671 | /* RAB-ReleaseList */ |
| 1672 | if (not istemplatekind(rab_rl, "omit")) { |
| 1673 | protocolIEs_rab_rl := { |
| 1674 | { |
| 1675 | id := id_RAB_ReleaseList, |
| 1676 | criticality := ignore, |
| 1677 | value_ := { |
| 1678 | rAB_ReleaseList := rab_rl |
| 1679 | } |
| 1680 | } |
| 1681 | }; |
| 1682 | protocolIEs[ie_pos] := protocolIEs_rab_rl[0]; |
| 1683 | ie_pos := ie_pos + 1; |
| 1684 | } |
| 1685 | |
| 1686 | |
| 1687 | ret.initiatingMessage := { |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1688 | procedureCode := id_RAB_Assignment, |
| 1689 | criticality := reject, |
| 1690 | value_ := { |
| 1691 | rAB_AssignmentRequest := { |
Daniel Willmann | 9e789be | 2022-02-22 13:30:51 +0100 | [diff] [blame] | 1692 | protocolIEs := protocolIEs, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1693 | protocolExtensions := exts |
| 1694 | } |
| 1695 | } |
| 1696 | } |
Daniel Willmann | 9e789be | 2022-02-22 13:30:51 +0100 | [diff] [blame] | 1697 | |
| 1698 | return ret; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1699 | } |
| 1700 | |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1701 | function |
| 1702 | ts_RANAP_RabAssResp(template (omit) RAB_SetupOrModifiedList rab_sml := omit, |
| 1703 | template (omit) RAB_FailedList rab_fl := omit, |
| 1704 | template (omit) RAB_AssignmentResponse.protocolExtensions exts := omit) return template RANAP_PDU { |
| 1705 | var template RANAP_PDU ret; |
| 1706 | var template RAB_AssignmentResponse.protocolIEs protocolIEs := {}; |
| 1707 | var integer ie_pos := 0; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1708 | |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1709 | var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_sml; |
| 1710 | var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_fl; |
| 1711 | |
| 1712 | /* RAB-SetupOrModifiedList */ |
| 1713 | if (istemplatekind(rab_sml, "value")) { |
| 1714 | protocolIEs_rab_sml := { |
| 1715 | { |
| 1716 | id := id_RAB_SetupOrModifiedList, |
| 1717 | criticality := ignore, |
| 1718 | value_ := { |
| 1719 | rAB_SetupOrModifiedList := rab_sml |
| 1720 | } |
| 1721 | } |
| 1722 | } |
| 1723 | |
| 1724 | protocolIEs[ie_pos] := protocolIEs_rab_sml[0]; |
| 1725 | ie_pos := ie_pos + 1; |
| 1726 | } |
| 1727 | |
| 1728 | /* TODO: RAB-ReleasedList */ |
| 1729 | /* TODO: RAB-QueuedList */ |
| 1730 | |
| 1731 | /* RAB-FailedList */ |
| 1732 | if (istemplatekind(rab_fl, "value")) { |
| 1733 | protocolIEs_rab_fl := { |
| 1734 | { |
| 1735 | id := id_RAB_FailedList, |
| 1736 | criticality := ignore, |
| 1737 | value_ := { |
| 1738 | rAB_FailedList := rab_fl |
| 1739 | } |
| 1740 | } |
| 1741 | } |
| 1742 | |
| 1743 | protocolIEs[ie_pos] := protocolIEs_rab_fl[0]; |
| 1744 | ie_pos := ie_pos + 1; |
| 1745 | } |
| 1746 | |
| 1747 | /* TODO: RAB-ReleaseFailedList */ |
| 1748 | |
| 1749 | ret.outcome := { |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1750 | procedureCode := id_RAB_Assignment, |
| 1751 | criticality := reject, |
| 1752 | value_ := { |
| 1753 | rAB_AssignmentResponse := { |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1754 | protocolIEs := protocolIEs, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1755 | protocolExtensions := exts |
| 1756 | } |
| 1757 | } |
| 1758 | } |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1759 | |
| 1760 | return ret; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1761 | } |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1762 | |
| 1763 | function |
| 1764 | tr_RANAP_RabAssResp(template RAB_SetupOrModifiedList rab_sml := omit, |
| 1765 | template RAB_FailedList rab_fl := omit, |
| 1766 | template RAB_AssignmentResponse.protocolExtensions exts := *) return template RANAP_PDU { |
| 1767 | var template RANAP_PDU ret; |
| 1768 | var template RAB_AssignmentResponse.protocolIEs protocolIEs := {}; |
| 1769 | var integer ie_pos := 0; |
| 1770 | |
| 1771 | var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_sml; |
| 1772 | var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_fl; |
| 1773 | |
| 1774 | /* RAB-SetupOrModifiedList */ |
| 1775 | if (not istemplatekind(rab_sml, "omit")) { |
| 1776 | protocolIEs_rab_sml := { |
| 1777 | { |
| 1778 | id := id_RAB_SetupOrModifiedList, |
| 1779 | criticality := ignore, |
| 1780 | value_ := { |
| 1781 | rAB_SetupOrModifiedList := rab_sml |
| 1782 | } |
| 1783 | } |
| 1784 | } |
| 1785 | |
| 1786 | protocolIEs[ie_pos] := protocolIEs_rab_sml[0]; |
| 1787 | ie_pos := ie_pos + 1; |
| 1788 | } |
| 1789 | |
| 1790 | /* TODO: RAB-ReleasedList */ |
| 1791 | /* TODO: RAB-QueuedList */ |
| 1792 | |
| 1793 | /* RAB-FailedList */ |
| 1794 | if (not istemplatekind(rab_fl, "omit")) { |
| 1795 | protocolIEs_rab_fl := { |
| 1796 | { |
| 1797 | id := id_RAB_FailedList, |
| 1798 | criticality := ignore, |
| 1799 | value_ := { |
| 1800 | rAB_FailedList := rab_fl |
| 1801 | } |
| 1802 | } |
| 1803 | } |
| 1804 | |
| 1805 | protocolIEs[ie_pos] := protocolIEs_rab_fl[0]; |
| 1806 | ie_pos := ie_pos + 1; |
| 1807 | } |
| 1808 | |
| 1809 | /* TODO: RAB-ReleaseFailedList */ |
| 1810 | |
| 1811 | protocolIEs[ie_pos] := *; |
| 1812 | |
| 1813 | ret.outcome := { |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1814 | procedureCode := id_RAB_Assignment, |
| 1815 | criticality := reject, |
| 1816 | value_ := { |
| 1817 | rAB_AssignmentResponse := { |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1818 | protocolIEs := protocolIEs, |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1819 | protocolExtensions := exts |
| 1820 | } |
| 1821 | } |
| 1822 | } |
Philipp Maier | 6289ea8 | 2022-02-09 15:30:11 +0100 | [diff] [blame] | 1823 | |
| 1824 | return ret; |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1825 | } |
| 1826 | |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1827 | /***************************************************************************************************** |
| 1828 | * |
| 1829 | *****************************************************************************************************/ |
| 1830 | |
| 1831 | /* extract the L3 (NAS) from a given RANAP message */ |
| 1832 | function f_ranap_extract_l3(RANAP_PDU ranap) return template (omit) octetstring |
| 1833 | { |
| 1834 | var integer i; |
| 1835 | |
| 1836 | if (match(ranap, tr_RANAP_initialUE_CS(?, ?, ?, ?, ?)) or |
| 1837 | match(ranap, tr_RANAP_initialUE_PS(?, ?, ?, ?, ?, ?)) ) { |
| 1838 | var InitialUE_Message.protocolIEs ies := ranap.initiatingMessage.value_.initialUE_Message.protocolIEs; |
| 1839 | for (i := 0; i < lengthof(ies); i := i+1) { |
| 1840 | if (ies[i].id == id_NAS_PDU) { |
| 1841 | return ies[i].value_.nAS_PDU; |
| 1842 | } |
| 1843 | } |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1844 | } else if (match(ranap, tr_RANAP_DirectTransfer(?))) { |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1845 | var DirectTransfer.protocolIEs ies := ranap.initiatingMessage.value_.directTransfer.protocolIEs; |
| 1846 | for (i := 0; i < lengthof(ies); i := i+1) { |
| 1847 | if (ies[i].id == id_NAS_PDU) { |
| 1848 | return ies[i].value_.nAS_PDU; |
| 1849 | } |
| 1850 | } |
| 1851 | } else { |
| 1852 | /* relocationInformation not supported yet*/ |
| 1853 | } |
| 1854 | return omit; |
| 1855 | } |
| 1856 | |
| 1857 | function f_ranap_extract_sapi(RANAP_PDU ranap) return template (omit) SAPI |
| 1858 | { |
| 1859 | var integer i; |
| 1860 | |
| 1861 | /* InitialUE message has no SAPI */ |
Vadim Yanitskiy | e06f228 | 2019-06-20 05:02:49 +0700 | [diff] [blame] | 1862 | if (match(ranap, tr_RANAP_DirectTransfer(?, omit))) { |
Harald Welte | a013e68 | 2018-06-18 19:49:39 +0200 | [diff] [blame] | 1863 | var DirectTransfer.protocolIEs ies := ranap.initiatingMessage.value_.directTransfer.protocolIEs; |
| 1864 | for (i := 0; i < lengthof(ies); i := i+1) { |
| 1865 | if (ies[i].id == id_SAPI) { |
| 1866 | return ies[i].value_.sAPI; |
| 1867 | } |
| 1868 | } |
| 1869 | } |
| 1870 | return omit; |
| 1871 | } |
| 1872 | |
| 1873 | |
| 1874 | } |