Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 1 | module SGsAP_Templates { |
| 2 | |
| 3 | /* Templates for the SGsAP protocol as per 3GPP TS 29.118 |
| 4 | * (C) 2018 by Harald Welte <laforg@gnumonks.org> |
| 5 | * All rights reserved. |
| 6 | * |
| 7 | * Released under the terms of the GNU General Public License, Version 2 or |
| 8 | * (at your option) any later version. |
Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 9 | * |
| 10 | * SPDX-License-Identifier: GPL-2.0-or-later |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | import from SGsAP_Types all; |
| 14 | import from GSM_Types all; |
| 15 | import from General_Types all; |
| 16 | import from MobileL3_CommonIE_Types all; |
| 17 | |
| 18 | /* 9.4.2 */ |
| 19 | template (value) EPS_LocationUpdateType ts_SGsAP_IE_EpsLuType(template (value) EPS_location_update_type lut) := { |
| 20 | iEI := '00001010'B, |
| 21 | lengthIndicator := 1, |
| 22 | locationUpdateType := lut |
| 23 | } |
| 24 | template EPS_LocationUpdateType tr_SGsAP_IE_EpsLuType(template EPS_location_update_type lut) := { |
| 25 | iEI := '00001010'B, |
| 26 | lengthIndicator := 1, |
| 27 | locationUpdateType := lut |
| 28 | } |
| 29 | |
| 30 | /* 9.4.3 */ |
| 31 | template (value) ErroneousMessage ts_SGsAP_IE_ErrMsg(template (value) octetstring err_msg) := { |
| 32 | iEI := '00011011'B, |
| 33 | lengthIndicator := lengthof(valueof(err_msg)), |
| 34 | erroneousMessage := err_msg |
| 35 | } |
| 36 | template ErroneousMessage tr_SGsAP_IE_ErrMsg(template octetstring err_msg) := { |
| 37 | iEI := '00011011'B, |
| 38 | lengthIndicator := ?, |
| 39 | erroneousMessage := err_msg |
| 40 | } |
| 41 | |
| 42 | |
| 43 | /* 9.4.6 */ |
| 44 | private function ts_SGsAP_IMSI(hexstring digits) return template (value) IMSI { |
| 45 | var template (value) IMSI imsi := { |
| 46 | iEI := '00000001'B, |
| 47 | lengthIndicator := lengthof(digits)/2 + 1, |
| 48 | iMSI := { |
| 49 | field1 := '001'B, |
| 50 | parity := '0'B, /* even */ |
| 51 | digits := digits, |
| 52 | fillerDigit := '1111'B /* even */ |
| 53 | } |
| 54 | } |
| 55 | if (lengthof(digits) mod 2 == 1) { |
| 56 | /* odd number of digits */ |
| 57 | imsi.iMSI.parity := '1'B; |
| 58 | imsi.iMSI.fillerDigit := omit; |
| 59 | } |
| 60 | return imsi; |
| 61 | } |
| 62 | private function ts_SGsAP_IMSI_omit(template (omit) hexstring digits) return template (omit) IMSI { |
| 63 | if (istemplatekind(digits, "omit")) { |
| 64 | return omit; |
| 65 | } else { |
| 66 | return ts_SGsAP_IMSI(valueof(digits)); |
| 67 | } |
| 68 | } |
| 69 | private function tr_SGsAP_IMSI(template hexstring digits) return template IMSI { |
| 70 | if (istemplatekind(digits, "omit")) { |
| 71 | return omit; |
| 72 | } else if (istemplatekind(digits, "*")) { |
| 73 | return *; |
Harald Welte | 4263c52 | 2018-12-06 11:56:27 +0100 | [diff] [blame] | 74 | } else if (istemplatekind(digits, "?")) { |
| 75 | return ?; |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 76 | } |
Harald Welte | 4263c52 | 2018-12-06 11:56:27 +0100 | [diff] [blame] | 77 | log("tr_SGsAP_IMSI: ", digits); |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 78 | var template IMSI imsi := { |
| 79 | iEI := '00000001'B, |
| 80 | lengthIndicator := lengthof(digits)/2 + 1, |
| 81 | iMSI := { |
| 82 | field1 := '001'B, |
| 83 | parity := '0'B, /* even */ |
| 84 | digits := digits, |
| 85 | fillerDigit := '1111'B /* even */ |
| 86 | } |
| 87 | } |
| 88 | if (lengthof(digits) mod 2 == 1) { |
| 89 | /* odd number of digits */ |
| 90 | /* odd number of digits */ |
| 91 | imsi.iMSI.parity := '1'B; |
| 92 | imsi.iMSI.fillerDigit := omit; |
| 93 | } |
| 94 | return imsi; |
| 95 | } |
| 96 | |
| 97 | /* 9.4.7 */ |
| 98 | template (value) IMSI_DetachFromEPS_ServiceType ts_SGsAP_IE_DetServiceType(template (value) IMSI_detachFromEPS_serviceType st) := { |
| 99 | iEI := '00010000'B, |
| 100 | lengthIndicator := 1, |
| 101 | serviceType := st |
| 102 | } |
| 103 | template IMSI_DetachFromEPS_ServiceType tr_SGsAP_IE_DetServiceType(template IMSI_detachFromEPS_serviceType st) := { |
| 104 | iEI := '00010000'B, |
| 105 | lengthIndicator := 1, |
| 106 | serviceType := st |
| 107 | } |
| 108 | |
| 109 | /* 9.4.8 */ |
| 110 | template (value) IMSI_DetachFromNonEPS_ServiceType ts_SGsAP_IE_DetNonEpsServiceType(template (value) IMSI_detachFromNonEPS_serviceType st) := { |
| 111 | iEI := '00010001'B, |
| 112 | lengthIndicator := 1, |
| 113 | serviceType := st |
| 114 | } |
| 115 | template IMSI_DetachFromNonEPS_ServiceType tr_SGsAP_IE_DetNonEpsServiceType(template IMSI_detachFromNonEPS_serviceType st) := { |
| 116 | iEI := '00010001'B, |
| 117 | lengthIndicator := 1, |
| 118 | serviceType := st |
| 119 | } |
| 120 | |
| 121 | /* 9.4.11 */ |
| 122 | private function f_enc_mnc_digit3(GsmMnc mnc) return HEX1 { |
| 123 | if (lengthof(mnc) == 2) { |
| 124 | return 'F'H; |
| 125 | } else { |
| 126 | return mnc[2]; |
| 127 | } |
| 128 | } |
| 129 | template (value) LocationAreaIdValue ts_SGsAP_LAI(GsmMcc mcc, GsmMnc mnc, GsmLac lac) := { |
| 130 | mccDigit1 := mcc[0], |
| 131 | mccDigit2 := mcc[1], |
| 132 | mccDigit3 := mcc[2], |
| 133 | mncDigit3 := f_enc_mnc_digit3(mnc), |
| 134 | mncDigit1 := mnc[0], |
| 135 | mncDigit2 := mnc[1], |
| 136 | lac := int2oct(lac, 2) |
| 137 | } |
| 138 | template (value) LocationAreaId ts_SGsAP_IE_Lai(template (value) LocationAreaIdValue lai) := { |
| 139 | iEI := '00000100'B, |
| 140 | lengthIndicator := 5, |
| 141 | locationAreaId := lai |
| 142 | } |
| 143 | template LocationAreaId tr_SGsAP_IE_Lai(template LocationAreaIdValue lai) := { |
| 144 | iEI := '00000100'B, |
| 145 | lengthIndicator := 5, |
| 146 | locationAreaId := lai |
| 147 | } |
| 148 | function ts_SGsAP_IE_Lai_omit(template (omit) LocationAreaIdValue lai) return template (omit) LocationAreaId { |
| 149 | if (istemplatekind(lai, "omit")) { |
| 150 | return omit; |
| 151 | } else { |
| 152 | return ts_SGsAP_IE_Lai(lai); |
| 153 | } |
| 154 | } |
| 155 | function tr_SGsAP_IE_Lai_omit(template LocationAreaIdValue lai) return template LocationAreaId { |
| 156 | if (istemplatekind(lai, "omit")) { |
| 157 | return omit; |
| 158 | } else if (istemplatekind(lai, "*")) { |
| 159 | return *; |
| 160 | } else { |
| 161 | return tr_SGsAP_IE_Lai(lai); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | |
| 166 | |
| 167 | /* 9.4.12 */ |
| 168 | template (value) MM_Information ts_SGsAP_IE_MmInfo(template (value) octetstring mm_info) := { |
| 169 | iEI := '00010111'B, |
| 170 | lengthIndicator := lengthof(valueof(mm_info)), |
| 171 | information := mm_info |
| 172 | } |
| 173 | template MM_Information tr_SGsAP_IE_MmInfo(template octetstring mm_info) := { |
| 174 | iEI := '00010111'B, |
| 175 | lengthIndicator := ?, |
| 176 | information := mm_info |
| 177 | } |
| 178 | |
| 179 | |
| 180 | |
| 181 | /* 9.4.13 */ |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 182 | template (value) MME_Name ts_SGsAP_IE_MmeName(template (value) octetstring name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 183 | iEI := '00001001'B, |
| 184 | lengthIndicator := lengthof(valueof(name)), |
| 185 | name := name |
| 186 | }; |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 187 | template MME_Name tr_SGsAP_IE_MmeName(template octetstring name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 188 | iEI := '00001001'B, |
| 189 | lengthIndicator := ?, |
| 190 | name := name |
| 191 | }; |
| 192 | |
| 193 | /* 9.4.14 */ |
| 194 | function f_l3_to_sgs_id(MobileIdentityLV l3) return MobileIdentityValue { |
| 195 | var OddEvenInd_Identity l3v := l3.mobileIdentityV.oddEvenInd_identity; |
| 196 | var MobileIdentityValue ret; |
| 197 | ret.typeOfIdentity := l3.mobileIdentityV.typeOfIdentity; |
| 198 | if (ischosen(l3v.imei)) { |
| 199 | ret.iD.imei.oddevenIndicator := l3v.imei.oddevenIndicator; |
| 200 | ret.iD.imei.digits := l3v.imei.digits; |
| 201 | } else if (ischosen(l3v.imsi)) { |
| 202 | ret.iD.imsi.oddevenIndicator := l3v.imsi.oddevenIndicator; |
| 203 | ret.iD.imsi.digits := l3v.imsi.digits; |
| 204 | ret.iD.imsi.fillerDigit := l3v.imsi.fillerDigit; |
| 205 | } else if (ischosen(l3v.imei_sv)) { |
| 206 | ret.iD.imei_sv.oddevenIndicator := l3v.imei_sv.oddevenIndicator; |
| 207 | ret.iD.imei_sv.digits := l3v.imei_sv.digits; |
| 208 | ret.iD.imei_sv.fillerDigit := l3v.imei_sv.fillerDigit; |
| 209 | } else if (ischosen(l3v.tmsi_ptmsi)) { |
| 210 | ret.iD.tmsi_ptmsi.oddevenIndicator := l3v.tmsi_ptmsi.oddevenIndicator; |
| 211 | ret.iD.tmsi_ptmsi.fillerDigit := l3v.tmsi_ptmsi.fillerDigit; |
| 212 | ret.iD.tmsi_ptmsi.octets := l3v.tmsi_ptmsi.octets; |
| 213 | } else if (ischosen(l3v.tmgi_and_MBMS_SessionID)) { |
| 214 | ret.iD.tmgi_and_MBMS_SessionID.oddevenIndicator := l3v.tmgi_and_MBMS_SessionID.oddevenIndicator; |
| 215 | ret.iD.tmgi_and_MBMS_SessionID.mCC_MNCIndicator := l3v.tmgi_and_MBMS_SessionID.mCC_MNCIndicator; |
| 216 | ret.iD.tmgi_and_MBMS_SessionID.mBMS_SessionIdentityIndicator := l3v.tmgi_and_MBMS_SessionID.mBMS_SessionIdentityIndicator; |
| 217 | ret.iD.tmgi_and_MBMS_SessionID.spare := l3v.tmgi_and_MBMS_SessionID.spare; |
| 218 | ret.iD.tmgi_and_MBMS_SessionID.mBMS_ServiceID := l3v.tmgi_and_MBMS_SessionID.mBMS_ServiceID; |
| 219 | ret.iD.tmgi_and_MBMS_SessionID.mccDigit1 := l3v.tmgi_and_MBMS_SessionID.mccDigit1; |
| 220 | ret.iD.tmgi_and_MBMS_SessionID.mccDigit2 := l3v.tmgi_and_MBMS_SessionID.mccDigit2; |
| 221 | ret.iD.tmgi_and_MBMS_SessionID.mccDigit3 := l3v.tmgi_and_MBMS_SessionID.mccDigit3; |
| 222 | ret.iD.tmgi_and_MBMS_SessionID.mccDigit3 := l3v.tmgi_and_MBMS_SessionID.mccDigit3; |
| 223 | ret.iD.tmgi_and_MBMS_SessionID.mccDigit1 := l3v.tmgi_and_MBMS_SessionID.mccDigit1; |
| 224 | ret.iD.tmgi_and_MBMS_SessionID.mccDigit2 := l3v.tmgi_and_MBMS_SessionID.mccDigit2; |
| 225 | ret.iD.tmgi_and_MBMS_SessionID.mBMS_SessionIdentity := l3v.tmgi_and_MBMS_SessionID.mBMS_SessionIdentity; |
| 226 | } else if (ischosen(l3v.no_identity)) { |
| 227 | ret.iD.no_identity.oddevenIndicator := l3v.no_identity.oddevenIndicator; |
| 228 | ret.iD.no_identity.fillerDigits := l3v.no_identity.fillerDigits; |
| 229 | } |
| 230 | return ret; |
| 231 | } |
| 232 | template MobileIdentity ts_SGsAP_IE_MobileID(template (value) MobileIdentityLV l3_mi) := { |
| 233 | iEI := '00001110'B, |
| 234 | lengthIndicator := 0, /* overwritten */ |
| 235 | iD := f_l3_to_sgs_id(valueof(l3_mi)) |
| 236 | } |
| 237 | |
| 238 | |
| 239 | /* 9.4.15 */ |
| 240 | template (value) NAS_MessageContainer ts_SGsAP_NasContainer(template (value) octetstring nas_pdu) := { |
| 241 | iEI := '00010110'B, |
| 242 | lengthIndicator := lengthof(valueof(nas_pdu)), |
| 243 | nAS_MessageContainer := nas_pdu |
| 244 | } |
| 245 | template NAS_MessageContainer tr_SGsAP_NasContainer(template octetstring nas_pdu) := { |
| 246 | iEI := '00010110'B, |
| 247 | lengthIndicator := ?, |
| 248 | nAS_MessageContainer := nas_pdu |
| 249 | } |
| 250 | |
| 251 | /* 9.4.16 */ |
| 252 | template (value) RejectCause ts_SGsAP_IE_RejCause(template (value) Reject_Cause cause) := { |
| 253 | iEI := '00001111'B, |
| 254 | lengthIndicator := 1, |
| 255 | cause := cause |
| 256 | } |
| 257 | template RejectCause tr_SGsAP_IE_RejCause(template Reject_Cause cause) := { |
| 258 | iEI := '00001111'B, |
| 259 | lengthIndicator := 1, |
| 260 | cause := cause |
| 261 | } |
| 262 | |
| 263 | /* 9.4.17 */ |
| 264 | template (value) ServiceIndicator ts_SGsAP_ServiceInd(template (value) Service_Indicator si) := { |
| 265 | iEI := '00100000'B, |
| 266 | lengthIndicator := 1, |
| 267 | indicator := si |
| 268 | } |
| 269 | template ServiceIndicator tr_SGsAP_ServiceInd(template Service_Indicator si) := { |
| 270 | iEI := '00100000'B, |
| 271 | lengthIndicator := 1, |
| 272 | indicator := si |
| 273 | } |
| 274 | |
| 275 | |
| 276 | /* 9.4.18 */ |
| 277 | template (value) SGsCause ts_SGsAP_IE_SgsCause(template (value) SGs_Cause cause) := { |
| 278 | iEI := '00001000'B, |
| 279 | lengthIndicator := 1, |
| 280 | cause := cause |
| 281 | } |
| 282 | function tr_SGsAP_IE_SgsCause(template SGs_Cause cause) return template SGsCause { |
| 283 | if (istemplatekind(cause, "omit")) { |
| 284 | return omit; |
| 285 | } else if (istemplatekind(cause, "*")) { |
| 286 | return *; |
| 287 | } else { |
| 288 | var template SGsCause ret := { |
| 289 | iEI := '00001000'B, |
| 290 | lengthIndicator := 1, |
| 291 | cause := cause |
| 292 | } |
| 293 | return ret; |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | /* 9.4.21c */ |
| 298 | template (value) UE_EMM_Mode ts_SGsAP_IE_UeEmmMode(template (value) UE_EMM_mode mode) := { |
| 299 | iEI := '00100101'B, |
| 300 | lengthIndicator := 1, |
| 301 | mode := mode |
| 302 | } |
| 303 | template UE_EMM_Mode tr_SGsAP_IE_UeEmmMode(template UE_EMM_mode mode) := { |
| 304 | iEI := '00100101'B, |
| 305 | lengthIndicator := 1, |
| 306 | mode := mode |
| 307 | } |
| 308 | |
| 309 | |
| 310 | /* 9.4.22 */ |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 311 | template (value) VLR_Name ts_SGsAP_IE_VlrName(template (value) octetstring name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 312 | iEI := '00000010'B, |
| 313 | lengthIndicator := lengthof(name), |
| 314 | name := name |
| 315 | } |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 316 | template VLR_Name tr_SGsAP_IE_VlrName(template octetstring name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 317 | iEI := '00000010'B, |
| 318 | lengthIndicator := ?, |
| 319 | name := name |
| 320 | } |
| 321 | |
| 322 | |
| 323 | |
| 324 | |
| 325 | |
| 326 | /* 3GPP TS 29.118 Section 8.1 */ |
| 327 | template (value) PDU_SGsAP ts_SGsAP_ALERT_ACK(hexstring imsi) := { |
| 328 | sGsAP_ALERT_ACK := { |
| 329 | messageType := '00001110'B, |
| 330 | iMSI := ts_SGsAP_IMSI(imsi) |
| 331 | } |
| 332 | } |
| 333 | template PDU_SGsAP tr_SGsAP_ALERT_ACK(template hexstring imsi) := { |
| 334 | sGsAP_ALERT_ACK := { |
| 335 | messageType := '00001110'B, |
| 336 | iMSI := tr_SGsAP_IMSI(imsi) |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | /* 3GPP TS 29.118 Section 8.2 */ |
| 341 | template PDU_SGsAP ts_SGsAP_ALERT_REJECT(hexstring imsi, |
| 342 | template (value) SGs_Cause cause) := { |
| 343 | sGsAP_ALERT_REJECT := { |
| 344 | messageType := '00001111'B, |
| 345 | iMSI := ts_SGsAP_IMSI(imsi), |
| 346 | sGsCause := ts_SGsAP_IE_SgsCause(cause) |
| 347 | } |
| 348 | } |
| 349 | template PDU_SGsAP tr_SGsAP_ALERT_REJECT(template hexstring imsi, |
| 350 | template SGs_Cause cause := ?) := { |
| 351 | sGsAP_ALERT_REJECT := { |
| 352 | messageType := '00001111'B, |
| 353 | iMSI := tr_SGsAP_IMSI(imsi), |
| 354 | sGsCause := tr_SGsAP_IE_SgsCause(cause) |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | /* 3GPP TS 29.118 Section 8.3 */ |
| 359 | template (value) PDU_SGsAP ts_SGsAP_ALERT_REQ(hexstring imsi) := { |
| 360 | sGsAP_ALERT_REQUEST := { |
| 361 | messageType := '00001101'B, |
| 362 | iMSI := ts_SGsAP_IMSI(imsi) |
| 363 | } |
| 364 | } |
| 365 | template PDU_SGsAP tr_SGsAP_ALERT_REQ(template hexstring imsi) := { |
| 366 | sGsAP_ALERT_REQUEST := { |
| 367 | messageType := '00001101'B, |
| 368 | iMSI := tr_SGsAP_IMSI(imsi) |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /* 3GPP TS 29.118 Section 8.4 */ |
| 373 | template (value) PDU_SGsAP ts_SGsAP_DL_UD(hexstring imsi, |
| 374 | template (value) octetstring nas_pdu) := { |
| 375 | sGsAP_DOWNLINK_UNITDATA := { |
| 376 | messageType := '00000111'B, |
| 377 | iMSI := ts_SGsAP_IMSI(imsi), |
| 378 | nAS_MessageContainer := ts_SGsAP_NasContainer(nas_pdu) |
| 379 | } |
| 380 | } |
| 381 | template PDU_SGsAP tr_SGsAP_DL_UD(template hexstring imsi, template octetstring nas_pdu := ?) := { |
| 382 | sGsAP_DOWNLINK_UNITDATA := { |
| 383 | messageType := '00000111'B, |
| 384 | iMSI := tr_SGsAP_IMSI(imsi), |
| 385 | nAS_MessageContainer := tr_SGsAP_NasContainer(nas_pdu) |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | /* 8.5 */ |
| 390 | template (value) PDU_SGsAP ts_SGsAP_EPS_DETACH_ACK(hexstring imsi) := { |
| 391 | sGsAP_EPS_DETACH_ACK:= { |
| 392 | messageType := '00010010'B, |
| 393 | iMSI := ts_SGsAP_IMSI(imsi) |
| 394 | } |
| 395 | } |
| 396 | template PDU_SGsAP tr_SGsAP_EPS_DETACH_ACK(template hexstring imsi) := { |
| 397 | sGsAP_EPS_DETACH_ACK:= { |
| 398 | messageType := '00010010'B, |
| 399 | iMSI := tr_SGsAP_IMSI(valueof(imsi)) |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | /* 8.6 */ |
| 404 | template (value) PDU_SGsAP ts_SGsAP_EPS_DETACH_IND(hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 405 | template (value) octetstring mme_name, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 406 | template (value) IMSI_detachFromEPS_serviceType det_serv_typ) := { |
| 407 | sGsAP_EPS_DETACH_INDICATION:= { |
| 408 | messageType := '00010001'B, |
| 409 | iMSI := ts_SGsAP_IMSI(imsi), |
| 410 | mME_Name := ts_SGsAP_IE_MmeName(mme_name), |
| 411 | iMSI_DetachFromEPS_ServiceType := ts_SGsAP_IE_DetServiceType(det_serv_typ) |
| 412 | } |
| 413 | } |
| 414 | template PDU_SGsAP tr_SGsAP_EPS_DETACH_IND(template hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 415 | template octetstring mme_name, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 416 | template IMSI_detachFromEPS_serviceType det_serv_typ) := { |
| 417 | sGsAP_EPS_DETACH_INDICATION:= { |
| 418 | messageType := '00010001'B, |
| 419 | iMSI := tr_SGsAP_IMSI(valueof(imsi)), |
| 420 | mME_Name := tr_SGsAP_IE_MmeName(mme_name), |
| 421 | iMSI_DetachFromEPS_ServiceType := tr_SGsAP_IE_DetServiceType(det_serv_typ) |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | /* 8.7 */ |
| 426 | template (value) PDU_SGsAP ts_SGsAP_IMSI_DETACH_ACK(hexstring imsi) := { |
| 427 | sGsAP_IMSI_DETACH_ACK := { |
| 428 | messageType := '00010100'B, |
| 429 | iMSI := ts_SGsAP_IMSI(imsi) |
| 430 | } |
| 431 | } |
| 432 | template PDU_SGsAP tr_SGsAP_IMSI_DETACH_ACK(template hexstring imsi) := { |
| 433 | sGsAP_IMSI_DETACH_ACK := { |
| 434 | messageType := '00010100'B, |
| 435 | iMSI := tr_SGsAP_IMSI(imsi) |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | /* 8.8 */ |
| 440 | template (value) PDU_SGsAP ts_SGsAP_IMSI_DETACH_IND(hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 441 | template (value) octetstring mme_name, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 442 | template (value) IMSI_detachFromNonEPS_serviceType det_serv_typ) := { |
| 443 | sGsAP_IMSI_DETACH_INDICATION := { |
| 444 | messageType := '00010011'B, |
| 445 | iMSI := ts_SGsAP_IMSI(imsi), |
| 446 | mME_Name := ts_SGsAP_IE_MmeName(mme_name), |
| 447 | iMSI_DetachFromNonEPS_ServiceType := ts_SGsAP_IE_DetNonEpsServiceType(det_serv_typ) |
| 448 | } |
| 449 | } |
| 450 | template PDU_SGsAP tr_SGsAP_IMSI_DETACH_IND(template hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 451 | template octetstring mme_name := ?, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 452 | template IMSI_detachFromNonEPS_serviceType det_serv_typ := ?) := { |
| 453 | sGsAP_IMSI_DETACH_INDICATION := { |
| 454 | messageType := '00010011'B, |
| 455 | iMSI := tr_SGsAP_IMSI(imsi), |
| 456 | mME_Name := tr_SGsAP_IE_MmeName(mme_name), |
| 457 | iMSI_DetachFromNonEPS_ServiceType := tr_SGsAP_IE_DetNonEpsServiceType(det_serv_typ) |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | /* 8.9 */ |
| 462 | template (value) PDU_SGsAP ts_SGsAP_LU_ACCEPT(hexstring imsi, |
| 463 | template (value) LocationAreaIdValue lai, |
| 464 | template (value) MobileIdentityLV mobile_id) := { |
| 465 | sGsAP_LOCATION_UPDATE_ACCEPT := { |
| 466 | messageType := '00001010'B, |
| 467 | iMSI := ts_SGsAP_IMSI(imsi), |
| 468 | locationAreaId := ts_SGsAP_IE_Lai(lai), |
| 469 | newTMSIorIMSI := ts_SGsAP_IE_MobileID(mobile_id) |
| 470 | } |
| 471 | } |
| 472 | template PDU_SGsAP tr_SGsAP_LU_ACCEPT(template hexstring imsi, |
| 473 | template LocationAreaIdValue lai := ?) := { |
| 474 | sGsAP_LOCATION_UPDATE_ACCEPT := { |
| 475 | messageType := '00001010'B, |
| 476 | iMSI := tr_SGsAP_IMSI(imsi), |
| 477 | locationAreaId := tr_SGsAP_IE_Lai(lai), |
| 478 | newTMSIorIMSI := * |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | /* 8.10 */ |
| 483 | template (value) PDU_SGsAP ts_SGsAP_LU_REJECT(hexstring imsi, |
| 484 | template (value) Reject_Cause rej_cause, |
| 485 | template (omit) LocationAreaIdValue lai) := { |
| 486 | sGsAP_LOCATION_UPDATE_REJECT := { |
| 487 | messageType := '00001011'B, |
| 488 | iMSI := ts_SGsAP_IMSI(imsi), |
| 489 | rejectCause := ts_SGsAP_IE_RejCause(rej_cause), |
| 490 | locationAreaId := ts_SGsAP_IE_Lai_omit(lai) |
| 491 | } |
| 492 | } |
| 493 | template PDU_SGsAP tr_SGsAP_LU_REJECT(template hexstring imsi, |
| 494 | template Reject_Cause rej_cause, |
| 495 | template LocationAreaIdValue lai) := { |
| 496 | sGsAP_LOCATION_UPDATE_REJECT := { |
| 497 | messageType := '00001011'B, |
| 498 | iMSI := tr_SGsAP_IMSI(imsi), |
| 499 | rejectCause := tr_SGsAP_IE_RejCause(rej_cause), |
| 500 | locationAreaId := tr_SGsAP_IE_Lai_omit(lai) |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | /* 8.11 */ |
| 505 | template (value) PDU_SGsAP ts_SGsAP_LU_REQ(hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 506 | template (value) octetstring mme_name, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 507 | template (value) EPS_location_update_type eps_lu_type, |
| 508 | template (value) LocationAreaIdValue new_lai) := { |
| 509 | sGsAP_LOCATION_UPDATE_REQUEST := { |
| 510 | messageType := '00001001'B, |
| 511 | iMSI := ts_SGsAP_IMSI(imsi), |
| 512 | mME_Name := ts_SGsAP_IE_MmeName(mme_name), |
| 513 | ePS_LocationUpdateType := ts_SGsAP_IE_EpsLuType(eps_lu_type), |
| 514 | newLocationAreaId := ts_SGsAP_IE_Lai(new_lai), |
| 515 | oldLocationAreaId := omit, |
| 516 | tMSI_Status := omit, |
| 517 | iMEI_SV := omit, |
| 518 | tAI := omit, |
| 519 | eCGI := omit, |
| 520 | tMSI_NRI := omit, |
| 521 | cS_DomainOperator := omit |
| 522 | } |
| 523 | } |
| 524 | template PDU_SGsAP tr_SGsAP_LU_REQ(template hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 525 | template octetstring mme_name := ?, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 526 | template EPS_location_update_type eps_lu_type := ?, |
| 527 | template LocationAreaIdValue new_lai := ?) := { |
| 528 | sGsAP_LOCATION_UPDATE_REQUEST := { |
| 529 | messageType := '00001001'B, |
| 530 | iMSI := tr_SGsAP_IMSI(imsi), |
| 531 | mME_Name := tr_SGsAP_IE_MmeName(mme_name), |
| 532 | ePS_LocationUpdateType := tr_SGsAP_IE_EpsLuType(eps_lu_type), |
| 533 | newLocationAreaId := tr_SGsAP_IE_Lai_omit(new_lai), |
| 534 | oldLocationAreaId := *, |
| 535 | tMSI_Status := *, |
| 536 | iMEI_SV := *, |
| 537 | tAI := *, |
| 538 | eCGI := *, |
| 539 | tMSI_NRI := *, |
| 540 | cS_DomainOperator := * |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | /* 8.12 */ |
| 545 | template (value) PDU_SGsAP ts_SGsAP_MM_INFO_REQ(hexstring imsi, |
| 546 | template (value) octetstring mm_info) := { |
| 547 | sGsAP_MM_INFORMATION_REQUEST := { |
| 548 | messageType := '00011010'B, |
| 549 | iMSI := ts_SGsAP_IMSI(imsi), |
| 550 | mM_Information := ts_SGsAP_IE_MmInfo(mm_info) |
| 551 | } |
| 552 | } |
| 553 | template PDU_SGsAP tr_SGsAP_MM_INFO_REQ(template hexstring imsi, |
| 554 | template octetstring mm_info :=?) := { |
| 555 | sGsAP_MM_INFORMATION_REQUEST := { |
| 556 | messageType := '00011010'B, |
| 557 | iMSI := tr_SGsAP_IMSI(imsi), |
| 558 | mM_Information := tr_SGsAP_IE_MmInfo(mm_info) |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | /* 8.13 */ |
| 563 | template (value) PDU_SGsAP ts_SGsAP_PAGING_REJ(hexstring imsi, |
| 564 | template (value) SGs_Cause cause) := { |
| 565 | sGsAP_PAGING_REJECT := { |
| 566 | messageType := '00000010'B, |
| 567 | iMSI := ts_SGsAP_IMSI(imsi), |
| 568 | sGsCause := ts_SGsAP_IE_SgsCause(cause) |
| 569 | } |
| 570 | } |
| 571 | template PDU_SGsAP tr_SGsAP_PAGING_REJ(template hexstring imsi, |
| 572 | template SGs_Cause cause := ?) := { |
| 573 | sGsAP_PAGING_REJECT := { |
| 574 | messageType := '00000010'B, |
| 575 | iMSI := tr_SGsAP_IMSI(imsi), |
| 576 | sGsCause := tr_SGsAP_IE_SgsCause(cause) |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | /* 8.14 */ |
| 581 | template (value) PDU_SGsAP ts_SGsAP_PAGING_REQ(hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 582 | template (value) octetstring vlr_name, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 583 | template (value) Service_Indicator serv_ind, |
| 584 | template (omit) OCT4 tmsi) := |
| 585 | { |
| 586 | sGsAP_PAGING_REQUEST := { |
| 587 | messageType := '00000001'B, |
| 588 | iMSI := ts_SGsAP_IMSI(imsi), |
| 589 | vLR_Name := ts_SGsAP_IE_VlrName(vlr_name), |
| 590 | serviceIndicator := ts_SGsAP_ServiceInd(serv_ind), |
| 591 | tMSI := omit, |
| 592 | cLI := omit, |
| 593 | locationAreaId := omit, |
| 594 | globalCN_Id := omit, |
| 595 | sS_Code := omit, |
| 596 | lCS_Indicator := omit, |
| 597 | lCS_ClientIdentity := omit, |
| 598 | channelNeeded := omit, |
| 599 | eMLPP_Priority := omit, |
| 600 | additionalPagingIndicator := omit |
| 601 | } |
| 602 | } |
| 603 | template PDU_SGsAP tr_SGsAP_PAGING_REQ(template hexstring imsi, |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 604 | template octetstring vlr_name, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 605 | template Service_Indicator serv_ind, |
| 606 | template OCT4 tmsi) := |
| 607 | { |
| 608 | sGsAP_PAGING_REQUEST := { |
| 609 | messageType := '00000001'B, |
| 610 | iMSI := tr_SGsAP_IMSI(imsi), |
| 611 | vLR_Name := tr_SGsAP_IE_VlrName(vlr_name), |
| 612 | serviceIndicator := tr_SGsAP_ServiceInd(serv_ind), |
| 613 | tMSI := *, |
| 614 | cLI := *, |
| 615 | locationAreaId := *, |
| 616 | globalCN_Id := *, |
| 617 | sS_Code := *, |
| 618 | lCS_Indicator := *, |
| 619 | lCS_ClientIdentity := *, |
| 620 | channelNeeded := *, |
| 621 | eMLPP_Priority := *, |
| 622 | additionalPagingIndicator := * |
| 623 | } |
| 624 | } |
| 625 | |
| 626 | /* 8.15 */ |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 627 | template (value) PDU_SGsAP ts_SGsAP_RESET_ACK_MME(template (value) octetstring mme_name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 628 | sGsAP_RESET_ACK := { |
| 629 | messageType := '00010110'B, |
| 630 | mME_Name := ts_SGsAP_IE_MmeName(mme_name), |
| 631 | vLR_Name := omit |
| 632 | } |
| 633 | } |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 634 | template (value) PDU_SGsAP ts_SGsAP_RESET_ACK_VLR(template (value) octetstring vlr_name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 635 | sGsAP_RESET_ACK := { |
| 636 | messageType := '00010110'B, |
| 637 | mME_Name := omit, |
| 638 | vLR_Name := ts_SGsAP_IE_VlrName(vlr_name) |
| 639 | } |
| 640 | } |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 641 | template PDU_SGsAP tr_SGsAP_RESET_ACK(template octetstring mme_name, template octetstring vlr_name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 642 | sGsAP_RESET_ACK := { |
| 643 | messageType := '00010110'B, |
| 644 | mME_Name := tr_SGsAP_IE_MmeName(mme_name), |
| 645 | vLR_Name := tr_SGsAP_IE_VlrName(vlr_name) |
| 646 | } |
| 647 | } |
| 648 | |
| 649 | /* 8.16 */ |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 650 | template (value) PDU_SGsAP ts_SGsAP_RESET_IND_MME(template (value) octetstring mme_name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 651 | sGsAP_RESET_INDICATION := { |
| 652 | messageType := '00010101'B, |
| 653 | mME_Name := ts_SGsAP_IE_MmeName(mme_name), |
| 654 | vLR_Name := omit |
| 655 | } |
| 656 | } |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 657 | template (value) PDU_SGsAP ts_SGsAP_RESET_IND_VLR(template (value) octetstring vlr_name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 658 | sGsAP_RESET_INDICATION := { |
| 659 | messageType := '00010101'B, |
| 660 | mME_Name := omit, |
| 661 | vLR_Name := ts_SGsAP_IE_VlrName(vlr_name) |
| 662 | } |
| 663 | } |
Philipp Maier | d3e0bfa | 2019-04-09 15:29:40 +0200 | [diff] [blame] | 664 | |
| 665 | template PDU_SGsAP tr_SGsAP_RESET_IND_MME(template octetstring mme_name) := { |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 666 | sGsAP_RESET_INDICATION := { |
| 667 | messageType := '00010101'B, |
| 668 | mME_Name := tr_SGsAP_IE_MmeName(mme_name), |
Philipp Maier | d3e0bfa | 2019-04-09 15:29:40 +0200 | [diff] [blame] | 669 | vLR_Name := omit |
| 670 | } |
| 671 | } |
| 672 | template PDU_SGsAP tr_SGsAP_RESET_IND_VLR(template octetstring vlr_name) := { |
| 673 | sGsAP_RESET_INDICATION := { |
| 674 | messageType := '00010101'B, |
| 675 | mME_Name := omit, |
Harald Welte | 1831443 | 2018-10-05 19:03:28 +0200 | [diff] [blame] | 676 | vLR_Name := tr_SGsAP_IE_VlrName(vlr_name) |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | /* 8.17 */ |
| 681 | template (value) PDU_SGsAP ts_SGsAP_SERVICE_REQ(hexstring imsi, |
| 682 | template (value) Service_Indicator serv_ind, |
| 683 | template (value) UE_EMM_mode emm_mode) := { |
| 684 | sGsAP_SERVICE_REQUEST := { |
| 685 | messageType := '00000110'B, |
| 686 | iMSI := ts_SGsAP_IMSI(imsi), |
| 687 | serviceIndicator := ts_SGsAP_ServiceInd(serv_ind), |
| 688 | iMEI_SV := omit, |
| 689 | uE_TimeZone := omit, |
| 690 | mobileStationClassmark2 := omit, |
| 691 | tAI := omit, |
| 692 | eCGI := omit, |
| 693 | /* optional, but "the MME shall include this IE." */ |
| 694 | uE_EMM_Mode := ts_SGsAP_IE_UeEmmMode(emm_mode) |
| 695 | } |
| 696 | } |
| 697 | template PDU_SGsAP tr_SGsAP_SERVICE_REQ(template hexstring imsi, |
| 698 | template Service_Indicator serv_ind := ?, |
| 699 | template UE_EMM_mode emm_mode := ?) := { |
| 700 | sGsAP_SERVICE_REQUEST := { |
| 701 | messageType := '00000110'B, |
| 702 | iMSI := tr_SGsAP_IMSI(imsi), |
| 703 | serviceIndicator := tr_SGsAP_ServiceInd(serv_ind), |
| 704 | iMEI_SV := *, |
| 705 | uE_TimeZone := *, |
| 706 | mobileStationClassmark2 := *, |
| 707 | tAI := *, |
| 708 | eCGI := *, |
| 709 | /* optional, but "the MME shall include this IE." */ |
| 710 | uE_EMM_Mode := tr_SGsAP_IE_UeEmmMode(emm_mode) |
| 711 | } |
| 712 | } |
| 713 | |
| 714 | |
| 715 | /* 8.18 */ |
| 716 | template (value) PDU_SGsAP ts_SGsAP_STATUS(template (omit) hexstring imsi, |
| 717 | template (value) SGs_Cause cause, |
| 718 | template (value) octetstring err_msg) := { |
| 719 | sGsAP_STATUS := { |
| 720 | messageType := '00011101'B, |
| 721 | iMSI := ts_SGsAP_IMSI_omit(imsi), |
| 722 | sGsCause := ts_SGsAP_IE_SgsCause(cause), |
| 723 | erroneousMessage := ts_SGsAP_IE_ErrMsg(err_msg) |
| 724 | } |
| 725 | } |
| 726 | template PDU_SGsAP tr_SGsAP_STATUS(template hexstring imsi, |
| 727 | template SGs_Cause cause, |
| 728 | template octetstring err_msg) := { |
| 729 | sGsAP_STATUS := { |
| 730 | messageType := '00011101'B, |
| 731 | iMSI := tr_SGsAP_IMSI(imsi), |
| 732 | sGsCause := tr_SGsAP_IE_SgsCause(cause), |
| 733 | erroneousMessage := tr_SGsAP_IE_ErrMsg(err_msg) |
| 734 | } |
| 735 | } |
| 736 | |
| 737 | |
| 738 | /* 8.19 */ |
| 739 | template (value) PDU_SGsAP ts_SGsAP_TMSI_REALL_CMPL(hexstring imsi) := { |
| 740 | sGsAP_TMSI_REALLOCATION_COMPLETE := { |
| 741 | messageType := '00001100'B, |
| 742 | iMSI := ts_SGsAP_IMSI(imsi) |
| 743 | } |
| 744 | } |
| 745 | template PDU_SGsAP tr_SGsAP_TMSI_REALL_CMPL(template hexstring imsi) := { |
| 746 | sGsAP_TMSI_REALLOCATION_COMPLETE := { |
| 747 | messageType := '00001100'B, |
| 748 | iMSI := tr_SGsAP_IMSI(imsi) |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | /* 8.20 */ |
| 753 | template (value) PDU_SGsAP ts_SGsAP_UE_ACT_IND(hexstring imsi) := { |
| 754 | sGsAP_UE_ACTIVITY_INDICATION := { |
| 755 | messageType := '00010000'B, |
| 756 | iMSI := ts_SGsAP_IMSI(imsi) |
| 757 | /* Rel 14: Max UE Avail Time */ |
| 758 | } |
| 759 | } |
| 760 | template PDU_SGsAP tr_SGsAP_UE_ACT_IND(template hexstring imsi) := { |
| 761 | sGsAP_UE_ACTIVITY_INDICATION := { |
| 762 | messageType := '00010000'B, |
| 763 | iMSI := tr_SGsAP_IMSI(imsi) |
| 764 | /* Rel 14: Max UE Avail Time */ |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | /* 8.21 */ |
| 769 | template (value) PDU_SGsAP ts_SGsAP_UE_UNREACHABLE(hexstring imsi, |
| 770 | template (value) SGs_Cause cause) := { |
| 771 | sGsAP_UE_UNREACHABLE := { |
| 772 | messageType := '00011111'B, |
| 773 | iMSI := ts_SGsAP_IMSI(imsi), |
| 774 | sGsCause := ts_SGsAP_IE_SgsCause(cause) |
| 775 | /* Rel 14: Requested Retransmission Time */ |
| 776 | /* Rel 14: Additional UE Unreachable indicators */ |
| 777 | } |
| 778 | } |
| 779 | template PDU_SGsAP tr_SGsAP_UE_UNREACHABLE(template hexstring imsi, |
| 780 | template SGs_Cause cause := ?) := { |
| 781 | sGsAP_UE_UNREACHABLE := { |
| 782 | messageType := '00011111'B, |
| 783 | iMSI := tr_SGsAP_IMSI(imsi), |
| 784 | sGsCause := tr_SGsAP_IE_SgsCause(cause) |
| 785 | /* Rel 14: Requested Retransmission Time */ |
| 786 | /* Rel 14: Additional UE Unreachable indicators */ |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | /* 8.22 */ |
| 791 | template (value) PDU_SGsAP ts_SGsAP_UL_UD(hexstring imsi, |
| 792 | template (value) octetstring nas_msg) := { |
| 793 | sGsAP_UPLINK_UNITDATA := { |
| 794 | messageType := '00001000'B, |
| 795 | iMSI := ts_SGsAP_IMSI(imsi), |
| 796 | nAS_MessageContainer := ts_SGsAP_NasContainer(nas_msg), |
| 797 | iMEI_SV := omit, |
| 798 | uE_TimeZone := omit, |
| 799 | mobileStationClassmark2 := omit, |
| 800 | tAI := omit, |
| 801 | eCGI := omit |
| 802 | } |
| 803 | } |
| 804 | template PDU_SGsAP tr_SGsAP_UL_UD(template hexstring imsi, |
| 805 | template octetstring nas_msg := ?) := { |
| 806 | sGsAP_UPLINK_UNITDATA := { |
| 807 | messageType := '00001000'B, |
| 808 | iMSI := tr_SGsAP_IMSI(imsi), |
| 809 | nAS_MessageContainer := tr_SGsAP_NasContainer(nas_msg), |
| 810 | iMEI_SV := *, |
| 811 | uE_TimeZone := *, |
| 812 | mobileStationClassmark2 := *, |
| 813 | tAI := *, |
| 814 | eCGI := * |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | /* 8.23 */ |
| 819 | template (value) PDU_SGsAP ts_SGsAP_RELEASE_REQ(hexstring imsi, |
| 820 | template (value) SGs_Cause cause) := { |
| 821 | sGsAP_RELEASE_REQUEST := { |
| 822 | messageType := '00011011'B, |
| 823 | iMSI := ts_SGsAP_IMSI(imsi), |
| 824 | sGsCause := ts_SGsAP_IE_SgsCause(cause) |
| 825 | } |
| 826 | } |
| 827 | template PDU_SGsAP tr_SGsAP_RELEASE_REQ(template hexstring imsi, |
| 828 | template SGs_Cause cause) := { |
| 829 | sGsAP_RELEASE_REQUEST := { |
| 830 | messageType := '00011011'B, |
| 831 | iMSI := tr_SGsAP_IMSI(imsi), |
| 832 | sGsCause := tr_SGsAP_IE_SgsCause(cause) |
| 833 | } |
| 834 | } |
| 835 | |
| 836 | /* 8.24 */ |
| 837 | template (value) PDU_SGsAP ts_SGsAP_SERVICE_ABORT_REQ(hexstring imsi) := { |
| 838 | sGsAP_SERVICE_ABORT_REQUEST := { |
| 839 | messageType := '00010111'B, |
| 840 | iMSI := ts_SGsAP_IMSI(imsi) |
| 841 | } |
| 842 | } |
| 843 | template PDU_SGsAP tr_SGsAP_SERVICE_ABORT_REQ(template hexstring imsi) := { |
| 844 | sGsAP_SERVICE_ABORT_REQUEST := { |
| 845 | messageType := '00010111'B, |
| 846 | iMSI := tr_SGsAP_IMSI(imsi) |
| 847 | } |
| 848 | } |
| 849 | |
| 850 | /* 8.25 */ |
| 851 | template (value) PDU_SGsAP ts_SGsAP_MO_CSFB_IND(hexstring imsi) := { |
| 852 | sGsAP_MO_CSFB_INDICATION := { |
| 853 | messageType := '00011000'B, |
| 854 | iMSI := ts_SGsAP_IMSI(imsi), |
| 855 | tAI := omit, |
| 856 | eCGI := omit |
| 857 | } |
| 858 | } |
| 859 | template PDU_SGsAP tr_SGsAP_MO_CSFB_IND(template hexstring imsi) := { |
| 860 | sGsAP_MO_CSFB_INDICATION := { |
| 861 | messageType := '00011000'B, |
| 862 | iMSI := tr_SGsAP_IMSI(imsi), |
| 863 | tAI := *, |
| 864 | eCGI := * |
| 865 | } |
| 866 | } |
| 867 | |
| 868 | |
| 869 | |
| 870 | |
| 871 | |
| 872 | |
| 873 | } |