Pau Espin Pedrol | 53aa61d | 2023-12-21 19:10:45 +0100 | [diff] [blame] | 1 | /* 3GPP TS 24.301, EPC (Evolved Packet Core) NAS (Non-Access Stratum) templates in TTCN-3 |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 2 | * (C) 2019 Harald Welte <laforge@gnumonks.org> |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Released under the terms of GNU General Public License, Version 2 or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 9 | */ |
| 10 | |
| 11 | module NAS_Templates { |
| 12 | |
| 13 | import from General_Types all; |
| 14 | import from NAS_EPS_Types all; |
| 15 | |
| 16 | template (value) PDU_NAS_EPS |
| 17 | ts_NAS_SM(template (value) EPS_SessionManagement sm) := { |
| 18 | protocolDiscriminator := '0010'B, |
| 19 | ePS_messages := { |
| 20 | ePS_SessionManagement := sm |
| 21 | } |
| 22 | } |
| 23 | template (present) PDU_NAS_EPS |
| 24 | tr_NAS_SM(template (present) EPS_SessionManagement sm) := { |
| 25 | protocolDiscriminator := '0010'B, |
| 26 | ePS_messages := { |
| 27 | ePS_SessionManagement := sm |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | template (value) PDU_NAS_EPS |
| 32 | ts_NAS_MM(template (value) EPS_MobilityManagement mm) := { |
| 33 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 34 | ePS_messages := { |
| 35 | ePS_MobilityManagement := mm |
| 36 | } |
| 37 | } |
| 38 | template (present) PDU_NAS_EPS |
| 39 | tr_NAS_MM(template (present) EPS_MobilityManagement mm) := { |
| 40 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 41 | ePS_messages := { |
| 42 | ePS_MobilityManagement := mm |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | const BIT4 c_EPS_SEC_NONE := '0000'B; |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 47 | const BIT4 c_EPS_SEC_IP := '0001'B; |
| 48 | const BIT4 c_EPS_SEC_IP_CIPH := '0010'B; |
| 49 | |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 50 | const BIT4 c_EPS_NAS_PD_EMM := '0111'B; |
| 51 | const BIT4 c_EPS_NAS_PD_ESM := '0010'B; |
| 52 | |
| 53 | private template (value) ESM_MessageContainerLVE |
| 54 | ts_NAS_EsmMsgContLVE(template (value) octetstring inp) := { |
| 55 | lengthIndicator := 0, |
| 56 | content := inp |
| 57 | } |
| 58 | private template (present) ESM_MessageContainerLVE |
| 59 | tr_NAS_EsmMsgContLVE(template (present) octetstring inp) := { |
| 60 | lengthIndicator := ?, |
| 61 | content := inp |
| 62 | } |
| 63 | |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 64 | /* 9.9.3.4A - 10.5.1.2/24.008 */ |
| 65 | template (value) CipheringKeySequenceNumberTV |
| 66 | ts_CipheringKeySequenceNumberTV(template (value) BIT3 key_seq) := { |
| 67 | keySequence := { |
| 68 | keySequence := key_seq, |
| 69 | spare := '0'B |
| 70 | }, |
| 71 | elementIdentifier := '1000'B |
| 72 | } |
| 73 | |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 74 | private template (value) MobileIdentityLV |
| 75 | ts_NAS_MobileIdLV(template (value) MobileIdentityV mid) := { |
| 76 | lengthIndicator := 0, |
| 77 | mobileIdentityV := mid |
| 78 | } |
| 79 | private template (present) MobileIdentityLV |
| 80 | tr_NAS_MobileIdLV(template (present) MobileIdentityV mid) := { |
| 81 | lengthIndicator := ?, |
| 82 | mobileIdentityV := mid |
| 83 | } |
| 84 | |
| 85 | private function f_enc_IMSI_NAS(hexstring digits) return IMSI { |
| 86 | var IMSI l3; |
| 87 | var integer len := lengthof(digits); |
| 88 | if (len rem 2 == 1) { /* modulo remainder */ |
| 89 | l3.oddevenIndicator := '1'B; |
| 90 | l3.fillerDigit := omit; |
| 91 | } else { |
| 92 | l3.oddevenIndicator := '0'B; |
| 93 | l3.fillerDigit := '1111'B; |
| 94 | } |
| 95 | l3.digits := digits; |
| 96 | return l3; |
| 97 | } |
| 98 | |
| 99 | private function f_enc_IMEI_NAS(hexstring digits) return IMEI { |
| 100 | var IMEI l3; |
| 101 | var integer len := lengthof(digits); |
| 102 | if (len rem 2 == 1) { /* modulo remainder */ |
| 103 | l3.oddevenIndicator := '1'B; |
| 104 | } else { |
| 105 | l3.oddevenIndicator := '0'B; |
| 106 | } |
| 107 | l3.digits := digits; |
| 108 | return l3; |
| 109 | } |
| 110 | |
| 111 | private function f_enc_IMEI_SV(hexstring digits) return IMEI_SV { |
| 112 | var IMEI_SV l3; |
| 113 | var integer len := lengthof(digits); |
| 114 | if (len rem 2 == 1) { /* modulo remainder */ |
| 115 | l3.oddevenIndicator := '1'B; |
| 116 | } else { |
| 117 | l3.oddevenIndicator := '0'B; |
| 118 | } |
| 119 | l3.digits := digits; |
| 120 | l3.fillerDigit := '1111'B; |
| 121 | return l3; |
| 122 | } |
| 123 | |
| 124 | template (value) GUTI ts_NAS_GUTI(hexstring mcc_mnc, OCT2 mmegi, OCT1 mmec, OCT4 tmsi) := { |
| 125 | oddevenIndicator := '0'B, |
| 126 | spare := '1111'B, |
Philipp Maier | 68cf947 | 2023-08-31 17:42:13 +0200 | [diff] [blame] | 127 | /* use the mcc_mnc format as specified in 3GPP TS 24.301, figure 9.9.3.12.1. |
| 128 | * Example: mcc=262, mnc=42 => 262f42. |
| 129 | * mcc=001, mnc=01 => 001f01. */ |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 130 | mccDigit1 := mcc_mnc[0], |
| 131 | mccDigit2 := mcc_mnc[1], |
| 132 | mccDigit3 := mcc_mnc[2], |
Philipp Maier | 68cf947 | 2023-08-31 17:42:13 +0200 | [diff] [blame] | 133 | mncDigit3 := mcc_mnc[3], |
| 134 | mncDigit1 := mcc_mnc[4], |
| 135 | mncDigit2 := mcc_mnc[5], |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 136 | mMEGI := mmegi, |
| 137 | mMEC := mmec, |
| 138 | mTMSI := tmsi |
| 139 | } |
| 140 | |
| 141 | template (value) EPS_MobileIdentityV |
| 142 | ts_NAS_MobileId_IMSI(hexstring imsi) := { |
| 143 | typeOfIdentity := '001'B, |
| 144 | oddEvenInd_identity := { |
| 145 | imsi := f_enc_IMSI_NAS(imsi) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | template (value) EPS_MobileIdentityV |
| 150 | ts_NAS_MobileId_IMEI(hexstring imei) := { |
| 151 | typeOfIdentity := '011'B, |
| 152 | oddEvenInd_identity := { |
| 153 | imei := f_enc_IMEI_NAS(imei) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | template (value) EPS_MobileIdentityV |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 158 | ts_NAS_MobileId_GUTI_fields(hexstring mcc_mnc, OCT2 mmegi, OCT1 mmec, OCT4 tmsi) := { |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 159 | typeOfIdentity := '110'B, |
| 160 | oddEvenInd_identity := { |
| 161 | guti := ts_NAS_GUTI(mcc_mnc, mmegi, mmec, tmsi) |
| 162 | } |
| 163 | } |
| 164 | |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 165 | template (value) EPS_MobileIdentityV |
| 166 | ts_NAS_MobileId_GUTI(template (value) GUTI guti) := { |
| 167 | typeOfIdentity := '110'B, |
| 168 | oddEvenInd_identity := { |
| 169 | guti := guti |
| 170 | } |
| 171 | } |
| 172 | |
Philipp Maier | 3e58245 | 2023-08-31 17:47:50 +0200 | [diff] [blame] | 173 | /* 9.9.3.12 EPS mobile identity */ |
| 174 | template (value) EPS_MobileIdentityLV |
| 175 | ts_EPS_MobileId_IMSI(hexstring imsi) := { |
| 176 | ePS_MobileIdentity := ts_NAS_MobileId_IMSI(imsi) |
| 177 | } |
| 178 | |
| 179 | template (value) EPS_MobileIdentityLV |
| 180 | ts_EPS_MobileId_IMEI(hexstring imei) := { |
| 181 | ePS_MobileIdentity := ts_NAS_MobileId_IMEI(imei) |
| 182 | } |
| 183 | |
| 184 | template (value) EPS_MobileIdentityLV |
| 185 | ts_EPS_MobileId_GUTI(hexstring mcc_mnc, OCT2 mmegi, OCT1 mmec, OCT4 tmsi) := { |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 186 | ePS_MobileIdentity := ts_NAS_MobileId_GUTI_fields(mcc_mnc, mmegi, mmec, tmsi) |
| 187 | } |
| 188 | |
| 189 | template (value) EPS_MobileIdentityLV |
| 190 | ts_EPS_MobileId_GUTI_(template (value) GUTI guti) := { |
| 191 | ePS_MobileIdentity := ts_NAS_MobileId_GUTI(guti) |
| 192 | } |
| 193 | |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 194 | /* 9.9.3.25 Nonce */ |
| 195 | template (value) NonceTV |
| 196 | ts_NonceTV(template (value) OCT4 nonce) := { |
| 197 | elementIdentifier := '55'O, |
| 198 | noncevalue := nonce |
| 199 | } |
| 200 | function f_ts_NonceTV(template (omit) OCT4 nonce) return template (omit) NonceTV { |
| 201 | if (istemplatekind(nonce, "omit")) { |
| 202 | return omit; |
| 203 | } |
| 204 | return ts_NonceTV(nonce); |
| 205 | } |
| 206 | |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 207 | /* 9.9.3.26 P-TMSI signature */ |
| 208 | template (value) P_TMSISignatureTV |
| 209 | ts_PTMSI_SignatureTV(template (value) OCT3 ptmsi_sig) := { |
| 210 | elementIdentifier := '19'O, |
| 211 | valueField := ptmsi_sig |
| 212 | } |
| 213 | |
| 214 | /* 9.9.3.45 GUTI Type */ |
| 215 | const BIT1 GUTI_TYPE_NATIVE := '0'B; |
| 216 | const BIT1 GUTI_TYPE_MAPPED := '1'B; |
| 217 | template (value) GUTI_TypeTV |
| 218 | ts_GUTI_TypeTV(template (value) BIT1 guti_type) := { |
| 219 | gUTI_Type := guti_type, |
| 220 | spare := '000'B, |
| 221 | elementIdentifier := '1110'B |
Philipp Maier | 3e58245 | 2023-08-31 17:47:50 +0200 | [diff] [blame] | 222 | } |
| 223 | |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 224 | template (value) PDU_NAS_EPS |
| 225 | ts_NAS_EMM_SecurityProtected(BIT4 sec_hdr_t, integer seq_nr, octetstring inner_nas) := { |
| 226 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 227 | ePS_messages := { |
| 228 | ePS_MobilityManagement := { |
| 229 | pDU_NAS_EPS_SecurityProtectedNASMessage := { |
| 230 | securityHeaderType := sec_hdr_t, |
| 231 | messageAuthenticationCode := '00000000'O, |
| 232 | sequenceNumber := seq_nr, |
| 233 | nAS_Message := inner_nas |
| 234 | } |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | template (present) PDU_NAS_EPS |
| 239 | tr_NAS_EMM_SecurityProtected := { |
| 240 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 241 | ePS_messages := { |
| 242 | ePS_MobilityManagement := { |
| 243 | pDU_NAS_EPS_SecurityProtectedNASMessage := ? |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | const BIT3 NAS_PDN_T_IPv4 := '001'B; |
| 249 | const BIT3 NAS_PDN_T_IPv6 := '010'B; |
| 250 | const BIT3 NAS_PDN_T_IPv4v6 := '011'B; |
| 251 | const BIT3 NAS_PDN_T_NonIP := '101'B; |
| 252 | |
| 253 | |
| 254 | /********************************************************************************* |
| 255 | * Mobility Management |
| 256 | *********************************************************************************/ |
| 257 | |
| 258 | /* 8.2.1 Attach Accept */ |
| 259 | template (value) PDU_NAS_EPS |
| 260 | ts_NAS_AttachAccept(template (value) EPS_AttachResultV result, |
| 261 | template (value) GPRSTimerV t3412, |
| 262 | template (value) TAI_Lists tai_lists, |
| 263 | template (value) octetstring esm_enc) := { |
| 264 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 265 | ePS_messages := { |
| 266 | ePS_MobilityManagement := { |
| 267 | pDU_NAS_EPS_AttachAccept := { |
| 268 | securityHeaderType := c_EPS_SEC_NONE, |
| 269 | messageType := '01000010'B, |
| 270 | ePS_AttachResult := result, |
| 271 | spare := '0000'B, |
| 272 | t3412 := t3412, |
| 273 | tAI_List := { |
| 274 | lengthIndicator := 0, |
| 275 | trackingAreaIdentityLists := tai_lists |
| 276 | }, |
| 277 | eSM_MessageContainer := ts_NAS_EsmMsgContLVE(esm_enc), |
| 278 | gUTI := omit, |
| 279 | locationAreaIdentification := omit, |
| 280 | msIdentity := omit, |
| 281 | eMMCause := omit, |
| 282 | t3402 := omit, |
| 283 | t3423 := omit, |
| 284 | equivalentPLMNs := omit, |
| 285 | emergencyNumberList := omit, |
| 286 | ePS_NetworkFeatureSupport := omit, |
| 287 | additionalUpdateResult := omit, |
| 288 | t3412_Extended := omit, |
| 289 | t3324 := omit, |
| 290 | extendedDRXParameters := omit, |
| 291 | dNCID := omit, |
| 292 | sMS_ServiceStatus := omit, |
| 293 | non3GPP_NW_ProvidedPolicies := omit, |
| 294 | t3448 := omit, |
| 295 | networkPolicy := omit, |
| 296 | t3447 := omit, |
| 297 | extendedEmergencyNumberList := omit |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | } |
| 302 | template (present) PDU_NAS_EPS |
| 303 | tr_NAS_AttachAccept(template (present) EPS_AttachResultV result := ?, |
| 304 | template (present) GPRSTimerV t3412 := ?, |
| 305 | template (present) TAI_Lists tai_lists := ?, |
| 306 | template (present) octetstring esm_enc := ?) := { |
| 307 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 308 | ePS_messages := { |
| 309 | ePS_MobilityManagement := { |
| 310 | pDU_NAS_EPS_AttachAccept := { |
| 311 | securityHeaderType := c_EPS_SEC_NONE, |
| 312 | messageType := '01000010'B, |
| 313 | ePS_AttachResult := result, |
| 314 | spare := ?, |
| 315 | t3412 := t3412, |
| 316 | tAI_List := { |
| 317 | lengthIndicator := ?, |
| 318 | trackingAreaIdentityLists := tai_lists |
| 319 | }, |
| 320 | eSM_MessageContainer := tr_NAS_EsmMsgContLVE(esm_enc), |
| 321 | gUTI := *, |
| 322 | locationAreaIdentification := *, |
| 323 | msIdentity := *, |
| 324 | eMMCause := *, |
| 325 | t3402 := *, |
| 326 | t3423 := *, |
| 327 | equivalentPLMNs := *, |
| 328 | emergencyNumberList := *, |
| 329 | ePS_NetworkFeatureSupport := *, |
| 330 | additionalUpdateResult := *, |
| 331 | t3412_Extended := *, |
| 332 | t3324 := *, |
| 333 | extendedDRXParameters := *, |
| 334 | dNCID := *, |
| 335 | sMS_ServiceStatus := *, |
| 336 | non3GPP_NW_ProvidedPolicies := *, |
| 337 | t3448 := *, |
| 338 | networkPolicy := *, |
| 339 | t3447 := *, |
| 340 | extendedEmergencyNumberList := * |
| 341 | } |
| 342 | } |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | |
| 347 | /* 8.2.2 Attach Complete */ |
| 348 | template (value) PDU_NAS_EPS |
| 349 | ts_NAS_AttachComplete(template (value) octetstring esm_enc) := { |
| 350 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 351 | ePS_messages := { |
| 352 | ePS_MobilityManagement := { |
| 353 | pDU_NAS_EPS_AttachComplete := { |
| 354 | securityHeaderType := c_EPS_SEC_NONE, |
| 355 | messageType := '01000011'B, |
| 356 | eSM_MessageContainer := ts_NAS_EsmMsgContLVE(esm_enc) |
| 357 | } |
| 358 | } |
| 359 | } |
| 360 | } |
| 361 | template (present) PDU_NAS_EPS |
| 362 | tr_NAS_AttachComplete(template (present) octetstring esm_enc := ?) := { |
| 363 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 364 | ePS_messages := { |
| 365 | ePS_MobilityManagement := { |
| 366 | pDU_NAS_EPS_AttachComplete := { |
| 367 | securityHeaderType := c_EPS_SEC_NONE, |
| 368 | messageType := '01000011'B, |
| 369 | eSM_MessageContainer := tr_NAS_EsmMsgContLVE(esm_enc) |
| 370 | } |
| 371 | } |
| 372 | } |
| 373 | } |
| 374 | |
Philipp Maier | 9e79658 | 2023-08-31 17:52:42 +0200 | [diff] [blame] | 375 | /* 9.9.3.14 EPS update type */ |
| 376 | const BIT3 c_EPS_UPD_TYPE_TA_UPD := '000'B; |
| 377 | const BIT3 c_EPS_UPD_TYPE_COMB_TA_LA_UPD := '001'B; |
| 378 | const BIT3 c_EPS_UPD_TYPE_COMB_TA_LA_UPD_IMSI_ATTACH := '010'B; |
| 379 | const BIT3 c_EPS_UPD_TYPE_TA_UPD_PERIODIC := '011'B; |
| 380 | template (value) EPS_UpdateTypeV ts_EPS_UpdateTypeV(BIT3 typeOfUpdate := c_EPS_UPD_TYPE_TA_UPD, BIT1 activeFlag := '0'B) := { |
| 381 | typeOfUpdate := typeOfUpdate, |
| 382 | activeFlag := activeFlag |
| 383 | } |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 384 | |
Philipp Maier | 64bfc89 | 2023-08-31 17:54:28 +0200 | [diff] [blame] | 385 | /* 9.9.3.21 NAS key set identifier */ |
| 386 | const BIT3 c_NAS_KEY_SET_ID_NO_KEY := '111'B; |
| 387 | const BIT1 c_NAS_TSC_NATIVE_SEC_CTX := '0'B; |
| 388 | const BIT1 c_NAS_TSC_MAPPED_SEC_CTX := '1'B; |
| 389 | template (value) NAS_KeySetIdentifierV ts_NAS_KeySetIdentifierV(BIT3 identifier := c_NAS_KEY_SET_ID_NO_KEY, BIT1 tSC := c_NAS_TSC_NATIVE_SEC_CTX) := { |
| 390 | identifier := identifier, |
| 391 | tSC := tSC |
| 392 | } |
| 393 | |
Pau Espin Pedrol | b5ad4ae | 2024-01-09 10:28:02 +0100 | [diff] [blame] | 394 | /* 8.2.26 Tracking Area Update Accept */ |
| 395 | template (present) PDU_NAS_EPS |
| 396 | tr_PDU_NAS_EPS_TrackingAreaUpdateAccept := { |
| 397 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 398 | ePS_messages := { |
| 399 | ePS_MobilityManagement := { |
| 400 | pDU_NAS_EPS_TrackingAreaUpdateAccept := { |
| 401 | securityHeaderType := c_EPS_SEC_NONE, |
| 402 | messageType := '01001001'B, |
| 403 | updateResult := { |
| 404 | valueOfUpdateResult := ?, |
| 405 | spare := '0'B |
| 406 | }, |
| 407 | spareHalfOctet := '0000'B, |
| 408 | t3412 := *, |
| 409 | gUTI := *, |
| 410 | tAI_List := *, |
| 411 | ePSBearerContextStatus := *, |
| 412 | locationAreaIdentification := *, |
| 413 | msIdentity := *, |
| 414 | eMMCause := *, |
| 415 | t3402 := *, |
| 416 | t3423 := *, |
| 417 | equivalentPLMNs := *, |
| 418 | emergencyNumberList := *, |
| 419 | ePS_NetworkFeatureSupport := *, |
| 420 | additionalUpdateResult := *, |
| 421 | t3412_Extended := *, |
| 422 | t3324 := *, |
| 423 | extendedDRXParameters := *, |
| 424 | headerCompressionConfigurationStatus := *, |
| 425 | dNCID := *, |
| 426 | sMS_ServiceStatus := *, |
| 427 | non3GPP_NW_ProvidedPolicies := *, |
| 428 | t3448 := *, |
| 429 | networkPolicy := *, |
| 430 | t3447 := *, |
| 431 | extendedEmergencyNumberList := * |
| 432 | } |
| 433 | } |
| 434 | } |
| 435 | } |
| 436 | |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 437 | /* 8.2.27 Tracking Area Update Complete */ |
| 438 | template (value) PDU_NAS_EPS |
| 439 | ts_PDU_NAS_EPS_TrackingAreaUpdateComplete(template (value) BIT4 securityHeaderType := c_EPS_SEC_NONE) := { |
| 440 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 441 | ePS_messages := { |
| 442 | ePS_MobilityManagement := { |
| 443 | pDU_NAS_EPS_TrackingAreaUpdateComplete := { |
| 444 | securityHeaderType := securityHeaderType, |
| 445 | messageType := '01001010'B |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
Philipp Maier | c1d9ef0 | 2023-09-01 14:41:55 +0200 | [diff] [blame] | 451 | /* 8.2.28 Tracking Area Update Reject */ |
| 452 | template (present) PDU_NAS_EPS |
| 453 | tr_PDU_NAS_EPS_TrackingAreaUpdateReject(template (present) EMM_CauseV cause := ?) := { |
| 454 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 455 | ePS_messages := { |
| 456 | ePS_MobilityManagement := { |
| 457 | pDU_NAS_EPS_TrackingAreaUpdateReject := { |
| 458 | securityHeaderType := c_EPS_SEC_NONE, |
| 459 | messageType := '01001011'B, |
| 460 | emmCause := cause, |
| 461 | t3346 := *, |
| 462 | extendedEmmCause := * |
| 463 | } |
| 464 | } |
| 465 | } |
| 466 | } |
| 467 | |
Philipp Maier | f155f6f | 2023-08-31 17:55:29 +0200 | [diff] [blame] | 468 | /* 8.2.29 Tracking Area Update Request */ |
| 469 | template (value) PDU_NAS_EPS |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 470 | ts_PDU_NAS_EPS_TrackingAreaUpdateRequest(template (value) EPS_MobileIdentityLV old_guti, |
| 471 | template (omit) P_TMSISignatureTV old_ptmsi_sig := omit, |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 472 | template (omit) GUTI_TypeTV old_guti_type := omit, |
| 473 | template (omit) NonceTV nonce_ue := omit, |
| 474 | template (omit) CipheringKeySequenceNumberTV gprs_cksn := omit) := { |
Philipp Maier | f155f6f | 2023-08-31 17:55:29 +0200 | [diff] [blame] | 475 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 476 | ePS_messages := { |
| 477 | ePS_MobilityManagement := { |
| 478 | pDU_NAS_EPS_TrackingAreaUpdateRequest := { |
| 479 | securityHeaderType := c_EPS_SEC_NONE, |
| 480 | messageType := '01001000'B, |
| 481 | ePSupdateType := ts_EPS_UpdateTypeV, |
| 482 | nasKeySetId := ts_NAS_KeySetIdentifierV, |
| 483 | oldGUTI := old_guti, |
| 484 | nonCurrentNative_nasKeySetId := omit, |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 485 | gprsCipheringKeySequenceNumber := gprs_cksn, |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 486 | old_P_TMSISignature := old_ptmsi_sig, |
Philipp Maier | f155f6f | 2023-08-31 17:55:29 +0200 | [diff] [blame] | 487 | additionalGUTI := omit, |
Pau Espin Pedrol | 3561887 | 2024-01-15 15:25:18 +0100 | [diff] [blame] | 488 | nonce := nonce_ue, |
Philipp Maier | f155f6f | 2023-08-31 17:55:29 +0200 | [diff] [blame] | 489 | uENetworkCapability := omit, |
| 490 | lastVisitedRegisteredTAI := omit, |
| 491 | dRXParameter := omit, |
| 492 | uE_RadioCapabilityInfoUpdateNeeded := omit, |
| 493 | ePSBearerContextStatus := omit, |
| 494 | mSNetworkCapability := omit, |
| 495 | oldLocationAreaIdentification := omit, |
| 496 | tMSIStatusTV := omit, |
| 497 | mobileStationClassmark2 := omit, |
| 498 | mobileStationClassmark3 := omit, |
| 499 | supportedCodecList := omit, |
| 500 | additionalUpdateType := omit, |
| 501 | voiceDomainPrefandUEsettings := omit, |
Pau Espin Pedrol | a94e823 | 2024-01-09 10:27:16 +0100 | [diff] [blame] | 502 | oldGUTI_Type := old_guti_type, |
Philipp Maier | f155f6f | 2023-08-31 17:55:29 +0200 | [diff] [blame] | 503 | deviceProperties := omit, |
| 504 | mS_NetworkFeatureSupport := omit, |
| 505 | tMSIBasedNRIContainer := omit, |
| 506 | t3324 := omit, |
| 507 | t3412_Extended := omit, |
| 508 | extendedDRXParameters := omit, |
| 509 | uEAdditionalSecurityCapability := omit, |
| 510 | uEStatus := omit |
| 511 | } |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 516 | /* 8.2.3 Attach Reject */ |
| 517 | template (value) PDU_NAS_EPS |
| 518 | ts_NAS_AttachReject(template (value) EMM_CauseV cause) := { |
| 519 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 520 | ePS_messages := { |
| 521 | ePS_MobilityManagement := { |
| 522 | pDU_NAS_EPS_AttachReject := { |
| 523 | securityHeaderType := c_EPS_SEC_NONE, |
| 524 | messageType := '01000100'B, |
| 525 | emmCause := cause, |
| 526 | eSM_MessageContainer := omit, |
| 527 | t3346 := omit, |
| 528 | t3402 := omit, |
| 529 | extendedEmmCause := omit |
| 530 | } |
| 531 | } |
| 532 | } |
| 533 | } |
| 534 | template (present) PDU_NAS_EPS |
| 535 | tr_NAS_AttachReject(template (present) EMM_CauseV cause := ?) := { |
| 536 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 537 | ePS_messages := { |
| 538 | ePS_MobilityManagement := { |
| 539 | pDU_NAS_EPS_AttachReject := { |
| 540 | securityHeaderType := c_EPS_SEC_NONE, |
| 541 | messageType := '01000100'B, |
| 542 | emmCause := cause, |
| 543 | eSM_MessageContainer := omit, |
| 544 | t3346 := omit, |
| 545 | t3402 := omit, |
| 546 | extendedEmmCause := omit |
| 547 | } |
| 548 | } |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | /* 8.2.4 Attach Request */ |
| 553 | template (value) PDU_NAS_EPS |
| 554 | ts_NAS_AttachRequest(template (value) BIT3 att_type, |
| 555 | template (value) BIT3 kset_id, |
| 556 | template (value) EPS_MobileIdentityV mobile_id, |
| 557 | template (value) UENetworkCapabilityV ue_net_cap, |
| 558 | template (value) octetstring esm_enc) := { |
| 559 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 560 | ePS_messages := { |
| 561 | ePS_MobilityManagement := { |
| 562 | pDU_NAS_EPS_AttachRequest := { |
| 563 | securityHeaderType := c_EPS_SEC_NONE, |
| 564 | messageType := '01000001'B, |
| 565 | ePS_attachType := { |
| 566 | typeOfAttach := att_type, |
| 567 | spare := '0'B |
| 568 | }, |
| 569 | nasKeySetId := { |
| 570 | identifier := kset_id, |
| 571 | tSC := '1'B |
| 572 | }, |
| 573 | ePSMobileId := { |
| 574 | lengthIndicator := 0, |
| 575 | ePS_MobileIdentity := mobile_id |
| 576 | }, |
| 577 | uENetworkCapability := { |
| 578 | lengthIndicator := 0, |
| 579 | uENetworkCapabilityV := ue_net_cap |
| 580 | }, |
| 581 | eSM_MessageContainer := ts_NAS_EsmMsgContLVE(esm_enc), |
| 582 | old_P_TMSISignature := omit, |
| 583 | additionalGUTI := omit, |
| 584 | lastVisitedRegisteredTAI := omit, |
| 585 | dRXParameter := omit, |
| 586 | mSNetworkCapability := omit, |
| 587 | oldLocationAreaIdentification := omit, |
| 588 | tMSIStatusTV := omit, |
| 589 | mobileStationClassmark2 := omit, |
| 590 | mobileStationClassmark3 := omit, |
| 591 | supportedCodecList := omit, |
| 592 | additionalUpdateType := omit, |
| 593 | voiceDomainPrefandUEsettings := omit, |
| 594 | deviceProperties := omit, |
| 595 | oldGUTI_Type := omit, |
| 596 | mS_NetworkFeatureSupport := omit, |
| 597 | tMSIBasedNRIContainer := omit, |
| 598 | t3324 := omit, |
| 599 | t3412_Extended := omit, |
| 600 | extendedDRXParameters := omit, |
| 601 | uEAdditionalSecurityCapability := omit |
| 602 | } |
| 603 | } |
| 604 | } |
| 605 | } |
| 606 | template (present) PDU_NAS_EPS |
| 607 | tr_NAS_AttachRequest(template (present) BIT3 att_type := ?, |
| 608 | template (present) BIT3 kset_id := ?, |
| 609 | template (present) EPS_MobileIdentityV mobile_id := ?, |
| 610 | template (present) UENetworkCapabilityV ue_net_cap := ?, |
| 611 | template (present) octetstring esm_enc := ?) := { |
| 612 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 613 | ePS_messages := { |
| 614 | ePS_MobilityManagement := { |
| 615 | pDU_NAS_EPS_AttachRequest := { |
| 616 | securityHeaderType := ?, |
| 617 | messageType := '01000001'B, |
| 618 | ePS_attachType := { |
| 619 | typeOfAttach := att_type, |
| 620 | spare := ? |
| 621 | }, |
| 622 | nasKeySetId := { |
| 623 | identifier := kset_id, |
| 624 | tSC := ? |
| 625 | }, |
| 626 | ePSMobileId := { |
| 627 | lengthIndicator := ?, |
| 628 | ePS_MobileIdentity := mobile_id |
| 629 | }, |
| 630 | uENetworkCapability := { |
| 631 | lengthIndicator := ?, |
| 632 | uENetworkCapabilityV := ue_net_cap |
| 633 | }, |
| 634 | eSM_MessageContainer := tr_NAS_EsmMsgContLVE(esm_enc), |
| 635 | old_P_TMSISignature := *, |
| 636 | additionalGUTI := *, |
| 637 | lastVisitedRegisteredTAI := *, |
| 638 | dRXParameter := *, |
| 639 | mSNetworkCapability := *, |
| 640 | oldLocationAreaIdentification := *, |
| 641 | tMSIStatusTV := *, |
| 642 | mobileStationClassmark2 := *, |
| 643 | mobileStationClassmark3 := *, |
| 644 | supportedCodecList := *, |
| 645 | additionalUpdateType := *, |
| 646 | voiceDomainPrefandUEsettings := *, |
| 647 | deviceProperties := *, |
| 648 | oldGUTI_Type := *, |
| 649 | mS_NetworkFeatureSupport := *, |
| 650 | tMSIBasedNRIContainer := *, |
| 651 | t3324 := *, |
| 652 | t3412_Extended := *, |
| 653 | extendedDRXParameters := *, |
| 654 | uEAdditionalSecurityCapability := * |
| 655 | } |
| 656 | } |
| 657 | } |
| 658 | } |
| 659 | |
| 660 | |
| 661 | /* 8.2.5 Authentication Failure */ |
| 662 | template (value) PDU_NAS_EPS |
| 663 | ts_NAS_AuthFail(template (value) EMM_CauseV cause /* template (omit) OCT14 auth_fail_par */) := { |
| 664 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 665 | ePS_messages := { |
| 666 | ePS_MobilityManagement := { |
| 667 | pDU_NAS_EPS_AuthenticationFailure := { |
| 668 | securityHeaderType := c_EPS_SEC_NONE, |
| 669 | messageType := '01011100'B, |
| 670 | emmCause := cause, |
| 671 | authenticationFailureParameter := omit |
| 672 | } |
| 673 | } |
| 674 | } |
| 675 | } |
| 676 | template (value) PDU_NAS_EPS |
| 677 | ts_NAS_AuthFail_par(template (value) EMM_CauseV cause, |
| 678 | template (value) OCT14 auth_fail_par) := { |
| 679 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 680 | ePS_messages := { |
| 681 | ePS_MobilityManagement := { |
| 682 | pDU_NAS_EPS_AuthenticationFailure := { |
| 683 | securityHeaderType := c_EPS_SEC_NONE, |
| 684 | messageType := '01011100'B, |
| 685 | emmCause := cause, |
| 686 | authenticationFailureParameter := { |
| 687 | elementIdentifier := '30'O, |
| 688 | lengthIndicator := lengthof(auth_fail_par), |
| 689 | authenticationFailureParameter := auth_fail_par |
| 690 | } |
| 691 | } |
| 692 | } |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | /* 8.2.6 Authentication Reject */ |
| 697 | template (value) PDU_NAS_EPS |
| 698 | ts_NAS_AuthRej := { |
| 699 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 700 | ePS_messages := { |
| 701 | ePS_MobilityManagement := { |
| 702 | pDU_NAS_EPS_AuthenticationReject := { |
| 703 | securityHeaderType := c_EPS_SEC_NONE, |
| 704 | messageType := '01010100'B |
| 705 | } |
| 706 | } |
| 707 | } |
| 708 | } |
| 709 | template (present) PDU_NAS_EPS |
| 710 | tr_NAS_AuthRej := { |
| 711 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 712 | ePS_messages := { |
| 713 | ePS_MobilityManagement := { |
| 714 | pDU_NAS_EPS_AuthenticationReject := { |
| 715 | securityHeaderType := ?, |
| 716 | messageType := '01010100'B |
| 717 | } |
| 718 | } |
| 719 | } |
| 720 | } |
| 721 | |
| 722 | /* 8.2.7 Authentication Request */ |
| 723 | template (value) PDU_NAS_EPS |
| 724 | ts_NAS_AuthReq(template (value) NAS_KeySetIdentifierV kset_id, |
| 725 | OCT16 rand, OCT16 autn) := { |
| 726 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 727 | ePS_messages := { |
| 728 | ePS_MobilityManagement := { |
| 729 | pDU_NAS_EPS_AuthenticationRequest := { |
| 730 | securityHeaderType := c_EPS_SEC_NONE, |
| 731 | messageType := '01010010'B, |
| 732 | nasKeySetId := kset_id, |
| 733 | spare := '0000'B, |
| 734 | authenticationParameterRAND := { |
| 735 | rAND := rand |
| 736 | }, |
| 737 | authenticationParameterAUTN := { |
| 738 | lengthIndicator := lengthof(autn), |
| 739 | aUTN := autn |
| 740 | } |
| 741 | } |
| 742 | } |
| 743 | } |
| 744 | } |
| 745 | template (present) PDU_NAS_EPS |
| 746 | tr_NAS_AuthReq(template (present) NAS_KeySetIdentifierV kset_id := ?, |
| 747 | template (present) OCT16 rand := ?, |
| 748 | template (present) OCT16 autn := ?) := { |
| 749 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 750 | ePS_messages := { |
| 751 | ePS_MobilityManagement := { |
| 752 | pDU_NAS_EPS_AuthenticationRequest := { |
| 753 | securityHeaderType := ?, |
| 754 | messageType := '01010010'B, |
| 755 | nasKeySetId := kset_id, |
| 756 | spare := '0000'B, |
| 757 | authenticationParameterRAND := { |
| 758 | rAND := rand |
| 759 | }, |
| 760 | authenticationParameterAUTN := { |
| 761 | lengthIndicator := ?, |
| 762 | aUTN := autn |
| 763 | } |
| 764 | } |
| 765 | } |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | /* 8.2.8 Authentication Response */ |
| 770 | template (value) PDU_NAS_EPS |
| 771 | ts_NAS_AuthResp(octetstring res) := { |
| 772 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 773 | ePS_messages := { |
| 774 | ePS_MobilityManagement := { |
| 775 | pDU_NAS_EPS_AuthenticationResponse := { |
| 776 | securityHeaderType := c_EPS_SEC_NONE, |
| 777 | messageType := '01010011'B, |
| 778 | authenticationResponseParameter := { |
| 779 | lengthIndicator := lengthof(res), |
| 780 | authenticationResponseParameter := { |
| 781 | rES := res |
| 782 | } |
| 783 | } |
| 784 | } |
| 785 | } |
| 786 | } |
| 787 | } |
| 788 | template (present) PDU_NAS_EPS |
| 789 | tr_NAS_AuthResp(template OCT16 res := ?) := { |
| 790 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 791 | ePS_messages := { |
| 792 | ePS_MobilityManagement := { |
| 793 | pDU_NAS_EPS_AuthenticationResponse := { |
| 794 | securityHeaderType := ?, |
| 795 | messageType := '01010011'B, |
| 796 | authenticationResponseParameter := { |
| 797 | lengthIndicator := ?, |
| 798 | authenticationResponseParameter := { |
| 799 | rES := res |
| 800 | } |
| 801 | } |
| 802 | } |
| 803 | } |
| 804 | } |
| 805 | } |
| 806 | |
Pau Espin Pedrol | 53aa61d | 2023-12-21 19:10:45 +0100 | [diff] [blame] | 807 | /* 8.2.13 EMM information */ |
| 808 | template (present) PDU_NAS_EPS |
| 809 | tr_NAS_EMMInformation := { |
| 810 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 811 | ePS_messages := { |
| 812 | ePS_MobilityManagement := { |
| 813 | pDU_NAS_EPS_EMM_Information := { |
| 814 | securityHeaderType := ?, |
| 815 | messageType := '01100001'B, |
| 816 | fullNameForNetwork := *, |
| 817 | shortNameForNetwork := *, |
| 818 | localTimeZone := *, |
| 819 | universalTimeAndLocalTimeZone := *, |
| 820 | networkDaylightSavingTime := * |
| 821 | } |
| 822 | } |
| 823 | } |
| 824 | } |
| 825 | |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 826 | /* 8.2.18 Identity Request */ |
| 827 | template (value) PDU_NAS_EPS |
| 828 | ts_NAS_IdentityReq(template (value) IdentityType2V id_type) := { |
| 829 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 830 | ePS_messages := { |
| 831 | ePS_MobilityManagement := { |
| 832 | pDU_NAS_EPS_IdentityRequest := { |
| 833 | securityHeaderType := c_EPS_SEC_NONE, |
| 834 | messageType := '01010101'B, |
| 835 | identityType := id_type, |
| 836 | spareHalfOctet := '0000'B |
| 837 | } |
| 838 | } |
| 839 | } |
| 840 | } |
| 841 | template (present) PDU_NAS_EPS |
| 842 | tr_NAS_IdentityReq(template (present) IdentityType2V id_type := ?) := { |
| 843 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 844 | ePS_messages := { |
| 845 | ePS_MobilityManagement := { |
| 846 | pDU_NAS_EPS_IdentityRequest := { |
| 847 | securityHeaderType := c_EPS_SEC_NONE, |
| 848 | messageType := '01010101'B, |
| 849 | identityType := id_type, |
| 850 | spareHalfOctet := ? |
| 851 | } |
| 852 | } |
| 853 | } |
| 854 | } |
| 855 | |
| 856 | /* 8.2.19 Identity Response */ |
| 857 | template (value) PDU_NAS_EPS |
| 858 | ts_NAS_IdentityResp(template (value) MobileIdentityV mobile_id) := { |
| 859 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 860 | ePS_messages := { |
| 861 | ePS_MobilityManagement := { |
| 862 | pDU_NAS_EPS_IdentityResponse := { |
| 863 | securityHeaderType := c_EPS_SEC_NONE, |
| 864 | messageType := '01010110'B, |
| 865 | mobileIdentity := ts_NAS_MobileIdLV(mobile_id) |
| 866 | } |
| 867 | } |
| 868 | } |
| 869 | } |
| 870 | template (present) PDU_NAS_EPS |
| 871 | tr_NAS_IdentityResp(template (present) MobileIdentityV mobile_id := ?) := { |
| 872 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 873 | ePS_messages := { |
| 874 | ePS_MobilityManagement := { |
| 875 | pDU_NAS_EPS_IdentityResponse := { |
| 876 | securityHeaderType := c_EPS_SEC_NONE, |
| 877 | messageType := '01010110'B, |
| 878 | mobileIdentity := tr_NAS_MobileIdLV(mobile_id) |
| 879 | } |
| 880 | } |
| 881 | } |
| 882 | } |
| 883 | |
| 884 | |
| 885 | |
| 886 | |
| 887 | /* 8.2.20 Security Mode Command */ |
| 888 | template (value) PDU_NAS_EPS |
| 889 | ts_NAS_SecModeCmd(template (value) NAS_SecurityAlgorithmsV alg, |
| 890 | template (value) NAS_KeySetIdentifierV kset_id, |
| 891 | template (value) UESecurityCapabilityLV ue_sec_cap) := { |
| 892 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 893 | ePS_messages := { |
| 894 | ePS_MobilityManagement := { |
| 895 | pDU_NAS_EPS_SecurityModeCommand := { |
| 896 | securityHeaderType := c_EPS_SEC_NONE, |
| 897 | messageType := '01011101'B, |
| 898 | selected_NAS_SecurityAlgorithms := alg, |
| 899 | nasKeySetId := kset_id, |
| 900 | spareHalfOctet := '0000'B, |
| 901 | replayed_UE_SecurityCapability := ue_sec_cap, |
| 902 | iMEISV_Request := omit, |
| 903 | replayedNonceUE := omit, |
| 904 | nonceMME := omit, |
| 905 | hashMME := omit, |
| 906 | uEAdditionalSecurityCapability := omit |
| 907 | } |
| 908 | } |
| 909 | } |
| 910 | } |
| 911 | template (present) PDU_NAS_EPS |
| 912 | tr_NAS_SecModeCmd(template (present) NAS_SecurityAlgorithmsV alg := ?, |
| 913 | template (present) NAS_KeySetIdentifierV kset_id := ?, |
| 914 | template (present) UESecurityCapabilityLV ue_sec_cap := ?) := { |
| 915 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 916 | ePS_messages := { |
| 917 | ePS_MobilityManagement := { |
| 918 | pDU_NAS_EPS_SecurityModeCommand := { |
| 919 | securityHeaderType := c_EPS_SEC_NONE, |
| 920 | messageType := '01011101'B, |
| 921 | selected_NAS_SecurityAlgorithms := alg, |
| 922 | nasKeySetId := kset_id, |
| 923 | spareHalfOctet := ?, |
| 924 | replayed_UE_SecurityCapability := ue_sec_cap, |
| 925 | iMEISV_Request := *, |
| 926 | replayedNonceUE := *, |
| 927 | nonceMME := *, |
| 928 | hashMME := *, |
| 929 | uEAdditionalSecurityCapability := * |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | /* 8.2.21 Security Mode Complete */ |
| 936 | template (value) PDU_NAS_EPS |
| 937 | ts_NAS_SecModeCmpl := { |
| 938 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 939 | ePS_messages := { |
| 940 | ePS_MobilityManagement := { |
| 941 | pDU_NAS_EPS_SecurityModeComplete := { |
| 942 | securityHeaderType := c_EPS_SEC_NONE, |
| 943 | messageType := '01011110'B, |
| 944 | iMEISV := omit, |
| 945 | replayedNASMessageContainer := omit |
| 946 | } |
| 947 | } |
| 948 | } |
| 949 | } |
| 950 | template (present) PDU_NAS_EPS |
| 951 | tr_NAS_SecModeCmpl := { |
| 952 | protocolDiscriminator := c_EPS_NAS_PD_EMM, |
| 953 | ePS_messages := { |
| 954 | ePS_MobilityManagement := { |
| 955 | pDU_NAS_EPS_SecurityModeComplete := { |
| 956 | securityHeaderType := c_EPS_SEC_NONE, |
| 957 | messageType := '01011110'B, |
| 958 | iMEISV := *, |
| 959 | replayedNASMessageContainer := * |
| 960 | } |
| 961 | } |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | /********************************************************************************* |
| 966 | * Session Management |
| 967 | *********************************************************************************/ |
| 968 | |
| 969 | /* 9.9.4.11 - 10.5.6.3/24.008 */ |
| 970 | private function ts_NAS_PCO_TLV(template (omit) ProtocolConfigOptionsV pco) |
| 971 | return template (omit) ProtocolConfigOptionsTLV { |
| 972 | var template (value) ProtocolConfigOptionsTLV ret; |
| 973 | if (istemplatekind(pco, "omit")) { |
| 974 | return omit; |
| 975 | } |
| 976 | ret := { |
| 977 | elementIdentifier := '27'O, |
| 978 | protocolConfigOptions := { |
| 979 | lengthIndicator := 0, |
| 980 | protocolConfigOptionsV := pco |
| 981 | } |
| 982 | } |
| 983 | return ret; |
| 984 | } |
| 985 | private function tr_NAS_PCO_TLV(template ProtocolConfigOptionsV pco := ?) |
| 986 | return template ProtocolConfigOptionsTLV { |
| 987 | var template ProtocolConfigOptionsTLV ret := { |
| 988 | elementIdentifier := '27'O, |
| 989 | protocolConfigOptions := { |
| 990 | lengthIndicator := ?, |
| 991 | protocolConfigOptionsV := pco |
| 992 | } |
| 993 | } |
| 994 | if (istemplatekind(pco, "omit")) { |
| 995 | return omit; |
| 996 | } else if (istemplatekind(pco, "*")) { |
| 997 | return *; |
| 998 | } else { |
| 999 | return ret; |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | |
| 1004 | |
| 1005 | /* 8.3.20 PDN Connectivity Request */ |
| 1006 | template (value) PDU_NAS_EPS |
| 1007 | ts_NAS_PdnConnReq(template (value) BIT4 bearer_id, |
| 1008 | template (value) BIT8 proc_tid, |
| 1009 | template (value) BIT3 pdn_type, |
| 1010 | template (value) BIT3 req_type) := { |
| 1011 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1012 | ePS_messages := { |
| 1013 | ePS_SessionManagement := { |
| 1014 | pDU_NAS_EPS_PDN_ConnectivityRequest := { |
| 1015 | ePSBearerIdentity := bearer_id, |
| 1016 | procedureTransactionIdentifier := proc_tid, |
| 1017 | messageType := '11010000'B, |
| 1018 | requestType := { |
| 1019 | requestTypeValue := req_type, |
| 1020 | spare := '0'B |
| 1021 | }, |
| 1022 | pDN_Type := { |
| 1023 | pDN_TypeValue := pdn_type, |
| 1024 | spare := '0'B |
| 1025 | }, |
| 1026 | eSM_InformationTransferFlag := omit, |
| 1027 | accessPointName := omit, |
| 1028 | protocolConfigOptions := omit, |
| 1029 | deviceProperties := omit, |
| 1030 | nBIFOMContainer := omit, |
| 1031 | headerCompressinConfiguration := omit, |
| 1032 | extendedProtocolConfigurationOptions := omit |
| 1033 | } |
| 1034 | } |
| 1035 | } |
| 1036 | } |
| 1037 | template (present) PDU_NAS_EPS |
| 1038 | tr_NAS_PdnConnReq(template (present) BIT4 bearer_id := ?, |
| 1039 | template (present) BIT8 proc_tid := ?, |
| 1040 | template (present) BIT3 pdn_type := ?, |
| 1041 | template (present) BIT3 req_type := ?) := { |
| 1042 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1043 | ePS_messages := { |
| 1044 | ePS_SessionManagement := { |
| 1045 | pDU_NAS_EPS_PDN_ConnectivityRequest := { |
| 1046 | ePSBearerIdentity := bearer_id, |
| 1047 | procedureTransactionIdentifier := proc_tid, |
| 1048 | messageType := '11010000'B, |
| 1049 | requestType := { |
| 1050 | requestTypeValue := req_type, |
| 1051 | spare := '0'B |
| 1052 | }, |
| 1053 | pDN_Type := { |
| 1054 | pDN_TypeValue := pdn_type, |
| 1055 | spare := '0'B |
| 1056 | }, |
| 1057 | eSM_InformationTransferFlag := omit, |
| 1058 | accessPointName := omit, |
| 1059 | protocolConfigOptions := omit, |
| 1060 | deviceProperties := omit, |
| 1061 | nBIFOMContainer := omit, |
| 1062 | headerCompressinConfiguration := omit, |
| 1063 | extendedProtocolConfigurationOptions := omit |
| 1064 | } |
| 1065 | } |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | /* 8.3.19 PDN Connectivity Reject */ |
| 1070 | template (value) PDU_NAS_EPS |
| 1071 | ts_NAS_PdnConnRej(template (value) BIT4 bearer_id, |
| 1072 | template (value) BIT8 proc_tid, |
| 1073 | template (value) ESM_CauseV cause) := { |
| 1074 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1075 | ePS_messages := { |
| 1076 | ePS_SessionManagement := { |
| 1077 | pDU_NAS_EPS_PDN_ConnectivityReject := { |
| 1078 | ePSBearerIdentity := bearer_id, |
| 1079 | procedureTransactionIdentifier := proc_tid, |
| 1080 | messageType := '11010001'B, |
| 1081 | esmCause := cause, |
| 1082 | protocolConfigOptions := omit, |
| 1083 | backOffTimer := omit, |
| 1084 | reAttemptIndicator := omit, |
| 1085 | nBIFOMContainer := omit, |
| 1086 | extendedProtocolConfigurationOptions := omit |
| 1087 | } |
| 1088 | } |
| 1089 | } |
| 1090 | } |
| 1091 | template (present) PDU_NAS_EPS |
| 1092 | tr_NAS_PdnConnRej(template (present) BIT4 bearer_id := ?, |
| 1093 | template (present) BIT8 proc_tid := ?, |
| 1094 | template (present) ESM_CauseV cause := ?) := { |
| 1095 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1096 | ePS_messages := { |
| 1097 | ePS_SessionManagement := { |
| 1098 | pDU_NAS_EPS_PDN_ConnectivityReject := { |
| 1099 | ePSBearerIdentity := bearer_id, |
| 1100 | procedureTransactionIdentifier := proc_tid, |
| 1101 | messageType := '11010001'B, |
| 1102 | esmCause := cause, |
| 1103 | protocolConfigOptions := *, |
| 1104 | backOffTimer := *, |
| 1105 | reAttemptIndicator := *, |
| 1106 | nBIFOMContainer := *, |
| 1107 | extendedProtocolConfigurationOptions := * |
| 1108 | } |
| 1109 | } |
| 1110 | } |
| 1111 | } |
| 1112 | |
| 1113 | |
| 1114 | /* 8.3.6 Activate Default EPS Bearer Context Request */ |
| 1115 | template (value) PDU_NAS_EPS |
| 1116 | ts_NAS_ActDefEpsBearCtxReq(template (value) BIT4 bearer_id, |
| 1117 | template (value) BIT8 proc_tid, |
| 1118 | template (value) EPS_QualityOfServiceV qos, |
| 1119 | template (value) octetstring apn, |
| 1120 | template (value) BIT3 addr_type, |
| 1121 | template (value) octetstring addr_info) := { |
| 1122 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1123 | ePS_messages := { |
| 1124 | ePS_SessionManagement := { |
| 1125 | pDU_NAS_EPS_ActDefEPSBearerContextRequest := { |
| 1126 | ePSBearerIdentity := bearer_id, |
| 1127 | procedureTransactionIdentifier := proc_tid, |
| 1128 | messageType := '11000001'B, |
| 1129 | ePS_QoS := { |
| 1130 | lengthIndicator := 0, |
| 1131 | ePS_QualityOfServiceV := qos |
| 1132 | }, |
| 1133 | accessPointName := { |
| 1134 | lengthIndicator := 0, |
| 1135 | accessPointNameValue := apn |
| 1136 | }, |
| 1137 | pDN_Address := { |
| 1138 | lengthIndicator := 0, |
| 1139 | typeValue := addr_type, |
| 1140 | spare := '00000'B, |
| 1141 | addressInformation := addr_info |
| 1142 | }, |
| 1143 | transactionIdentifier := omit, |
| 1144 | negotiatedQoS := omit, |
| 1145 | negotiated_LLC_SAPI := omit, |
| 1146 | radioPriority := omit, |
| 1147 | packetFlowID := omit, |
| 1148 | aPN_AMBR := omit, |
| 1149 | esmCause := omit, |
| 1150 | protocolConfigOptions := omit, |
| 1151 | connectivityType := omit, |
| 1152 | wLANOffloadIndication := omit, |
| 1153 | nBIFOMContainer := omit, |
| 1154 | headerCompressinConfiguration := omit, |
| 1155 | controlPlaneOnlyIndication := omit, |
| 1156 | extendedProtocolConfigurationOptions := omit, |
| 1157 | servingPLMNRateControl := omit, |
| 1158 | extended_APN_AMBR := omit, |
| 1159 | extendedQoS := omit |
| 1160 | } |
| 1161 | } |
| 1162 | } |
| 1163 | } |
Pau Espin Pedrol | ecfc7d6 | 2023-12-13 18:49:29 +0100 | [diff] [blame] | 1164 | template (present) PDU_NAS_EPS |
| 1165 | tr_NAS_ActDefEpsBearCtxReq(template (present) BIT4 bearer_id := ?, |
| 1166 | template (present) BIT8 proc_tid := ?, |
| 1167 | template (present) EPS_QualityOfServiceV qos := ?, |
| 1168 | template (present) octetstring apn := ?, |
| 1169 | template (present) BIT3 addr_type := ?, |
| 1170 | template (present) octetstring addr_info := ?) := { |
| 1171 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1172 | ePS_messages := { |
| 1173 | ePS_SessionManagement := { |
| 1174 | pDU_NAS_EPS_ActDefEPSBearerContextRequest := { |
| 1175 | ePSBearerIdentity := bearer_id, |
| 1176 | procedureTransactionIdentifier := proc_tid, |
| 1177 | messageType := '11000001'B, |
| 1178 | ePS_QoS := { |
| 1179 | lengthIndicator := ?, |
| 1180 | ePS_QualityOfServiceV := qos |
| 1181 | }, |
| 1182 | accessPointName := { |
| 1183 | lengthIndicator := 0, |
| 1184 | accessPointNameValue := apn |
| 1185 | }, |
| 1186 | pDN_Address := { |
| 1187 | lengthIndicator := 0, |
| 1188 | typeValue := addr_type, |
| 1189 | spare := '00000'B, |
| 1190 | addressInformation := addr_info |
| 1191 | }, |
| 1192 | transactionIdentifier := *, |
| 1193 | negotiatedQoS := *, |
| 1194 | negotiated_LLC_SAPI := *, |
| 1195 | radioPriority := *, |
| 1196 | packetFlowID := *, |
| 1197 | aPN_AMBR := *, |
| 1198 | esmCause := *, |
| 1199 | protocolConfigOptions := *, |
| 1200 | connectivityType := *, |
| 1201 | wLANOffloadIndication := *, |
| 1202 | nBIFOMContainer := *, |
| 1203 | headerCompressinConfiguration := *, |
| 1204 | controlPlaneOnlyIndication := *, |
| 1205 | extendedProtocolConfigurationOptions := *, |
| 1206 | servingPLMNRateControl := *, |
| 1207 | extended_APN_AMBR := *, |
| 1208 | extendedQoS := * |
| 1209 | } |
| 1210 | } |
| 1211 | } |
| 1212 | } |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 1213 | |
| 1214 | /* 8.3.4 Activate Default EPS Bearer Context Accept */ |
| 1215 | template (value) PDU_NAS_EPS |
| 1216 | ts_NAS_ActDefEpsBearCtxAck(template (value) BIT4 bearer_id, |
| 1217 | template (value) BIT8 proc_tid, |
| 1218 | template (omit) ProtocolConfigOptionsV pco) := { |
| 1219 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1220 | ePS_messages := { |
| 1221 | ePS_SessionManagement := { |
| 1222 | pDU_NAS_EPS_ActDefEPSBearerContextAccept := { |
| 1223 | ePSBearerIdentity := bearer_id, |
| 1224 | procedureTransactionIdentifier := proc_tid, |
| 1225 | messageType := '11000010'B, |
| 1226 | protocolConfigOptions := ts_NAS_PCO_TLV(pco), |
| 1227 | extendedProtocolConfigurationOptions := omit |
| 1228 | } |
| 1229 | } |
| 1230 | } |
| 1231 | } |
| 1232 | template (present) PDU_NAS_EPS |
| 1233 | tr_NAS_ActDefEpsBearCtxAck(template (present) BIT4 bearer_id := ?, |
| 1234 | template (present) BIT8 proc_tid := ?, |
| 1235 | template ProtocolConfigOptionsV pco := *) := { |
| 1236 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1237 | ePS_messages := { |
| 1238 | ePS_SessionManagement := { |
| 1239 | pDU_NAS_EPS_ActDefEPSBearerContextAccept := { |
| 1240 | ePSBearerIdentity := bearer_id, |
| 1241 | procedureTransactionIdentifier := proc_tid, |
| 1242 | messageType := '11000010'B, |
| 1243 | protocolConfigOptions := tr_NAS_PCO_TLV(pco), |
| 1244 | extendedProtocolConfigurationOptions := * |
| 1245 | } |
| 1246 | } |
| 1247 | } |
| 1248 | } |
| 1249 | |
| 1250 | |
| 1251 | /* 8.3.5 Activate Default EPS Bearer Context Reject */ |
| 1252 | template (value) PDU_NAS_EPS |
| 1253 | ts_NAS_ActDefEpsBearCtxRej(template (value) BIT4 bearer_id, |
| 1254 | template (value) BIT8 proc_tid, |
| 1255 | template (value) ESM_CauseV cause) := { |
| 1256 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1257 | ePS_messages := { |
| 1258 | ePS_SessionManagement := { |
| 1259 | pDU_NAS_EPS_ActDefEPSBearerContextReject := { |
| 1260 | ePSBearerIdentity := bearer_id, |
| 1261 | procedureTransactionIdentifier := proc_tid, |
| 1262 | messageType := '11000011'B, |
| 1263 | esmCause := cause, |
| 1264 | protocolConfigOptions := omit, |
| 1265 | extendedProtocolConfigurationOptions := omit |
| 1266 | } |
| 1267 | } |
| 1268 | } |
| 1269 | } |
| 1270 | template (present) PDU_NAS_EPS |
| 1271 | tr_NAS_ActDefEpsBearCtxRej(template (present) BIT4 bearer_id := ?, |
| 1272 | template (present) BIT8 proc_tid := ?, |
| 1273 | template (present) ESM_CauseV cause := ?) := { |
| 1274 | protocolDiscriminator := c_EPS_NAS_PD_ESM, |
| 1275 | ePS_messages := { |
| 1276 | ePS_SessionManagement := { |
| 1277 | pDU_NAS_EPS_ActDefEPSBearerContextReject := { |
| 1278 | ePSBearerIdentity := bearer_id, |
| 1279 | procedureTransactionIdentifier := proc_tid, |
| 1280 | messageType := '11000011'B, |
| 1281 | esmCause := cause, |
| 1282 | protocolConfigOptions := *, |
| 1283 | extendedProtocolConfigurationOptions := * |
| 1284 | } |
| 1285 | } |
| 1286 | } |
| 1287 | } |
| 1288 | |
| 1289 | |
| 1290 | |
| 1291 | |
| 1292 | |
| 1293 | } |