Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 1 | module BSSMAP_Templates { |
| 2 | |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 3 | /* BSSMAP Templates, building on top of BSSAP_Types from Ericsson. |
| 4 | * |
Harald Welte | 44d055f | 2023-04-17 09:18:55 +0800 | [diff] [blame^] | 5 | * (C) 2017-2023 by Harald Welte <laforge@gnumonks.org> |
Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 6 | * contributions by sysmocom - s.f.m.c. GmbH |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 7 | * All rights reserved. |
| 8 | * |
| 9 | * Released under the terms of GNU General Public License, Version 2 or |
| 10 | * (at your option) any later version. |
Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 11 | * |
| 12 | * SPDX-License-Identifier: GPL-2.0-or-later |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 13 | */ |
| 14 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 15 | import from General_Types all; |
| 16 | import from Osmocom_Types all; |
Pau Espin Pedrol | 6a846bc | 2020-09-04 13:01:22 +0200 | [diff] [blame] | 17 | import from Native_Functions all; |
| 18 | import from Misc_Helpers all; |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 19 | import from GSM_Types all; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 20 | import from BSSAP_Types all; |
| 21 | |
| 22 | type integer BssmapCause; |
Philipp Maier | 34bd80e | 2018-03-27 14:28:52 +0200 | [diff] [blame] | 23 | type integer SpeechVersion; |
| 24 | type integer Channel; |
| 25 | type integer ChannelMode; |
Pau Espin Pedrol | c08d552 | 2021-04-16 15:40:38 +0200 | [diff] [blame] | 26 | //type octetstring BSSMAP_oldToNewBSSIEs; |
| 27 | |
| 28 | // Old BSS to New BSS Information - 48.008 subclause 3.2.2.58 |
| 29 | type record BSSMAP_oldToNewBSSIEs |
| 30 | { |
| 31 | BSSAMAP_IE_LastUsedEUTRANPLMNId LastUsedEUTRANPLMNId optional |
| 32 | /* TODO: add other FIELDS here from specs */ |
| 33 | } |
| 34 | external function enc_BSSMAP_oldToNewBSSIEs(in BSSMAP_oldToNewBSSIEs val) return octetstring |
| 35 | with { extension "prototype(convert) encode(RAW)" }; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 36 | |
Harald Welte | b69533d | 2017-12-15 13:55:17 +0100 | [diff] [blame] | 37 | /* 48.008 3.2.2.5 - this actually belongs to BSSAP_Types.ttcn */ |
| 38 | type enumerated myBSSMAP_Cause { |
| 39 | /* 000 / 001: Normal event */ |
| 40 | GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE ('0000000'B), |
| 41 | GSM0808_CAUSE_RADIO_INTERFACE_FAILURE ('0000001'B), |
| 42 | GSM0808_CAUSE_UPLINK_QUALITY ('0000010'B), |
| 43 | GSM0808_CAUSE_UPLINK_STRENGTH ('0000011'B), |
| 44 | GSM0808_CAUSE_DOWNLINK_QUALITY ('0000100'B), |
| 45 | GSM0808_CAUSE_DOWNLINK_STRENGTH ('0000101'B), |
| 46 | GSM0808_CAUSE_DISTANCE ('0000110'B), |
| 47 | GSM0808_CAUSE_O_AND_M_INTERVENTION ('0000111'B), |
| 48 | GSM0808_CAUSE_RESPONSE_TO_MSC_INVOCATION ('0001000'B), |
| 49 | GSM0808_CAUSE_CALL_CONTROL ('0001001'B), |
| 50 | GSM0808_CAUSE_RADIO_INTERFACE_FAILURE_REVERSION ('0001010'B), |
| 51 | GSM0808_CAUSE_HANDOVER_SUCCESSFUL ('0001011'B), |
| 52 | GSM0808_CAUSE_BETTER_CELL ('0001100'B), |
| 53 | GSM0808_CAUSE_DIRECTED_RETRY ('0001101'B), |
| 54 | GSM0808_CAUSE_JOINED_GROUP_CALL_CHANNEL ('0001110'B), |
| 55 | GSM0808_CAUSE_TRAFFIC ('0001111'B), |
| 56 | GSM0808_CAUSE_REDUCE_LOAD_IN_SERVING_CELL ('0010000'B), |
| 57 | GSM0808_CAUSE_TRAFFIC_LOAD_IN_TGT_HIGHER_THAN_IN_SRC_CELL ('0010001'B), |
| 58 | GSM0808_CAUSE_RELOCATION_TRIGGERED ('0010010'B), |
| 59 | GSM0808_CAUSE_REQUSTED_OPT_NOT_AUTHORISED ('0010100'B), |
| 60 | GSM0808_CAUSE_ALT_CHAN_CONFIG_REQUESTED ('0010101'B), |
| 61 | GSM0808_CAUSE_RESP_TO_INT_HO_ENQ_MSG ('0010110'B), |
| 62 | GSM0808_CAUSE_INT_HO_ENQUIRY_REJECT ('0010111'B), |
| 63 | GSM0808_CAUSE_REDUNDANCY_LEVEL_NOT_ADEQUATE ('0011000'B), |
| 64 | /* reserved */ |
| 65 | /* 010: Resource unavailable */ |
| 66 | GSM0808_CAUSE_EQUIPMENT_FAILURE ('0100000'B), |
| 67 | GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE ('0100001'B), |
| 68 | GSM0808_CAUSE_RQSTED_TERRESTRIAL_RESOURCE_UNAVAILABLE ('0100010'B), |
| 69 | GSM0808_CAUSE_CCCH_OVERLOAD ('0100011'B), |
| 70 | GSM0808_CAUSE_PROCESSOR_OVERLOAD ('0100100'B), |
| 71 | GSM0808_CAUSE_BSS_NOT_EQUIPPED ('0100101'B), |
| 72 | GSM0808_CAUSE_MS_NOT_EQUIPPED ('0100110'B), |
| 73 | GSM0808_CAUSE_INVALID_CELL ('0100111'B), |
| 74 | GSM0808_CAUSE_TRAFFIC_LOAD ('0101000'B), |
| 75 | GSM0808_CAUSE_PREEMPTION ('0101001'B), |
| 76 | GSM0808_CAUSE_DTM_HO_SGSN_FAILURE ('0101010'B), |
| 77 | GSM0808_CAUSE_DTM_HO_PS_ALLOC_FAILURE ('0101011'B), |
| 78 | /* reserved */ |
| 79 | /* 011: Service or option not available, but implemented */ |
| 80 | GSM0808_CAUSE_RQSTED_TRANSCODING_RATE_ADAPTION_UNAVAILABLE ('0110000'B), |
| 81 | GSM0808_CAUSE_CIRCUIT_POOL_MISMATCH ('0110001'B), |
| 82 | GSM0808_CAUSE_SWITCH_CIRCUIT_POOL ('0110010'B), |
| 83 | GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE ('0110011'B), |
| 84 | GSM0808_CAUSE_LSA_NOT_ALLOWED ('0110100'B), |
| 85 | GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL ('0110101'B), |
| 86 | GSM0808_CAUSE_REQ_A_IF_TYPE_UNAVAIL ('0110110'B), |
| 87 | GSM0808_CAUSE_INVALID_CSG_CELL ('0110111'B), |
| 88 | /* reserved */ |
| 89 | /* 100: Service or option not implemented or currently disabled */ |
| 90 | GSM0808_CAUSE_REQ_REDUND_LEVEL_NOT_AVAIL ('0111111'B), |
| 91 | GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED ('1000000'B), |
| 92 | GSM0808_CAUSE_GERAN_IU_MODE_FAILURE ('1000001'B), |
| 93 | GSM0808_CAUSE_INC_RELOC_NOT_SUPP_DT_PUESBINE_FEATURE ('1000010'B), |
| 94 | GSM0808_CAUSE_ACCESS_RESTRICTED_DUE_TO_SHARED_NETWORKS ('1000011'B), |
| 95 | GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP ('1000100'B), |
| 96 | GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP ('1000101'B), |
| 97 | GSM0808_CAUSE_REQ_REDUND_LVL_NOT_SUPP ('1000110'B), |
| 98 | /* reserved */ |
| 99 | /* 101: Invalid message */ |
| 100 | GSM0808_CAUSE_TERRESTRIAL_CIRCUIT_ALREADY_ALLOCATED ('1010000'B), |
| 101 | GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS ('1010001'B), |
| 102 | GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING ('1010010'B), |
| 103 | GSM0808_CAUSE_INCORRECT_VALUE ('1010011'B), |
| 104 | GSM0808_CAUSE_UNKNOWN_MESSAGE_TYPE ('1010100'B), |
| 105 | GSM0808_CAUSE_UNKNOWN_INFORMATION_ELEMENT ('1010101'B), |
| 106 | GSM0808_CAUSE_DTM_HO_INVALID_PS_IND ('1010110'B), |
| 107 | GSM0808_CAUSE_CALL_ID_ALREADY_ALLOC ('1010111'B), |
| 108 | /* reserved */ |
| 109 | /* 110: protocol error */ |
| 110 | GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC ('1100000'B), |
| 111 | GSM0808_CAUSE_VGCS_VBS_CALL_NON_EXISTANT ('1100001'B), |
| 112 | GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY ('1100010'B) |
| 113 | } with { variant "FIELDLENGTH(7)" }; |
| 114 | |
Oliver Smith | dd00275 | 2023-02-21 13:35:00 +0100 | [diff] [blame] | 115 | /* 3GPP TS 48.008 3.2.2.11 Channel Type |
| 116 | * Transparent: Data Rate */ |
| 117 | const OCT1 GSM0808_DATA_RATE_TRANSP_32k0 := ('3a'O); |
| 118 | const OCT1 GSM0808_DATA_RATE_TRANSP_28k8 := ('39'O); |
| 119 | const OCT1 GSM0808_DATA_RATE_TRANSP_14k4 := ('18'O); |
| 120 | const OCT1 GSM0808_DATA_RATE_TRANSP_9k6 := ('10'O); |
| 121 | const OCT1 GSM0808_DATA_RATE_TRANSP_4k8 := ('11'O); |
| 122 | const OCT1 GSM0808_DATA_RATE_TRANSP_2k4 := ('12'O); |
| 123 | const OCT1 GSM0808_DATA_RATE_TRANSP_1k2 := ('13'O); |
| 124 | const OCT1 GSM0808_DATA_RATE_TRANSP_600 := ('14'O); |
| 125 | const OCT1 GSM0808_DATA_RATE_TRANSP_1200_75 := ('15'O); |
| 126 | |
| 127 | /* 3GPP TS 48.008 3.2.2.11 Channel Type |
| 128 | * Non-Transparent: Radio Interface Data Rate (preferred) */ |
| 129 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_12000_6000 := ('00'O); |
| 130 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_43k5 := ('34'O); |
| 131 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_29k0 := ('31'O); |
| 132 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_14k5 := ('14'O); |
| 133 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_12k0 := ('10'O); |
| 134 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_6k0 := ('11'O); |
| 135 | |
| 136 | /* 3GPP TS 48.008 3.2.2.11 Channel Type |
| 137 | * Non-Transparent: Allowed Radio Interface Data Rate (all possible allowed) */ |
| 138 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_43k5 := ('40'O); |
| 139 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_32k0 := ('20'O); |
| 140 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_29k0 := ('10'O); |
| 141 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_14k5 := ('08'O); |
| 142 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_12k0 := ('02'O); |
| 143 | const OCT1 GSM0808_DATA_RATE_NON_TRANSP_ALLOWED_6k0 := ('01'O); |
| 144 | |
Neels Hofmeyr | e52bc2d | 2020-10-01 06:39:10 +0200 | [diff] [blame] | 145 | type enumerated BSSMAP_LcsCause { |
| 146 | BSSMAP_LCS_CAUSE_UNSPECIFIED ('00000000'B), |
| 147 | BSSMAP_LCS_CAUSE_SYSTEM_FAILURE ('00000001'B), |
| 148 | BSSMAP_LCS_CAUSE_PROTOCOL_ERROR ('00000010'B), |
| 149 | BSSMAP_LCS_CAUSE_DATA_MISSING_IN_REQ ('00000011'B), |
| 150 | BSSMAP_LCS_CAUSE_UNEXP_DATA_IN_REQ ('00000100'B), |
| 151 | BSSMAP_LCS_CAUSE_POS_METH_FAILURE ('00000101'B), |
| 152 | BSSMAP_LCS_CAUSE_TGT_MS_UNREACHABLE ('00000110'B), |
| 153 | BSSMAP_LCS_CAUSE_REQUEST_ABORTED ('00000111'B), |
| 154 | BSSMAP_LCS_CAUSE_FACILITY_NOTSUPP ('00001000'B), |
| 155 | BSSMAP_LCS_CAUSE_INTER_BSC_HO ('00001001'B), |
| 156 | BSSMAP_LCS_CAUSE_INTRA_BSC_HO ('00001010'B), |
| 157 | BSSMAP_LCS_CAUSE_CONGESTION ('00001011'B), |
| 158 | BSSMAP_LCS_CAUSE_INTER_NSE_CHG ('00001100'B), |
| 159 | BSSMAP_LCS_CAUSE_RA_UPDAT ('00001101'B), |
| 160 | BSSMAP_LCS_CAUSE_PTMSI_REALLOC ('00001110'B), |
| 161 | BSSMAP_LCS_CAUSE_GPRS_SUSPENSION ('00001111'B) |
| 162 | } with { variant "FIELDLENGTH(8)" }; |
| 163 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 164 | template PDU_BSSAP ts_BSSAP_BSSMAP := { |
| 165 | discriminator := '0'B, |
| 166 | spare := '0000000'B, |
| 167 | dlci := omit, |
| 168 | lengthIndicator := 0, /* overwritten by codec */ |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 169 | pdu := { |
| 170 | bssmap := ? |
| 171 | } |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | template PDU_BSSAP tr_BSSAP_BSSMAP := { |
| 175 | discriminator := '0'B, |
| 176 | spare := '0000000'B, |
Harald Welte | 049ca64 | 2018-01-21 13:54:34 +0100 | [diff] [blame] | 177 | dlci := *, |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 178 | lengthIndicator := ?, |
| 179 | pdu := { |
| 180 | bssmap := ? |
| 181 | } |
| 182 | } |
| 183 | |
Harald Welte | 0a6835c | 2018-01-21 13:56:01 +0100 | [diff] [blame] | 184 | template PDU_BSSAP ts_BSSAP_DTAP(octetstring dtap, template OCT1 dlci := omit) := { |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 185 | discriminator := '1'B, |
| 186 | spare := '0000000'B, |
Harald Welte | 0a6835c | 2018-01-21 13:56:01 +0100 | [diff] [blame] | 187 | dlci := dlci, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 188 | lengthIndicator := 0, /* overwritten by codec */ |
| 189 | pdu := { |
Harald Welte | 0a6835c | 2018-01-21 13:56:01 +0100 | [diff] [blame] | 190 | dtap := dtap |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 191 | } |
| 192 | } |
| 193 | |
| 194 | template PDU_BSSAP tr_BSSAP_DTAP := { |
| 195 | discriminator := '1'B, |
| 196 | spare := '0000000'B, |
Harald Welte | 049ca64 | 2018-01-21 13:54:34 +0100 | [diff] [blame] | 197 | dlci := *, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 198 | lengthIndicator := ?, |
| 199 | pdu := { |
| 200 | dtap := ? |
| 201 | } |
| 202 | } |
| 203 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 204 | template (value) BSSMAP_IE_Cause ts_BSSMAP_IE_Cause(BssmapCause val) := { |
| 205 | elementIdentifier := '04'O, |
| 206 | lengthIndicator := 0, |
| 207 | causeValue := int2bit(val, 7), |
| 208 | extensionCauseValue := '0'B, |
| 209 | spare1 := omit |
| 210 | } |
Vadim Yanitskiy | 4806396 | 2020-08-28 07:49:44 +0700 | [diff] [blame] | 211 | template BSSMAP_IE_Cause tr_BSSMAP_IE_Cause(template (present) myBSSMAP_Cause val) := { |
| 212 | elementIdentifier := '04'O, |
| 213 | lengthIndicator := ?, |
| 214 | causeValue := f_tr_causeValue(val), |
| 215 | extensionCauseValue := ?, |
| 216 | spare1 := * |
| 217 | } |
| 218 | private function f_tr_causeValue(template (present) myBSSMAP_Cause val) |
| 219 | return template (present) BIT7 { |
| 220 | if (istemplatekind(val, "?")) { |
| 221 | return ?; |
| 222 | } else { |
| 223 | var integer int_val := enum2int(valueof(val)); |
| 224 | return int2bit(valueof(int_val), 7); |
| 225 | } |
| 226 | } |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 227 | |
Philipp Maier | 34bd80e | 2018-03-27 14:28:52 +0200 | [diff] [blame] | 228 | template (value) BSSMAP_IE_SpeechVersion ts_BSSMAP_IE_SpeechVersion(SpeechVersion val) := { |
| 229 | elementIdentifier := '40'O, |
| 230 | speechVersionIdentifier := int2bit(val, 7), |
| 231 | spare1_1 := '0'B |
| 232 | } |
| 233 | |
| 234 | template (value) BSSMAP_IE_CurrentChannelType1 ts_BSSMAP_IE_CurrentChannelType1(Channel c, ChannelMode cm) := { |
| 235 | elementIdentifier := '31'O, |
| 236 | channel := int2bit(c, 4), |
| 237 | channelMode := int2bit(cm, 4) |
| 238 | } |
| 239 | |
Pau Espin Pedrol | c08d552 | 2021-04-16 15:40:38 +0200 | [diff] [blame] | 240 | template (value) BSSMAP_oldToNewBSSIEs ts_BSSMAP_oldToNewBSSIEs(template (omit) BSSAMAP_IE_LastUsedEUTRANPLMNId last_used_eutran_plmn) := { |
| 241 | LastUsedEUTRANPLMNId := last_used_eutran_plmn |
| 242 | } |
| 243 | function f_ts_BSSMAP_oldToNewBSSIEs(template (omit) BSSAMAP_IE_LastUsedEUTRANPLMNId last_used_eutran_plmn) |
| 244 | return template (omit) BSSMAP_oldToNewBSSIEs { |
| 245 | if (istemplatekind(last_used_eutran_plmn, "omit")) { |
| 246 | return omit; |
| 247 | } else { |
| 248 | return ts_BSSMAP_oldToNewBSSIEs(last_used_eutran_plmn); |
| 249 | } |
| 250 | } |
| 251 | template (value) BSSMAP_IE_OldToNewBSSInfo ts_BSSMAP_IE_OldToNewBSSInfo(template (value) BSSMAP_oldToNewBSSIEs val) := { |
Philipp Maier | 34bd80e | 2018-03-27 14:28:52 +0200 | [diff] [blame] | 252 | elementIdentifier := '3A'O, |
| 253 | lengthIndicator := 0, /* overwritten by codec */ |
Pau Espin Pedrol | c08d552 | 2021-04-16 15:40:38 +0200 | [diff] [blame] | 254 | oldToNewBSSIEs := enc_BSSMAP_oldToNewBSSIEs(valueof(val)) |
| 255 | } |
| 256 | function f_ts_BSSMAP_IE_OldToNewBSSInfo(template (omit) BSSMAP_oldToNewBSSIEs val) |
| 257 | return template (omit) BSSMAP_IE_OldToNewBSSInfo { |
| 258 | if (istemplatekind(val, "omit")) { |
| 259 | return omit; |
| 260 | } else { |
| 261 | return ts_BSSMAP_IE_OldToNewBSSInfo(val); |
| 262 | } |
Philipp Maier | 34bd80e | 2018-03-27 14:28:52 +0200 | [diff] [blame] | 263 | } |
| 264 | |
Pau Espin Pedrol | 35801c3 | 2021-04-19 13:03:20 +0200 | [diff] [blame] | 265 | template BSSMAP_IE_OldToNewBSSInfo tr_BSSMAP_IE_OldToNewBSSInfo(template (value) BSSMAP_oldToNewBSSIEs val) := { |
| 266 | elementIdentifier := '3A'O, |
| 267 | lengthIndicator := ?, /* overwritten by codec */ |
| 268 | oldToNewBSSIEs := enc_BSSMAP_oldToNewBSSIEs(valueof(val)) |
| 269 | } |
| 270 | function f_tr_BSSMAP_IE_OldToNewBSSInfo(template BSSMAP_oldToNewBSSIEs val := *) |
| 271 | return template BSSMAP_IE_OldToNewBSSInfo { |
| 272 | if (istemplatekind(val, "*")) { |
| 273 | return *; |
| 274 | } else if (istemplatekind(val, "?")) { |
| 275 | return ?; |
| 276 | } else if (istemplatekind(val, "omit")) { |
| 277 | return omit; |
| 278 | } else { |
| 279 | return tr_BSSMAP_IE_OldToNewBSSInfo(val); |
| 280 | } |
| 281 | } |
| 282 | |
Harald Welte | 420c6b0 | 2020-08-21 11:54:30 +0200 | [diff] [blame] | 283 | template (value) BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := { |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 284 | elementIdentifier := 'F0'O |
| 285 | } |
| 286 | |
Harald Welte | 420c6b0 | 2020-08-21 11:54:30 +0200 | [diff] [blame] | 287 | private function f_enc_osmux_support(boolean osmux_enabled) return template (omit) BSSMAP_IE_Osmo_OsmuxSupport { |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 288 | if (osmux_enabled) { |
| 289 | return tr_BSSMAP_IE_Osmo_OsmuxSupport; |
| 290 | } |
| 291 | return omit; |
| 292 | } |
| 293 | |
| 294 | template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 295 | pdu := { |
| 296 | bssmap := { |
| 297 | reset := { |
| 298 | messageType := '30'O, |
| 299 | cause := ts_BSSMAP_IE_Cause(cause), |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 300 | a_InterfaceSelectorForReset := omit, |
| 301 | osmuxSupport := f_enc_osmux_support(osmux_enabled) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 302 | } |
| 303 | } |
| 304 | } |
| 305 | } |
| 306 | |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 307 | template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 308 | pdu := { |
| 309 | bssmap := { |
| 310 | reset := { |
| 311 | messageType := '30'O, |
| 312 | cause := ?, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 313 | a_InterfaceSelectorForReset := *, |
| 314 | osmuxSupport := f_enc_osmux_support(osmux_enabled) |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 315 | } |
| 316 | } |
| 317 | } |
| 318 | } |
| 319 | |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 320 | template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := { |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 321 | pdu := { |
| 322 | bssmap := { |
| 323 | resetAck := { |
| 324 | messageType := '31'O, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 325 | a_InterfaceSelectorForReset := omit, |
| 326 | osmuxSupport := f_enc_osmux_support(osmux_enabled) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 327 | } |
| 328 | } |
| 329 | } |
| 330 | } |
| 331 | |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 332 | template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := { |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 333 | pdu := { |
| 334 | bssmap := { |
| 335 | resetAck := { |
| 336 | messageType := '31'O, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 337 | a_InterfaceSelectorForReset := *, |
| 338 | osmuxSupport := f_enc_osmux_support(osmux_enabled) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 339 | } |
| 340 | } |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | template BSSMAP_IE_CellIdentifier ts_BSSMAP_IE_CellID := { |
| 345 | elementIdentifier := '05'O, |
| 346 | lengthIndicator := 0, |
| 347 | cellIdentifierDiscriminator := '0000'B, |
| 348 | spare1_4 := '0000'B, |
| 349 | cellIdentification := ? |
| 350 | } |
| 351 | |
| 352 | type uint16_t BssmapLAC; |
| 353 | type uint16_t BssmapCI; |
Pau Espin Pedrol | a8ef3be | 2022-02-16 16:21:17 +0100 | [diff] [blame] | 354 | type uint16_t BssmapSAC; |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 355 | |
Harald Welte | ae8ce23 | 2018-01-21 13:56:46 +0100 | [diff] [blame] | 356 | template BSSMAP_IE_CellIdentifier ts_CellId_CGI(hexstring mcc, hexstring mnc, BssmapLAC lac, BssmapCI ci) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 357 | modifies ts_BSSMAP_IE_CellID := { |
| 358 | cellIdentification := { |
Harald Welte | ae8ce23 | 2018-01-21 13:56:46 +0100 | [diff] [blame] | 359 | cI_CGI := ts_BSSMAP_CI_CGI(mcc, mnc, lac, ci) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 360 | } |
| 361 | } |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 362 | |
Pau Espin Pedrol | a8ef3be | 2022-02-16 16:21:17 +0100 | [diff] [blame] | 363 | template (value) BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci) |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 364 | modifies ts_BSSMAP_IE_CellID := { |
| 365 | cellIdentification := { |
| 366 | cI_LAC_CI := { |
| 367 | lac := int2oct(lac, 2), |
| 368 | ci := int2oct(ci, 2) |
| 369 | } |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci) |
| 374 | modifies ts_BSSMAP_IE_CellID := { |
| 375 | cellIdentification := { |
| 376 | cI_CI := int2oct(ci, 2) |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | template BSSMAP_IE_CellIdentifier ts_CellId_none |
| 381 | modifies ts_BSSMAP_IE_CellID := { |
| 382 | cellIdentification := { |
| 383 | cI_noCell := ''O |
| 384 | } |
| 385 | } |
| 386 | |
Pau Espin Pedrol | a8ef3be | 2022-02-16 16:21:17 +0100 | [diff] [blame] | 387 | template (value) BSSMAP_IE_CellIdentifier ts_CellID_SAI(OCT3 mcc_mnc, BssmapLAC lac, BssmapSAC sac) |
| 388 | modifies ts_BSSMAP_IE_CellID := { |
| 389 | cellIdentification := { |
| 390 | cI_SAI := { |
| 391 | mcc_mnc := mcc_mnc, |
| 392 | lac := int2oct(lac, 2), |
| 393 | sac := int2oct(sac, 2) |
| 394 | } |
| 395 | } |
| 396 | } |
| 397 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 398 | |
Harald Welte | 44d055f | 2023-04-17 09:18:55 +0800 | [diff] [blame^] | 399 | template (value) BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(template (value) octetstring l3info) := { |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 400 | elementIdentifier := '17'O, |
| 401 | lengthIndicator := 0, |
| 402 | layer3info := l3info |
| 403 | } |
| 404 | |
Harald Welte | 44d055f | 2023-04-17 09:18:55 +0800 | [diff] [blame^] | 405 | template (present) BSSMAP_IE_Layer3Information tr_BSSMAP_IE_L3Info(template (present) octetstring l3info) := { |
Harald Welte | f8a0bda | 2017-12-09 00:53:17 +0100 | [diff] [blame] | 406 | elementIdentifier := '17'O, |
| 407 | lengthIndicator := ?, |
| 408 | layer3info := l3info |
| 409 | } |
| 410 | |
| 411 | |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 412 | template PDU_BSSAP ts_BSSMAP_ComplL3(BSSMAP_IE_CellIdentifier cell_id, octetstring l3_info) |
| 413 | modifies ts_BSSAP_BSSMAP := { |
| 414 | pdu := { |
| 415 | bssmap := { |
| 416 | completeLayer3Information := { |
| 417 | messageType := '57'O, |
| 418 | cellIdentifier := cell_id, |
| 419 | layer3Information := ts_BSSMAP_IE_L3Info(l3_info), |
| 420 | chosenChannel := omit, |
| 421 | lSAIdentifier := omit, |
| 422 | aPDU := omit, |
| 423 | codecList := omit, |
| 424 | redirectAttemptFlag := omit, |
| 425 | sendSequenceNumber := omit, |
| 426 | iMSI := omit |
| 427 | } |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | |
Harald Welte | f8a0bda | 2017-12-09 00:53:17 +0100 | [diff] [blame] | 432 | template PDU_BSSAP tr_BSSMAP_ComplL3(template octetstring l3_info := ?, |
Vadim Yanitskiy | a47cd4e | 2021-12-04 20:05:04 +0300 | [diff] [blame] | 433 | template BSSMAP_IE_CellIdentifier cell_id := ?, |
| 434 | template BSSMAP_IE_SpeechCodecList codec_list := *) |
Harald Welte | f8a0bda | 2017-12-09 00:53:17 +0100 | [diff] [blame] | 435 | modifies tr_BSSAP_BSSMAP := { |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 436 | pdu := { |
| 437 | bssmap := { |
Harald Welte | f8a0bda | 2017-12-09 00:53:17 +0100 | [diff] [blame] | 438 | completeLayer3Information := { |
| 439 | messageType := '57'O, |
| 440 | cellIdentifier := cell_id, |
| 441 | layer3Information := tr_BSSMAP_IE_L3Info(l3_info), |
| 442 | chosenChannel := *, |
| 443 | lSAIdentifier := *, |
| 444 | aPDU := *, |
Vadim Yanitskiy | a47cd4e | 2021-12-04 20:05:04 +0300 | [diff] [blame] | 445 | codecList := codec_list, |
Harald Welte | f8a0bda | 2017-12-09 00:53:17 +0100 | [diff] [blame] | 446 | redirectAttemptFlag := *, |
| 447 | sendSequenceNumber := *, |
| 448 | iMSI := * |
| 449 | } |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 450 | } |
| 451 | } |
| 452 | } |
| 453 | |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 454 | template BSSMAP_IE_CellIdentifierList ts_BSSMAP_IE_CidList(template BSSMAP_FIELD_CellIdentificationList cid_list) := { |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 455 | elementIdentifier := '1A'O, |
| 456 | lengthIndicator := 0, /* overwritten */ |
| 457 | cellIdentifierDiscriminator := '0000'B, /* overwritten */ |
| 458 | spare1_4 := '0000'B, |
| 459 | cellIdentificationList := cid_list |
| 460 | } |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 461 | |
Harald Welte | 4bf5fc9 | 2017-12-15 13:56:06 +0100 | [diff] [blame] | 462 | const OCT1 ChRate_ANY := '00'O; |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 463 | const OCT1 ChRate_TCHF := '08'O; |
| 464 | const OCT1 ChRate_TCHH := '09'O; |
Harald Welte | 4bf5fc9 | 2017-12-15 13:56:06 +0100 | [diff] [blame] | 465 | const OCT1 ChRate_TCHForH_Fpref := '0A'O; |
| 466 | const OCT1 ChRate_TCHForH_Hpref := '0B'O; |
| 467 | const OCT1 ChRate_TCHForH_Fpref_nochg := '1A'O; |
| 468 | const OCT1 ChRate_TCHForH_Hpref_nochg := '1B'O; |
| 469 | const OCT1 ChRate_TCHForH := '0F'O; |
| 470 | const OCT1 ChRate_TCHForH_nochg := '1F'O; |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 471 | |
Harald Welte | dbd6b3f | 2018-03-21 18:45:02 +0100 | [diff] [blame] | 472 | const OCT1 Spdi_TCHF_FR := '01'O; |
| 473 | const OCT1 Spdi_TCHF_EFR := '11'O; |
| 474 | const OCT1 Spdi_TCHF_AMR := '21'O; |
| 475 | const OCT1 Spdi_TCHH_HR := '05'O; |
| 476 | const OCT1 Spdi_TCHH_AMR := '25'O; |
| 477 | |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 478 | template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := { |
| 479 | elementIdentifier := '0B'O, /* overwritten */ |
| 480 | lengthIndicator := 0, /* overwritten */ |
| 481 | speechOrDataIndicator := '0001'B, /* speech */ |
| 482 | spare1_4 := '0000'B, |
| 483 | channelRateAndType := ChRate_TCHF, |
Harald Welte | dbd6b3f | 2018-03-21 18:45:02 +0100 | [diff] [blame] | 484 | speechId_DataIndicator := Spdi_TCHF_FR |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 485 | } |
| 486 | |
Harald Welte | 4bf5fc9 | 2017-12-15 13:56:06 +0100 | [diff] [blame] | 487 | template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies ts_BSSMAP_IE_ChannelType := { |
| 488 | speechOrDataIndicator := '0100'B /* speech + CTM */ |
| 489 | } |
| 490 | |
| 491 | template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCSD := { |
| 492 | elementIdentifier := '0B'O, /* overwritten */ |
| 493 | lengthIndicator := 0, /* overwritten */ |
| 494 | speechOrDataIndicator := '0010'B, /* data */ |
| 495 | spare1_4 := '0000'B, |
| 496 | channelRateAndType := ChRate_TCHF, |
| 497 | speechId_DataIndicator := '10'O /* 9600 bps / transparent */ |
| 498 | } |
| 499 | |
| 500 | template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeSIGNAL := { |
| 501 | elementIdentifier := '0B'O, /* overwritten */ |
| 502 | lengthIndicator := 0, /* overwritten */ |
| 503 | speechOrDataIndicator := '0011'B, /* data */ |
| 504 | spare1_4 := '0000'B, |
| 505 | channelRateAndType := ChRate_ANY, |
| 506 | speechId_DataIndicator := '00'O /* spare */ |
| 507 | } |
| 508 | |
| 509 | template (value) BSSMAP_IE_EncryptionInformation ts_BSSMAP_IE_EncrInfo(OCT8 kc, OCT1 algs := '05'O) := { |
| 510 | elementIdentifier := '0A'O, |
| 511 | lengthIndicator := 0, /* overwritten */ |
| 512 | permittedAlgorithms := algs, |
| 513 | key := kc |
| 514 | } |
| 515 | |
Harald Welte | 1611428 | 2018-01-24 22:41:21 +0100 | [diff] [blame] | 516 | template BSSMAP_IE_EncryptionInformation tr_BSSMAP_IE_EncrInfo(template OCT8 kc := ?, template OCT1 algs := ?) := { |
| 517 | elementIdentifier := '0A'O, |
| 518 | lengthIndicator := ?, /* overwritten */ |
| 519 | permittedAlgorithms := algs, |
| 520 | key := kc |
| 521 | } |
| 522 | |
Neels Hofmeyr | 1d8dece | 2021-06-21 05:25:46 +0200 | [diff] [blame] | 523 | template BSSMAP_IE_ChosenEncryptionAlgorithm ts_BSSMAP_IE_ChosenEncryptionAlgorithm(OCT1 algorithmIdentifier) := { |
| 524 | elementIdentifier := '2C'O, |
| 525 | algorithmIdentifier := algorithmIdentifier |
| 526 | } |
Harald Welte | 1611428 | 2018-01-24 22:41:21 +0100 | [diff] [blame] | 527 | |
Neels Hofmeyr | 1d8dece | 2021-06-21 05:25:46 +0200 | [diff] [blame] | 528 | template BSSMAP_IE_ChosenEncryptionAlgorithm tr_BSSMAP_IE_ChosenEncryptionAlgorithm(template OCT1 algorithmIdentifier := ?) := { |
| 529 | elementIdentifier := '2C'O, |
| 530 | algorithmIdentifier := algorithmIdentifier |
| 531 | } |
Harald Welte | 4bf5fc9 | 2017-12-15 13:56:06 +0100 | [diff] [blame] | 532 | |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 533 | template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, uint5_t ts) := { |
| 534 | elementIdentifier := '01'O, /* overwritten */ |
| 535 | cicHigh := bit2oct(substr(int2bit(span, 11) << 5, 0, 8)), |
| 536 | cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5)) |
| 537 | } |
| 538 | |
Pau Espin Pedrol | 43021cb | 2019-06-18 17:32:15 +0200 | [diff] [blame] | 539 | function f_bssmap_ie_cic_2_int(BSSMAP_IE_CircuitIdentityCode cic_ie) return integer { |
| 540 | var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow); |
| 541 | return cic; |
| 542 | } |
| 543 | |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 544 | template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr, |
Harald Welte | b6e1d7e | 2018-01-26 21:38:59 +0100 | [diff] [blame] | 545 | uint16_t udp_port, |
| 546 | integer len) := { |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 547 | elementIdentifier := '7C'O, |
Harald Welte | b6e1d7e | 2018-01-26 21:38:59 +0100 | [diff] [blame] | 548 | lengthIndicator := len, /* overwritten */ |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 549 | ipAddress := addr, |
| 550 | uDPPortValue := udp_port |
| 551 | } |
Harald Welte | 235ebf1 | 2017-12-15 14:18:16 +0100 | [diff] [blame] | 552 | template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, uint16_t pt) := |
Harald Welte | b6e1d7e | 2018-01-26 21:38:59 +0100 | [diff] [blame] | 553 | ts_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6); |
Harald Welte | 235ebf1 | 2017-12-15 14:18:16 +0100 | [diff] [blame] | 554 | template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) := |
Harald Welte | b6e1d7e | 2018-01-26 21:38:59 +0100 | [diff] [blame] | 555 | ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18); |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 556 | |
Pau Espin Pedrol | 6a846bc | 2020-09-04 13:01:22 +0200 | [diff] [blame] | 557 | function f_ts_BSSMAP_IE_AoIP_TLA(charstring addr, uint16_t udp_port) |
| 558 | return template (value) BSSMAP_IE_AoIP_TransportLayerAddress { |
| 559 | if (f_addr_is_ipv6(addr)) { |
| 560 | var OCT16 ip6 := f_inet6_addr(addr); |
| 561 | return ts_BSSMAP_IE_AoIP_TLA6(ip6, udp_port); |
| 562 | } else { |
| 563 | var OCT4 ip := f_inet_addr(addr); |
| 564 | return ts_BSSMAP_IE_AoIP_TLA4(ip, udp_port); |
| 565 | } |
| 566 | } |
| 567 | |
Neels Hofmeyr | 3c89a6b | 2019-10-15 16:54:37 +0200 | [diff] [blame] | 568 | template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA(template BSSMAP_FIELD_IPAddress addr, |
| 569 | template uint16_t udp_port, |
| 570 | template integer len := ?) := { |
| 571 | elementIdentifier := '7C'O, |
| 572 | lengthIndicator := len, |
| 573 | ipAddress := addr, |
| 574 | uDPPortValue := udp_port |
| 575 | } |
| 576 | template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA4(template OCT4 ip, template uint16_t pt) := |
| 577 | tr_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6); |
| 578 | template BSSMAP_IE_AoIP_TransportLayerAddress tr_BSSMAP_IE_AoIP_TLA6(template OCT16 ip, template uint16_t pt) := |
| 579 | tr_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18); |
| 580 | |
Pau Espin Pedrol | 6a846bc | 2020-09-04 13:01:22 +0200 | [diff] [blame] | 581 | function f_tr_BSSMAP_IE_AoIP_TLA(charstring addr, template uint16_t udp_port) |
| 582 | return template BSSMAP_IE_AoIP_TransportLayerAddress { |
| 583 | if (f_addr_is_ipv6(addr)) { |
| 584 | var OCT16 ip6 := f_inet6_addr(addr); |
| 585 | return tr_BSSMAP_IE_AoIP_TLA6(ip6, udp_port); |
| 586 | } else { |
| 587 | var OCT4 ip := f_inet_addr(addr); |
| 588 | return tr_BSSMAP_IE_AoIP_TLA4(ip, udp_port); |
| 589 | } |
| 590 | } |
| 591 | |
Neels Hofmeyr | f7831cb | 2021-06-23 20:04:58 +0200 | [diff] [blame] | 592 | template (present) BSSMAP_IE_KC128 tr_BSSMAP_IE_Kc128(template (present) OCT16 kc128) := { |
| 593 | elementIdentifier := '83'O, |
| 594 | kC128_Value := kc128 |
| 595 | } |
| 596 | |
Harald Welte | 4bf5fc9 | 2017-12-15 13:56:06 +0100 | [diff] [blame] | 597 | template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := { |
| 598 | elementIdentifier := '83'O, |
| 599 | kC128_Value := kc128 |
| 600 | } |
| 601 | |
Harald Welte | f1b64e2 | 2017-12-15 14:55:14 +0100 | [diff] [blame] | 602 | /* 3.2.2.103 */ |
| 603 | template (value) BSSMAP_FIELD_CodecElement ts_CodecBase := { |
| 604 | codecType := GSM_FR, |
| 605 | tF := '0'B, |
| 606 | pT := '0'B, |
| 607 | pI := '0'B, |
| 608 | fI := '1'B, |
| 609 | extendedCodecType := omit, |
| 610 | s0_7 := omit, |
| 611 | s8_15 := omit |
| 612 | } |
| 613 | template (value) BSSMAP_FIELD_CodecElement ts_CodecFR modifies ts_CodecBase := { |
| 614 | codecType := GSM_FR |
| 615 | } |
| 616 | template (value) BSSMAP_FIELD_CodecElement ts_CodecEFR modifies ts_CodecBase := { |
| 617 | codecType := GSM_EFR |
| 618 | } |
| 619 | template (value) BSSMAP_FIELD_CodecElement ts_CodecHR modifies ts_CodecBase := { |
| 620 | codecType := GSM_HR |
| 621 | } |
| 622 | template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_F modifies ts_CodecBase := { |
| 623 | codecType := FR_AMR, |
| 624 | s0_7 := '11111111'B, |
| 625 | s8_15 := '01010111'B /* S11, S13 and S15 are reserved and coded with zeroes */ |
| 626 | } |
| 627 | template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_H modifies ts_CodecBase := { |
| 628 | codecType := HR_AMR, |
| 629 | s0_7 := '00111111'B, |
| 630 | s8_15 := '00000111'B /* S6 - S7 and S11 – S15 are reserved and coded with zeroes */ |
| 631 | } |
Neels Hofmeyr | a47a8c6 | 2022-04-07 00:31:19 +0200 | [diff] [blame] | 632 | template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_WB modifies ts_CodecBase := { |
| 633 | codecType := FR_AMR_WB, |
| 634 | s0_7 := '00000001'B |
| 635 | } |
Oliver Smith | dd00275 | 2023-02-21 13:35:00 +0100 | [diff] [blame] | 636 | template (value) BSSMAP_FIELD_CodecElement ts_CodecCSData modifies ts_CodecBase := { |
| 637 | codecType := CodecExtension, |
| 638 | tF := '0'B, /* Spare */ |
| 639 | pT := '0'B, /* CSDoTDM */ |
| 640 | pI := '1'B, /* CSDoIP */ |
| 641 | fI := '0'B, /* Spare */ |
| 642 | extendedCodecType := 'FD'O, /* CSData */ |
| 643 | s0_7 := '00000000'B /* R2, R3, Spare */ |
| 644 | } |
Harald Welte | f1b64e2 | 2017-12-15 14:55:14 +0100 | [diff] [blame] | 645 | template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := { |
| 646 | elementIdentifier := '7D'O, |
| 647 | lengthIndicator := 0, /* overwritten */ |
| 648 | codecElements := valueof(elem) |
| 649 | } |
Neels Hofmeyr | 82fd04b | 2019-02-28 08:43:00 +0100 | [diff] [blame] | 650 | template BSSMAP_IE_SpeechCodec ts_BSSMAP_IE_SpeechCodec(template BSSMAP_FIELD_CodecElements elem) := { |
| 651 | elementIdentifier := '7E'O, |
| 652 | lengthIndicator := 0, /* overwritten */ |
| 653 | codecElements := valueof(elem) |
| 654 | } |
Harald Welte | f1b64e2 | 2017-12-15 14:55:14 +0100 | [diff] [blame] | 655 | |
Harald Welte | 44d055f | 2023-04-17 09:18:55 +0800 | [diff] [blame^] | 656 | function ts_BSSMAP_IE_CallIdentifier(template (omit) OCT4 cid) return template (omit) BSSMAP_IE_CallIdentifier { |
| 657 | if (istemplatekind(cid, "omit")) { |
| 658 | return omit; |
| 659 | } else { |
| 660 | var template (present) BSSMAP_IE_CallIdentifier ie := { |
| 661 | elementIdentifier := '7F'O, |
| 662 | callIdentifierInfo := cid |
| 663 | } |
| 664 | return ie; |
| 665 | } |
| 666 | } |
| 667 | function tr_BSSMAP_IE_CallIdentifier(template OCT4 cid) return template BSSMAP_IE_CallIdentifier { |
| 668 | if (istemplatekind(cid, "*")) { |
| 669 | return *; |
| 670 | } else if (istemplatekind(cid, "omit")) { |
| 671 | return omit; |
| 672 | } else { |
| 673 | var template BSSMAP_IE_CallIdentifier ie := { |
| 674 | elementIdentifier := '7F'O, |
| 675 | callIdentifierInfo := cid |
| 676 | } |
| 677 | return ie; |
| 678 | } |
| 679 | } |
| 680 | |
| 681 | |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 682 | template (present) BSSMAP_IE_Osmo_OsmuxCID tr_OsmuxCID(template (present) INT1 cid := ?) := { |
| 683 | elementIdentifier := 'F1'O, |
| 684 | osmuxCID := cid |
| 685 | } |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 686 | template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := { |
| 687 | elementIdentifier := 'F1'O, |
| 688 | osmuxCID := cid |
| 689 | } |
| 690 | |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 691 | template PDU_BSSAP |
| 692 | ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 693 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, |
| 694 | template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 695 | modifies ts_BSSAP_BSSMAP := { |
| 696 | pdu := { |
| 697 | bssmap := { |
| 698 | assignmentRequest := { |
| 699 | messageType :='01'O, /* overwritten */ |
| 700 | channelType := ts_BSSMAP_IE_ChannelType, |
| 701 | layer3HeaderInfo := omit, |
| 702 | priority := omit, |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 703 | circuitIdentityCode := cic, |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 704 | downLinkDTX_Flag := omit, |
| 705 | interferenceBandToBeUsed := omit, |
| 706 | classmarkInformationType2 := omit, |
| 707 | groupCallReference := omit, |
| 708 | talkerFlag := omit, |
| 709 | configurationEvolutionIndication := omit, |
| 710 | lsaAccesControlSuppression := omit, |
| 711 | serviceHandover := omit, |
| 712 | encryptionInformation := omit, |
| 713 | talkerPriority := omit, |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 714 | aoIPTransportLayer := aoip, |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 715 | codecList := omit, |
| 716 | callIdentifier := omit, |
| 717 | kC128 := omit, |
| 718 | globalCallReference := omit, |
| 719 | lCLS_Configuration := omit, |
| 720 | lCLS_ConnectionStatusControl := omit, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 721 | lCLS_CorrelationNotNeeded := omit, |
| 722 | osmuxCID := osmuxCID |
Harald Welte | 365f4ed | 2017-11-23 00:00:43 +0100 | [diff] [blame] | 723 | } |
| 724 | } |
| 725 | } |
| 726 | } |
Harald Welte | c76f29f | 2017-11-22 12:46:46 +0100 | [diff] [blame] | 727 | |
Harald Welte | be48a7c | 2018-01-26 21:39:25 +0100 | [diff] [blame] | 728 | template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 729 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, |
| 730 | template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) |
Harald Welte | be48a7c | 2018-01-26 21:39:25 +0100 | [diff] [blame] | 731 | modifies tr_BSSAP_BSSMAP := { |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 732 | pdu := { |
| 733 | bssmap := { |
| 734 | assignmentRequest := { |
| 735 | messageType :='01'O, /* overwritten */ |
| 736 | channelType := ?, |
| 737 | layer3HeaderInfo := *, |
| 738 | priority := *, |
Harald Welte | be48a7c | 2018-01-26 21:39:25 +0100 | [diff] [blame] | 739 | circuitIdentityCode := cic, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 740 | downLinkDTX_Flag := *, |
| 741 | interferenceBandToBeUsed := *, |
| 742 | classmarkInformationType2 := *, |
| 743 | groupCallReference := *, |
| 744 | talkerFlag := *, |
| 745 | configurationEvolutionIndication := *, |
| 746 | lsaAccesControlSuppression := *, |
| 747 | serviceHandover := *, |
| 748 | encryptionInformation := *, |
| 749 | talkerPriority := *, |
Harald Welte | be48a7c | 2018-01-26 21:39:25 +0100 | [diff] [blame] | 750 | aoIPTransportLayer := aoip, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 751 | codecList := *, |
| 752 | callIdentifier := *, |
| 753 | kC128 := *, |
| 754 | globalCallReference := *, |
| 755 | lCLS_Configuration := *, |
| 756 | lCLS_ConnectionStatusControl := *, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 757 | lCLS_CorrelationNotNeeded := *, |
| 758 | osmuxCID := osmuxCID |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 759 | } |
| 760 | } |
| 761 | } |
| 762 | } |
| 763 | |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 764 | template PDU_BSSAP |
| 765 | ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit, |
Neels Hofmeyr | 82fd04b | 2019-02-28 08:43:00 +0100 | [diff] [blame] | 766 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 767 | template BSSMAP_IE_SpeechCodec speechCodec := omit, |
| 768 | template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit) |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 769 | modifies ts_BSSAP_BSSMAP := { |
| 770 | pdu := { |
| 771 | bssmap := { |
| 772 | assignmentComplete := { |
| 773 | messageType :='02'O, /* overwritten */ |
Harald Welte | 7ed2b08 | 2017-11-23 18:52:13 +0100 | [diff] [blame] | 774 | rR_Cause := omit, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 775 | circuitIdentityCode := cic, |
| 776 | cellIdentifier := omit, |
| 777 | chosenChannel := omit, |
| 778 | chosenEncryptionAlgorithm := omit, |
| 779 | circuitPool := omit, |
| 780 | speechVersion := omit, |
| 781 | lSAIdentifier := omit, |
| 782 | talkerPriority := omit, |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 783 | aoIPTransportLayer := aoip, |
Neels Hofmeyr | 82fd04b | 2019-02-28 08:43:00 +0100 | [diff] [blame] | 784 | speechCodec := speechCodec, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 785 | codecList := omit, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 786 | lCLS_BSS_Status := omit, |
| 787 | osmuxCID := osmuxCID |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 788 | } |
| 789 | } |
| 790 | } |
| 791 | } |
| 792 | |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 793 | template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 794 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *, |
| 795 | template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *) |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 796 | modifies tr_BSSAP_BSSMAP := { |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 797 | pdu := { |
| 798 | bssmap := { |
| 799 | assignmentComplete := { |
| 800 | messageType := '02'O, /* overwritten */ |
Harald Welte | 7ed2b08 | 2017-11-23 18:52:13 +0100 | [diff] [blame] | 801 | rR_Cause := *, |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 802 | circuitIdentityCode := cic, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 803 | cellIdentifier := *, |
| 804 | chosenChannel := *, |
| 805 | chosenEncryptionAlgorithm := *, |
| 806 | circuitPool := *, |
| 807 | speechVersion := *, |
| 808 | lSAIdentifier := *, |
| 809 | talkerPriority := *, |
Harald Welte | cc7e4dc | 2017-12-14 21:55:10 +0100 | [diff] [blame] | 810 | aoIPTransportLayer := aoip, |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 811 | speechCodec := *, |
| 812 | codecList := *, |
Pau Espin Pedrol | 5eff975 | 2019-05-23 15:03:54 +0200 | [diff] [blame] | 813 | lCLS_BSS_Status := *, |
| 814 | osmuxCID := osmuxCID |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 815 | } |
| 816 | } |
| 817 | } |
| 818 | } |
| 819 | |
Harald Welte | 16a4adf | 2017-12-14 18:54:01 +0100 | [diff] [blame] | 820 | template PDU_BSSAP tr_BSSMAP_AssignmentFail modifies tr_BSSAP_BSSMAP := { |
| 821 | pdu := { |
| 822 | bssmap := { |
| 823 | assignmentFailure := { |
| 824 | messageType := '03'O, /* overwritten */ |
| 825 | rR_Cause := *, |
| 826 | circuitPool := *, |
| 827 | circuitPoolList := *, |
| 828 | talkerPriority := *, |
| 829 | codecList := * |
| 830 | } |
| 831 | } |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 836 | template (value) PDU_BSSAP ts_BSSMAP_ClearCommand(BssmapCause cause) |
| 837 | modifies ts_BSSAP_BSSMAP := { |
| 838 | pdu := { |
| 839 | bssmap := { |
| 840 | clearCommand := { |
| 841 | messageType := '20'O, /* overwritten */ |
| 842 | layer3HeaderInfo := omit, |
| 843 | cause := ts_BSSMAP_IE_Cause(cause), |
| 844 | cSFB_Indication := omit |
| 845 | } |
| 846 | } |
| 847 | } |
| 848 | } |
Harald Welte | 9978710 | 2019-02-04 10:41:36 +0100 | [diff] [blame] | 849 | template (value) PDU_BSSAP ts_BSSMAP_ClearCommandCSFB(BssmapCause cause) |
| 850 | modifies ts_BSSMAP_ClearCommand := { |
| 851 | pdu := { |
| 852 | bssmap := { |
| 853 | clearCommand := { |
| 854 | cSFB_Indication := { |
| 855 | elementIdentifier := '8F'O |
| 856 | } |
| 857 | } |
| 858 | } |
| 859 | } |
| 860 | } |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 861 | |
| 862 | template PDU_BSSAP tr_BSSMAP_ClearCommand modifies tr_BSSAP_BSSMAP := { |
| 863 | pdu := { |
| 864 | bssmap := { |
| 865 | clearCommand := { |
| 866 | messageType := '20'O, /* overwritten */ |
| 867 | layer3HeaderInfo := *, |
| 868 | cause := ?, |
| 869 | cSFB_Indication := * |
| 870 | } |
| 871 | } |
| 872 | } |
| 873 | } |
| 874 | |
Harald Welte | 4c422b7 | 2019-02-17 16:27:10 +0100 | [diff] [blame] | 875 | template PDU_BSSAP tr_BSSMAP_ClearCommandCSFB modifies tr_BSSAP_BSSMAP := { |
| 876 | pdu := { |
| 877 | bssmap := { |
| 878 | clearCommand := { |
| 879 | messageType := '20'O, /* overwritten */ |
| 880 | layer3HeaderInfo := *, |
| 881 | cause := ?, |
| 882 | cSFB_Indication := { |
| 883 | elementIdentifier := '8F'O |
| 884 | } |
| 885 | } |
| 886 | } |
| 887 | } |
| 888 | } |
| 889 | |
Harald Welte | b3414b2 | 2017-11-23 18:22:10 +0100 | [diff] [blame] | 890 | template (value) PDU_BSSAP ts_BSSMAP_ClearComplete |
| 891 | modifies ts_BSSAP_BSSMAP := { |
| 892 | pdu := { |
| 893 | bssmap := { |
| 894 | clearComplete := { |
| 895 | messageType := '21'O /* overwritten */ |
| 896 | } |
| 897 | } |
| 898 | } |
| 899 | } |
| 900 | |
Harald Welte | c859df5 | 2017-11-24 23:41:41 +0100 | [diff] [blame] | 901 | template PDU_BSSAP tr_BSSMAP_ClearComplete modifies tr_BSSAP_BSSMAP := { |
| 902 | pdu := { |
| 903 | bssmap := { |
| 904 | clearComplete := { |
| 905 | messageType := '21'O |
| 906 | } |
| 907 | } |
| 908 | } |
| 909 | } |
| 910 | |
Harald Welte | bc88178 | 2018-01-23 20:09:15 +0100 | [diff] [blame] | 911 | template (value) PDU_BSSAP ts_BSSMAP_ClearRequest(BssmapCause cause) |
| 912 | modifies ts_BSSAP_BSSMAP := { |
| 913 | pdu := { |
| 914 | bssmap := { |
| 915 | clearRequest := { |
| 916 | messageType := '22'O, /* overwritten */ |
| 917 | cause := ts_BSSMAP_IE_Cause(cause) |
| 918 | } |
| 919 | } |
| 920 | } |
| 921 | } |
| 922 | |
Harald Welte | cfa79ad | 2017-12-09 22:33:47 +0100 | [diff] [blame] | 923 | template PDU_BSSAP tr_BSSMAP_ClearRequest modifies tr_BSSAP_BSSMAP := { |
| 924 | pdu := { |
| 925 | bssmap := { |
| 926 | clearRequest := { |
| 927 | messageType := '22'O, /* overwritten */ |
| 928 | cause := ? |
| 929 | } |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 934 | template PDU_BSSAP ts_BSSMAP_HandoverRequired(BssmapCause cause, |
Pau Espin Pedrol | 35801c3 | 2021-04-19 13:03:20 +0200 | [diff] [blame] | 935 | template BSSMAP_FIELD_CellIdentificationList cid_list, |
| 936 | template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit) |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 937 | modifies ts_BSSAP_BSSMAP := { |
| 938 | pdu := { |
| 939 | bssmap := { |
| 940 | handoverRequired := { |
| 941 | messageType := '11'O, |
| 942 | cause := ts_BSSMAP_IE_Cause(cause), |
| 943 | responseRequest := omit, |
| 944 | cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list), |
| 945 | circuitPoolList := omit, |
| 946 | currentChannelType1 := omit, |
| 947 | speechVersion := omit, |
| 948 | queueingIndicator := omit, |
Pau Espin Pedrol | 35801c3 | 2021-04-19 13:03:20 +0200 | [diff] [blame] | 949 | oldToNewBSSInfo := f_ts_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs), |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 950 | sourceToTargetRNCTransparentInfo := omit, |
| 951 | sourceToTargetRNCTransparentInfoCDMA := omit, |
| 952 | gERANClassmark := omit, |
| 953 | talkerPriority := omit, |
| 954 | speechCodec := omit, |
| 955 | cSG_Identifier := omit |
| 956 | } |
| 957 | } |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | |
Oliver Smith | c9a5f53 | 2022-10-21 11:32:23 +0200 | [diff] [blame] | 962 | template PDU_BSSAP tr_BSSMAP_HandoverRequired(template BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := *, |
| 963 | template (present) BSSMAP_FIELD_CellIdentificationList cid_list := ?) |
| 964 | modifies tr_BSSAP_BSSMAP := { |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 965 | pdu := { |
| 966 | bssmap := { |
| 967 | handoverRequired := { |
Pau Espin Pedrol | 35801c3 | 2021-04-19 13:03:20 +0200 | [diff] [blame] | 968 | messageType := '11'O, |
Oliver Smith | c9a5f53 | 2022-10-21 11:32:23 +0200 | [diff] [blame] | 969 | cellIdentifierList := { |
| 970 | cellIdentificationList := cid_list |
| 971 | }, |
Pau Espin Pedrol | 35801c3 | 2021-04-19 13:03:20 +0200 | [diff] [blame] | 972 | oldToNewBSSInfo := f_tr_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs) |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 973 | } |
| 974 | } |
| 975 | } |
| 976 | } |
| 977 | |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 978 | template PDU_BSSAP tr_BSSMAP_HandoverRequiredReject modifies tr_BSSAP_BSSMAP := { |
| 979 | pdu := { |
| 980 | bssmap := { |
| 981 | handoverRequiredReject := { |
| 982 | messageType := '1A'O |
| 983 | } |
| 984 | } |
| 985 | } |
| 986 | } |
| 987 | |
| 988 | template PDU_BSSAP tr_BSSMAP_HandoverCommand |
| 989 | modifies tr_BSSAP_BSSMAP := { |
| 990 | pdu := { |
| 991 | bssmap := { |
| 992 | handoverCommand := { |
| 993 | messageType := '13'O |
| 994 | } |
| 995 | } |
| 996 | } |
| 997 | } |
| 998 | |
| 999 | template PDU_BSSAP tr_BSSMAP_HandoverSucceeded |
| 1000 | modifies tr_BSSAP_BSSMAP := { |
| 1001 | pdu := { |
| 1002 | bssmap := { |
| 1003 | handoverSucceeded := { |
| 1004 | messageType := '15'O |
| 1005 | } |
| 1006 | } |
| 1007 | } |
| 1008 | } |
| 1009 | |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1010 | template (value) PDU_BSSAP ts_BSSMAP_HandoverCommand(octetstring layer3info) |
| 1011 | modifies ts_BSSAP_BSSMAP := { |
| 1012 | pdu := { |
| 1013 | bssmap := { |
| 1014 | handoverCommand := { |
| 1015 | messageType := '13'O, |
| 1016 | layer3Information := { |
| 1017 | elementIdentifier := '17'O, |
| 1018 | lengthIndicator := 0, |
| 1019 | layer3info := layer3info |
| 1020 | }, |
| 1021 | cellIdentifier := omit, |
| 1022 | newBSSToOldBSSInfo := omit, |
| 1023 | talkerPriority := omit |
| 1024 | } |
| 1025 | } |
| 1026 | } |
| 1027 | } |
| 1028 | |
Neels Hofmeyr | 61ebb8b | 2018-10-09 18:28:06 +0200 | [diff] [blame] | 1029 | template PDU_BSSAP tr_BSSMAP_HandoverFailure modifies tr_BSSAP_BSSMAP := { |
| 1030 | pdu := { |
| 1031 | bssmap := { |
| 1032 | handoverFailure := { |
| 1033 | messageType := '16'O, |
| 1034 | cause := ?, |
| 1035 | rR_Cause := *, |
| 1036 | circuitPool := *, |
| 1037 | circuitPoolList := *, |
| 1038 | gERANClassmark := *, |
| 1039 | newBSSToOldBSSInfo := *, |
| 1040 | interSystemInformation := *, |
| 1041 | talkerPriority := *, |
| 1042 | codecList := * |
| 1043 | } |
| 1044 | } |
| 1045 | } |
| 1046 | } |
| 1047 | |
Neels Hofmeyr | 0d841d9 | 2021-06-21 22:27:21 +0200 | [diff] [blame] | 1048 | template PDU_BSSAP tr_BSSMAP_HandoverRequest(template BSSMAP_IE_EncryptionInformation encryptionInformation := *, |
| 1049 | template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := *, |
Vadim Yanitskiy | 6fe5d4e | 2022-08-04 04:04:54 +0700 | [diff] [blame] | 1050 | template BSSMAP_IE_KC128 kC128 := *, |
| 1051 | template BSSMAP_IE_SpeechCodecList codecList := * |
Neels Hofmeyr | 0d841d9 | 2021-06-21 22:27:21 +0200 | [diff] [blame] | 1052 | ) |
| 1053 | modifies tr_BSSAP_BSSMAP := { |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 1054 | pdu := { |
| 1055 | bssmap := { |
| 1056 | handoverRequest := { |
Neels Hofmeyr | 0d841d9 | 2021-06-21 22:27:21 +0200 | [diff] [blame] | 1057 | messageType := '10'O, |
| 1058 | encryptionInformation := encryptionInformation, |
| 1059 | chosenEncryptionAlgorithm := chosenEncryptionAlgorithm, |
Vadim Yanitskiy | 6fe5d4e | 2022-08-04 04:04:54 +0700 | [diff] [blame] | 1060 | codecList := codecList, |
Neels Hofmeyr | 0d841d9 | 2021-06-21 22:27:21 +0200 | [diff] [blame] | 1061 | kC128 := kC128 |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 1062 | } |
| 1063 | } |
| 1064 | } |
| 1065 | } |
| 1066 | |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1067 | template PDU_BSSAP ts_BSSMAP_HandoverRequest( |
| 1068 | template BSSMAP_IE_CircuitIdentityCode cic := omit, |
| 1069 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip_tla := omit, |
| 1070 | template BSSMAP_IE_CellIdentifier cell_id_target := ts_CellID_LAC_CI(1, 0), |
Pau Espin Pedrol | c08d552 | 2021-04-16 15:40:38 +0200 | [diff] [blame] | 1071 | template BSSMAP_IE_CellIdentifier cell_id_source := ts_CellID_LAC_CI(1, 1), |
Neels Hofmeyr | 1d8dece | 2021-06-21 05:25:46 +0200 | [diff] [blame] | 1072 | template (omit) BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := omit, |
| 1073 | template BSSMAP_IE_EncryptionInformation encryptionInformation := ts_BSSMAP_IE_EncrInfo('0000000000000000'O,'01'O), |
| 1074 | template (omit) BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := omit, |
Neels Hofmeyr | 9fe1320 | 2022-03-04 00:05:43 +0100 | [diff] [blame] | 1075 | template (omit) BSSMAP_IE_KC128 kC128 := omit, |
| 1076 | template (omit) BSSMAP_IE_SpeechCodecList codecList := omit |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1077 | ) |
| 1078 | modifies ts_BSSAP_BSSMAP := { |
| 1079 | pdu := { |
| 1080 | bssmap := { |
| 1081 | handoverRequest := { |
| 1082 | messageType := '10'O, |
| 1083 | channelType := ts_BSSMAP_IE_ChannelType, |
Neels Hofmeyr | 1d8dece | 2021-06-21 05:25:46 +0200 | [diff] [blame] | 1084 | encryptionInformation := encryptionInformation, |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1085 | classmarkInformationType := { |
| 1086 | classmarkInformationType1 := { |
| 1087 | elementIdentifier := '1D'O, |
| 1088 | rf_PowerCapability := '000'B, |
| 1089 | a5_1 := '0'B, |
| 1090 | esind := '0'B, |
| 1091 | revisionLevel := '10'B, |
| 1092 | spare1_1 := '0'B |
| 1093 | } |
| 1094 | }, |
| 1095 | cellIdentifierSource := cell_id_source, |
| 1096 | priority := omit, |
| 1097 | circuitIdentityCode := cic, |
| 1098 | downLinkDTX_Flag := omit, |
| 1099 | cellIdentifierTarget := cell_id_target, |
| 1100 | interferenceBandToBeUsed := omit, |
| 1101 | cause := omit, |
| 1102 | classmarkInformationType3 := omit, |
| 1103 | currentChannelType1 := omit, |
| 1104 | speechVersion := omit, |
| 1105 | groupCallReference := omit, |
| 1106 | talkerFlag := omit, |
| 1107 | configurationEvolutionIndication := omit, |
Neels Hofmeyr | 1d8dece | 2021-06-21 05:25:46 +0200 | [diff] [blame] | 1108 | chosenEncryptionAlgorithm := chosenEncryptionAlgorithm, |
Pau Espin Pedrol | c08d552 | 2021-04-16 15:40:38 +0200 | [diff] [blame] | 1109 | oldToNewBSSInfo := f_ts_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs), |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1110 | lSAInformation := omit, |
| 1111 | lSAAccessControlSuppression := omit, |
| 1112 | serviceHandover := omit, |
| 1113 | iMSI_bssmap := omit, |
| 1114 | sourceToTargetRNCTransparentInfo := omit, |
| 1115 | sourceToTargetRNCTransparentInfoCDMA := omit, |
| 1116 | sNAAccessInformation := omit, |
| 1117 | talkerPriority := omit, |
| 1118 | aoIPTransportLayer := aoip_tla, |
Neels Hofmeyr | 9fe1320 | 2022-03-04 00:05:43 +0100 | [diff] [blame] | 1119 | codecList := codecList, |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1120 | callIdentifier := omit, |
Neels Hofmeyr | 1d8dece | 2021-06-21 05:25:46 +0200 | [diff] [blame] | 1121 | kC128 := kC128, |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1122 | globalCallReference := omit, |
| 1123 | lCLS_Configuration := omit, |
| 1124 | connectionStatusControl := omit |
| 1125 | } |
| 1126 | } |
| 1127 | } |
| 1128 | } |
| 1129 | |
| 1130 | template PDU_BSSAP tr_BSSMAP_HandoverRequestAcknowledge(template octetstring layer3info) |
| 1131 | modifies tr_BSSAP_BSSMAP := { |
| 1132 | pdu := { |
| 1133 | bssmap := { |
| 1134 | handoverRequestAck := { |
| 1135 | messageType := '12'O, |
| 1136 | layer3Information := { |
| 1137 | elementIdentifier := '17'O, |
| 1138 | lengthIndicator := ?, |
| 1139 | layer3info := layer3info |
| 1140 | } |
| 1141 | } |
| 1142 | } |
| 1143 | } |
| 1144 | } |
| 1145 | |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 1146 | template PDU_BSSAP ts_BSSMAP_HandoverRequestAcknowledge( |
| 1147 | template octetstring layer3info, |
| 1148 | template LIN1 layer3infoLength, |
| 1149 | template BSSMAP_IE_AoIP_TransportLayerAddress aoIPTransportLayer := omit, |
| 1150 | template BSSMAP_IE_SpeechCodec speechCodec := omit, |
| 1151 | template BSSMAP_IE_ChosenChannel chosenChannel := omit, |
| 1152 | template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := omit) |
| 1153 | modifies ts_BSSAP_BSSMAP := { |
| 1154 | pdu := { |
| 1155 | bssmap := { |
| 1156 | handoverRequestAck := { |
| 1157 | messageType := '12'O, |
| 1158 | layer3Information := { |
| 1159 | elementIdentifier := '17'O, |
| 1160 | lengthIndicator := layer3infoLength, |
| 1161 | layer3info := layer3info |
| 1162 | }, |
| 1163 | chosenChannel := chosenChannel, |
| 1164 | chosenEncryptionAlgorithm := chosenEncryptionAlgorithm, |
| 1165 | circuitPool := omit, |
| 1166 | speechVersion := omit, |
| 1167 | circuitIdentityCode := omit, |
| 1168 | lSAIdentifier := omit, |
| 1169 | newBSSToOldBSSInfo := omit, |
| 1170 | interSystemInformation := omit, |
| 1171 | talkerPriority := omit, |
| 1172 | aoIPTransportLayer := aoIPTransportLayer, |
| 1173 | codecList := omit, |
| 1174 | speechCodec := speechCodec, |
| 1175 | lCLS_bSS_Status := omit |
| 1176 | } |
| 1177 | } |
| 1178 | } |
| 1179 | } |
| 1180 | |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1181 | template PDU_BSSAP tr_BSSMAP_HandoverDetect |
| 1182 | modifies tr_BSSAP_BSSMAP := { |
| 1183 | pdu := { |
| 1184 | bssmap := { |
| 1185 | handoverDetect := { |
| 1186 | messageType := '1B'O, |
| 1187 | talkerPriority := * |
| 1188 | } |
| 1189 | } |
| 1190 | } |
| 1191 | } |
| 1192 | |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 1193 | template PDU_BSSAP ts_BSSMAP_HandoverDetect |
| 1194 | modifies ts_BSSAP_BSSMAP := { |
| 1195 | pdu := { |
| 1196 | bssmap := { |
| 1197 | handoverDetect := { |
| 1198 | messageType := '1B'O, |
| 1199 | talkerPriority := omit |
| 1200 | } |
| 1201 | } |
| 1202 | } |
| 1203 | } |
| 1204 | |
Neels Hofmeyr | bd0ef93 | 2018-03-19 14:58:46 +0100 | [diff] [blame] | 1205 | template PDU_BSSAP tr_BSSMAP_HandoverComplete |
| 1206 | modifies tr_BSSAP_BSSMAP := { |
| 1207 | pdu := { |
| 1208 | bssmap := { |
| 1209 | handoverComplete := { |
| 1210 | messageType := '14'O, |
| 1211 | rR_Cause := *, |
| 1212 | talkerPriority := *, |
| 1213 | speechCodec := *, |
| 1214 | codecList := *, |
| 1215 | chosenEncryptionAlgorithm := *, |
| 1216 | chosenChannel := *, |
| 1217 | lCLS_BSS_Status := * |
| 1218 | } |
| 1219 | } |
| 1220 | } |
| 1221 | } |
Harald Welte | cfa79ad | 2017-12-09 22:33:47 +0100 | [diff] [blame] | 1222 | |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 1223 | template PDU_BSSAP ts_BSSMAP_HandoverComplete |
| 1224 | modifies ts_BSSAP_BSSMAP := { |
| 1225 | pdu := { |
| 1226 | bssmap := { |
| 1227 | handoverComplete := { |
| 1228 | messageType := '14'O, |
| 1229 | rR_Cause := omit, |
| 1230 | talkerPriority := omit, |
| 1231 | speechCodec := omit, |
| 1232 | codecList := omit, |
| 1233 | chosenEncryptionAlgorithm := omit, |
| 1234 | chosenChannel := omit, |
| 1235 | lCLS_BSS_Status := omit |
| 1236 | } |
| 1237 | } |
| 1238 | } |
| 1239 | } |
| 1240 | |
Philipp Maier | aee6039 | 2018-11-05 17:09:00 +0100 | [diff] [blame] | 1241 | template PDU_BSSAP tr_BSSMAP_HandoverPerformed |
| 1242 | modifies tr_BSSAP_BSSMAP := { |
| 1243 | pdu := { |
| 1244 | bssmap := { |
| 1245 | handoverPerformed := { |
| 1246 | messageType := '17'O, |
| 1247 | cause := ?, |
| 1248 | cellIdentifier := ?, |
Philipp Maier | 8d33a13 | 2018-11-12 11:58:55 +0100 | [diff] [blame] | 1249 | chosenChannel := *, |
| 1250 | chosenEncryptionAlgorithm := *, |
| 1251 | speechVersion := *, |
| 1252 | lSAIdentifier := *, |
| 1253 | talkerPriority := *, |
| 1254 | codecList := *, |
| 1255 | speechCodec := *, |
| 1256 | lCLS_BSS_Status := * |
Philipp Maier | aee6039 | 2018-11-05 17:09:00 +0100 | [diff] [blame] | 1257 | } |
| 1258 | } |
| 1259 | } |
| 1260 | } |
| 1261 | |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1262 | template BSSMAP_IE_IMSI ts_BSSMAP_Imsi(hexstring imsi_digits) := { |
| 1263 | elementIdentifier := '08'O, |
| 1264 | lengthIndicator := 0, /* overwritten */ |
| 1265 | typeOfIdentity := '001'B, /* IMSI */ |
| 1266 | oddEvenIndicator := f_hex_is_odd_length(imsi_digits), |
| 1267 | digits := imsi_digits |
| 1268 | } |
| 1269 | |
Harald Welte | 17d2115 | 2018-01-27 00:47:11 +0100 | [diff] [blame] | 1270 | template BSSMAP_IE_IMSI tr_BSSMAP_Imsi(template hexstring imsi_digits) := { |
| 1271 | elementIdentifier := '08'O, |
| 1272 | lengthIndicator := ?, /* overwritten */ |
| 1273 | typeOfIdentity := '001'B, /* IMSI */ |
| 1274 | oddEvenIndicator := ?, |
| 1275 | digits := imsi_digits |
| 1276 | } |
| 1277 | |
Pau Espin Pedrol | ee8cec8 | 2021-04-15 14:39:05 +0200 | [diff] [blame] | 1278 | template (value) BSSAMAP_IE_LastUsedEUTRANPLMNId ts_BSSMAP_LastUsedEUTRANPLMNId(OCT3 mcc_mnc) := { |
| 1279 | elementIdentifier := '95'O, |
| 1280 | mcc_mnc := mcc_mnc |
| 1281 | } |
Pau Espin Pedrol | e979c40 | 2021-04-28 17:29:54 +0200 | [diff] [blame] | 1282 | template BSSAMAP_IE_LastUsedEUTRANPLMNId tr_BSSMAP_LastUsedEUTRANPLMNId(template OCT3 mcc_mnc) := { |
| 1283 | elementIdentifier := '95'O, |
| 1284 | mcc_mnc := mcc_mnc |
| 1285 | } |
Pau Espin Pedrol | ee8cec8 | 2021-04-15 14:39:05 +0200 | [diff] [blame] | 1286 | function f_ts_BSSMAP_LastUsedEUTRANPLMNId(template (omit) OCT3 mcc_mnc) |
| 1287 | return template (omit) BSSAMAP_IE_LastUsedEUTRANPLMNId { |
| 1288 | if (not istemplatekind(mcc_mnc, "omit")) { |
| 1289 | return ts_BSSMAP_LastUsedEUTRANPLMNId(valueof(mcc_mnc)); |
| 1290 | } else { |
| 1291 | return omit; |
| 1292 | } |
| 1293 | } |
Pau Espin Pedrol | e979c40 | 2021-04-28 17:29:54 +0200 | [diff] [blame] | 1294 | function f_tr_BSSMAP_LastUsedEUTRANPLMNId(template OCT3 mcc_mnc) |
| 1295 | return template BSSAMAP_IE_LastUsedEUTRANPLMNId { |
| 1296 | if (istemplatekind(mcc_mnc, "*")) { |
| 1297 | return *; |
| 1298 | } else if (istemplatekind(mcc_mnc, "?")) { |
| 1299 | return ?; |
| 1300 | } else if (istemplatekind(mcc_mnc, "omit")) { |
| 1301 | return omit; |
| 1302 | } else { |
| 1303 | return ts_BSSMAP_LastUsedEUTRANPLMNId(valueof(mcc_mnc)); |
| 1304 | } |
| 1305 | } |
Pau Espin Pedrol | ee8cec8 | 2021-04-15 14:39:05 +0200 | [diff] [blame] | 1306 | |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1307 | template BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_noCell := { |
| 1308 | cIl_noCell := ''O |
| 1309 | } |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1310 | template (value) BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_BSS := { |
| 1311 | cIl_allInBSS := ''O |
| 1312 | } |
| 1313 | template BSSMAP_FIELD_CellIdentificationList tr_BSSMAP_CIL_BSS := { |
| 1314 | cIl_allInBSS := ''O |
| 1315 | } |
| 1316 | |
| 1317 | template (value) BSSMAP_FIELD_CellIdentificationList |
| 1318 | ts_BSSMAP_CIL_CGI(template (value) BSSMAP_FIELD_CellIdentificationList_CGI cgil) := { |
| 1319 | cIl_CGI := cgil |
| 1320 | } |
| 1321 | template BSSMAP_FIELD_CellIdentificationList |
| 1322 | tr_BSSMAP_CIL_CGI(template BSSMAP_FIELD_CellIdentificationList_CGI cgil) := { |
| 1323 | cIl_CGI := cgil |
| 1324 | } |
| 1325 | |
| 1326 | template (value) BSSMAP_FIELD_CellIdentificationList |
| 1327 | ts_BSSMAP_CIL_LAC_CI(template (value) BSSMAP_FIELD_CellIdentificationList_LAC_CI lac_cil) := { |
| 1328 | cIl_LAC_CI := lac_cil |
| 1329 | } |
| 1330 | template BSSMAP_FIELD_CellIdentificationList |
| 1331 | tr_BSSMAP_CIL_LAC_CI(template BSSMAP_FIELD_CellIdentificationList_LAC_CI lac_cil) := { |
| 1332 | cIl_LAC_CI := lac_cil |
| 1333 | } |
| 1334 | |
| 1335 | template (value) BSSMAP_FIELD_CellIdentificationList |
| 1336 | ts_BSSMAP_CIL_CI(template (value) RecordOfOCT2 cil) := { |
| 1337 | cIl_CI := cil |
| 1338 | } |
| 1339 | template BSSMAP_FIELD_CellIdentificationList tr_BSSMAP_CIL_CI(template RecordOfOCT2 cil) := { |
| 1340 | cIl_CI := cil |
| 1341 | } |
| 1342 | |
| 1343 | template (value) BSSMAP_FIELD_CellIdentificationList |
| 1344 | ts_BSSMAP_CIL_LAI(template (value) BSSMAP_FIELD_CellIdentificationList_LAI lail) := { |
| 1345 | cIl_LAI := lail |
| 1346 | } |
| 1347 | template BSSMAP_FIELD_CellIdentificationList |
| 1348 | tr_BSSMAP_CIL_LAI(template BSSMAP_FIELD_CellIdentificationList_LAI lail) := { |
| 1349 | cIl_LAI := lail |
| 1350 | } |
| 1351 | |
| 1352 | template (value) BSSMAP_FIELD_CellIdentificationList |
| 1353 | ts_BSSMAP_CIL_LAC(template (value) RecordOfOCT2 lacl) := { |
| 1354 | cIl_LAC := lacl |
| 1355 | } |
| 1356 | template BSSMAP_FIELD_CellIdentificationList tr_BSSMAP_CIL_LAC(template RecordOfOCT2 lacl) := { |
| 1357 | cIl_LAC := lacl |
| 1358 | } |
| 1359 | |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1360 | |
Pau Espin Pedrol | e979c40 | 2021-04-28 17:29:54 +0200 | [diff] [blame] | 1361 | function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 { |
Harald Welte | 24135bd | 2018-03-17 19:27:53 +0100 | [diff] [blame] | 1362 | if (lengthof(mnc) == 2) { |
| 1363 | return hex2oct(mcc[1] & mcc[0] & 'F'H & mcc[2] & mnc[1] & mnc[0]); |
Stefan Sperling | 83348bc | 2018-03-14 17:44:40 +0100 | [diff] [blame] | 1364 | } else { |
| 1365 | return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]); |
| 1366 | } |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1367 | } |
| 1368 | |
Pau Espin Pedrol | e979c40 | 2021-04-28 17:29:54 +0200 | [diff] [blame] | 1369 | function f_dec_mcc_mnc(in OCT3 mcc_mnc, out GsmMcc mcc, out GsmMnc mnc) { |
| 1370 | var hexstring hs := oct2hex(mcc_mnc); |
| 1371 | mcc := hs[1] & hs[0] & hs[3]; |
| 1372 | mnc := hs[5] & hs[4]; |
| 1373 | if (hs[2] == 'F'H) { |
| 1374 | mnc := mnc & hs[2]; |
| 1375 | } |
| 1376 | } |
| 1377 | |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1378 | template (value) BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, GsmMnc mnc, GsmLac lac, GsmCellId ci) := { |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1379 | mcc_mnc := f_enc_mcc_mnc(mcc, mnc), |
| 1380 | lac := int2oct(lac, 2), |
| 1381 | ci := int2oct(ci, 2) |
| 1382 | } |
| 1383 | |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1384 | template (value) BSSMAP_FIELD_CellIdentification_LAC_CI ts_BSSMAP_CI_LAC_CI(GsmLac lac, GsmCellId ci) := { |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1385 | lac := int2oct(lac, 2), |
| 1386 | ci := int2oct(ci, 2) |
| 1387 | } |
| 1388 | |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1389 | template (value) BSSMAP_FIELD_CellIdentification_LAI ts_BSSMAP_CI_LAI(GsmMcc mcc, GsmMnc mnc, GsmLac lac) := { |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1390 | mcc_mnc := f_enc_mcc_mnc(mcc, mnc), |
| 1391 | lac := int2oct(lac, 2) |
| 1392 | } |
| 1393 | |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1394 | template (value) OCT2 ts_BSSMAP_CI_LAC(GsmLac lac) := int2oct(lac, 2); |
| 1395 | template (value) OCT2 ts_BSSMAP_CI_CI(GsmCellId ci) := int2oct(ci, 2); |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1396 | |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1397 | template (value) BSSMAP_FIELD_CellIdentification_PLMN_LAC_RNC |
Harald Welte | 751d3eb | 2018-01-31 15:51:06 +0100 | [diff] [blame] | 1398 | ts_BSSMAP_CI_PLMN_LAC_RNC(GsmMcc mcc, GsmMnc mnc, GsmLac lac, uint16_t rnc_id) := { |
| 1399 | mcc_mnc := f_enc_mcc_mnc(mcc, mnc), |
| 1400 | lac := int2oct(lac, 2), |
| 1401 | rncId := int2oct(rnc_id, 2) |
| 1402 | } |
| 1403 | |
Harald Welte | aba4216 | 2019-06-19 18:17:59 +0200 | [diff] [blame] | 1404 | template (value) BSSMAP_FIELD_CellIdentification_LAC_RNC ts_BSSMAP_CI_LAC_RNC(GsmLac lac, uint16_t rnc_id) := { |
Harald Welte | 751d3eb | 2018-01-31 15:51:06 +0100 | [diff] [blame] | 1405 | lac := int2oct(lac, 2), |
| 1406 | rncId := int2oct(rnc_id, 2) |
| 1407 | } |
| 1408 | |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1409 | template BSSMAP_IE_ChannelNeeded ts_BSSMAP_IE_ChanNeeded(BIT2 chneed) := { |
| 1410 | elementIdentifier := '24'O, |
| 1411 | channel := chneed, |
| 1412 | spare := '000000'B |
| 1413 | } |
| 1414 | |
| 1415 | template BSSMAP_IE_TMSI ts_BSSMAP_IE_TMSI(OCT4 tmsi) := { |
| 1416 | elementIdentifier := '09'O, |
| 1417 | lengthIndicator := 4, |
| 1418 | tmsiOctets := tmsi |
| 1419 | }; |
| 1420 | |
Harald Welte | 17d2115 | 2018-01-27 00:47:11 +0100 | [diff] [blame] | 1421 | template BSSMAP_IE_TMSI tr_BSSMAP_IE_TMSI(template OCT4 tmsi) := { |
| 1422 | elementIdentifier := '09'O, |
| 1423 | lengthIndicator := 4, |
| 1424 | tmsiOctets := tmsi |
| 1425 | }; |
| 1426 | |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1427 | private function f_tmsi_or_omit(template OCT4 tmsi) return template BSSMAP_IE_TMSI { |
| 1428 | var template BSSMAP_IE_TMSI ret; |
| 1429 | if (ispresent(tmsi)) { |
| 1430 | ret := ts_BSSMAP_IE_TMSI(valueof(tmsi)); |
| 1431 | } else { |
| 1432 | ret := omit; |
| 1433 | } |
| 1434 | return ret; |
| 1435 | } |
| 1436 | |
| 1437 | template PDU_BSSAP ts_BSSMAP_Paging(hexstring imsi_digits, |
| 1438 | template BSSMAP_FIELD_CellIdentificationList cid_list, |
| 1439 | template OCT4 tmsi := omit, |
| 1440 | template BSSMAP_IE_ChannelNeeded chneed := omit) |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1441 | modifies ts_BSSAP_BSSMAP := { |
| 1442 | pdu := { |
| 1443 | bssmap := { |
| 1444 | paging := { |
Harald Welte | 17d2115 | 2018-01-27 00:47:11 +0100 | [diff] [blame] | 1445 | messageType := '52'O, |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1446 | iMSI := ts_BSSMAP_Imsi(imsi_digits), |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1447 | tMSI := f_tmsi_or_omit(tmsi), |
Neels Hofmeyr | 0ac6315 | 2019-05-07 01:20:17 +0200 | [diff] [blame] | 1448 | cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list), |
Harald Welte | 72cecfa | 2017-12-11 19:50:14 +0100 | [diff] [blame] | 1449 | channelNeeded := chneed, |
Harald Welte | 28d943e | 2017-11-25 15:00:50 +0100 | [diff] [blame] | 1450 | eMLPP_Priority := omit, |
| 1451 | pagingInformation := omit /* only VGCS/VBS flag */ |
| 1452 | } |
| 1453 | } |
| 1454 | } |
| 1455 | } |
| 1456 | |
Harald Welte | 17d2115 | 2018-01-27 00:47:11 +0100 | [diff] [blame] | 1457 | template PDU_BSSAP tr_BSSMAP_Paging(template hexstring imsi_digits := ?, |
| 1458 | template OCT4 tmsi := *, |
| 1459 | template BSSMAP_IE_ChannelNeeded chneed := *) |
| 1460 | modifies tr_BSSAP_BSSMAP := { |
| 1461 | pdu := { |
| 1462 | bssmap := { |
| 1463 | paging := { |
| 1464 | messageType := '52'O, |
| 1465 | iMSI := tr_BSSMAP_Imsi(imsi_digits), |
| 1466 | tMSI := tr_BSSMAP_IE_TMSI(tmsi) ifpresent, |
| 1467 | cellIdentifierList := ?, |
| 1468 | channelNeeded := chneed, |
| 1469 | eMLPP_Priority := omit, |
| 1470 | pagingInformation := omit /* only VGCS/VBS flag */ |
| 1471 | } |
| 1472 | } |
| 1473 | } |
| 1474 | } |
| 1475 | |
| 1476 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1477 | template PDU_BSSAP ts_BSSMAP_CipherModeCmd(OCT1 alg, OCT8 key) |
| 1478 | modifies ts_BSSAP_BSSMAP := { |
| 1479 | pdu := { |
| 1480 | bssmap := { |
| 1481 | cipherModeCommand := { |
| 1482 | messageType := '53'O, |
| 1483 | layer3HeaderInfo := omit, |
| 1484 | encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), |
| 1485 | cipherResponseMode := omit, |
| 1486 | kC128 := omit |
| 1487 | } |
| 1488 | } |
| 1489 | } |
| 1490 | } |
| 1491 | |
| 1492 | template PDU_BSSAP ts_BSSMAP_CipherModeCmdKc128(OCT1 alg, OCT8 key, OCT16 kc128) |
| 1493 | modifies ts_BSSAP_BSSMAP := { |
| 1494 | pdu := { |
| 1495 | bssmap := { |
| 1496 | cipherModeCommand := { |
| 1497 | messageType := '53'O, |
| 1498 | layer3HeaderInfo := omit, |
| 1499 | encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg), |
| 1500 | cipherResponseMode := omit, |
| 1501 | kC128 := { '83'O, kc128 } |
| 1502 | } |
| 1503 | } |
| 1504 | } |
| 1505 | } |
| 1506 | |
Neels Hofmeyr | f7831cb | 2021-06-23 20:04:58 +0200 | [diff] [blame] | 1507 | template PDU_BSSAP tr_BSSMAP_CipherModeCmd2(template BSSMAP_IE_EncryptionInformation encryptionInformation := *, |
| 1508 | template BSSMAP_IE_KC128 kC128 := *) |
Harald Welte | 1611428 | 2018-01-24 22:41:21 +0100 | [diff] [blame] | 1509 | modifies tr_BSSAP_BSSMAP := { |
| 1510 | pdu := { |
| 1511 | bssmap := { |
| 1512 | cipherModeCommand := { |
| 1513 | messageType := '53'O, |
| 1514 | layer3HeaderInfo := *, |
Neels Hofmeyr | f7831cb | 2021-06-23 20:04:58 +0200 | [diff] [blame] | 1515 | encryptionInformation := encryptionInformation, |
Harald Welte | 1611428 | 2018-01-24 22:41:21 +0100 | [diff] [blame] | 1516 | cipherResponseMode := *, |
Neels Hofmeyr | f7831cb | 2021-06-23 20:04:58 +0200 | [diff] [blame] | 1517 | kC128 := kC128 |
Harald Welte | 1611428 | 2018-01-24 22:41:21 +0100 | [diff] [blame] | 1518 | } |
| 1519 | } |
| 1520 | } |
| 1521 | } |
| 1522 | |
Neels Hofmeyr | f7831cb | 2021-06-23 20:04:58 +0200 | [diff] [blame] | 1523 | template PDU_BSSAP tr_BSSMAP_CipherModeCmd(template OCT1 alg, template OCT8 key, template BSSMAP_IE_KC128 kC128 := omit) |
| 1524 | := tr_BSSMAP_CipherModeCmd2(tr_BSSMAP_IE_EncrInfo(key, alg), kC128); |
| 1525 | |
Harald Welte | 1611428 | 2018-01-24 22:41:21 +0100 | [diff] [blame] | 1526 | template PDU_BSSAP ts_BSSMAP_CipherModeCompl(OCT1 alg) |
| 1527 | modifies ts_BSSAP_BSSMAP := { |
| 1528 | pdu := { |
| 1529 | bssmap := { |
| 1530 | cipherModeComplete := { |
| 1531 | messageType := '55'O, |
| 1532 | layer3MessageContents := omit, |
| 1533 | chosenEncryptionAlgorithm := { |
| 1534 | elementIdentifier := '2C'O, |
| 1535 | algorithmIdentifier := alg |
| 1536 | } |
| 1537 | } |
| 1538 | } |
| 1539 | } |
| 1540 | } |
| 1541 | |
Stefan Sperling | a2d59c6 | 2018-12-18 16:32:44 +0100 | [diff] [blame] | 1542 | template PDU_BSSAP ts_BSSMAP_CipherModeComplAlg(template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := ?) |
| 1543 | modifies ts_BSSAP_BSSMAP := { |
| 1544 | pdu := { |
| 1545 | bssmap := { |
| 1546 | cipherModeComplete := { |
| 1547 | messageType := '55'O, |
| 1548 | layer3MessageContents := omit, |
| 1549 | chosenEncryptionAlgorithm := chosenEncryptionAlgorithm |
| 1550 | } |
| 1551 | } |
| 1552 | } |
| 1553 | } |
| 1554 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1555 | template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := { |
| 1556 | pdu := { |
| 1557 | bssmap := { |
| 1558 | cipherModeComplete := { |
| 1559 | messageType := '55'O, |
| 1560 | layer3MessageContents := *, |
| 1561 | chosenEncryptionAlgorithm := { |
| 1562 | elementIdentifier := '2C'O, |
| 1563 | algorithmIdentifier := alg |
| 1564 | } |
| 1565 | } |
| 1566 | } |
| 1567 | } |
| 1568 | } |
| 1569 | |
| 1570 | template PDU_BSSAP tr_BSSMAP_CipherModeRej modifies tr_BSSAP_BSSMAP := { |
| 1571 | pdu := { |
| 1572 | bssmap := { |
| 1573 | cipherModeReject := { |
| 1574 | messageType := '59'O, |
| 1575 | cause := ? |
| 1576 | } |
| 1577 | } |
| 1578 | } |
| 1579 | } |
| 1580 | |
Daniel Willmann | 52918e5 | 2018-09-20 14:39:09 +0200 | [diff] [blame] | 1581 | template PDU_BSSAP tr_BSSMAP_ClassmarkReq modifies tr_BSSAP_BSSMAP := { |
| 1582 | pdu := { |
| 1583 | bssmap := { |
| 1584 | classmarkRequest := { |
| 1585 | messageType := '58'O, |
| 1586 | talkerPriority := * |
| 1587 | } |
| 1588 | } |
| 1589 | } |
| 1590 | } |
| 1591 | |
Harald Welte | 5c2622c | 2018-01-21 20:45:20 +0100 | [diff] [blame] | 1592 | template BSSMAP_IE_ClassmarkInformationType2 ts_CM2_default := { |
| 1593 | elementIdentifier := '12'O, |
| 1594 | lengthIndicator := 0, /* overwritten */ |
| 1595 | /* CM1 */ |
| 1596 | rf_PowerCapability := '010'B, /* class3 */ |
| 1597 | a5_1 := '0'B, /* supported */ |
| 1598 | esind := '1'B, /* early classmark supported */ |
| 1599 | revisionLevel := '10'B, /* R99 */ |
| 1600 | spare1_1 := '0'B, |
| 1601 | /* CM2 */ |
| 1602 | fc := '1'B, /* E-GSM support */ |
| 1603 | vgcs := '0'B, |
| 1604 | vbs := '0'B, |
| 1605 | sm_Capability := '1'B, |
| 1606 | ss_ScreenIndicator := '00'B, |
| 1607 | ps_Capability := '1'B, |
| 1608 | spare2_1 := '0'B, |
| 1609 | classmarkInformationType2_oct5 := { |
| 1610 | a5_2 := '0'B, /* not available */ |
| 1611 | a5_3 := '1'B, /* available */ |
| 1612 | cmsp := '0'B, /* not supported */ |
| 1613 | solsa := '0'B, /* not suported */ |
| 1614 | ucs2 := '0'B, /* GSM alphabet preferred */ |
| 1615 | lcsvacap := '0'B, /* not supported */ |
| 1616 | spare := '0'B, |
| 1617 | cm3 := '0'B /* no CM3 */ |
| 1618 | } |
| 1619 | } |
| 1620 | |
Eric Wild | 26f4a62 | 2021-05-17 15:27:05 +0200 | [diff] [blame] | 1621 | |
| 1622 | template BSSMAP_IE_ClassmarkInformationType3 ts_CM3_default := { |
| 1623 | elementIdentifier := '13'O, |
| 1624 | lengthIndicator := 0, /* overwritten */ |
| 1625 | classmark3ValuePart := '01'O /* A5/4 supported */ |
| 1626 | } |
| 1627 | |
Harald Welte | 5c2622c | 2018-01-21 20:45:20 +0100 | [diff] [blame] | 1628 | template PDU_BSSAP ts_BSSMAP_ClassmarkUpd(template BSSMAP_IE_ClassmarkInformationType2 cm2 := ts_CM2_default, |
| 1629 | template BSSMAP_IE_ClassmarkInformationType3 cm3 := omit) |
| 1630 | modifies ts_BSSAP_BSSMAP := { |
| 1631 | pdu := { |
| 1632 | bssmap := { |
| 1633 | classmarkUpdate := { |
| 1634 | messageType := '54'O, |
| 1635 | classmarkInformationType2 := cm2, |
| 1636 | classmarkInformationType3 := cm3, |
| 1637 | talkerPriority := omit |
| 1638 | } |
| 1639 | } |
| 1640 | } |
| 1641 | } |
| 1642 | |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 1643 | template PDU_BSSAP tr_BSSMAP_ClassmarkUpd(template BSSMAP_IE_ClassmarkInformationType2 cm2 := *, |
| 1644 | template BSSMAP_IE_ClassmarkInformationType3 cm3 := *) |
| 1645 | modifies tr_BSSAP_BSSMAP := { |
| 1646 | pdu := { |
| 1647 | bssmap := { |
| 1648 | classmarkUpdate := { |
| 1649 | messageType := '54'O, |
| 1650 | classmarkInformationType2 := cm2, |
| 1651 | classmarkInformationType3 := cm3, |
| 1652 | talkerPriority := * |
| 1653 | } |
| 1654 | } |
| 1655 | } |
| 1656 | } |
| 1657 | |
Neels Hofmeyr | 92b12b7 | 2018-09-18 14:30:23 +0200 | [diff] [blame] | 1658 | template PDU_BSSAP ts_BSSMAP_ClassmarkRequest |
| 1659 | modifies ts_BSSAP_BSSMAP := { |
| 1660 | pdu := { |
| 1661 | bssmap := { |
| 1662 | classmarkRequest := { |
| 1663 | messageType := '58'O, |
| 1664 | talkerPriority := omit |
| 1665 | } |
| 1666 | } |
| 1667 | } |
| 1668 | } |
| 1669 | |
Eric Wild | 26f4a62 | 2021-05-17 15:27:05 +0200 | [diff] [blame] | 1670 | template PDU_BSSAP tr_BSSMAP_ClassmarkRequest |
| 1671 | modifies tr_BSSAP_BSSMAP := { |
| 1672 | pdu := { |
| 1673 | bssmap := { |
| 1674 | classmarkRequest := { |
| 1675 | messageType := '58'O, |
| 1676 | talkerPriority := * |
| 1677 | } |
| 1678 | } |
| 1679 | } |
| 1680 | } |
| 1681 | |
Harald Welte | 49518bf | 2018-02-10 11:39:19 +0100 | [diff] [blame] | 1682 | /* return Layer3 octetstring inside BSSAP PDU */ |
| 1683 | function f_bssap_extract_l3(PDU_BSSAP bssap) return template octetstring { |
| 1684 | if (ischosen(bssap.pdu.bssmap)) { |
| 1685 | var PDU_BSSMAP bssmap := bssap.pdu.bssmap; |
| 1686 | if (ischosen(bssmap.completeLayer3Information)) { |
| 1687 | return bssmap.completeLayer3Information.layer3Information.layer3info; |
| 1688 | } else if (ischosen(bssmap.handoverRequestAck)) { |
| 1689 | return bssmap.handoverRequestAck.layer3Information.layer3info; |
| 1690 | } else if (ischosen(bssmap.handoverCommand)) { |
| 1691 | return bssmap.handoverCommand.layer3Information.layer3info; |
| 1692 | } else if (ischosen(bssmap.uplinkRequest)) { |
| 1693 | return bssmap.uplinkRequest.layer3Information.layer3info; |
| 1694 | } else if (ischosen(bssmap.uplinkRequestConfirmation)) { |
| 1695 | return bssmap.uplinkRequestConfirmation.layer3Information.layer3info; |
| 1696 | } else if (ischosen(bssmap.uplinkApplicationData)) { |
| 1697 | return bssmap.uplinkApplicationData.layer3Information.layer3info; |
| 1698 | } else if (ischosen(bssmap.rerouteCommand)) { |
| 1699 | return bssmap.rerouteCommand.initialLayer3Information.layer3info; |
| 1700 | } else { |
| 1701 | return omit; |
| 1702 | } |
| 1703 | } else { |
| 1704 | return bssap.pdu.dtap; |
| 1705 | } |
| 1706 | } |
| 1707 | |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1708 | /* TS 29.205 B.2.1.9 */ |
| 1709 | template (value) GlobalCallReferenceValue ts_GCR(octetstring net_id, OCT2 node_id, OCT5 cref_id) := { |
| 1710 | networkIDLengthIndicator := 0, /* overwritten */ |
| 1711 | networkID := net_id, |
| 1712 | nodeIDLengthIndicator := 0, /* overwritten */ |
| 1713 | nodeID := node_id, |
| 1714 | callReferenceIDLengthIndicator := 0, /* overwritten */ |
| 1715 | callReferenceID := cref_id |
| 1716 | } |
| 1717 | template GlobalCallReferenceValue tr_GCR(template octetstring net_id, |
| 1718 | template OCT2 node_id, |
| 1719 | template OCT5 cref_id) := { |
| 1720 | networkIDLengthIndicator := ?, |
| 1721 | networkID := net_id, |
| 1722 | nodeIDLengthIndicator := ?, |
| 1723 | nodeID := node_id, |
| 1724 | callReferenceIDLengthIndicator := ?, |
| 1725 | callReferenceID := cref_id |
| 1726 | } |
| 1727 | |
| 1728 | /* TS 47.008 3.2.2.115 */ |
| 1729 | template (value) BSSMAP_IE_GlobalCallReference ts_BSSMAP_IE_GCR(template (value) GlobalCallReferenceValue gcr) := { |
| 1730 | elementIdentifier := '89'O, |
| 1731 | lengthIndicator := 0, /* overwritten */ |
| 1732 | globalCallReferenceValue := gcr |
| 1733 | } |
| 1734 | template BSSMAP_IE_GlobalCallReference tr_BSSMAP_IE_GCR(template GlobalCallReferenceValue gcr) := { |
| 1735 | elementIdentifier := '89'O, |
| 1736 | lengthIndicator := ?, |
| 1737 | globalCallReferenceValue := gcr |
| 1738 | } |
| 1739 | |
| 1740 | /* TS 48.008 3.2.2.116 */ |
| 1741 | const BIT4 LCLS_CFG_both_way := '0000'B; |
| 1742 | const BIT4 LCLS_CFG_both_way_and_bicast_UL := '0001'B; |
| 1743 | const BIT4 LCLS_CFG_both_way_and_send_DL := '0010'B; |
| 1744 | const BIT4 LCLS_CFG_both_way_and_send_DL_block_local_DL := '0011'B; |
| 1745 | const BIT4 LCLS_CFG_both_way_and_bicast_UL_send_DL := '0100'B; |
| 1746 | const BIT4 LCLS_CFG_both_way_and_bicast_UL_send_DL_block_local_DL := '0101'B; |
| 1747 | |
| 1748 | template (value) BSSMAP_IE_LCLS_Configuration ts_BSSMAP_IE_LclsCfg(BIT4 cfg_val) := { |
| 1749 | elementIdentifier := '8A'O, |
| 1750 | lCLS_ConfigurationValue := cfg_val, |
| 1751 | spare := '0000'B |
| 1752 | } |
| 1753 | template BSSMAP_IE_LCLS_Configuration tr_BSSMAP_IE_LclsCfg(template BIT4 cfg_val) := { |
| 1754 | elementIdentifier := '8A'O, |
| 1755 | lCLS_ConfigurationValue := cfg_val, |
| 1756 | spare := '0000'B |
| 1757 | } |
| 1758 | |
| 1759 | /* TS 48.008 3.2.2.117 */ |
| 1760 | const BIT4 LCLS_CSC_connect := '0000'B; |
| 1761 | const BIT4 LCLS_CSC_do_not_connect := '0001'B; |
| 1762 | const BIT4 LCLS_CSC_release_lcls := '0010'B; |
| 1763 | const BIT4 LCLS_CSC_bicast_UL_at_handover := '0011'B; |
| 1764 | const BIT4 LCLS_CSC_bicast_UL_and_recv_DL_at_handover := '0100'B; |
| 1765 | |
| 1766 | template (value) BSSMAP_IE_LCLS_ConnectionStatusControl ts_BSSMAP_IE_LclsCsc(BIT4 csc) := { |
| 1767 | elementIdentifier := '8B'O, |
| 1768 | lCLS_ConnectionStatusControlValue := csc, |
| 1769 | spare := '0000'B |
| 1770 | } |
| 1771 | template BSSMAP_IE_LCLS_ConnectionStatusControl tr_BSSMAP_IE_LclsCsc(template BIT4 csc) := { |
| 1772 | elementIdentifier := '8B'O, |
| 1773 | lCLS_ConnectionStatusControlValue := csc, |
| 1774 | spare := '0000'B |
| 1775 | } |
| 1776 | |
| 1777 | /* TS 48.008 3.2.2.119 */ |
| 1778 | const BIT4 LCLS_STS_not_yet_ls := '0000'B; |
| 1779 | const BIT4 LCLS_STS_not_possible_ls := '0001'B; |
| 1780 | const BIT4 LCLS_STS_no_longer_ls := '0010'B; |
| 1781 | const BIT4 LCLS_STS_req_lcls_not_supp := '0011'B; |
| 1782 | const BIT4 LCLS_STS_locally_switched := '0100'B; |
| 1783 | |
| 1784 | template (value) BSSMAP_IE_LCLS_BSS_Status ts_BSSMAP_IE_LclsSts(BIT4 sts) := { |
| 1785 | elementIdentifier := '8D'O, |
| 1786 | lCLS_BSS_StatusValue := sts, |
| 1787 | spare := '0000'B |
| 1788 | } |
| 1789 | template BSSMAP_IE_LCLS_BSS_Status tr_BSSMAP_IE_LclsSts(template BIT4 sts) := { |
| 1790 | elementIdentifier := '8D'O, |
| 1791 | lCLS_BSS_StatusValue := sts, |
| 1792 | spare := '0000'B |
| 1793 | } |
| 1794 | |
| 1795 | /* TS 48.008 3.2.1.91 */ |
| 1796 | template (value) PDU_BSSAP ts_BSSMAP_LclsConnCtrl(template (omit) BSSMAP_IE_LCLS_Configuration cfg, |
Harald Welte | 354722e | 2018-06-01 13:15:32 +0200 | [diff] [blame] | 1797 | template (omit) BSSMAP_IE_LCLS_ConnectionStatusControl csc) modifies ts_BSSAP_BSSMAP := { |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1798 | pdu := { |
| 1799 | bssmap := { |
| 1800 | lCLS_ConnectControl := { |
| 1801 | messageType := '74'O, |
| 1802 | lCLS_Configuration := cfg, |
| 1803 | lCLS_ConnectionStatusControl := csc |
| 1804 | } |
| 1805 | } |
| 1806 | } |
| 1807 | } |
| 1808 | template PDU_BSSAP tr_BSSMAP_LclsConnCtrl(template BSSMAP_IE_LCLS_Configuration cfg, |
Harald Welte | 354722e | 2018-06-01 13:15:32 +0200 | [diff] [blame] | 1809 | template BSSMAP_IE_LCLS_ConnectionStatusControl csc) |
| 1810 | modifies tr_BSSAP_BSSMAP := { |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1811 | pdu := { |
| 1812 | bssmap := { |
| 1813 | lCLS_ConnectControl := { |
| 1814 | messageType := '74'O, |
| 1815 | lCLS_Configuration := cfg, |
| 1816 | lCLS_ConnectionStatusControl := csc |
| 1817 | } |
| 1818 | } |
| 1819 | } |
| 1820 | } |
| 1821 | |
| 1822 | /* TS 48.008 3.2.1.92 */ |
Harald Welte | 354722e | 2018-06-01 13:15:32 +0200 | [diff] [blame] | 1823 | template (value) PDU_BSSAP ts_BSSMAP_LclsConnCtrlAck(template (value) BSSMAP_IE_LCLS_BSS_Status sts) |
| 1824 | modifies ts_BSSAP_BSSMAP := { |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1825 | pdu := { |
| 1826 | bssmap := { |
| 1827 | lCLS_connectControlAck := { |
| 1828 | messageType := '75'O, |
| 1829 | lCLS_BSS_Status := sts |
| 1830 | } |
| 1831 | } |
| 1832 | } |
| 1833 | } |
Harald Welte | 354722e | 2018-06-01 13:15:32 +0200 | [diff] [blame] | 1834 | template PDU_BSSAP tr_BSSMAP_LclsConnCtrlAck(template BSSMAP_IE_LCLS_BSS_Status sts) |
| 1835 | modifies tr_BSSAP_BSSMAP := { |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1836 | pdu := { |
| 1837 | bssmap := { |
| 1838 | lCLS_connectControlAck := { |
| 1839 | messageType := '75'O, |
| 1840 | lCLS_BSS_Status := sts |
| 1841 | } |
| 1842 | } |
| 1843 | } |
| 1844 | } |
| 1845 | |
| 1846 | /* TS 48.008 3.2.1.93 */ |
| 1847 | template (value) PDU_BSSAP ts_BSSMAP_LclsNotification(template (omit) BSSMAP_IE_LCLS_BSS_Status sts, |
Harald Welte | 354722e | 2018-06-01 13:15:32 +0200 | [diff] [blame] | 1848 | template (omit) BSSMAP_IE_LCLS_BreakRequest brq) |
| 1849 | modifies ts_BSSAP_BSSMAP := { |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1850 | pdu := { |
| 1851 | bssmap := { |
| 1852 | lCLS_Notification := { |
| 1853 | messageType := '76'O, |
| 1854 | lCLS_BSS_Status := sts, |
| 1855 | lCLS_BreakRequest := brq |
| 1856 | } |
| 1857 | } |
| 1858 | } |
| 1859 | } |
| 1860 | template PDU_BSSAP tr_BSSMAP_LclsNotification(template BSSMAP_IE_LCLS_BSS_Status sts, |
Harald Welte | 354722e | 2018-06-01 13:15:32 +0200 | [diff] [blame] | 1861 | template BSSMAP_IE_LCLS_BreakRequest brq) |
| 1862 | modifies tr_BSSAP_BSSMAP := { |
Harald Welte | 0b50aed | 2018-05-28 22:33:07 +0200 | [diff] [blame] | 1863 | pdu := { |
| 1864 | bssmap := { |
| 1865 | lCLS_Notification := { |
| 1866 | messageType := '76'O, |
| 1867 | lCLS_BSS_Status := sts, |
| 1868 | lCLS_BreakRequest := brq |
| 1869 | } |
| 1870 | } |
| 1871 | } |
| 1872 | } |
| 1873 | |
Harald Welte | cc0b014 | 2018-05-29 15:19:33 +0200 | [diff] [blame] | 1874 | template PDU_BSSAP tr_BSSMAP_LclsNotificationSts(BIT4 sts) |
| 1875 | modifies tr_BSSAP_BSSMAP := { |
| 1876 | pdu := { |
| 1877 | bssmap := { |
| 1878 | lCLS_Notification := { |
| 1879 | messageType := '76'O, |
| 1880 | lCLS_BSS_Status := tr_BSSMAP_IE_LclsSts(sts), |
| 1881 | lCLS_BreakRequest := omit |
| 1882 | } |
| 1883 | } |
| 1884 | } |
| 1885 | } |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 1886 | |
Pau Espin Pedrol | ee8cec8 | 2021-04-15 14:39:05 +0200 | [diff] [blame] | 1887 | template PDU_BSSAP ts_BSSMAP_CommonId(hexstring imsi_digits, |
| 1888 | template (omit) OCT3 last_eutran_plmn := omit) |
Harald Welte | eddf0e9 | 2020-06-21 19:42:15 +0200 | [diff] [blame] | 1889 | modifies ts_BSSAP_BSSMAP := { |
| 1890 | pdu := { |
| 1891 | bssmap := { |
| 1892 | commonID := { |
| 1893 | messageType := '2F'O, |
| 1894 | iMSI := ts_BSSMAP_Imsi(imsi_digits), |
Pau Espin Pedrol | d5ba6ce | 2021-04-15 14:18:13 +0200 | [diff] [blame] | 1895 | sNAAccessInformation := omit, |
| 1896 | selectedPLMNId := omit, |
Pau Espin Pedrol | ee8cec8 | 2021-04-15 14:39:05 +0200 | [diff] [blame] | 1897 | lastUsedEUTRANPLMNId := f_ts_BSSMAP_LastUsedEUTRANPLMNId(last_eutran_plmn) |
Harald Welte | eddf0e9 | 2020-06-21 19:42:15 +0200 | [diff] [blame] | 1898 | } |
| 1899 | } |
| 1900 | } |
| 1901 | } |
| 1902 | |
Pau Espin Pedrol | e979c40 | 2021-04-28 17:29:54 +0200 | [diff] [blame] | 1903 | template PDU_BSSAP tr_BSSMAP_CommonId(template hexstring imsi_digits, |
| 1904 | template BSSAMAP_IE_LastUsedEUTRANPLMNId lastUsedEUTRANPLMNId := *) |
Harald Welte | eddf0e9 | 2020-06-21 19:42:15 +0200 | [diff] [blame] | 1905 | modifies tr_BSSAP_BSSMAP := { |
| 1906 | pdu := { |
| 1907 | bssmap := { |
| 1908 | commonID := { |
| 1909 | messageType := '2F'O, |
| 1910 | iMSI := tr_BSSMAP_Imsi(imsi_digits), |
Pau Espin Pedrol | e979c40 | 2021-04-28 17:29:54 +0200 | [diff] [blame] | 1911 | sNAAccessInformation := *, |
| 1912 | selectedPLMNId := *, |
| 1913 | lastUsedEUTRANPLMNId := lastUsedEUTRANPLMNId |
Harald Welte | eddf0e9 | 2020-06-21 19:42:15 +0200 | [diff] [blame] | 1914 | } |
| 1915 | } |
| 1916 | } |
| 1917 | } |
Harald Welte | 898113b | 2018-01-31 18:32:21 +0100 | [diff] [blame] | 1918 | |
Vadim Yanitskiy | 4806396 | 2020-08-28 07:49:44 +0700 | [diff] [blame] | 1919 | template PDU_BSSAP tr_BSSMAP_SAPInReject(template (present) GsmSapi sapi := ?, |
| 1920 | template BSSMAP_IE_Cause cause := ?) |
| 1921 | modifies tr_BSSAP_BSSMAP := { |
| 1922 | pdu := { |
| 1923 | bssmap := { |
| 1924 | sAPInReject := { |
| 1925 | messageType := '25'O, |
| 1926 | dLCI := { |
| 1927 | elementIdentifier := '18'O, |
| 1928 | sapiValue := f_tr_SAPI(sapi), |
| 1929 | spare := ?, |
| 1930 | c1 := ?, c2 := ? |
| 1931 | }, |
| 1932 | cause := cause |
| 1933 | } |
| 1934 | } |
| 1935 | } |
| 1936 | } |
| 1937 | |
| 1938 | private function f_tr_SAPI(template (present) GsmSapi sapi) |
| 1939 | return template (present) BIT3 { |
| 1940 | if (istemplatekind(sapi, "?")) { |
| 1941 | return ?; |
| 1942 | } else { |
| 1943 | return int2bit(valueof(sapi), 3); |
| 1944 | } |
| 1945 | } |
| 1946 | |
Neels Hofmeyr | e52bc2d | 2020-10-01 06:39:10 +0200 | [diff] [blame] | 1947 | template (value) BSSMAP_IE_LocationType ts_BSSMAP_IE_LocationType |
| 1948 | := { |
| 1949 | elementIdentifier := '44'O, |
| 1950 | lengthIndicator := 1, |
| 1951 | locationInformation := '00'O, |
| 1952 | positioningMethod := omit |
| 1953 | } |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1954 | |
Vadim Yanitskiy | 2ae269b | 2022-03-23 14:51:27 +0300 | [diff] [blame] | 1955 | template (value) BSSMAP_IE_LCSClientType |
| 1956 | ts_BSSMAP_IE_LCSClientType(template (value) BIT4 category := '0010'B, |
| 1957 | template (value) BIT4 subtype := '0000'B) := { |
| 1958 | elementIdentifier := '48'O, |
| 1959 | lengthIndicator := 0, /* overwritten */ |
| 1960 | subtype := subtype, |
| 1961 | category := category |
| 1962 | } |
| 1963 | |
Vadim Yanitskiy | dcbdb82 | 2022-03-23 15:11:45 +0300 | [diff] [blame] | 1964 | template (value) BSSMAP_IE_LCSPriority |
| 1965 | ts_BSSMAP_IE_LCSPriority(template (value) OCT1 priority := '00'O) := { |
| 1966 | elementIdentifier := '43'O, |
| 1967 | lengthIndicator := 0, /* overwritten */ |
| 1968 | priority := priority |
| 1969 | } |
| 1970 | |
| 1971 | template (value) BSSMAP_IE_LCSQOS |
| 1972 | ts_BSSMAP_IE_LCSQOS(template (value) BIT1 vCI := '0'B, |
| 1973 | template (value) BIT1 vEL := '0'B, |
| 1974 | template (value) BIT1 hAI := '1'B, |
| 1975 | template (value) BIT7 hAV := '0010010'B, |
| 1976 | template (value) BIT1 vAI := '0'B, |
| 1977 | template (value) BIT7 vAV := '0000000'B) := { |
| 1978 | elementIdentifier := '3E'O, |
| 1979 | lengthIndicator := 0, /* overwritten */ |
| 1980 | vCI := vCI, /* Vertical Coordinate Indicator: VC requested ('1'B) or not ('0'B) */ |
| 1981 | vEL := vEL, /* report velocity if available (1) or not(0) */ |
| 1982 | spare_1_6 := '000000'B, |
| 1983 | horizontalAccuracy := hAV, /* Accuracy Horizontal (HA) */ |
| 1984 | hAI := hAI, /* Horizontal Accuracy Indicator HA is specified (1) or not (0) */ |
| 1985 | verticalAccuracy := vAV, /* Accuracy Vertical (VA) */ |
| 1986 | vAI := vAI, /* Vertical Accuracy Indicator VA is specified (1) or not (0) */ |
| 1987 | spare_2_6 := '000000'B, |
| 1988 | rTC := '00'B /* Response Time is not specified */ |
| 1989 | } |
| 1990 | |
Harald Welte | 44d055f | 2023-04-17 09:18:55 +0800 | [diff] [blame^] | 1991 | |
| 1992 | /* 3.2.2.55 */ |
| 1993 | template (value) BSSMAP_IE_GroupCallReference |
| 1994 | ts_BSSMAP_IE_GroupCallRef(template (value) GroupCallRef group_call_ref) :={ |
| 1995 | elementIdentifier := '37'O, |
| 1996 | lengthIndicator := 0, // overwritten |
| 1997 | descrGroupbroadcastCallRef := group_call_ref |
| 1998 | } |
| 1999 | template (present) BSSMAP_IE_GroupCallReference |
| 2000 | tr_BSSMAP_IE_GroupCallRef(template (present) GroupCallRef group_call_ref) :={ |
| 2001 | elementIdentifier := '37'O, |
| 2002 | lengthIndicator := 0, // overwritten |
| 2003 | descrGroupbroadcastCallRef := group_call_ref |
| 2004 | } |
| 2005 | |
| 2006 | /* 3.2.2.88 */ |
| 2007 | template (value) BSSMAP_IE_VGCS_FeatureFlags |
| 2008 | ts_BSSMAP_IE_VGCS_FeatureFlags(BIT1 tp_ind, BIT2 as_ind, BIT1 bss_res, BIT1 tcp) := { |
| 2009 | elementIdentifier := '69'O, |
| 2010 | lengthIndicator := 0, // overwritten |
| 2011 | TP_Ind := tp_ind, |
| 2012 | AS_Ind := as_ind, |
| 2013 | BSS_Res := bss_res, |
| 2014 | tCP := tcp, |
| 2015 | spare := '000'B |
| 2016 | }; |
| 2017 | template (present) BSSMAP_IE_VGCS_FeatureFlags |
| 2018 | tr_BSSMAP_IE_VGCS_FeatureFlags(BIT1 tp_ind, BIT2 as_ind, BIT1 bss_res, BIT1 tcp) := { |
| 2019 | elementIdentifier := '69'O, |
| 2020 | lengthIndicator := ?, |
| 2021 | TP_Ind := tp_ind, |
| 2022 | AS_Ind := as_ind, |
| 2023 | BSS_Res := bss_res, |
| 2024 | tCP := tcp, |
| 2025 | spare := ? |
| 2026 | }; |
| 2027 | |
| 2028 | /* 3.2.2.98 */ |
| 2029 | template (value) BSSMAP_IE_ApplicationData |
| 2030 | ts_BSSMAP_IE_ApplicationData(template (value) OCT9 adi) := { |
| 2031 | elementIdentifier := '78'O, |
| 2032 | lengthIndicator := 0, // overwritten |
| 2033 | applicationDataInfo := adi |
| 2034 | }; |
| 2035 | template (present) BSSMAP_IE_ApplicationData |
| 2036 | tr_BSSMAP_IE_ApplicationData(template (present) OCT9 adi) := { |
| 2037 | elementIdentifier := '78'O, |
| 2038 | lengthIndicator := ?, |
| 2039 | applicationDataInfo := adi |
| 2040 | }; |
| 2041 | |
| 2042 | /* 3.2.2.99 */ |
| 2043 | template (value) BSSMAP_IE_DataIdentity |
| 2044 | ts_BSSMAP_IE_DataIdentity(template (value) DataIdentity data_id) := { |
| 2045 | elementIdentifier := '79'O, |
| 2046 | lengthIndicator := 0, // overwritten |
| 2047 | dataIdentityInfo := data_id |
| 2048 | }; |
| 2049 | template (present) BSSMAP_IE_DataIdentity |
| 2050 | tr_BSSMAP_IE_DataIdentity(template (present) DataIdentity data_id) := { |
| 2051 | elementIdentifier := '79'O, |
| 2052 | lengthIndicator := ?, |
| 2053 | dataIdentityInfo := data_id |
| 2054 | }; |
| 2055 | |
| 2056 | /* 3.2.2.52 */ |
| 2057 | template (value) BSSMAP_IE_AssignmentRequirement |
| 2058 | ts_BSSMAP_IE_AssRequirement(template (value) OCT1 ass_rqm) := { |
| 2059 | elementIdentifier := '33'O, |
| 2060 | assignmentRequirement := ass_rqm |
| 2061 | } |
| 2062 | template (present) BSSMAP_IE_AssignmentRequirement |
| 2063 | tr_BSSMAP_IE_AssRequirement(template (present) OCT1 ass_rqm) := { |
| 2064 | elementIdentifier := '33'O, |
| 2065 | assignmentRequirement := ass_rqm |
| 2066 | } |
| 2067 | |
| 2068 | /* 3.2.2.89 */ |
| 2069 | function ts_BSSMAP_IE_TalkerPriority(template (omit) BIT2 prio) |
| 2070 | return template (omit) BSSMAP_IE_TalkerPriority { |
| 2071 | if (istemplatekind(prio, "omit")) { |
| 2072 | return omit; |
| 2073 | } else { |
| 2074 | var template (present) BSSMAP_IE_TalkerPriority tp := { |
| 2075 | elementIdentifier := '6A'O, |
| 2076 | priority := prio, |
| 2077 | spare := '000000'B |
| 2078 | }; |
| 2079 | return tp; |
| 2080 | } |
| 2081 | } |
| 2082 | function tr_BSSMAP_IE_TalkerPriority(template BIT2 prio) |
| 2083 | return template BSSMAP_IE_TalkerPriority { |
| 2084 | if (istemplatekind(prio, "omit")) { |
| 2085 | return omit; |
| 2086 | } else if (istemplatekind(prio, "*")) { |
| 2087 | return *; |
| 2088 | } else { |
| 2089 | var template BSSMAP_IE_TalkerPriority tp := { |
| 2090 | elementIdentifier := '6A'O, |
| 2091 | priority := prio, |
| 2092 | spare := ? |
| 2093 | } |
| 2094 | return tp; |
| 2095 | } |
| 2096 | } |
| 2097 | |
| 2098 | /* 3.2.2.90 */ |
| 2099 | template (value) BSSMAP_IE_EmergencySetIndication |
| 2100 | ts_BSSMAP_IE_EmergencySetIndication := { |
| 2101 | elementIdentifier := '6B'O |
| 2102 | } |
| 2103 | template (present) BSSMAP_IE_EmergencySetIndication |
| 2104 | tr_BSSMAP_IE_EmergencySetIndication := { |
| 2105 | elementIdentifier := '6B'O |
| 2106 | } |
| 2107 | |
| 2108 | |
| 2109 | |
| 2110 | |
| 2111 | /* Section 3.2.1.50 */ |
| 2112 | template (value) PDU_BSSAP |
| 2113 | ts_BSSMAP_VGCS_VBS_Setup(template (value) GroupCallRef group_call_ref, |
| 2114 | template (omit) BSSMAP_IE_VGCS_FeatureFlags feature_flags := omit) |
| 2115 | modifies ts_BSSAP_BSSMAP := { |
| 2116 | pdu := { |
| 2117 | bssmap := { |
| 2118 | vGCS_VBSSetup := { |
| 2119 | messageType := '04'O, |
| 2120 | groupCallReference := ts_BSSMAP_IE_GroupCallRef(group_call_ref), |
| 2121 | priority := omit, |
| 2122 | vGCS_FeatureFlags := feature_flags |
| 2123 | } |
| 2124 | } |
| 2125 | } |
| 2126 | } |
| 2127 | template (present) PDU_BSSAP |
| 2128 | tr_BSSMAP_VGCS_VBS_Setup(template (present) GroupCallRef group_call_ref, |
| 2129 | template BSSMAP_IE_VGCS_FeatureFlags feature_flags := *) |
| 2130 | modifies tr_BSSAP_BSSMAP := { |
| 2131 | pdu := { |
| 2132 | bssmap := { |
| 2133 | vGCS_VBSSetup := { |
| 2134 | messageType := '04'O, |
| 2135 | groupCallReference := tr_BSSMAP_IE_GroupCallRef(group_call_ref), |
| 2136 | priority := *, |
| 2137 | vGCS_FeatureFlags := feature_flags |
| 2138 | } |
| 2139 | } |
| 2140 | } |
| 2141 | } |
| 2142 | |
| 2143 | /* Section 3.2.1.51 */ |
| 2144 | template (value) PDU_BSSAP |
| 2145 | ts_BSSMAP_VGCS_VBS_SetupAck(template (omit) BSSMAP_IE_VGCS_FeatureFlags feature_flags := omit) |
| 2146 | modifies ts_BSSAP_BSSMAP := { |
| 2147 | pdu := { |
| 2148 | bssmap := { |
| 2149 | vGCS_VBSSetupAck := { |
| 2150 | messageType := '05'O, |
| 2151 | vGCS_FeatureFlags := feature_flags |
| 2152 | } |
| 2153 | } |
| 2154 | } |
| 2155 | } |
| 2156 | template (present) PDU_BSSAP |
| 2157 | tr_BSSMAP_VGCS_VBS_SetupAck(template BSSMAP_IE_VGCS_FeatureFlags feature_flags := *) |
| 2158 | modifies tr_BSSAP_BSSMAP := { |
| 2159 | pdu := { |
| 2160 | bssmap := { |
| 2161 | vGCS_VBSSetupAck := { |
| 2162 | messageType := '05'O, |
| 2163 | vGCS_FeatureFlags := feature_flags |
| 2164 | } |
| 2165 | } |
| 2166 | } |
| 2167 | } |
| 2168 | |
| 2169 | /* Section 3.2.1.52 */ |
| 2170 | template (value) PDU_BSSAP |
| 2171 | ts_BSSMAP_VGCS_VBS_SetupRefuse(BssmapCause cause) |
| 2172 | modifies ts_BSSAP_BSSMAP := { |
| 2173 | pdu := { |
| 2174 | bssmap := { |
| 2175 | vGCS_VBSSetupRefuse := { |
| 2176 | messageType := '06'O, |
| 2177 | cause := ts_BSSMAP_IE_Cause(cause) |
| 2178 | } |
| 2179 | } |
| 2180 | } |
| 2181 | } |
| 2182 | template (present) PDU_BSSAP |
| 2183 | tr_BSSMAP_VGCS_VBS_SetupRefuse(template (present) myBSSMAP_Cause cause := ?) |
| 2184 | modifies tr_BSSAP_BSSMAP := { |
| 2185 | pdu := { |
| 2186 | bssmap := { |
| 2187 | vGCS_VBSSetupRefuse := { |
| 2188 | messageType := '06'O, |
| 2189 | cause := tr_BSSMAP_IE_Cause(cause) |
| 2190 | } |
| 2191 | } |
| 2192 | } |
| 2193 | } |
| 2194 | |
| 2195 | /* Section 3.2.1.53 */ |
| 2196 | template (value) PDU_BSSAP |
| 2197 | ts_BSSMAP_VGCS_VBS_AssignmentReq(template (value) BSSMAP_IE_ChannelType ch_type, |
| 2198 | template (value) OCT1 ass_requirement, |
| 2199 | template (value) BSSMAP_IE_CellIdentifier cell_id, |
| 2200 | template (value) GroupCallRef group_call_ref, |
| 2201 | template (omit) BSSMAP_IE_CircuitIdentityCode cic := omit, |
| 2202 | template (omit) BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, |
| 2203 | template (omit) OCT4 call_id := omit) |
| 2204 | modifies ts_BSSAP_BSSMAP := { |
| 2205 | pdu := { |
| 2206 | bssmap := { |
| 2207 | vGCS_VBSAssignmentRequest := { |
| 2208 | messageType := '07'O, /* overwritten */ |
| 2209 | channelType := ch_type, |
| 2210 | assignmentRequirement := ts_BSSMAP_IE_AssRequirement(ass_requirement), |
| 2211 | cellIdentifier := cell_id, |
| 2212 | groupCallReference := ts_BSSMAP_IE_GroupCallRef(group_call_ref), |
| 2213 | priority := omit, |
| 2214 | circuitIdentityCode := cic, |
| 2215 | downLinkDTX_Flag := omit, |
| 2216 | encryptionInformation := omit, |
| 2217 | vSTK_RAND := omit, |
| 2218 | vSTK := omit, |
| 2219 | cellIdentifierListSegment := omit, |
| 2220 | aoIPTransportLayer := aoip, |
| 2221 | callIdentifier := ts_BSSMAP_IE_CallIdentifier(call_id), |
| 2222 | codecList := omit |
| 2223 | } |
| 2224 | } |
| 2225 | } |
| 2226 | } |
| 2227 | template (present) PDU_BSSAP |
| 2228 | tr_BSSMAP_VGCS_VBS_AssignmentReq(template (present) BSSMAP_IE_ChannelType ch_type, |
| 2229 | template (present) OCT1 ass_requirement, |
| 2230 | template (present) BSSMAP_IE_CellIdentifier cell_id, |
| 2231 | template (present) GroupCallRef group_call_ref, |
| 2232 | template BSSMAP_IE_CircuitIdentityCode cic := *, |
| 2233 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip := ?, |
| 2234 | template OCT4 call_id := ?) |
| 2235 | modifies tr_BSSAP_BSSMAP := { |
| 2236 | pdu := { |
| 2237 | bssmap := { |
| 2238 | vGCS_VBSAssignmentRequest := { |
| 2239 | messageType := '07'O, /* overwritten */ |
| 2240 | channelType := ch_type, |
| 2241 | assignmentRequirement := tr_BSSMAP_IE_AssRequirement(ass_requirement), |
| 2242 | cellIdentifier := cell_id, |
| 2243 | groupCallReference := tr_BSSMAP_IE_GroupCallRef(group_call_ref), |
| 2244 | priority := omit, |
| 2245 | circuitIdentityCode := cic, |
| 2246 | downLinkDTX_Flag := omit, |
| 2247 | encryptionInformation := omit, |
| 2248 | vSTK_RAND := omit, |
| 2249 | vSTK := omit, |
| 2250 | cellIdentifierListSegment := omit, |
| 2251 | aoIPTransportLayer := aoip, |
| 2252 | callIdentifier := tr_BSSMAP_IE_CallIdentifier(call_id), |
| 2253 | codecList := omit |
| 2254 | } |
| 2255 | } |
| 2256 | } |
| 2257 | } |
| 2258 | |
| 2259 | /* Section 3.2.1.54 */ |
| 2260 | template (value) PDU_BSSAP |
| 2261 | ts_BSSMAP_VGCS_VBS_AssignmentRes(template (value) BSSMAP_IE_ChannelType ch_type, |
| 2262 | template (value) BSSMAP_IE_CellIdentifier cell_id, |
| 2263 | template (omit) BSSMAP_IE_ChosenChannel chosen_ch := omit, |
| 2264 | template (omit) BSSMAP_IE_CircuitIdentityCode cic := omit, |
| 2265 | template (omit) BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit, |
| 2266 | template (omit) BSSMAP_IE_SpeechCodec speech_codec := omit, |
| 2267 | template (omit) OCT4 call_id := omit) |
| 2268 | modifies ts_BSSAP_BSSMAP := { |
| 2269 | pdu := { |
| 2270 | bssmap := { |
| 2271 | vGCS_VBSAssignmentResult := { |
| 2272 | messageType := '1C'O, /* overwritten */ |
| 2273 | channelType := ch_type, |
| 2274 | cellIdentifier := cell_id, |
| 2275 | chosenChannel := chosen_ch, |
| 2276 | circuitIdentityCode := cic, |
| 2277 | circuitPool := omit, |
| 2278 | aoIPTransportLayer := aoip, |
| 2279 | speechCodec := speech_codec, |
| 2280 | callIdentifier := ts_BSSMAP_IE_CallIdentifier(call_id) |
| 2281 | } |
| 2282 | } |
| 2283 | } |
| 2284 | } |
| 2285 | template (present) PDU_BSSAP |
| 2286 | tr_BSSMAP_VGCS_VBS_AssignmentRes(template (present) BSSMAP_IE_ChannelType ch_type, |
| 2287 | template (present) BSSMAP_IE_CellIdentifier cell_id, |
| 2288 | template BSSMAP_IE_ChosenChannel chosen_ch := *, |
| 2289 | template BSSMAP_IE_CircuitIdentityCode cic := omit, |
| 2290 | template BSSMAP_IE_AoIP_TransportLayerAddress aoip := ?, |
| 2291 | template BSSMAP_IE_SpeechCodec speech_codec := ?, |
| 2292 | template OCT4 call_id := ?) |
| 2293 | modifies tr_BSSAP_BSSMAP := { |
| 2294 | pdu := { |
| 2295 | bssmap := { |
| 2296 | vGCS_VBSAssignmentResult := { |
| 2297 | messageType := '1C'O, /* overwritten */ |
| 2298 | channelType := ch_type, |
| 2299 | cellIdentifier := cell_id, |
| 2300 | chosenChannel := chosen_ch, |
| 2301 | circuitIdentityCode := cic, |
| 2302 | circuitPool := *, |
| 2303 | aoIPTransportLayer := aoip, |
| 2304 | speechCodec := speech_codec, |
| 2305 | callIdentifier := tr_BSSMAP_IE_CallIdentifier(call_id) |
| 2306 | } |
| 2307 | } |
| 2308 | } |
| 2309 | } |
| 2310 | |
| 2311 | /* Section 3.2.1.55 */ |
| 2312 | template (value) PDU_BSSAP |
| 2313 | ts_BSSMAP_VGCS_VBS_AssignmentFail(BssmapCause cause) |
| 2314 | modifies ts_BSSAP_BSSMAP := { |
| 2315 | pdu := { |
| 2316 | bssmap := { |
| 2317 | vGCS_VBSAssignmentFailure := { |
| 2318 | messageType := '1D'O, /* overwritten */ |
| 2319 | cause := ts_BSSMAP_IE_Cause(cause), |
| 2320 | /* we only implement AoIP for now... */ |
| 2321 | circuitPool := omit, |
| 2322 | circuitPoolList := omit |
| 2323 | } |
| 2324 | } |
| 2325 | } |
| 2326 | } |
| 2327 | template (present) PDU_BSSAP |
| 2328 | tr_BSSMAP_VGCS_VBS_AssignmentFail(template (present) myBSSMAP_Cause cause := ?) |
| 2329 | modifies tr_BSSAP_BSSMAP := { |
| 2330 | pdu := { |
| 2331 | bssmap := { |
| 2332 | vGCS_VBSAssignmentFailure := { |
| 2333 | messageType := '1D'O, /* overwritten */ |
| 2334 | cause := tr_BSSMAP_IE_Cause(cause), |
| 2335 | /* we only implement AoIP for now... */ |
| 2336 | circuitPool := omit, |
| 2337 | circuitPoolList := omit |
| 2338 | } |
| 2339 | } |
| 2340 | } |
| 2341 | } |
| 2342 | |
| 2343 | /* Section 3.2.1.56 */ |
| 2344 | template (value) PDU_BSSAP |
| 2345 | ts_BSSMAP_VGCS_VBS_QueuingInd |
| 2346 | modifies ts_BSSAP_BSSMAP := { |
| 2347 | pdu := { |
| 2348 | bssmap := { |
| 2349 | vGCS_VBSQueuingIndication := { |
| 2350 | messageType := '1E'O |
| 2351 | } |
| 2352 | } |
| 2353 | } |
| 2354 | } |
| 2355 | template (present) PDU_BSSAP |
| 2356 | tr_BSSMAP_VGCS_VBS_QueuingInd |
| 2357 | modifies tr_BSSAP_BSSMAP := { |
| 2358 | pdu := { |
| 2359 | bssmap := { |
| 2360 | vGCS_VBSQueuingIndication := { |
| 2361 | messageType := '1E'O |
| 2362 | } |
| 2363 | } |
| 2364 | } |
| 2365 | } |
| 2366 | |
| 2367 | /* Section 3.2.1.57 */ |
| 2368 | template (value) PDU_BSSAP |
| 2369 | ts_BSSMAP_UplinkReq_L3(template (value) BIT2 priority, |
| 2370 | template (omit) BSSMAP_IE_CellIdentifier cell_id, |
| 2371 | template (value) octetstring l3_info) |
| 2372 | modifies ts_BSSAP_BSSMAP := { |
| 2373 | pdu := { |
| 2374 | bssmap := { |
| 2375 | uplinkRequest := { |
| 2376 | messageType := '1F'O, |
| 2377 | talkerPriority := ts_BSSMAP_IE_TalkerPriority(priority), |
| 2378 | cellIdentifier := cell_id, |
| 2379 | layer3Information := ts_BSSMAP_IE_L3Info(l3_info), |
| 2380 | mobileIdentity := omit |
| 2381 | } |
| 2382 | } |
| 2383 | } |
| 2384 | } |
| 2385 | template (present) PDU_BSSAP |
| 2386 | tr_BSSMAP_UplinkReq_L3(template (present) BIT2 priority, |
| 2387 | template BSSMAP_IE_CellIdentifier cell_id, |
| 2388 | template (present) octetstring l3_info) |
| 2389 | modifies tr_BSSAP_BSSMAP := { |
| 2390 | pdu := { |
| 2391 | bssmap := { |
| 2392 | uplinkRequest := { |
| 2393 | messageType := '1F'O, |
| 2394 | talkerPriority := tr_BSSMAP_IE_TalkerPriority(priority), |
| 2395 | cellIdentifier := cell_id, |
| 2396 | layer3Information := tr_BSSMAP_IE_L3Info(l3_info), |
| 2397 | mobileIdentity := omit |
| 2398 | } |
| 2399 | } |
| 2400 | } |
| 2401 | } |
| 2402 | template (value) PDU_BSSAP |
| 2403 | ts_BSSMAP_UplinkReq_MI(template (omit) BIT2 priority, |
| 2404 | template (omit) BSSMAP_IE_CellIdentifier cell_id, |
| 2405 | template (value) BSSMAP_IE_MobileIdentity mobile_id) |
| 2406 | modifies ts_BSSAP_BSSMAP := { |
| 2407 | pdu := { |
| 2408 | bssmap := { |
| 2409 | uplinkRequest := { |
| 2410 | messageType := '1F'O, |
| 2411 | talkerPriority := ts_BSSMAP_IE_TalkerPriority(priority), |
| 2412 | cellIdentifier := cell_id, |
| 2413 | layer3Information := omit, |
| 2414 | mobileIdentity := mobile_id |
| 2415 | } |
| 2416 | } |
| 2417 | } |
| 2418 | } |
| 2419 | template (present) PDU_BSSAP |
| 2420 | tr_BSSMAP_UplinkReq_MI(template BIT2 priority, |
| 2421 | template (omit) BSSMAP_IE_CellIdentifier cell_id, |
| 2422 | template (present) BSSMAP_IE_MobileIdentity mobile_id) |
| 2423 | modifies tr_BSSAP_BSSMAP := { |
| 2424 | pdu := { |
| 2425 | bssmap := { |
| 2426 | uplinkRequest := { |
| 2427 | messageType := '1F'O, |
| 2428 | talkerPriority := tr_BSSMAP_IE_TalkerPriority(priority), |
| 2429 | cellIdentifier := cell_id, |
| 2430 | layer3Information := omit, |
| 2431 | mobileIdentity := mobile_id |
| 2432 | } |
| 2433 | } |
| 2434 | } |
| 2435 | } |
| 2436 | |
| 2437 | /* 3.2.1.58 */ |
| 2438 | template (value) PDU_BSSAP |
| 2439 | ts_BSSMAP_UplinkReqAck(template (omit) BIT2 priority, |
| 2440 | template (omit) BSSMAP_IE_EmergencySetIndication ems := omit, |
| 2441 | template (omit) BSSMAP_IE_TalkerIdentity talker_id := omit) |
| 2442 | modifies ts_BSSAP_BSSMAP := { |
| 2443 | pdu := { |
| 2444 | bssmap := { |
| 2445 | uplinkRequestAck := { |
| 2446 | messageType := '27'O, |
| 2447 | talkerPriority := ts_BSSMAP_IE_TalkerPriority(priority), |
| 2448 | emergencySetIndication := ems, |
| 2449 | talkerIdentity := talker_id |
| 2450 | } |
| 2451 | } |
| 2452 | } |
| 2453 | } |
| 2454 | template (present) PDU_BSSAP |
| 2455 | tr_BSSMAP_UplinkReqAck(template BIT2 priority, |
| 2456 | template BSSMAP_IE_EmergencySetIndication ems := *, |
| 2457 | template BSSMAP_IE_TalkerIdentity talker_id := *) |
| 2458 | modifies tr_BSSAP_BSSMAP := { |
| 2459 | pdu := { |
| 2460 | bssmap := { |
| 2461 | uplinkRequestAck := { |
| 2462 | messageType := '27'O, |
| 2463 | talkerPriority := tr_BSSMAP_IE_TalkerPriority(priority), |
| 2464 | emergencySetIndication := ems, |
| 2465 | talkerIdentity := talker_id |
| 2466 | } |
| 2467 | } |
| 2468 | } |
| 2469 | } |
| 2470 | |
| 2471 | /* 3.2.1.59 */ |
| 2472 | template (value) PDU_BSSAP |
| 2473 | ts_BSSMAP_UplinkReqConf(template (value) BSSMAP_IE_CellIdentifier cell_id, |
| 2474 | template (omit) BSSMAP_IE_TalkerIdentity talker_id := omit, |
| 2475 | template (value) octetstring l3_info) |
| 2476 | modifies ts_BSSAP_BSSMAP := { |
| 2477 | pdu := { |
| 2478 | bssmap := { |
| 2479 | uplinkRequestConfirmation := { |
| 2480 | messageType := '49'O, |
| 2481 | cellIdentifier := cell_id, |
| 2482 | talkerIdentity := talker_id, |
| 2483 | layer3Information := ts_BSSMAP_IE_L3Info(l3_info) |
| 2484 | } |
| 2485 | } |
| 2486 | } |
| 2487 | } |
| 2488 | template (present) PDU_BSSAP |
| 2489 | tr_BSSMAP_UplinkReqConf(template (present) BSSMAP_IE_CellIdentifier cell_id, |
| 2490 | template BSSMAP_IE_TalkerIdentity talker_id := *, |
| 2491 | template (present) octetstring l3_info) |
| 2492 | modifies tr_BSSAP_BSSMAP := { |
| 2493 | pdu := { |
| 2494 | bssmap := { |
| 2495 | uplinkRequestConfirmation := { |
| 2496 | messageType := '49'O, |
| 2497 | cellIdentifier := cell_id, |
| 2498 | talkerIdentity := talker_id, |
| 2499 | layer3Information := tr_BSSMAP_IE_L3Info(l3_info) |
| 2500 | } |
| 2501 | } |
| 2502 | } |
| 2503 | } |
| 2504 | |
| 2505 | |
| 2506 | /* 3.2.1.60 */ |
| 2507 | template (value) PDU_BSSAP |
| 2508 | ts_BSSMAP_UplinkRelInd(BssmapCause cause, template (omit) BIT2 prio) |
| 2509 | modifies ts_BSSAP_BSSMAP := { |
| 2510 | pdu := { |
| 2511 | bssmap := { |
| 2512 | uplinkReleaseIndication := { |
| 2513 | messageType := '4A'O, |
| 2514 | cause := ts_BSSMAP_IE_Cause(cause), |
| 2515 | talkerPriority := ts_BSSMAP_IE_TalkerPriority(prio) |
| 2516 | } |
| 2517 | } |
| 2518 | } |
| 2519 | } |
| 2520 | template (present) PDU_BSSAP |
| 2521 | tr_BSSMAP_UplinkRelInd(template (present) myBSSMAP_Cause cause, template BIT2 prio) |
| 2522 | modifies tr_BSSAP_BSSMAP := { |
| 2523 | pdu := { |
| 2524 | bssmap := { |
| 2525 | uplinkReleaseIndication := { |
| 2526 | messageType := '4A'O, |
| 2527 | cause := tr_BSSMAP_IE_Cause(cause), |
| 2528 | talkerPriority := tr_BSSMAP_IE_TalkerPriority(prio) |
| 2529 | } |
| 2530 | } |
| 2531 | } |
| 2532 | } |
| 2533 | |
| 2534 | |
| 2535 | /* 3.2.1.61 */ |
| 2536 | template (value) PDU_BSSAP |
| 2537 | ts_BSSMAP_UplinkRejCmd(BssmapCause cause, |
| 2538 | template (omit) BIT2 cur_talker_prio := omit, |
| 2539 | template (omit) BIT2 rej_talker_prio := omit, |
| 2540 | template (omit) BSSMAP_IE_TalkerIdentity talker_id := omit) |
| 2541 | modifies ts_BSSAP_BSSMAP := { |
| 2542 | pdu := { |
| 2543 | bssmap := { |
| 2544 | uplinkRejectCommand := { |
| 2545 | messageType := '4B'O, |
| 2546 | cause := ts_BSSMAP_IE_Cause(cause), |
| 2547 | currentTalkerPriority := ts_BSSMAP_IE_TalkerPriority(cur_talker_prio), |
| 2548 | rejectedTalkerPriority := ts_BSSMAP_IE_TalkerPriority(rej_talker_prio), |
| 2549 | talkerIdentity := talker_id |
| 2550 | } |
| 2551 | } |
| 2552 | } |
| 2553 | } |
| 2554 | template (present) PDU_BSSAP |
| 2555 | tr_BSSMAP_UplinkRejCmd(template (present) myBSSMAP_Cause cause, |
| 2556 | template BIT2 cur_talker_prio := *, |
| 2557 | template BIT2 rej_talker_prio := *, |
| 2558 | template BSSMAP_IE_TalkerIdentity talker_id := *) |
| 2559 | modifies tr_BSSAP_BSSMAP := { |
| 2560 | pdu := { |
| 2561 | bssmap := { |
| 2562 | uplinkRejectCommand := { |
| 2563 | messageType := '4B'O, |
| 2564 | cause := tr_BSSMAP_IE_Cause(cause), |
| 2565 | currentTalkerPriority := tr_BSSMAP_IE_TalkerPriority(cur_talker_prio), |
| 2566 | rejectedTalkerPriority := tr_BSSMAP_IE_TalkerPriority(rej_talker_prio), |
| 2567 | talkerIdentity := talker_id |
| 2568 | } |
| 2569 | } |
| 2570 | } |
| 2571 | } |
| 2572 | |
| 2573 | |
| 2574 | /* 3.2.1.62 */ |
| 2575 | template (value) PDU_BSSAP |
| 2576 | ts_BSSMAP_UplinkRelCmd(BssmapCause cause) |
| 2577 | modifies ts_BSSAP_BSSMAP := { |
| 2578 | pdu := { |
| 2579 | bssmap := { |
| 2580 | uplinkReleaseCommand := { |
| 2581 | messageType := '4C'O, |
| 2582 | cause := ts_BSSMAP_IE_Cause(cause) |
| 2583 | } |
| 2584 | } |
| 2585 | } |
| 2586 | } |
| 2587 | template (present) PDU_BSSAP |
| 2588 | tr_BSSMAP_UplinkRelCmd(template (present) myBSSMAP_Cause cause) |
| 2589 | modifies tr_BSSAP_BSSMAP := { |
| 2590 | pdu := { |
| 2591 | bssmap := { |
| 2592 | uplinkReleaseCommand := { |
| 2593 | messageType := '4C'O, |
| 2594 | cause := tr_BSSMAP_IE_Cause(cause) |
| 2595 | } |
| 2596 | } |
| 2597 | } |
| 2598 | } |
| 2599 | |
| 2600 | |
| 2601 | /* 3.2.1.63 */ |
| 2602 | template (value) PDU_BSSAP |
| 2603 | ts_BSSMAP_UplinkSeizedCmd(BssmapCause cause, |
| 2604 | template (omit) BIT2 talker_prio := omit, |
| 2605 | template (omit) BSSMAP_IE_EmergencySetIndication emerg := omit, |
| 2606 | template (omit) BSSMAP_IE_TalkerIdentity talker_id := omit) |
| 2607 | modifies ts_BSSAP_BSSMAP := { |
| 2608 | pdu := { |
| 2609 | bssmap := { |
| 2610 | uplinkSeizedCommand := { |
| 2611 | messageType := '4D'O, |
| 2612 | cause := ts_BSSMAP_IE_Cause(cause), |
| 2613 | talkerPriority := ts_BSSMAP_IE_TalkerPriority(talker_prio), |
| 2614 | emergencySetIndication := emerg, |
| 2615 | talkerIdentity := talker_id |
| 2616 | } |
| 2617 | } |
| 2618 | } |
| 2619 | } |
| 2620 | template (present) PDU_BSSAP |
| 2621 | tr_BSSMAP_UplinkSeizedCmd(template (present) myBSSMAP_Cause cause, |
| 2622 | template BIT2 talker_prio := *, |
| 2623 | template BSSMAP_IE_EmergencySetIndication emerg := *, |
| 2624 | template BSSMAP_IE_TalkerIdentity talker_id := *) |
| 2625 | modifies tr_BSSAP_BSSMAP := { |
| 2626 | pdu := { |
| 2627 | bssmap := { |
| 2628 | uplinkSeizedCommand := { |
| 2629 | messageType := '4D'O, |
| 2630 | cause := tr_BSSMAP_IE_Cause(cause), |
| 2631 | talkerPriority := tr_BSSMAP_IE_TalkerPriority(talker_prio), |
| 2632 | emergencySetIndication := emerg, |
| 2633 | talkerIdentity := talker_id |
| 2634 | } |
| 2635 | } |
| 2636 | } |
| 2637 | } |
| 2638 | |
| 2639 | |
| 2640 | |
| 2641 | /* Section 3.2.1.82 */ |
| 2642 | template (value) PDU_BSSAP |
| 2643 | ts_BSSMAP_NotificationData(template (value) OCT9 app_data, template (value) DataIdentity data_identity) |
| 2644 | modifies ts_BSSAP_BSSMAP := { |
| 2645 | pdu := { |
| 2646 | bssmap := { |
| 2647 | notificationData := { |
| 2648 | messageType := '62'O, |
| 2649 | applicationData := ts_BSSMAP_IE_ApplicationData(app_data), |
| 2650 | dataIdentity := ts_BSSMAP_IE_DataIdentity(data_identity), |
| 2651 | mSISDN := omit |
| 2652 | } |
| 2653 | } |
| 2654 | } |
| 2655 | } |
| 2656 | template (present) PDU_BSSAP |
| 2657 | tr_BSSMAP_NotificationData(template (present) OCT9 app_data, template (present) DataIdentity data_identity) |
| 2658 | modifies ts_BSSAP_BSSMAP := { |
| 2659 | pdu := { |
| 2660 | bssmap := { |
| 2661 | notificationData := { |
| 2662 | messageType := '62'O, |
| 2663 | applicationData := tr_BSSMAP_IE_ApplicationData(app_data), |
| 2664 | dataIdentity := tr_BSSMAP_IE_DataIdentity(data_identity), |
| 2665 | mSISDN := ? |
| 2666 | } |
| 2667 | } |
| 2668 | } |
| 2669 | } |
| 2670 | |
| 2671 | |
| 2672 | |
Vadim Yanitskiy | 2ae269b | 2022-03-23 14:51:27 +0300 | [diff] [blame] | 2673 | template (value) PDU_BSSAP |
| 2674 | ts_BSSMAP_Perform_Location_Request(template (omit) BSSMAP_IE_IMSI imsi, |
| 2675 | template (omit) BSSMAP_IE_CellIdentifier cellIdentifier := omit, |
Vadim Yanitskiy | dcbdb82 | 2022-03-23 15:11:45 +0300 | [diff] [blame] | 2676 | template (omit) BSSMAP_IE_LCSClientType clientType := ts_BSSMAP_IE_LCSClientType, |
| 2677 | template (omit) BSSMAP_IE_LCSPriority priority := ts_BSSMAP_IE_LCSPriority, |
| 2678 | template (omit) BSSMAP_IE_LCSQOS qos := ts_BSSMAP_IE_LCSQOS) |
Neels Hofmeyr | e52bc2d | 2020-10-01 06:39:10 +0200 | [diff] [blame] | 2679 | modifies ts_BSSAP_BSSMAP := { |
| 2680 | pdu := { |
| 2681 | bssmap := { |
| 2682 | performLocationRequest := { |
| 2683 | messageType := '2B'O, |
| 2684 | locationType := ts_BSSMAP_IE_LocationType, |
| 2685 | cellIdentifier := cellIdentifier, |
| 2686 | classmarkInformationType3 := omit, |
Vadim Yanitskiy | 2ae269b | 2022-03-23 14:51:27 +0300 | [diff] [blame] | 2687 | lCS_ClientType := clientType, |
Neels Hofmeyr | e52bc2d | 2020-10-01 06:39:10 +0200 | [diff] [blame] | 2688 | chosenChannel := omit, |
Vadim Yanitskiy | dcbdb82 | 2022-03-23 15:11:45 +0300 | [diff] [blame] | 2689 | lCS_Priority := priority, |
| 2690 | lCS_QOS := qos, |
Neels Hofmeyr | e52bc2d | 2020-10-01 06:39:10 +0200 | [diff] [blame] | 2691 | gPS_AssistanceData := omit, |
| 2692 | aPDU := omit, |
| 2693 | iMSI := imsi, |
| 2694 | iMEI := omit, |
| 2695 | gANSS_LocationType := omit, |
| 2696 | gANSS_AssistanceData := omit |
| 2697 | } |
| 2698 | } |
| 2699 | } |
| 2700 | } |
| 2701 | |
| 2702 | template (present) BSSMAP_IE_LocationEstimate tr_BSSMAP_IE_LocationEstimate(template (present) octetstring geo_loc := ?) |
| 2703 | := { |
| 2704 | elementIdentifier := '45'O, |
| 2705 | lengthIndicator := ?, |
| 2706 | geographicLocation := geo_loc |
| 2707 | } |
| 2708 | |
| 2709 | function tr_BSSMAP_LcsCause(template (present) BSSMAP_LcsCause cause) |
| 2710 | return template (omit) BSSMAP_IE_LCSCause { |
| 2711 | if (istemplatekind(cause, "omit")) { |
| 2712 | return omit; |
| 2713 | } |
| 2714 | var template BSSMAP_IE_LCSCause ie := { |
| 2715 | elementIdentifier := '47'O, |
| 2716 | lengthIndicator := 1, |
| 2717 | causeValue := int2bit(enum2int(valueof(cause)), 8), |
| 2718 | diagnosticValue := omit |
| 2719 | } |
| 2720 | return ie; |
| 2721 | } |
| 2722 | |
| 2723 | template (present) PDU_BSSAP tr_BSSMAP_Perform_Location_Response( |
| 2724 | template BSSMAP_IE_LocationEstimate locationEstimate := *, |
| 2725 | template BSSMAP_IE_PositioningData positioningData := *, |
| 2726 | template BSSMAP_IE_LCSCause lCS_Cause := * |
| 2727 | ) |
| 2728 | modifies tr_BSSAP_BSSMAP := { |
| 2729 | pdu := { |
| 2730 | bssmap := { |
| 2731 | performLocationResponse := { |
| 2732 | messageType := '2D'O, |
| 2733 | locationEstimate := locationEstimate, |
| 2734 | positioningData := positioningData, |
| 2735 | decipheringKeys := *, |
| 2736 | lCS_Cause := lCS_Cause, |
| 2737 | velocityEstimate := *, |
| 2738 | gANSS_PositioningData := * |
| 2739 | } |
| 2740 | } |
| 2741 | } |
| 2742 | } |
| 2743 | |
| 2744 | template (present) PDU_BSSAP tr_BSSMAP_Perform_Location_Abort(template (present) BSSMAP_IE_LCSCause lCS_Cause := ?) |
| 2745 | modifies tr_BSSAP_BSSMAP := { |
| 2746 | pdu := { |
| 2747 | bssmap := { |
| 2748 | performLocationAbort := { |
| 2749 | messageType := '2E'O, |
| 2750 | lCS_Cause := lCS_Cause |
| 2751 | } |
| 2752 | } |
| 2753 | } |
| 2754 | } |
Harald Welte | c859df5 | 2017-11-24 23:41:41 +0100 | [diff] [blame] | 2755 | |
Harald Welte | b69533d | 2017-12-15 13:55:17 +0100 | [diff] [blame] | 2756 | } with { encode "RAW" }; |