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