Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1 | module RSL_Types { |
| 2 | |
Vadim Yanitskiy | c06688e | 2020-05-06 15:22:45 +0700 | [diff] [blame] | 3 | /* RSL types defining abstract TTCN-3 data types for the A-bis RSL protocol. |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 4 | * |
| 5 | * RSL is a 3GPP standard protocol used between BTS and BSC in a GSM network. |
| 6 | * |
Harald Welte | e33e515 | 2023-04-09 23:29:48 +0200 | [diff] [blame] | 7 | * (C) 2017-2023 by Harald Welte <laforge@gnumonks.org> |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 8 | * All rights reserved. |
| 9 | * |
| 10 | * Released under the terms of GNU General Public License, Version 2 or |
| 11 | * (at your option) any later version. |
Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 12 | * |
| 13 | * SPDX-License-Identifier: GPL-2.0-or-later |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 14 | */ |
| 15 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 16 | import from General_Types all; |
| 17 | import from Osmocom_Types all; |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 18 | import from GSM_RR_Types all; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 19 | import from GSM_Types all; |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 20 | import from MobileL3_CommonIE_Types all; |
| 21 | import from L3_Templates all; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 22 | |
| 23 | /* Section 9.1 */ |
| 24 | type enumerated RSL_MessageGroup { |
| 25 | RSL_MDISC_RESERVED ('0000000'B), |
| 26 | RSL_MDISC_RLL ('0000001'B), |
| 27 | RSL_MDISC_DCHAN ('0000100'B), |
| 28 | RSL_MDISC_CCHAN ('0000110'B), |
| 29 | RSL_MDISC_TRX_MGMT ('0001000'B), |
| 30 | RSL_MDISC_LCS ('0010000'B), |
| 31 | RSL_MDISC_IPACCESS ('0111111'B) |
| 32 | } with { variant "FIELDLENGTH(7)" }; |
| 33 | |
| 34 | /* Section 9.1 */ |
| 35 | type record RSL_MessageDiscriminator { |
| 36 | RSL_MessageGroup msg_group, |
| 37 | boolean transparent |
| 38 | } with { variant "FIELDORDER(msb)" }; |
| 39 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 40 | template (value) RSL_MessageDiscriminator ts_RSL_MsgDisc(RSL_MessageGroup mg, boolean t := true) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 41 | msg_group := mg, |
| 42 | transparent := t |
| 43 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 44 | template RSL_MessageDiscriminator tr_RSL_MsgDisc(template RSL_MessageGroup mg, boolean t := true) := { |
| 45 | msg_group := mg, |
| 46 | transparent := t |
| 47 | } |
| 48 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 49 | |
| 50 | /* Section 9.2 */ |
| 51 | type enumerated RSL_MessageType { |
| 52 | /* Radio Link Layer Management */ |
| 53 | RSL_MT_DATA_REQ ('00000001'B), |
| 54 | RSL_MT_DATA_IND ('00000010'B), |
| 55 | RSL_MT_ERROR_IND ('00000011'B), |
| 56 | RSL_MT_EST_REQ ('00000100'B), |
| 57 | RSL_MT_EST_CONF ('00000101'B), |
| 58 | RSL_MT_EST_IND ('00000110'B), |
| 59 | RSL_MT_REL_REQ ('00000111'B), |
| 60 | RSL_MT_REL_CONF ('00001000'B), |
| 61 | RSL_MT_REL_IND ('00001001'B), |
| 62 | RSL_MT_UNIT_DATA_REQ ('00001010'B), |
| 63 | RSL_MT_UNIT_DATA_IND ('00001011'B), |
| 64 | |
| 65 | /* non-standard below */ |
| 66 | RSL_MT_SUSP_REQ ('00001100'B), |
| 67 | RSL_MT_SUSP_CONF ('00001101'B), |
| 68 | RSL_MT_RES_REQ ('00001110'B), |
| 69 | RSL_MT_RECON_REQ ('00001111'B), |
| 70 | |
| 71 | /* Common Channel Management / TRX Management */ |
| 72 | RSL_MT_BCCH_INFO ('00010001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 73 | RSL_MT_CCCH_LOAD_IND ('00010010'B), |
| 74 | RSL_MT_CHAN_RQD ('00010011'B), |
| 75 | RSL_MT_DELETE_IND ('00010100'B), |
| 76 | RSL_MT_PAGING_CMD ('00010101'B), |
| 77 | RSL_MT_IMMEDIATE_ASSIGN_CMD ('00010110'B), |
| 78 | RSL_MT_SMS_BC_REQ ('00010111'B), |
| 79 | RSL_MT_CHAN_CONF ('00011000'B), /* non-standard element */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 80 | /* empty */ |
| 81 | RSL_MT_RF_RES_IND ('00011001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 82 | RSL_MT_SACCH_FILL ('00011010'B), |
| 83 | RSL_MT_OVERLOAD ('00011011'B), |
| 84 | RSL_MT_ERROR_REPORT ('00011100'B), |
| 85 | RSL_MT_SMS_BC_CMD ('00011101'B), |
| 86 | RSL_MT_CBCH_LOAD_IND ('00011110'B), |
| 87 | RSL_MT_NOT_CMD ('00011111'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 88 | |
| 89 | /* Dedicate Channel Management */ |
| 90 | RSL_MT_CHAN_ACTIV ('00100001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 91 | RSL_MT_CHAN_ACTIV_ACK ('00100010'B), |
| 92 | RSL_MT_CHAN_ACTIV_NACK ('00100011'B), |
| 93 | RSL_MT_CONN_FAIL ('00100100'B), |
| 94 | RSL_MT_DEACTIVATE_SACCH ('00100101'B), |
| 95 | RSL_MT_ENCR_CMD ('00100110'B), |
| 96 | RSL_MT_HANDO_DET ('00100111'B), |
| 97 | RSL_MT_MEAS_RES ('00101000'B), |
| 98 | RSL_MT_MODE_MODIFY_REQ ('00101001'B), |
| 99 | RSL_MT_MODE_MODIFY_ACK ('00101010'B), |
| 100 | RSL_MT_MODE_MODIFY_NACK ('00101011'B), |
| 101 | RSL_MT_PHY_CONTEXT_REQ ('00101100'B), |
| 102 | RSL_MT_PHY_CONTEXT_CONF ('00101101'B), |
| 103 | RSL_MT_RF_CHAN_REL ('00101110'B), |
| 104 | RSL_MT_MS_POWER_CONTROL ('00101111'B), |
| 105 | RSL_MT_BS_POWER_CONTROL ('00110000'B), /* 0x30 */ |
| 106 | RSL_MT_PREPROC_CONFIG ('00110001'B), |
| 107 | RSL_MT_PREPROC_MEAS_RES ('00110010'B), |
| 108 | RSL_MT_RF_CHAN_REL_ACK ('00110011'B), |
| 109 | RSL_MT_SACCH_INFO_MODIFY('00110100'B), |
| 110 | RSL_MT_TALKER_DET ('00110101'B), |
| 111 | RSL_MT_LISTENER_DET ('00110110'B), |
| 112 | RSL_MT_REMOTE_CODEC_CONF_REP ('00110111'B), |
| 113 | RSL_MT_RTD_REP ('00111000'B), |
| 114 | RSL_MT_PRE_HANDO_NOTIF ('00111001'B), |
| 115 | RSL_MT_MR_CODEC_MOD_REQ ('00111010'B), |
| 116 | RSL_MT_MR_CODEC_MOD_ACK ('00111011'B), |
| 117 | RSL_MT_MR_CODEC_MOD_NACK ('00111100'B), |
| 118 | RSL_MT_MR_CODEC_MOD_PER ('00111101'B), |
| 119 | RSL_MT_TFO_REP ('00111110'B), |
| 120 | RSL_MT_TFO_MOD_REQ ('00111111'B), /* 0x3f */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 121 | |
| 122 | RSL_MT_LOCATION_INFO ('01000001'B), |
| 123 | |
| 124 | /* ip.access specific RSL message types */ |
| 125 | RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B), |
| 126 | |
| 127 | RSL_MT_IPAC_PDCH_ACT ('01001000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 128 | RSL_MT_IPAC_PDCH_ACT_ACK ('01001001'B), |
| 129 | RSL_MT_IPAC_PDCH_ACT_NACK ('01001010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 130 | RSL_MT_IPAC_PDCH_DEACT ('01001011'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 131 | RSL_MT_IPAC_PDCH_DEACT_ACK ('01001100'B), |
| 132 | RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 133 | |
| 134 | RSL_MT_IPAC_CONNECT_MUX ('01010000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 135 | RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), |
| 136 | RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), |
| 137 | RSL_MT_IPAC_BIND_MUX ('01010011'B), |
| 138 | RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), |
| 139 | RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), |
| 140 | RSL_MT_IPAC_DISC_MUX ('01010110'B), |
| 141 | RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), |
| 142 | RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 143 | RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 144 | RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), |
| 145 | RSL_MT_IPAC_HO_CAN_RES ('01100010'B), |
| 146 | RSL_MT_IPAC_CRCX ('01110000'B), |
| 147 | RSL_MT_IPAC_CRCX_ACK ('01110001'B), |
| 148 | RSL_MT_IPAC_CRCX_NACK ('01110010'B), |
| 149 | RSL_MT_IPAC_MDCX ('01110011'B), |
| 150 | RSL_MT_IPAC_MDCX_ACK ('01110100'B), |
| 151 | RSL_MT_IPAC_MDCX_NACK ('01110101'B), |
| 152 | RSL_MT_IPAC_DLCX_IND ('01110110'B), |
| 153 | RSL_MT_IPAC_DLCX ('01110111'B), |
| 154 | RSL_MT_IPAC_DLCX_ACK ('01111000'B), |
Harald Welte | 908ce54 | 2019-09-04 23:05:40 +0200 | [diff] [blame] | 155 | RSL_MT_IPAC_DLCX_NACK ('01111001'B), |
| 156 | |
| 157 | RSL_MT_OSMO_ETWS_CMD ('01111111'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 158 | } with { variant "FIELDLENGTH(8)" }; |
| 159 | |
| 160 | /*! RSL Information Element Identifiers (Chapter 9.3) */ |
| 161 | type enumerated RSL_IE_Type { |
| 162 | RSL_IE_CHAN_NR ('00000001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 163 | RSL_IE_LINK_IDENT ('00000010'B), |
| 164 | RSL_IE_ACT_TYPE ('00000011'B), |
| 165 | RSL_IE_BS_POWER ('00000100'B), |
| 166 | RSL_IE_CHAN_IDENT ('00000101'B), |
| 167 | RSL_IE_CHAN_MODE ('00000110'B), |
| 168 | RSL_IE_ENCR_INFO ('00000111'B), |
| 169 | RSL_IE_FRAME_NUMBER ('00001000'B), |
| 170 | RSL_IE_HANDO_REF ('00001001'B), |
| 171 | RSL_IE_L1_INFO ('00001010'B), |
| 172 | RSL_IE_L3_INFO ('00001011'B), |
| 173 | RSL_IE_MS_IDENTITY ('00001100'B), |
| 174 | RSL_IE_MS_POWER ('00001101'B), |
| 175 | RSL_IE_PAGING_GROUP ('00001110'B), |
| 176 | RSL_IE_PAGING_LOAD ('00001111'B), |
| 177 | RSL_IE_PYHS_CONTEXT ('00010000'B), |
| 178 | RSL_IE_ACCESS_DELAY ('00010001'B), |
| 179 | RSL_IE_RACH_LOAD ('00010010'B), |
| 180 | RSL_IE_REQ_REFERENCE ('00010011'B), |
| 181 | RSL_IE_RELEASE_MODE ('00010100'B), |
| 182 | RSL_IE_RESOURCE_INFO ('00010101'B), |
| 183 | RSL_IE_RLM_CAUSE ('00010110'B), |
| 184 | RSL_IE_STARTNG_TIME ('00010111'B), |
| 185 | RSL_IE_TIMING_ADVANCE ('00011000'B), |
| 186 | RSL_IE_UPLINK_MEAS ('00011001'B), |
| 187 | RSL_IE_CAUSE ('00011010'B), |
| 188 | RSL_IE_MEAS_RES_NR ('00011011'B), |
| 189 | RSL_IE_MSG_ID ('00011100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 190 | /* reserved */ |
| 191 | RSL_IE_SYSINFO_TYPE ('00011110'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 192 | RSL_IE_MS_POWER_PARAM ('00011111'B), |
| 193 | RSL_IE_BS_POWER_PARAM ('00100000'B), |
| 194 | RSL_IE_PREPROC_PARAM ('00100001'B), |
| 195 | RSL_IE_PREPROC_MEAS ('00100010'B), |
| 196 | RSL_IE_IMM_ASS_INFO ('00100011'B),/* Phase 1 (3.6.0), later Full below */ |
| 197 | RSL_IE_SMSCB_INFO ('00100100'B), |
| 198 | RSL_IE_MS_TIMING_OFFSET ('00100101'B), |
| 199 | RSL_IE_ERR_MSG ('00100110'B), |
| 200 | RSL_IE_FULL_BCCH_INFO ('00100111'B), |
| 201 | RSL_IE_CHAN_NEEDED ('00101000'B), |
| 202 | RSL_IE_CB_CMD_TYPE ('00101001'B), |
| 203 | RSL_IE_SMSCB_MSG ('00101010'B), |
| 204 | RSL_IE_FULL_IMM_ASS_INFO ('00101011'B), |
| 205 | RSL_IE_SACCH_INFO ('00101100'B), |
| 206 | RSL_IE_CBCH_LOAD_INFO ('00101101'B), |
| 207 | RSL_IE_SMSCB_CHAN_INDICATOR ('00101110'B), |
| 208 | RSL_IE_GROUP_CALL_REF ('00101111'B), |
Harald Welte | e33e515 | 2023-04-09 23:29:48 +0200 | [diff] [blame] | 209 | RSL_IE_GROUP_CHAN_DESC ('00110000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 210 | RSL_IE_NCH_DRX_INFO ('00110001'B), |
| 211 | RSL_IE_CMD_INDICATOR ('00110010'B), |
| 212 | RSL_IE_EMLPP_PRIO ('00110011'B), |
| 213 | RSL_IE_UIC ('00110100'B), |
| 214 | RSL_IE_MAIN_CHAN_REF ('00110101'B), |
| 215 | RSL_IE_MR_CONFIG ('00110110'B), |
| 216 | RSL_IE_MR_CONTROL ('00110111'B), |
| 217 | RSL_IE_SUP_CODEC_TYPES ('00111000'B), |
| 218 | RSL_IE_CODEC_CONFIG ('00111001'B), |
| 219 | RSL_IE_RTD ('00111010'B), |
| 220 | RSL_IE_TFO_STATUS ('00111011'B), |
| 221 | RSL_IE_LLP_APDU ('00111100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 222 | |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 223 | /* Osmocom extensions */ |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 224 | RSL_IE_OSMO_REP_ACCH_CAP ('01100000'B), |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 225 | RSL_IE_OSMO_TRAINING_SEQUENCE ('01100001'B), |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 226 | RSL_IE_OSMO_TOP_ACCH_CAP ('01100010'B), |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 227 | RSL_IE_OSMO_OSMUX_CID ('01100011'B), |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 228 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 229 | /* ip.access */ |
| 230 | RSL_IE_IPAC_SRTP_CONFIG ('11100000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 231 | RSL_IE_IPAC_PROXY_UDP ('11100001'B), |
| 232 | RSL_IE_IPAC_BSCMPL_TOUT ('11100010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 233 | |
| 234 | RSL_IE_IPAC_REMOTE_IP ('11110000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 235 | RSL_IE_IPAC_REMOTE_PORT ('11110001'B), |
| 236 | RSL_IE_IPAC_RTP_PAYLOAD ('11110010'B), |
| 237 | RSL_IE_IPAC_LOCAL_PORT ('11110011'B), |
| 238 | RSL_IE_IPAC_SPEECH_MODE ('11110100'B), |
| 239 | RSL_IE_IPAC_LOCAL_IP ('11110101'B), |
| 240 | RSL_IE_IPAC_CONN_STAT ('11110110'B), |
| 241 | RSL_IE_IPAC_HO_C_PARMS ('11110111'B), |
| 242 | RSL_IE_IPAC_CONN_ID ('11111000'B), |
| 243 | RSL_IE_IPAC_RTP_CSD_FMT ('11111001'B), |
| 244 | RSL_IE_IPAC_RTP_JIT_BUF ('11111010'B), |
| 245 | RSL_IE_IPAC_RTP_COMPR ('11111011'B), |
| 246 | RSL_IE_IPAC_RTP_PAYLOAD2 ('11111100'B), |
| 247 | RSL_IE_IPAC_RTP_MPLEX ('11111101'B), |
| 248 | RSL_IE_IPAC_RTP_MPLEX_ID ('11111110'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 249 | } with { variant "FIELDLENGTH(8)" }; |
| 250 | |
| 251 | type record RSL_LV { |
| 252 | uint8_t len, |
| 253 | octetstring payload |
| 254 | } with { variant (len) "LENGTHTO(payload)" } |
| 255 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 256 | template (value) RSL_LV ts_RSL_LV(template (value) octetstring pl) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 257 | len := 0, |
| 258 | payload := pl |
| 259 | } |
| 260 | |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 261 | template RSL_LV tr_RSL_LV(template octetstring pl) := { |
| 262 | len := ?, |
| 263 | payload := pl |
| 264 | } |
| 265 | |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 266 | type record RSL_L16V { |
| 267 | uint16_t len, |
| 268 | octetstring payload |
| 269 | } with { variant (len) "LENGTHTO(payload)" } |
| 270 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 271 | template (value) RSL_L16V ts_RSL_L16V(template (value) octetstring pl) := { |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 272 | len := 0, |
| 273 | payload := pl |
| 274 | } |
| 275 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 276 | template RSL_L16V tr_RSL_L16V(template octetstring pl) := { |
| 277 | len := ?, |
| 278 | payload := pl |
| 279 | } |
| 280 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 281 | type record RSL_IE_V { |
| 282 | uint8_t val |
| 283 | } |
| 284 | |
| 285 | /* 9.3.3 */ |
| 286 | type record RSL_IE_ActivationType { |
| 287 | boolean reactivation, |
| 288 | uint4_t reserved, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 289 | RSL_ActivationAbits a_bits |
| 290 | }; |
| 291 | type enumerated RSL_ActivationAbits { |
| 292 | ACT_REL_TO_IMM_ASSIGN ('000'B), |
| 293 | ACT_REL_TO_NORM_ASSIGN ('001'B), |
| 294 | ACT_REL_TO_ASYNC_HANDOVER ('010'B), |
| 295 | ACT_REL_TO_SYNC_HANDOVER ('011'B), |
| 296 | ACT_REL_TO_ADDL_ASSIGN ('100'B), |
| 297 | ACT_REL_TO_MSLOT_CONFIG ('101'B), |
| 298 | ACT_REL_TO_OSMO_PDCH ('111'B) |
| 299 | } with { variant "FIELDLENGTH(3)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 300 | |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 301 | const RSL_IE_ActivationType t_RSL_IE_ActType_IA := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 302 | reactivation := false, |
| 303 | reserved := 0, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 304 | a_bits := ACT_REL_TO_IMM_ASSIGN |
| 305 | } |
| 306 | const RSL_IE_ActivationType t_RSL_IE_ActType_ASS := { |
| 307 | reactivation := false, |
| 308 | reserved := 0, |
| 309 | a_bits := ACT_REL_TO_NORM_ASSIGN |
| 310 | } |
| 311 | const RSL_IE_ActivationType t_RSL_IE_ActType_HO_ASYNC := { |
| 312 | reactivation := false, |
| 313 | reserved := 0, |
| 314 | a_bits := ACT_REL_TO_ASYNC_HANDOVER |
| 315 | } |
| 316 | const RSL_IE_ActivationType t_RSL_IE_ActType_HO_SYNC := { |
| 317 | reactivation := false, |
| 318 | reserved := 0, |
| 319 | a_bits := ACT_REL_TO_SYNC_HANDOVER |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 320 | } |
| 321 | |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 322 | /* osmocom-style dynamic PDCH */ |
Vadim Yanitskiy | 58b1653 | 2021-10-09 20:27:39 +0600 | [diff] [blame] | 323 | const RSL_IE_ActivationType c_RSL_IE_ActType_PDCH := { |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 324 | reactivation := false, |
| 325 | reserved := 1, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 326 | a_bits := ACT_REL_TO_OSMO_PDCH |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 327 | } |
| 328 | |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 329 | /* 9.3.5 */ |
| 330 | type record RSL_IE_ChannelIdent { |
| 331 | uint8_t len, |
| 332 | /* 3GPP TS 44.018 Channel Description IE (TV) */ |
| 333 | ChannelDescriptionTV ch_desc, |
| 334 | /* 3GPP TS 44.018 Mobile Allocation IE (shall be empty) */ |
| 335 | MobileAllocationTLV ma |
| 336 | } with { variant (len) "LENGTHTO(ch_desc,ma)" }; |
| 337 | |
| 338 | template (value) RSL_IE_ChannelIdent |
| 339 | ts_RSL_ChannelIdent(template (value) ChannelDescription ch_desc) := { |
| 340 | len := 0, /* overwritten */ |
| 341 | ch_desc := { |
| 342 | iei := '64'O, |
| 343 | v := ch_desc |
| 344 | }, |
| 345 | /* Shall be included but empty */ |
| 346 | ma := { |
| 347 | iei := '72'O, |
| 348 | v := { |
| 349 | len := 0, |
| 350 | ma := ''B |
| 351 | } |
| 352 | } |
| 353 | }; |
| 354 | |
| 355 | template RSL_IE_ChannelIdent |
| 356 | tr_RSL_ChannelIdent(template (present) ChannelDescription ch_desc := ?, |
| 357 | template (present) MobileAllocationLV ma := ?) := { |
| 358 | len := ?, |
| 359 | ch_desc := { |
| 360 | iei := '64'O, |
| 361 | v := ch_desc |
| 362 | }, |
| 363 | /* Shall be included but empty */ |
| 364 | ma := { |
| 365 | iei := '72'O, |
| 366 | v := ma |
| 367 | } |
| 368 | }; |
| 369 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 370 | /* 9.3.6 */ |
| 371 | type enumerated RSL_SpeechDataInd { |
| 372 | RSL_SPDI_SPEECH ('00000001'B), |
| 373 | RSL_SPDI_DATA ('00000010'B), |
| 374 | RSL_SPDI_SIGN ('00000011'B) |
| 375 | } with { variant "FIELDLENGTH(8)" }; |
| 376 | type enumerated RSL_ChanRateType { |
| 377 | RSL_CHRT_SDCCH ('00000001'B), |
| 378 | RSL_CHRT_TCH_F ('00001000'B), |
| 379 | RSL_CHRT_TCH_H ('00001001'B), |
| 380 | RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B), |
| 381 | RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B), |
| 382 | RSL_CHRT_TCH_F_GROUP ('00011000'B), |
| 383 | RSL_CHRT_TCH_H_GROUP ('00011001'B), |
| 384 | RSL_CHRT_TCH_F_BCAST ('00101000'B), |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 385 | RSL_CHRT_TCH_H_BCAST ('00101001'B), |
| 386 | RSL_CHRT_OSMO_TCH_F_VAMOS ('10001000'B), |
| 387 | RSL_CHRT_OSMO_TCH_H_VAMOS ('10001001'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 388 | } with { variant "FIELDLENGTH(8)" }; |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 389 | type enumerated RSL_ChanModeOct6Signalling { |
| 390 | RSL_CMOD_NO_RESOURCE ('00000000'B) |
| 391 | } with { variant "FIELDLENGTH(8)" }; |
| 392 | type enumerated RSL_ChanModeOct6SpeechAlgo { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 393 | RSL_CMOD_SP_GSM1 ('00000001'B), |
| 394 | RSL_CMOD_SP_GSM2 ('00010001'B), |
| 395 | RSL_CMOD_SP_GSM3 ('00100001'B), |
| 396 | RSL_CMOD_SP_GSM4 ('00110001'B), |
| 397 | RSL_CMOD_SP_GSM5 ('00001001'B), |
| 398 | RSL_CMOD_SP_GSM6 ('00001101'B) |
| 399 | } with { variant "FIELDLENGTH(8)" }; |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 400 | type enumerated RSL_ChanModeOct6DataRate { |
| 401 | RSL_CMOD_CSD_NTA_43k5_14k5 ('01100001'B), |
| 402 | RSL_CMOD_CSD_NTA_29k0_14k5 ('01100010'B), |
| 403 | RSL_CMOD_CSD_NTA_43k5_29k0 ('01100011'B), |
| 404 | RSL_CMOD_CSD_NTA_14k5_43k5 ('01101001'B), |
| 405 | RSL_CMOD_CSD_NTA_14k5_29k0 ('01101010'B), |
| 406 | RSL_CMOD_CSD_NTA_29k0_43k5 ('01101011'B), |
| 407 | RSL_CMOD_CSD_NT_43k5 ('01110100'B), |
| 408 | RSL_CMOD_CSD_NT_28k8 ('01110001'B), |
| 409 | RSL_CMOD_CSD_NT_14k5 ('01011000'B), |
| 410 | RSL_CMOD_CSD_NT_12k0 ('01010000'B), |
| 411 | RSL_CMOD_CSD_NT_6k0 ('01010001'B), |
| 412 | RSL_CMOD_CSD_T_32k0 ('00111000'B), |
| 413 | RSL_CMOD_CSD_T_29k0 ('00111001'B), |
| 414 | RSL_CMOD_CSD_T_14k4 ('00011000'B), |
| 415 | RSL_CMOD_CSD_T_9k6 ('00010000'B), |
| 416 | RSL_CMOD_CSD_T_4k8 ('00010001'B), |
| 417 | RSL_CMOD_CSD_T_2k4 ('00010010'B), |
| 418 | RSL_CMOD_CSD_T_1k2 ('00010011'B), |
| 419 | RSL_CMOD_CSD_T_600 ('00010100'B), |
| 420 | RSL_CMOD_CSD_T_1200_75 ('00010101'B) |
| 421 | } with { variant "FIELDLENGTH(8)" }; |
| 422 | type union RSL_ChanModeOct6 { |
| 423 | RSL_ChanModeOct6Signalling sign, |
| 424 | RSL_ChanModeOct6SpeechAlgo speech, |
| 425 | RSL_ChanModeOct6DataRate data |
| 426 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 427 | type record RSL_IE_ChannelMode { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 428 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 429 | BIT6 reserved, |
| 430 | boolean dtx_d, |
| 431 | boolean dtx_u, |
| 432 | RSL_SpeechDataInd spd_ind, |
| 433 | RSL_ChanRateType ch_rate_type, |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 434 | RSL_ChanModeOct6 u |
| 435 | } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,u)" |
| 436 | variant (u) "CROSSTAG( |
| 437 | sign, spd_ind = RSL_SPDI_SIGN; |
| 438 | speech, spd_ind = RSL_SPDI_SPEECH; |
| 439 | data, spd_ind = RSL_SPDI_DATA; |
| 440 | )"} |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 441 | |
Vadim Yanitskiy | eaaa1d6 | 2023-05-26 18:46:25 +0700 | [diff] [blame] | 442 | template (value) RSL_IE_ChannelMode |
| 443 | ts_RSL_ChanMode_SIGN(template (value) RSL_ChanRateType t := RSL_CHRT_SDCCH, |
| 444 | template (value) boolean dtxd := false, |
| 445 | template (value) boolean dtxu := false) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 446 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 447 | reserved := '000000'B, |
Vadim Yanitskiy | eaaa1d6 | 2023-05-26 18:46:25 +0700 | [diff] [blame] | 448 | dtx_d := dtxd, |
| 449 | dtx_u := dtxu, |
| 450 | spd_ind := RSL_SPDI_SIGN, |
| 451 | ch_rate_type := t, |
| 452 | u := { sign := RSL_CMOD_NO_RESOURCE } |
| 453 | } |
| 454 | template RSL_IE_ChannelMode |
| 455 | tr_RSL_ChanMode_SIGN(template (present) RSL_ChanRateType t := ?, |
| 456 | template (present) boolean dtxd := ?, |
| 457 | template (present) boolean dtxu := ?) := { |
| 458 | len := ?, |
| 459 | reserved := ?, |
| 460 | dtx_d := dtxd, |
| 461 | dtx_u := dtxu, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 462 | spd_ind := RSL_SPDI_SIGN, |
Philipp Maier | ac69346 | 2020-10-14 20:21:44 +0200 | [diff] [blame] | 463 | ch_rate_type := t, |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 464 | u := { sign := RSL_CMOD_NO_RESOURCE } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 465 | } |
| 466 | |
Vadim Yanitskiy | 8e2b8e3 | 2023-05-26 18:44:01 +0700 | [diff] [blame] | 467 | template (value) RSL_IE_ChannelMode |
| 468 | ts_RSL_ChanMode_DATA(template (value) RSL_ChanRateType t, |
| 469 | template (value) RSL_ChanModeOct6DataRate r, |
| 470 | template (value) boolean dtxd := false, |
| 471 | template (value) boolean dtxu := false) := { |
| 472 | len := 0, /* overwritten */ |
| 473 | reserved := '000000'B, |
| 474 | dtx_d := dtxd, |
| 475 | dtx_u := dtxu, |
| 476 | spd_ind := RSL_SPDI_DATA, |
| 477 | ch_rate_type := t, |
| 478 | u := { data := r } |
| 479 | } |
| 480 | template RSL_IE_ChannelMode |
| 481 | tr_RSL_ChanMode_DATA(template (present) RSL_ChanRateType t := ?, |
| 482 | template (present) RSL_ChanModeOct6DataRate r := ?, |
| 483 | template (present) boolean dtxd := ?, |
| 484 | template (present) boolean dtxu := ?) := { |
| 485 | len := ?, |
| 486 | reserved := ?, |
| 487 | dtx_d := dtxd, |
| 488 | dtx_u := dtxu, |
| 489 | spd_ind := RSL_SPDI_DATA, |
| 490 | ch_rate_type := t, |
| 491 | u := { data := r } |
| 492 | } |
| 493 | |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 494 | template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_ChanModeOct6SpeechAlgo alg, |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 495 | boolean dtx_downlink := false) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 496 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 497 | reserved := '000000'B, |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 498 | dtx_d := dtx_downlink, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 499 | dtx_u := false, |
| 500 | spd_ind := RSL_SPDI_SPEECH, |
| 501 | ch_rate_type := t, |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 502 | u := { speech := alg } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 503 | } |
Harald Welte | 3618d9d | 2018-03-21 18:45:27 +0100 | [diff] [blame] | 504 | template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t, |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 505 | template RSL_ChanModeOct6SpeechAlgo alg) := { |
Harald Welte | 3618d9d | 2018-03-21 18:45:27 +0100 | [diff] [blame] | 506 | len := ?, |
| 507 | reserved := '000000'B, |
| 508 | dtx_d := ?, |
| 509 | dtx_u := ?, |
| 510 | spd_ind := RSL_SPDI_SPEECH, |
| 511 | ch_rate_type := t, |
Oliver Smith | 0033b12 | 2023-02-28 13:30:53 +0100 | [diff] [blame] | 512 | u := { speech := alg } |
Harald Welte | 3618d9d | 2018-03-21 18:45:27 +0100 | [diff] [blame] | 513 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 514 | |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 515 | /* 9.3.4 BS Power IE */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 516 | type record RSL_IE_BS_Power { |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 517 | uint2_t reserved, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 518 | boolean epc, |
| 519 | boolean fpc, |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 520 | uint4_t power_level |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 521 | } |
| 522 | |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 523 | template (value) RSL_IE_BS_Power ts_RSL_IE_BS_Power(uint4_t power_level, |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 524 | boolean epc := false, boolean fpc := false) := { |
| 525 | reserved := 0, |
| 526 | epc := epc, |
| 527 | fpc := fpc, |
| 528 | power_level := power_level |
| 529 | } |
Vadim Yanitskiy | 2a5a1ef | 2021-06-30 00:51:48 +0200 | [diff] [blame] | 530 | template RSL_IE_BS_Power |
| 531 | tr_RSL_IE_BS_Power(template (present) uint4_t power_level, |
| 532 | template (present) boolean epc := ?, |
| 533 | template (present) boolean fpc := ?) := { |
| 534 | reserved := ?, |
| 535 | epc := epc, |
| 536 | fpc := fpc, |
| 537 | power_level := power_level |
| 538 | } |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 539 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 540 | /* 9.3.7 */ |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 541 | type enumerated RSL_AlgId { |
| 542 | RSL_ALG_ID_A5_0 ('00000001'B), |
| 543 | RSL_ALG_ID_A5_1 ('00000010'B), |
| 544 | RSL_ALG_ID_A5_2 ('00000011'B), |
| 545 | RSL_ALG_ID_A5_3 ('00000100'B), |
| 546 | RSL_ALG_ID_A5_4 ('00000101'B), |
| 547 | RSL_ALG_ID_A5_5 ('00000110'B), |
| 548 | RSL_ALG_ID_A5_6 ('00000111'B), |
| 549 | RSL_ALG_ID_A5_7 ('00001000'B) |
| 550 | } with { variant "FIELDLENGTH(8)" }; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 551 | type record RSL_IE_EncryptionInfo { |
| 552 | uint8_t len, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 553 | RSL_AlgId alg_id, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 554 | octetstring key |
| 555 | } with { variant (len) "LENGTHTO(alg_id,key)" }; |
| 556 | |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 557 | template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template RSL_AlgId alg, |
| 558 | template octetstring key) := { |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 559 | len := ?, |
| 560 | alg_id := alg, |
| 561 | key := key |
| 562 | } |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 563 | template (value) RSL_IE_EncryptionInfo ts_RSL_IE_EncrInfo(template (value) RSL_AlgId alg, |
| 564 | octetstring key) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 565 | len := 0, /* overwritten */ |
| 566 | alg_id := alg, |
| 567 | key := key |
| 568 | } |
| 569 | |
| 570 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 571 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 572 | /* 9.3.8 */ |
| 573 | type record RSL_IE_FrameNumber { |
| 574 | uint5_t t1_p, |
| 575 | uint6_t t3, |
| 576 | uint5_t t2 |
| 577 | } |
| 578 | type RSL_IE_FrameNumber RSL_IE_StartingTime; |
| 579 | |
| 580 | /* 9.3.10 */ |
| 581 | type record RSL_IE_L1Info { |
| 582 | uint5_t ms_power_lvl, |
| 583 | boolean fpc, |
| 584 | uint2_t reserved, |
| 585 | uint8_t actual_ta |
| 586 | } |
| 587 | |
Neels Hofmeyr | afe2ea5 | 2021-11-24 15:16:12 +0100 | [diff] [blame] | 588 | template (value) RSL_IE_L1Info ts_RSL_IE_L1Info := { |
| 589 | ms_power_lvl := 0, |
| 590 | fpc := false, |
| 591 | reserved := 0, |
| 592 | actual_ta := 0 |
| 593 | }; |
| 594 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 595 | /* 9.3.13 */ |
| 596 | type record RSL_IE_MS_Power { |
| 597 | uint2_t reserved, |
| 598 | boolean fpc_epc, |
| 599 | uint5_t power_level |
| 600 | } |
Pau Espin Pedrol | f7630a6 | 2019-10-28 15:07:08 +0100 | [diff] [blame] | 601 | template RSL_IE_MS_Power tr_RSL_IE_MS_Power(template uint5_t power_level := ?, |
| 602 | template boolean fpc_epc := false) := { |
| 603 | reserved := 0, |
| 604 | fpc_epc := fpc_epc, |
| 605 | power_level := power_level |
| 606 | } |
Harald Welte | 1028017 | 2019-05-19 22:28:04 +0200 | [diff] [blame] | 607 | template (value) RSL_IE_MS_Power ts_RSL_IE_MS_Power(uint5_t power_level, |
| 608 | boolean fpc_epc := false) := { |
| 609 | reserved := 0, |
| 610 | fpc_epc := fpc_epc, |
| 611 | power_level := power_level |
| 612 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 613 | |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 614 | /* 9.3.18 */ |
| 615 | type record RSL_IE_RachLoad { |
| 616 | uint8_t len, |
| 617 | uint16_t slot_count, |
| 618 | uint16_t busy_count, |
| 619 | uint16_t access_count |
| 620 | } with { variant (len) "LENGTHTO(slot_count,busy_count,access_count)" } |
| 621 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 622 | template (value) RSL_IE_RachLoad ts_RSL_IE_RachLoad(uint16_t slot, uint16_t busy, uint16_t acc) := { |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 623 | len := 0, /* overwritten */ |
| 624 | slot_count := slot, |
| 625 | busy_count := busy, |
| 626 | access_count := acc |
| 627 | } |
| 628 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 629 | template RSL_IE_RachLoad tr_RSL_IE_RachLoad(template uint16_t slot, |
| 630 | template uint16_t busy, |
| 631 | template uint16_t acc) := { |
| 632 | len := ?, /* overwritten */ |
| 633 | slot_count := slot, |
| 634 | busy_count := busy, |
| 635 | access_count := acc |
| 636 | } |
| 637 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 638 | /* 9.3.19 */ |
| 639 | type record RSL_IE_RequestRef { |
| 640 | OCT1 ra, |
| 641 | RSL_IE_FrameNumber frame_nr |
| 642 | } |
| 643 | |
| 644 | /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */ |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 645 | template (value) RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 646 | t1_p := (fn / 1326) mod 32, |
| 647 | t3 := fn mod 51, |
| 648 | t2 := fn mod 26 |
| 649 | } |
| 650 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 651 | function tr_RSL_IE_FrameNumber(template GsmFrameNumber fn) return template RSL_IE_FrameNumber { |
| 652 | if (istemplatekind(fn, "?")) { |
| 653 | return ?; |
| 654 | } else { |
| 655 | return ts_RSL_IE_FrameNumber(valueof(fn)); |
| 656 | } |
| 657 | } |
| 658 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 659 | template (value) RSL_IE_RequestRef ts_RSL_IE_ReqRef(OCT1 ra, GsmFrameNumber frame_nr) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 660 | ra := ra, |
| 661 | frame_nr := ts_RSL_IE_FrameNumber(frame_nr) |
| 662 | } |
| 663 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 664 | template RSL_IE_RequestRef tr_RSL_IE_ReqRef(template OCT1 ra, template GsmFrameNumber frame_nr) := { |
| 665 | ra := ra, |
| 666 | frame_nr := tr_RSL_IE_FrameNumber(frame_nr) |
| 667 | } |
| 668 | |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 669 | /* 9.3.21 Resource Information */ |
| 670 | type record RSL_IE_ResourceInfo { |
| 671 | uint8_t len, |
| 672 | RSL_ResourceInfo info |
| 673 | } with { variant (len) "LENGTHTO(info)" }; |
| 674 | |
| 675 | type record of RSL_ResourceInfoItem RSL_ResourceInfo; |
| 676 | type record RSL_ResourceInfoItem { |
| 677 | RslChannelNr chan_nr, |
| 678 | uint3_t interf_band, |
| 679 | BIT5 rfu ('00000'B) |
| 680 | }; |
| 681 | |
| 682 | template (value) RSL_ResourceInfoItem |
| 683 | ts_RSL_ResourceInfoItem(template (value) RslChannelNr chan_nr, |
| 684 | template (value) uint3_t interf_band := 0) := { |
| 685 | chan_nr := chan_nr, |
| 686 | interf_band := interf_band, |
| 687 | rfu := '00000'B |
| 688 | } |
| 689 | template RSL_ResourceInfoItem |
| 690 | tr_RSL_ResourceInfoItem(template (present) RslChannelNr chan_nr := ?, |
| 691 | template (present) uint3_t interf_band := ?) := { |
| 692 | chan_nr := chan_nr, |
| 693 | interf_band := interf_band, |
| 694 | rfu := ? /* Tolerate unknown values */ |
| 695 | } |
| 696 | |
Harald Welte | 15de8ba | 2018-06-29 08:51:42 +0200 | [diff] [blame] | 697 | /* Osmocom Extension */ |
| 698 | type record RSL_IE_UplinkMeasSuppMeasInfo { |
| 699 | int16_t toa256_mean, |
| 700 | int16_t toa256_min, |
| 701 | int16_t toa256_max, |
| 702 | uint16_t toa256_std_dev |
| 703 | }; |
| 704 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 705 | /* 9.3.25 */ |
| 706 | type record RSL_IE_UplinkMeas { |
| 707 | uint8_t len, |
| 708 | BIT1 rfu, |
| 709 | boolean dtx_d, |
| 710 | uint6_t rxlev_f_u, |
| 711 | BIT2 reserved1, |
| 712 | uint6_t rxlev_s_u, |
| 713 | BIT2 reserved2, |
| 714 | uint3_t rxq_f_u, |
| 715 | uint3_t rxq_s_u, |
Harald Welte | 15de8ba | 2018-06-29 08:51:42 +0200 | [diff] [blame] | 716 | RSL_IE_UplinkMeasSuppMeasInfo supp_meas_info optional |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 717 | } with { variant (len) "LENGTHTO(rfu,dtx_d,rxlev_f_u,reserved1,rxlev_s_u,reserved2,rxq_f_u,rxq_s_u,supp_meas_info)" }; |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 718 | |
Neels Hofmeyr | afe2ea5 | 2021-11-24 15:16:12 +0100 | [diff] [blame] | 719 | template (value) RSL_IE_UplinkMeas ts_RSL_IE_UplinkMeas(uint6_t rxlev := 12, uint3_t rxqual := 0) := { |
| 720 | len := 0, /* overwritten */ |
| 721 | rfu := '0'B, |
| 722 | dtx_d := false, |
| 723 | rxlev_f_u := rxlev, |
| 724 | reserved1 := '00'B, |
| 725 | rxlev_s_u := rxlev, |
| 726 | reserved2 := '00'B, |
| 727 | rxq_f_u := rxqual, |
| 728 | rxq_s_u := rxqual, |
| 729 | supp_meas_info := omit |
| 730 | }; |
| 731 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 732 | /* 9.3.26 */ |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 733 | type enumerated RSL_Cause { |
| 734 | /* normal event */ |
| 735 | RSL_ERR_RADIO_IF_FAIL ('00'O), |
| 736 | RSL_ERR_RADIO_LINK_FAIL ('01'O), |
| 737 | RSL_ERR_HANDOVER_ACC_FAIL ('02'O), |
| 738 | RSL_ERR_TALKER_ACC_FAIL ('03'O), |
| 739 | RSL_ERR_OM_INTERVENTION ('07'O), |
| 740 | RSL_ERR_NORMAL_UNSPEC ('0f'O), |
| 741 | RSL_ERR_T_MSRFPCI_EXP ('18'O), |
| 742 | /* resource unavailable */ |
| 743 | RSL_ERR_EQUIPMENT_FAIL ('20'O), |
| 744 | RSL_ERR_RR_UNAVAIL ('21'O), |
| 745 | RSL_ERR_TERR_CH_FAIL ('22'O), |
| 746 | RSL_ERR_CCCH_OVERLOAD ('23'O), |
| 747 | RSL_ERR_ACCH_OVERLOAD ('24'O), |
| 748 | RSL_ERR_PROCESSOR_OVERLOAD ('25'O), |
| 749 | RSL_ERR_BTS_NOT_EQUIPPED ('27'O), |
| 750 | RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), |
| 751 | RSL_ERR_NOTIF_OVERFLOW ('29'O), |
| 752 | RSL_ERR_RES_UNAVAIL ('2f'O), |
| 753 | /* service or option not available */ |
| 754 | RSL_ERR_TRANSC_UNAVAIL ('30'O), |
| 755 | RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), |
| 756 | /* service or option not implemented */ |
| 757 | RSL_ERR_ENCR_UNIMPL ('40'O), |
| 758 | RSL_ERR_SERV_OPT_UNIMPL ('4f'O), |
| 759 | /* invalid message */ |
| 760 | RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), |
Harald Welte | 9912eb5 | 2018-02-25 13:30:15 +0100 | [diff] [blame] | 761 | RSL_ERR_IPA_RCH_NOT_ACTV_ALLOC ('51'O), |
| 762 | RSL_ERR_IPA_CONN_INVALID ('52'O), |
| 763 | RSL_ERR_IPA_CONN_IN_USE ('53'O), |
| 764 | RSL_ERR_IPA_CONN_ALREADY_EXISTS ('54'O), |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 765 | RSL_ERR_INVALID_MESSAGE ('5f'O), |
| 766 | /* protocol error */ |
| 767 | RSL_ERR_MSG_DISCR ('60'O), |
| 768 | RSL_ERR_MSG_TYPE ('61'O), |
| 769 | RSL_ERR_MSG_SEQ ('62'O), |
| 770 | RSL_ERR_IE_ERROR ('63'O), |
| 771 | RSL_ERR_MAND_IE_ERROR ('64'O), |
| 772 | RSL_ERR_OPT_IE_ERROR ('65'O), |
| 773 | RSL_ERR_IE_NONEXIST ('66'O), |
| 774 | RSL_ERR_IE_LENGTH ('67'O), |
| 775 | RSL_ERR_IE_CONTENT ('68'O), |
| 776 | RSL_ERR_PROTO ('6f'O), |
| 777 | /* interworking */ |
| 778 | RSL_ERR_INTERWORKING ('7f'O) |
| 779 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 780 | type record RSL_IE_Cause { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 781 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 782 | uint1_t e, |
| 783 | RSL_Cause cause, |
| 784 | octetstring cause_ext optional |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 785 | } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 786 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 787 | template (value) RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 788 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 789 | e := 0, |
| 790 | cause := cause, |
| 791 | cause_ext := omit |
| 792 | } |
| 793 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 794 | template RSL_IE_Cause tr_RSL_IE_Cause(template RSL_Cause cause) := { |
| 795 | len := ?, |
| 796 | e := 0, |
| 797 | cause := cause, |
| 798 | cause_ext := omit |
| 799 | } |
| 800 | |
Harald Welte | c8d363c | 2019-05-19 20:36:48 +0200 | [diff] [blame] | 801 | /* 9.3.29 */ |
| 802 | type record RSL_SacchInfo { |
| 803 | uint8_t len, |
| 804 | uint8_t num_msgs, |
| 805 | RSL_SacchInfoElements elems |
| 806 | } with { |
| 807 | variant (len) "LENGTHTO(num_msgs,elems)"; |
| 808 | variant (num_msgs) "LENGTHTO(elems)"; |
| 809 | variant (num_msgs) "UNIT(elements)" |
| 810 | }; |
| 811 | type record RSL_SacchInfoElement { |
| 812 | RSL_IE_SysinfoType si_type, |
| 813 | uint8_t len, |
| 814 | octetstring msg |
| 815 | } with { |
| 816 | variant (len) "LENGTHTO(msg)"; |
| 817 | }; |
| 818 | type record of RSL_SacchInfoElement RSL_SacchInfoElements; |
| 819 | template (value) RSL_SacchInfo ts_RSL_SacchInfo(template (value) RSL_SacchInfoElements elems) := { |
| 820 | len := 0, /* overwritten */ |
| 821 | num_msgs := 0, /* overwritten */ |
| 822 | elems := elems |
| 823 | } |
| 824 | template (value) RSL_SacchInfoElement ts_RSL_SacchInfoElem(RSL_IE_SysinfoType tp, octetstring msg) := { |
| 825 | si_type := tp, |
| 826 | len := lengthof(msg), |
| 827 | msg := msg |
| 828 | } |
| 829 | |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 830 | /* 9.3.31 */ |
| 831 | type record RSL_IE_MS_Power_Parameters { |
| 832 | uint8_t len, |
| 833 | octetstring params |
| 834 | } with { |
| 835 | variant (len) "LENGTHTO(params)"; |
| 836 | }; |
| 837 | template (value) RSL_IE_MS_Power_Parameters ts_RSL_IE_MS_Power_Parameters(octetstring params) := { |
| 838 | len := 0, /* overwritten */ |
| 839 | params := params |
| 840 | } |
| 841 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 842 | /* 9.3.40 */ |
| 843 | type enumerated RSL_ChanNeeded { |
| 844 | RSL_CHANNEED_ANY ('00'B), |
| 845 | RSL_CHANNEED_SDCCH ('01'B), |
| 846 | RSL_CHANNEED_TCH_F ('10'B), |
| 847 | RSL_CHANNEED_TCH_ForH ('11'B) |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 848 | } with { variant "FIELDLENGTH(2)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 849 | type record RSL_IE_ChanNeeded { |
| 850 | uint6_t reserved, |
| 851 | RSL_ChanNeeded chan_needed |
| 852 | } |
| 853 | |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 854 | /* 9.3.41 CB Command Type */ |
| 855 | type enumerated RSL_CbCommand { |
| 856 | RSL_CB_CMD_NORMAL ('0000'B), |
| 857 | RSL_CB_CMD_SCHEDULE ('1000'B), |
| 858 | RSL_CB_CMD_DEFAULT ('1110'B), |
| 859 | RSL_CB_CMD_NULL ('1111'B) |
| 860 | } with { variant "FIELDLENGTH(4)" }; |
| 861 | type record RSL_IE_CbCommandType { |
| 862 | RSL_CbCommand command, |
| 863 | boolean default_bcast_null, |
| 864 | BIT1 spare, |
| 865 | uint2_t last_block |
| 866 | }; |
| 867 | template (value) RSL_IE_CbCommandType ts_RSL_IE_CbCmdType(RSL_CbCommand cmd := RSL_CB_CMD_NORMAL, |
| 868 | uint2_t last_block := 1, |
| 869 | boolean def_bcast_null := true) := { |
| 870 | command := cmd, |
| 871 | default_bcast_null := def_bcast_null, |
| 872 | spare := '0'B, |
| 873 | last_block := last_block |
| 874 | } |
| 875 | |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 876 | /* 9.4.43 CBCH Load Information */ |
| 877 | type record RSL_IE_CbchLoadInfo { |
| 878 | boolean overflow, |
| 879 | BIT3 spare, |
| 880 | uint4_t slot_count |
| 881 | }; |
| 882 | template RSL_IE_CbchLoadInfo tr_CbchLoadInfo(template boolean overflow, |
| 883 | template uint4_t slot_count) := { |
| 884 | overflow := overflow, |
| 885 | spare := ?, |
| 886 | slot_count := slot_count |
| 887 | } |
| 888 | template (value) RSL_IE_CbchLoadInfo ts_CbchLoadInfo(boolean overflow, uint4_t slot_count) := { |
| 889 | overflow := overflow, |
| 890 | spare := '000'B, |
| 891 | slot_count := slot_count |
| 892 | } |
| 893 | |
Harald Welte | e33e515 | 2023-04-09 23:29:48 +0200 | [diff] [blame] | 894 | /* 9.3.45 Group Call Reference */ |
| 895 | type record RSL_IE_GroupCallReference { |
| 896 | uint8_t len, |
| 897 | GroupCallRef group_or_bcast_call_ref |
| 898 | } with { |
| 899 | variant (len) "LENGTHTO(group_or_bcast_call_ref)" |
| 900 | }; |
| 901 | template (value) RSL_IE_GroupCallReference ts_GroupCallRef(template (value) GroupCallRef gcr) := { |
| 902 | len := 0, // overwritten |
| 903 | group_or_bcast_call_ref := gcr |
| 904 | } |
| 905 | template (present) RSL_IE_GroupCallReference tr_GroupCallRef(template (present) GroupCallRef gcr := ?) := { |
| 906 | len := ?, |
| 907 | group_or_bcast_call_ref := gcr |
| 908 | } |
| 909 | |
| 910 | /* 9.3.46 Channel description */ |
| 911 | type record RSL_IE_GroupChannelDescription { |
| 912 | uint8_t len, |
| 913 | octetstring chan_desc |
| 914 | } with { |
| 915 | variant (len) "LENGTHTO(chan_desc)" |
| 916 | }; |
| 917 | template (value) RSL_IE_GroupChannelDescription ts_GroupChanDesc(template (value) octetstring cd) := { |
| 918 | len := 0, // overwritten |
| 919 | chan_desc := cd |
| 920 | } |
| 921 | template (present) RSL_IE_GroupChannelDescription tr_GroupChanDesc(template (present) octetstring cd) := { |
| 922 | len := ?, |
| 923 | chan_desc := cd |
| 924 | } |
| 925 | |
| 926 | /* 9.3.47 NCH DRX Information */ |
| 927 | type record RSL_IE_NchDrxInformation { |
| 928 | uint8_t len, |
| 929 | BIT2 spare, |
| 930 | BIT1 nln_status, |
| 931 | BIT3 emlpp_priority, |
| 932 | BIT2 nln |
| 933 | } with { |
| 934 | variant (len) "LENGTHTO(spare,nln_status,emlpp_priority,nln)" |
| 935 | }; |
| 936 | |
| 937 | /* 9.3.48 Command Indicator */ |
| 938 | type enumerated RSL_CommandIndicator { |
| 939 | CMD_IND_START (0), |
| 940 | CMD_IND_STOP (1) |
| 941 | } with { variant "FIELDLENGTH(8)" }; |
| 942 | type record RSL_IE_CommandIndicator { |
| 943 | uint8_t len, |
| 944 | RSL_CommandIndicator command_value |
| 945 | } with { |
| 946 | variant (len) "LENGTHTO(command_value)" |
| 947 | }; |
| 948 | template (value) RSL_IE_CommandIndicator ts_CommandInd(template (value) RSL_CommandIndicator ci) := { |
| 949 | len := 0, // overwritten |
| 950 | command_value := ci |
| 951 | } |
| 952 | template (present) RSL_IE_CommandIndicator tr_CommandInd(template (present) RSL_CommandIndicator ci) := { |
| 953 | len := ?, |
| 954 | command_value := ci |
| 955 | } |
| 956 | |
| 957 | /* 9.3.50 UIC */ |
| 958 | type record RSL_IE_Uic { |
| 959 | uint8_t len, |
| 960 | BIT2 spare, |
| 961 | uint6_t uic |
| 962 | } with { |
| 963 | variant (len) "LENGTHTO(spare,uic)" |
| 964 | }; |
| 965 | |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 966 | /* 9.3.52, 3GPP TS 44.018 10.5.2.21aa */ |
| 967 | type record RSL_IE_MultirateCfg { |
| 968 | uint8_t len, |
| 969 | uint3_t mr_speech_ver, |
| 970 | boolean nscb, |
| 971 | boolean icmi, |
| 972 | BIT1 spare, |
| 973 | uint2_t start_mode, |
Vadim Yanitskiy | f14e696 | 2022-09-14 15:18:06 +0700 | [diff] [blame] | 974 | BIT8 codec_modes, |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 975 | octetstring parameters |
| 976 | } with { |
Vadim Yanitskiy | f14e696 | 2022-09-14 15:18:06 +0700 | [diff] [blame] | 977 | variant (len) "LENGTHTO(mr_speech_ver,nscb,icmi,spare,start_mode,codec_modes,parameters)" |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 978 | }; |
| 979 | template (value) RSL_IE_MultirateCfg ts_RSL_MultirateCfg(boolean icmi := true, uint2_t start_mode := 0, |
Vadim Yanitskiy | 0345d20 | 2022-09-14 16:13:40 +0700 | [diff] [blame] | 980 | BIT8 codec_modes := '00000100'B /* 5,90k */, |
| 981 | octetstring params := ''O) := { |
Vadim Yanitskiy | 9e0139b | 2022-09-14 17:41:29 +0700 | [diff] [blame] | 982 | len := 2 + lengthof(params), |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 983 | mr_speech_ver := 1, |
| 984 | nscb := false, |
| 985 | icmi := icmi, |
| 986 | spare := '0'B, |
| 987 | start_mode := start_mode, |
Vadim Yanitskiy | f14e696 | 2022-09-14 15:18:06 +0700 | [diff] [blame] | 988 | codec_modes := codec_modes, |
Vadim Yanitskiy | 0345d20 | 2022-09-14 16:13:40 +0700 | [diff] [blame] | 989 | parameters := params |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 990 | } |
| 991 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 992 | /* 9.3.53 */ |
| 993 | type record RSL_IE_MultirateCtrl { |
| 994 | uint3_t spare, |
| 995 | boolean od, |
| 996 | boolean pre, |
| 997 | uint2_t rae, |
| 998 | boolean tfo |
| 999 | } |
| 1000 | |
| 1001 | type enumerated RSL_IE_SysinfoType { |
| 1002 | RSL_SYSTEM_INFO_8 ('00000000'B), |
| 1003 | RSL_SYSTEM_INFO_1 ('00000001'B), |
| 1004 | RSL_SYSTEM_INFO_2 ('00000010'B), |
| 1005 | RSL_SYSTEM_INFO_3 ('00000011'B), |
| 1006 | RSL_SYSTEM_INFO_4 ('00000100'B), |
| 1007 | RSL_SYSTEM_INFO_5 ('00000101'B), |
| 1008 | RSL_SYSTEM_INFO_6 ('00000110'B), |
| 1009 | RSL_SYSTEM_INFO_7 ('00000111'B), |
| 1010 | RSL_SYSTEM_INFO_16 ('00001000'B), |
| 1011 | RSL_SYSTEM_INFO_17 ('00001001'B), |
| 1012 | RSL_SYSTEM_INFO_2bis ('00001010'B), |
| 1013 | RSL_SYSTEM_INFO_2ter ('00001011'B), |
| 1014 | RSL_SYSTEM_INFO_5bis ('00001101'B), |
| 1015 | RSL_SYSTEM_INFO_5ter ('00001110'B), |
| 1016 | RSL_SYSTEM_INFO_10 ('00001111'B), |
| 1017 | RSL_EXT_MEAS_ORDER ('01000111'B), |
| 1018 | RSL_MEAS_INFO ('01001000'B), |
| 1019 | RSL_SYSTEM_INFO_13 ('00101000'B), |
| 1020 | RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| 1021 | RSL_SYSTEM_INFO_2quater ('00101001'B), |
| 1022 | RSL_SYSTEM_INFO_9 ('00101010'B), |
| 1023 | RSL_SYSTEM_INFO_18 ('00101011'B), |
| 1024 | RSL_SYSTEM_INFO_19 ('00101100'B), |
| 1025 | RSL_SYSTEM_INFO_20 ('00101101'B) |
| 1026 | } with { variant "FIELDLENGTH(8)" } |
| 1027 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1028 | type record RSL_IE_IPA_ConnectionStats { |
| 1029 | uint8_t len, |
| 1030 | uint32_t tx_packets, |
| 1031 | uint32_t tx_octets, |
| 1032 | uint32_t rx_packets, |
| 1033 | uint32_t rx_octets, |
| 1034 | uint32_t lost_packets, |
| 1035 | uint32_t jitter, |
| 1036 | uint32_t avg_delay |
| 1037 | } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| 1038 | |
| 1039 | type enumerated RSL_IPA_SpeechMode { |
| 1040 | RSL_IPA_SPM_SENDRECV ('00'B), |
| 1041 | RSL_IPA_SPM_RECVONLY ('01'B), |
| 1042 | RSL_IPA_SPM_SENDONLY ('10'B), |
| 1043 | RSL_IPA_SPM_RESERVED ('11'B) |
| 1044 | } with { variant "FIELDLENGTH(2)" } |
| 1045 | |
| 1046 | type enumerated RSL_IPA_Codec { |
| 1047 | RSL_IPA_CODEC_FR ('0000'B), |
| 1048 | RSL_IPA_CODEC_EFR ('0001'B), |
| 1049 | RSL_IPA_CODEC_AMR_F ('0010'B), |
| 1050 | RSL_IPA_CODEC_HR ('0011'B), |
| 1051 | RSL_IPA_CODEC_AMR_H ('0101'B), |
| 1052 | RSL_IPA_CODEC_RTP_PT ('1111'B) |
| 1053 | } with { variant "FIELDLENGTH(4)" } |
| 1054 | |
| 1055 | type record RSL_IE_IPA_SpeechMode { |
| 1056 | BIT2 reserved, |
| 1057 | RSL_IPA_SpeechMode mode, |
| 1058 | RSL_IPA_Codec codec |
| 1059 | } |
| 1060 | |
Oliver Smith | bc392a8 | 2023-04-17 14:06:42 +0200 | [diff] [blame] | 1061 | type enumerated RSL_IPA_RTP_CSD_FMT_D { |
| 1062 | RSL_IPA_RTP_CSD_EXT_TRAU ('0000'B), |
| 1063 | RSL_IPA_RTP_CSD_NON_TRAU ('0001'B), |
| 1064 | RSL_IPA_RTP_CSD_TRAU_BTS ('0010'B), |
| 1065 | RSL_IPA_RTP_CSD_IWF_FREE ('0011'B) |
| 1066 | } with { variant "FIELDLENGTH(4)" } |
| 1067 | |
| 1068 | type enumerated RSL_IPA_RTP_CSD_FMT_IR { |
| 1069 | RSL_IPA_RTP_CSD_8k ('0000'B), |
| 1070 | RSL_IPA_RTP_CSD_16k ('0001'B), |
| 1071 | RSL_IPA_RTP_CSD_32k ('0010'B), |
| 1072 | RSL_IPA_RTP_CSD_64 ('0011'B) |
| 1073 | } with { variant "FIELDLENGTH(4)" } |
| 1074 | |
| 1075 | type record RSL_IE_IPA_RTP_CSD_FMT { |
| 1076 | RSL_IPA_RTP_CSD_FMT_IR ir, |
| 1077 | RSL_IPA_RTP_CSD_FMT_D d |
| 1078 | } |
| 1079 | |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1080 | /* 9.3.20 */ |
| 1081 | type enumerated RSL_IE_ReleaseMode { |
| 1082 | RSL_REL_MODE_NORMAL ('00'B), |
| 1083 | REL_REL_MODE_LOCAL ('01'B) |
| 1084 | } |
| 1085 | |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1086 | type record RSL_IE_OSMO_TrainingSequence { |
| 1087 | uint8_t len, |
| 1088 | uint8_t tsc_set, |
| 1089 | uint8_t tsc |
| 1090 | } with { variant (len) "LENGTHTO(tsc_set,tsc)" } |
| 1091 | |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 1092 | type record RSL_IE_OSMO_RepAcchCap { |
| 1093 | uint8_t len, |
| 1094 | BIT1 rfu ('0'B), |
| 1095 | uint3_t rxqual, |
| 1096 | boolean ul_sacch, |
| 1097 | boolean dl_sacch, |
| 1098 | boolean dl_facch_all, |
| 1099 | boolean dl_facch_cmd |
| 1100 | } with { variant (len) "LENGTHTO(rfu,rxqual,ul_sacch,dl_sacch,dl_facch_all,dl_facch_cmd)" } |
| 1101 | |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 1102 | type record RSL_IE_OSMO_TopAcchCap { |
| 1103 | uint8_t len, |
| 1104 | boolean sacch_enable, |
| 1105 | boolean facch_enable, |
| 1106 | uint3_t rxqual, |
| 1107 | uint3_t overpower_db |
| 1108 | } with { variant (len) "LENGTHTO(sacch_enable,facch_enable,rxqual,overpower_db)" } |
| 1109 | |
Vadim Yanitskiy | 66d3c33 | 2021-11-06 18:18:13 +0300 | [diff] [blame] | 1110 | template (value) RSL_IE_OSMO_TopAcchCap |
| 1111 | ts_RSL_IE_OSMO_TopAcchCap(template (value) uint3_t overpower := 2, |
| 1112 | template (value) uint3_t rxqual := 4, |
| 1113 | boolean facch_enable := true, |
| 1114 | boolean sacch_enable := true) := { |
| 1115 | len := 0, /* overwritten */ |
| 1116 | sacch_enable := sacch_enable, |
| 1117 | facch_enable := facch_enable, |
| 1118 | rxqual := rxqual, |
| 1119 | overpower_db := overpower |
| 1120 | }; |
| 1121 | template RSL_IE_OSMO_TopAcchCap |
| 1122 | tr_RSL_IE_OSMO_TopAcchCap(template (present) uint3_t overpower := ?, |
| 1123 | template (present) uint3_t rxqual := ?, |
| 1124 | template (present) boolean facch_enable := ?, |
| 1125 | template (present) boolean sacch_enable := ?) := { |
| 1126 | len := ?, /* overwritten */ |
| 1127 | sacch_enable := sacch_enable, |
| 1128 | facch_enable := facch_enable, |
| 1129 | rxqual := rxqual, |
| 1130 | overpower_db := overpower |
| 1131 | }; |
| 1132 | |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 1133 | type record RSL_IE_OSMO_Osmux_CID { |
| 1134 | uint8_t len, |
| 1135 | uint8_t cid |
| 1136 | } with { variant (len) "LENGTHTO(cid)" } |
| 1137 | |
| 1138 | template (present) RSL_IE_OSMO_Osmux_CID |
| 1139 | tr_RSL_IE_OSMO_Osmux_CID(template (present) uint8_t osmux_cid := ?) := { |
| 1140 | len := ?, /* overwritten */ |
| 1141 | cid := osmux_cid |
| 1142 | }; |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 1143 | function f_tr_RSL_IE_OSMO_Osmux_CID(template uint8_t osmux_cid := *) |
| 1144 | return template RSL_IE_OSMO_Osmux_CID { |
| 1145 | var template RSL_IE_OSMO_Osmux_CID ie := omit; |
| 1146 | if (not istemplatekind(osmux_cid, "omit")) { |
| 1147 | ie := tr_RSL_IE_OSMO_Osmux_CID(osmux_cid); |
| 1148 | } |
| 1149 | return ie; |
| 1150 | } |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 1151 | template (value) RSL_IE_OSMO_Osmux_CID |
| 1152 | ts_RSL_IE_OSMO_Osmux_CID(template (value) uint8_t osmux_cid) := { |
| 1153 | len := 0, /* overwritten */ |
| 1154 | cid := osmux_cid |
| 1155 | }; |
| 1156 | |
| 1157 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1158 | /* union of all IE bodies */ |
| 1159 | type union RSL_IE_Body { |
| 1160 | RslChannelNr chan_nr, |
| 1161 | RslLinkId link_id, |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 1162 | RSL_L16V l3_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1163 | RSL_LV rlm_cause, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1164 | RSL_IE_ReleaseMode release_mode, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1165 | RSL_IE_ActivationType act_type, |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 1166 | RSL_IE_ChannelIdent chan_ident, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1167 | RSL_IE_ChannelMode chan_mode, |
| 1168 | uint8_t handover_ref, |
| 1169 | RSL_IE_BS_Power bs_power, |
Vadim Yanitskiy | 802508e | 2020-11-11 07:25:47 +0700 | [diff] [blame] | 1170 | RSL_LV bs_power_params, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1171 | RSL_IE_MS_Power ms_power, |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 1172 | RSL_IE_MS_Power_Parameters ms_power_params, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1173 | uint8_t timing_adv, |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 1174 | RSL_IE_MultirateCfg multirate_cfg, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1175 | RSL_IE_MultirateCtrl multirate_ctrl, |
Harald Welte | a670615 | 2019-05-19 20:38:18 +0200 | [diff] [blame] | 1176 | uint8_t msg_id, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1177 | RSL_IE_FrameNumber frame_nr, |
| 1178 | RSL_IE_Cause cause, |
| 1179 | uint8_t access_delay, |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 1180 | RSL_IE_RachLoad rach_load, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1181 | uint8_t meas_res_nr, |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1182 | uint8_t ms_timing_offset, |
| 1183 | RSL_IE_UplinkMeas uplink_meas, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1184 | RSL_IE_L1Info l1_info, |
| 1185 | RSL_IE_SysinfoType sysinfo_type, |
| 1186 | uint16_t paging_load, |
| 1187 | uint8_t paging_group, |
| 1188 | RSL_IE_ChanNeeded chan_needed, |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 1189 | RSL_IE_CbCommandType cb_cmd_type, |
| 1190 | RSL_LV smscb_message, |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 1191 | RSL_IE_CbchLoadInfo cbch_load_info, |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 1192 | RSL_IE_ResourceInfo resource_info, |
Harald Welte | c8d363c | 2019-05-19 20:36:48 +0200 | [diff] [blame] | 1193 | RSL_SacchInfo sacch_info, |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 1194 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1195 | RSL_IE_StartingTime starting_time, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1196 | RSL_IE_EncryptionInfo encr_info, |
Harald Welte | a3ff670 | 2019-05-20 20:03:50 +0200 | [diff] [blame] | 1197 | uint8_t smscb_chan_ind, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1198 | RSL_IE_RequestRef req_ref, |
| 1199 | RSL_LV full_imm_ass_info, |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 1200 | MobileIdentityLV ms_identity, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1201 | |
Harald Welte | e33e515 | 2023-04-09 23:29:48 +0200 | [diff] [blame] | 1202 | RSL_IE_GroupCallReference group_call_ref, |
| 1203 | RSL_IE_GroupChannelDescription group_chan_desc, |
| 1204 | RSL_IE_NchDrxInformation nch_drx_info, |
| 1205 | RSL_IE_CommandIndicator cmd_indicator, |
| 1206 | RSL_IE_Uic uic, |
| 1207 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1208 | uint16_t ipa_conn_id, |
| 1209 | uint16_t ipa_local_port, |
| 1210 | uint16_t ipa_remote_port, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 1211 | OCT4 ipa_local_ip, |
| 1212 | OCT4 ipa_remote_ip, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1213 | uint8_t ipa_rtp_pt, |
| 1214 | uint8_t ipa_rtp_pt2, |
| 1215 | RSL_IE_IPA_ConnectionStats ipa_stats, |
| 1216 | RSL_IE_IPA_SpeechMode ipa_speech_mode, |
Oliver Smith | bc392a8 | 2023-04-17 14:06:42 +0200 | [diff] [blame] | 1217 | RSL_IE_IPA_RTP_CSD_FMT ipa_rtp_csd_fmt, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1218 | |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1219 | RSL_IE_OSMO_TrainingSequence osmo_training_sequence, |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 1220 | RSL_IE_OSMO_RepAcchCap rep_acch_cap, |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 1221 | RSL_IE_OSMO_TopAcchCap top_acch_cap, |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 1222 | RSL_IE_OSMO_Osmux_CID osmux_cid, |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1223 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1224 | RSL_LV other |
| 1225 | } |
| 1226 | |
| 1227 | type record RSL_IE { |
| 1228 | RSL_IE_Type iei, |
| 1229 | RSL_IE_Body body |
| 1230 | } with { variant (body) "CROSSTAG( |
| 1231 | chan_nr, iei = RSL_IE_CHAN_NR; |
| 1232 | link_id, iei = RSL_IE_LINK_IDENT; |
| 1233 | l3_info, iei = RSL_IE_L3_INFO; |
| 1234 | rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| 1235 | release_mode, iei = RSL_IE_RELEASE_MODE; |
| 1236 | act_type, iei = RSL_IE_ACT_TYPE; |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 1237 | chan_ident, iei = RSL_IE_CHAN_IDENT; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1238 | chan_mode, iei = RSL_IE_CHAN_MODE; |
| 1239 | handover_ref, iei = RSL_IE_HANDO_REF; |
| 1240 | bs_power, iei = RSL_IE_BS_POWER; |
Vadim Yanitskiy | 802508e | 2020-11-11 07:25:47 +0700 | [diff] [blame] | 1241 | bs_power_params, iei = RSL_IE_BS_POWER_PARAM; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1242 | ms_power, iei = RSL_IE_MS_POWER; |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 1243 | ms_power_params, iei = RSL_IE_MS_POWER_PARAM; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1244 | timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
Pau Espin Pedrol | f7634dc | 2022-09-02 17:56:00 +0200 | [diff] [blame] | 1245 | multirate_cfg, iei = RSL_IE_MR_CONFIG; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1246 | multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
Harald Welte | a670615 | 2019-05-19 20:38:18 +0200 | [diff] [blame] | 1247 | msg_id, iei = RSL_IE_MSG_ID; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1248 | |
| 1249 | frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| 1250 | cause, iei = RSL_IE_CAUSE; |
| 1251 | access_delay, iei = RSL_IE_ACCESS_DELAY; |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 1252 | rach_load, iei = RSL_IE_RACH_LOAD; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1253 | meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1254 | ms_timing_offset, iei = RSL_IE_MS_TIMING_OFFSET; |
| 1255 | uplink_meas, iei = RSL_IE_UPLINK_MEAS; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1256 | l1_info, iei = RSL_IE_L1_INFO; |
| 1257 | sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| 1258 | paging_load, iei = RSL_IE_PAGING_LOAD; |
| 1259 | paging_group, iei = RSL_IE_PAGING_GROUP; |
| 1260 | chan_needed, iei = RSL_IE_CHAN_NEEDED; |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 1261 | cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; |
| 1262 | smscb_message, iei = RSL_IE_SMSCB_MSG; |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 1263 | cbch_load_info, iei = RSL_IE_CBCH_LOAD_INFO; |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 1264 | resource_info, iei = RSL_IE_RESOURCE_INFO; |
Harald Welte | c8d363c | 2019-05-19 20:36:48 +0200 | [diff] [blame] | 1265 | sacch_info, iei = RSL_IE_SACCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1266 | starting_time, iei = RSL_IE_STARTNG_TIME; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1267 | encr_info, iei = RSL_IE_ENCR_INFO; |
Harald Welte | a3ff670 | 2019-05-20 20:03:50 +0200 | [diff] [blame] | 1268 | smscb_chan_ind, iei = RSL_IE_SMSCB_CHAN_INDICATOR; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1269 | |
| 1270 | req_ref, iei = RSL_IE_REQ_REFERENCE; |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 1271 | full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| 1272 | ms_identity, iei = RSL_IE_MS_IDENTITY; |
| 1273 | other, iei = RSL_IE_FULL_BCCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1274 | |
Harald Welte | e33e515 | 2023-04-09 23:29:48 +0200 | [diff] [blame] | 1275 | group_call_ref, iei = RSL_IE_GROUP_CALL_REF; |
| 1276 | group_chan_desc, iei = RSL_IE_GROUP_CHAN_DESC; |
| 1277 | nch_drx_info, iei = RSL_IE_NCH_DRX_INFO; |
| 1278 | cmd_indicator, iei = RSL_IE_CMD_INDICATOR; |
| 1279 | uic, iei = RSL_IE_UIC; |
| 1280 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1281 | ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| 1282 | ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| 1283 | ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| 1284 | ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| 1285 | ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| 1286 | ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| 1287 | ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| 1288 | ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| 1289 | ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
Oliver Smith | bc392a8 | 2023-04-17 14:06:42 +0200 | [diff] [blame] | 1290 | ipa_rtp_csd_fmt, iei = RSL_IE_IPAC_RTP_CSD_FMT; |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1291 | |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1292 | osmo_training_sequence, iei = RSL_IE_OSMO_TRAINING_SEQUENCE; |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 1293 | rep_acch_cap, iei = RSL_IE_OSMO_REP_ACCH_CAP; |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 1294 | top_acch_cap, iei = RSL_IE_OSMO_TOP_ACCH_CAP; |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 1295 | osmux_cid, iei = RSL_IE_OSMO_OSMUX_CID; |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1296 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1297 | other, OTHERWISE; |
| 1298 | )" }; |
| 1299 | |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1300 | /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| 1301 | * that it needs to set for a given union-choice (body). So we have to explicitly |
| 1302 | * specify the IEI by the caller :( */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1303 | template (value) RSL_IE t_RSL_IE(RSL_IE_Type iei, template (value) RSL_IE_Body body) := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1304 | iei := iei, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1305 | body := body |
| 1306 | } |
| 1307 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1308 | template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| 1309 | iei := ?, /* overwritten? */ |
| 1310 | body := body |
| 1311 | } |
| 1312 | |
| 1313 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1314 | type record of RSL_IE RSL_IE_List; |
| 1315 | |
| 1316 | type record RSL_Message { |
| 1317 | RSL_MessageDiscriminator msg_disc, |
| 1318 | RSL_MessageType msg_type, |
| 1319 | RSL_IE_List ies optional |
| 1320 | } |
| 1321 | |
| 1322 | external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| 1323 | with { extension "prototype(convert) encode(RAW)" }; |
| 1324 | external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| 1325 | with { extension "prototype(convert) decode(RAW)" }; |
| 1326 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1327 | template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1328 | RSL_MessageType m_type) := { |
| 1329 | msg_disc := m_disc, |
| 1330 | msg_type := m_type, |
| 1331 | ies := * |
| 1332 | } |
| 1333 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1334 | template (value) RSL_Message ts_RSL_MsgDiscType(template (value) RSL_MessageDiscriminator m_disc, |
| 1335 | template (value) RSL_MessageType msg_type, |
| 1336 | template (omit) RSL_IE_List ies := omit) := { |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1337 | msg_disc := m_disc, |
| 1338 | msg_type := msg_type, |
| 1339 | ies := ies |
| 1340 | } |
| 1341 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1342 | template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| 1343 | msg_disc := ?, |
| 1344 | msg_type := msg_type, |
| 1345 | ies := * |
| 1346 | } |
| 1347 | |
| 1348 | /* Common Channel Management */ |
| 1349 | template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1350 | msg_disc := { RSL_MDISC_CCHAN, ? } |
| 1351 | } |
| 1352 | |
| 1353 | /* RLL */ |
| 1354 | template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1355 | msg_disc := { RSL_MDISC_RLL, true } |
| 1356 | } |
| 1357 | |
| 1358 | /* Dedicated Channel Management */ |
| 1359 | template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1360 | msg_disc := { RSL_MDISC_DCHAN, ? } |
| 1361 | } |
| 1362 | |
Vadim Yanitskiy | bf2aa49 | 2022-06-01 00:28:38 +0600 | [diff] [blame] | 1363 | /* TRX Management */ |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1364 | template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1365 | msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| 1366 | } |
| 1367 | |
| 1368 | |
| 1369 | /* dedicated channel or RLL */ |
| 1370 | template RSL_Message tr_RSL_MsgTypeDR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
Harald Welte | e540822 | 2018-01-29 21:57:58 +0100 | [diff] [blame] | 1371 | msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,?}, {RSL_MDISC_IPACCESS,false}) |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1372 | } |
| 1373 | |
| 1374 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1375 | /* 8.3.1 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1376 | template (value) RSL_Message ts_RSL_DATA_REQ(template (value) RslChannelNr chan_nr, |
| 1377 | template (value) RslLinkId link_id, |
| 1378 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1379 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 1380 | msg_type := RSL_MT_DATA_REQ, |
| 1381 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1382 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1383 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1384 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1385 | } |
| 1386 | } |
| 1387 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1388 | template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| 1389 | template RslLinkId link_id := ?, |
| 1390 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1391 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, true), |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1392 | msg_type := RSL_MT_DATA_REQ, |
| 1393 | ies :={ |
| 1394 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1395 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1396 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1397 | } |
| 1398 | } |
| 1399 | |
| 1400 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1401 | /* 8.3.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1402 | template (value) RSL_Message ts_RSL_DATA_IND(template (value) RslChannelNr chan_nr, |
| 1403 | template (value) RslLinkId link_id, |
| 1404 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1405 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 1406 | msg_type := RSL_MT_DATA_IND, |
| 1407 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1408 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1409 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1410 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1411 | } |
| 1412 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1413 | template RSL_Message tr_RSL_DATA_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 1414 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1415 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, true), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1416 | msg_type := RSL_MT_DATA_IND, |
| 1417 | ies :={ |
| 1418 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1419 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1420 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1421 | } |
| 1422 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1423 | |
| 1424 | /* 8.3.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1425 | template (value) RSL_Message ts_RSL_ERROR_IND(template (value) RslChannelNr chan_nr, |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1426 | template (value) RslLinkId link_id, |
| 1427 | template (value) octetstring rlm_cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1428 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1429 | msg_type := RSL_MT_ERROR_IND, |
| 1430 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1431 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1432 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1433 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{rlm_cause := ts_RSL_LV(rlm_cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1434 | } |
| 1435 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1436 | template RSL_Message tr_RSL_ERROR_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1437 | template octetstring rlm_cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1438 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1439 | msg_type := RSL_MT_ERROR_IND, |
| 1440 | ies :={ |
| 1441 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1442 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1443 | tr_RSL_IE(RSL_IE_Body:{rlm_cause := tr_RSL_LV(rlm_cause)}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1444 | } |
| 1445 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1446 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1447 | /* 8.3.4 BTS <- BSC */ |
| 1448 | template (value) RSL_Message ts_RSL_EST_REQ(template (value) RslChannelNr chan_nr, |
| 1449 | template (value) RslLinkId link_id) := { |
| 1450 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1451 | msg_type := RSL_MT_EST_REQ, |
| 1452 | ies := { |
| 1453 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1454 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| 1455 | } |
| 1456 | } |
| 1457 | template RSL_Message tr_RSL_EST_REQ(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 1458 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1459 | msg_type := RSL_MT_EST_REQ, |
| 1460 | ies := { |
| 1461 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1462 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1463 | } |
| 1464 | } |
| 1465 | |
| 1466 | /* 8.3.5 BTS -> BSC */ |
| 1467 | template (value) RSL_Message ts_RSL_EST_CONF(template (value) RslChannelNr chan_nr, |
| 1468 | template (value) RslLinkId link_id) := { |
| 1469 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1470 | msg_type := RSL_MT_EST_CONF, |
| 1471 | ies := { |
| 1472 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1473 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| 1474 | } |
| 1475 | } |
| 1476 | template RSL_Message tr_RSL_EST_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 1477 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1478 | msg_type := RSL_MT_EST_CONF, |
| 1479 | ies := { |
| 1480 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1481 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1482 | } |
| 1483 | } |
| 1484 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1485 | /* 8.3.6 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1486 | template (value) RSL_Message ts_RSL_EST_IND(template (value) RslChannelNr chan_nr, |
| 1487 | template (value) RslLinkId link_id, |
| 1488 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1489 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1490 | msg_type := RSL_MT_EST_IND, |
| 1491 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1492 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1493 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1494 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1495 | } |
| 1496 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1497 | template RSL_Message tr_RSL_EST_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 1498 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1499 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1500 | msg_type := RSL_MT_EST_IND, |
| 1501 | ies := { |
| 1502 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1503 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1504 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1505 | } |
| 1506 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1507 | template RSL_Message tr_RSL_EST_IND_NOL3(template RslChannelNr chan_nr, template RslLinkId link_id) := |
| 1508 | { |
| 1509 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1510 | msg_type := RSL_MT_EST_IND, |
| 1511 | ies := { |
| 1512 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1513 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1514 | } |
| 1515 | } |
| 1516 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1517 | |
| 1518 | /* 8.3.7 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1519 | template (value) RSL_Message ts_RSL_REL_REQ(template (value) RslChannelNr chan_nr, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1520 | template (value) RslLinkId link_id, |
| 1521 | template (value) RSL_IE_ReleaseMode rel_mode := RSL_REL_MODE_NORMAL) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1522 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1523 | msg_type := RSL_MT_REL_REQ, |
| 1524 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1525 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1526 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1527 | t_RSL_IE(RSL_IE_RELEASE_MODE, RSL_IE_Body:{release_mode := rel_mode}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1528 | } |
| 1529 | } |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1530 | template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1531 | template RslLinkId link_id, |
| 1532 | template RSL_IE_ReleaseMode rel_mode := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1533 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1534 | msg_type := RSL_MT_REL_REQ, |
| 1535 | ies :={ |
| 1536 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1537 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1538 | tr_RSL_IE(RSL_IE_Body:{release_mode := rel_mode}) |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1539 | } |
| 1540 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1541 | |
| 1542 | /* 8.3.8 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1543 | template (value) RSL_Message ts_RSL_REL_CONF(template (value) RslChannelNr chan_nr, |
| 1544 | template (value) RslLinkId link_id) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1545 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1546 | msg_type := RSL_MT_REL_CONF, |
| 1547 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1548 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1549 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1550 | } |
| 1551 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1552 | template RSL_Message tr_RSL_REL_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1553 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1554 | msg_type := RSL_MT_REL_CONF, |
| 1555 | ies :={ |
| 1556 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1557 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1558 | } |
| 1559 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1560 | |
| 1561 | /* 8.3.9 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1562 | template (value) RSL_Message ts_RSL_REL_IND(template (value) RslChannelNr chan_nr, |
| 1563 | template (value) RslLinkId link_id) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1564 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1565 | msg_type := RSL_MT_REL_IND, |
| 1566 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1567 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1568 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1569 | } |
| 1570 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1571 | template RSL_Message tr_RSL_REL_IND(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1572 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1573 | msg_type := RSL_MT_REL_IND, |
| 1574 | ies :={ |
| 1575 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1576 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1577 | } |
| 1578 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1579 | |
| 1580 | /* 8.3.10 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1581 | template (value) RSL_Message ts_RSL_UNITDATA_REQ(template (value) RslChannelNr chan_nr, |
| 1582 | template (value) RslLinkId link_id, |
| 1583 | octetstring l3_info) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1584 | modifies ts_RSL_DATA_REQ := { |
| 1585 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 1586 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1587 | template RSL_Message tr_RSL_UNITDATA_REQ(template RslChannelNr chan_nr, |
| 1588 | template RslLinkId link_id, |
Vadim Yanitskiy | 8f98d3f | 2018-10-03 17:58:10 +0700 | [diff] [blame] | 1589 | template octetstring l3_info := ?) |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1590 | modifies tr_RSL_DATA_REQ := { |
| 1591 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 1592 | } |
| 1593 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1594 | |
| 1595 | /* 8.3.11 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1596 | template (value) RSL_Message ts_RSL_UNITDATA_IND(template (value) RslChannelNr chan_nr, |
| 1597 | template (value) RslLinkId link_id, |
| 1598 | octetstring l3_info) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1599 | modifies ts_RSL_DATA_IND := { |
| 1600 | msg_type := RSL_MT_UNIT_DATA_IND |
| 1601 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1602 | template RSL_Message tr_RSL_UNITDATA_IND(template RslChannelNr chan_nr, |
Vadim Yanitskiy | fabe0f2 | 2018-10-03 17:51:47 +0700 | [diff] [blame] | 1603 | template RslLinkId link_id, |
Vadim Yanitskiy | 8f98d3f | 2018-10-03 17:58:10 +0700 | [diff] [blame] | 1604 | template octetstring l3_info := ?) |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1605 | modifies tr_RSL_DATA_IND := { |
| 1606 | msg_type := RSL_MT_UNIT_DATA_IND |
| 1607 | } |
| 1608 | |
| 1609 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1610 | |
| 1611 | |
| 1612 | /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| 1613 | |
| 1614 | /* 8.4.1 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1615 | template (value) RSL_Message ts_RSL_CHAN_ACT(template (value) RslChannelNr chan_nr, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1616 | template (value) RSL_IE_ChannelMode mode, |
| 1617 | template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1618 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1619 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1620 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1621 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1622 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := at}), |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1623 | t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1624 | /* lots of optional IEs */ |
| 1625 | } |
| 1626 | } |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1627 | template RSL_Message tr_RSL_CHAN_ACT(template RslChannelNr chan_nr, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1628 | template RSL_IE_ChannelMode mode, |
| 1629 | template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1630 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1631 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1632 | ies :={ |
| 1633 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1634 | tr_RSL_IE(RSL_IE_Body:{act_type := at}), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1635 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1636 | /* lots of optional IEs */ |
| 1637 | * |
| 1638 | } |
| 1639 | } |
Vadim Yanitskiy | 58b1653 | 2021-10-09 20:27:39 +0600 | [diff] [blame] | 1640 | |
| 1641 | template (value) RSL_Message |
| 1642 | ts_RSL_CHAN_ACT_PDCH(template (value) RslChannelNr chan_nr) := { |
| 1643 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1644 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1645 | ies :={ |
| 1646 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1647 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := c_RSL_IE_ActType_PDCH}) |
| 1648 | } |
| 1649 | } |
| 1650 | template RSL_Message |
| 1651 | tr_RSL_CHAN_ACT_PDCH(template (present) RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1652 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1653 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1654 | ies :={ |
| 1655 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
Vadim Yanitskiy | 58b1653 | 2021-10-09 20:27:39 +0600 | [diff] [blame] | 1656 | tr_RSL_IE(RSL_IE_Body:{act_type := c_RSL_IE_ActType_PDCH}), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1657 | /* lots of optional IEs */ |
| 1658 | * |
| 1659 | } |
| 1660 | } |
| 1661 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1662 | |
| 1663 | /* 8.4.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1664 | template (value) RSL_Message ts_RSL_CHAN_ACT_ACK(template (value) RslChannelNr chan_nr, |
| 1665 | GsmFrameNumber fn) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1666 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1667 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 1668 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1669 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1670 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := ts_RSL_IE_FrameNumber(fn)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1671 | } |
| 1672 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1673 | template RSL_Message tr_RSL_CHAN_ACT_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1674 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1675 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 1676 | ies := { |
| 1677 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1678 | tr_RSL_IE(RSL_IE_Body:{frame_nr := ?}) |
| 1679 | } |
| 1680 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1681 | |
| 1682 | /* 8.4.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1683 | template (value) RSL_Message ts_RSL_CHAN_ACT_NACK(template (value) RslChannelNr chan_nr, |
| 1684 | RSL_Cause cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1685 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1686 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 1687 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1688 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1689 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1690 | } |
| 1691 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1692 | template RSL_Message tr_RSL_CHAN_ACT_NACK(template RslChannelNr chan_nr, |
| 1693 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1694 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1695 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 1696 | ies := { |
| 1697 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1698 | tr_RSL_IE(RSL_IE_Body:{cause := ?}) |
| 1699 | } |
| 1700 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1701 | |
| 1702 | /* 8.4.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1703 | template (value) RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1704 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1705 | msg_type := RSL_MT_CONN_FAIL, |
| 1706 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1707 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1708 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1709 | } |
| 1710 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1711 | template RSL_Message tr_RSL_CONN_FAIL_IND(template RslChannelNr chan_nr, |
| 1712 | template RSL_Cause cause := ?) := { |
| 1713 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1714 | msg_type := RSL_MT_CONN_FAIL, |
| 1715 | ies :={ |
| 1716 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1717 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1718 | } |
| 1719 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1720 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1721 | /* 8.4.5 BSC -> BTS */ |
| 1722 | template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| 1723 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1724 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1725 | ies := { |
| 1726 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1727 | } |
| 1728 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1729 | template (value) RSL_Message ts_RSL_DEACT_SACCH(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1730 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1731 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1732 | ies := { |
| 1733 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1734 | } |
| 1735 | } |
| 1736 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1737 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1738 | /* 8.4.6 BSC ->BTS */ |
| 1739 | template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, |
| 1740 | template RslLinkId link_id := ?, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 1741 | template RSL_AlgId alg := ?, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1742 | template octetstring key := ?, |
| 1743 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1744 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1745 | msg_type := RSL_MT_ENCR_CMD, |
| 1746 | ies := { |
| 1747 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1748 | tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1749 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1750 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1751 | } |
| 1752 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1753 | template (value) RSL_Message ts_RSL_ENCR_CMD(template (value) RslChannelNr chan_nr, |
| 1754 | template (value) RslLinkId link_id, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 1755 | template (value) RSL_AlgId alg, octetstring key, |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1756 | octetstring l3_info) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1757 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1758 | msg_type := RSL_MT_ENCR_CMD, |
| 1759 | ies := { |
| 1760 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1761 | t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := ts_RSL_IE_EncrInfo(alg, key)}), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1762 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1763 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1764 | } |
| 1765 | } |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1766 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1767 | template RSL_Message tr_RSL_MEAS_RES(template RslChannelNr chan_nr, |
| 1768 | template uint8_t meas_res_nr := ?, |
| 1769 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1770 | template RSL_IE_BS_Power bs_power := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1771 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1772 | msg_type := RSL_MT_MEAS_RES, |
| 1773 | ies := { |
| 1774 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1775 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1776 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1777 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1778 | * |
| 1779 | } |
| 1780 | } |
| 1781 | |
Vadim Yanitskiy | 7c29c4e | 2022-06-18 03:07:50 +0700 | [diff] [blame] | 1782 | /* Templates for a measurement report that lacks the measurement report |
Philipp Maier | dd841d3 | 2019-12-17 14:44:54 +0100 | [diff] [blame] | 1783 | * from the MS (l1_info, l3_info and ms timing offset */ |
Vadim Yanitskiy | 7c29c4e | 2022-06-18 03:07:50 +0700 | [diff] [blame] | 1784 | template (value) RSL_Message |
| 1785 | ts_RSL_MEAS_RES_EMPTY(template (value) RslChannelNr chan_nr, |
| 1786 | template (value) uint8_t meas_res_nr, |
| 1787 | template (value) RSL_IE_UplinkMeas ul_meas, |
| 1788 | template (value) RSL_IE_BS_Power bs_power) := { |
| 1789 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1790 | msg_type := RSL_MT_MEAS_RES, |
| 1791 | ies := { |
| 1792 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1793 | t_RSL_IE(RSL_IE_MEAS_RES_NR, RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1794 | t_RSL_IE(RSL_IE_UPLINK_MEAS, RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1795 | t_RSL_IE(RSL_IE_BS_POWER, RSL_IE_Body:{bs_power := bs_power}) |
| 1796 | } |
| 1797 | } |
| 1798 | template RSL_Message |
| 1799 | tr_RSL_MEAS_RES_EMPTY(template (present) RslChannelNr chan_nr, |
| 1800 | template uint8_t meas_res_nr := ?, |
| 1801 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1802 | template RSL_IE_BS_Power bs_power := ?) := { |
Philipp Maier | dd841d3 | 2019-12-17 14:44:54 +0100 | [diff] [blame] | 1803 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1804 | msg_type := RSL_MT_MEAS_RES, |
| 1805 | ies := { |
| 1806 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1807 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1808 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1809 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}) |
| 1810 | } |
| 1811 | } |
| 1812 | |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1813 | /* Osmocom specific template, require lots of optional fields to be present */ |
| 1814 | template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr, |
| 1815 | template uint8_t meas_res_nr := ?, |
| 1816 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1817 | template RSL_IE_BS_Power bs_power := ?, |
| 1818 | template RSL_IE_L1Info l1_info := ?, |
| 1819 | template octetstring l3_info := ?, |
| 1820 | template uint8_t ms_to := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1821 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1822 | msg_type := RSL_MT_MEAS_RES, |
| 1823 | ies := { |
| 1824 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1825 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1826 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1827 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1828 | tr_RSL_IE(RSL_IE_Body:{l1_info := l1_info}), |
| 1829 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 1830 | tr_RSL_IE(RSL_IE_Body:{ms_timing_offset := ms_to}) |
| 1831 | } |
| 1832 | } |
| 1833 | |
Neels Hofmeyr | afe2ea5 | 2021-11-24 15:16:12 +0100 | [diff] [blame] | 1834 | template (value) RSL_Message ts_RSL_MEAS_RES(template (value) RslChannelNr chan_nr, |
| 1835 | uint8_t meas_res_nr, |
| 1836 | template (value) RSL_IE_UplinkMeas ul_meas, |
| 1837 | template (value) RSL_IE_BS_Power bs_power, |
| 1838 | template (value) RSL_IE_L1Info l1_info, |
| 1839 | octetstring l3_info, |
| 1840 | uint8_t ms_to) := { |
| 1841 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1842 | msg_type := RSL_MT_MEAS_RES, |
| 1843 | ies := { |
| 1844 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1845 | t_RSL_IE(RSL_IE_MEAS_RES_NR, RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1846 | t_RSL_IE(RSL_IE_UPLINK_MEAS, RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1847 | t_RSL_IE(RSL_IE_BS_POWER, RSL_IE_Body:{bs_power := bs_power}), |
| 1848 | t_RSL_IE(RSL_IE_L1_INFO, RSL_IE_Body:{l1_info := l1_info}), |
| 1849 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}), |
| 1850 | t_RSL_IE(RSL_IE_MS_TIMING_OFFSET, RSL_IE_Body:{ms_timing_offset := ms_to}) |
| 1851 | } |
| 1852 | } |
| 1853 | |
Eric Wild | f1827a7 | 2019-05-28 17:37:35 +0200 | [diff] [blame] | 1854 | /* 8.4.9 BSC -> BTS */ |
| 1855 | template (value) RSL_Message ts_RSL_MODE_MODIFY_REQ(template (value) RslChannelNr chan_nr, |
| 1856 | template (value) RSL_IE_ChannelMode mode) := { |
| 1857 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1858 | msg_type := RSL_MT_MODE_MODIFY_REQ, |
| 1859 | ies :={ |
| 1860 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1861 | t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) |
| 1862 | /* lots of optional IEs */ |
| 1863 | } |
| 1864 | } |
| 1865 | template RSL_Message tr_RSL_MODE_MODIFY_REQ(template RslChannelNr chan_nr, |
| 1866 | template RSL_IE_ChannelMode mode) := { |
| 1867 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1868 | msg_type := RSL_MT_MODE_MODIFY_REQ, |
| 1869 | ies :={ |
| 1870 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1871 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1872 | /* lots of optional IEs */ |
| 1873 | * |
| 1874 | } |
| 1875 | } |
Neels Hofmeyr | 9f3e6ac | 2021-04-08 23:09:24 +0200 | [diff] [blame] | 1876 | |
| 1877 | template RSL_Message tr_RSL_MODE_MODIFY_REQ_with_OSMO_TSC(template RslChannelNr chan_nr, |
| 1878 | template RSL_IE_ChannelMode mode, |
| 1879 | template uint8_t tsc_set := ?, |
| 1880 | template uint8_t tsc := ?) := { |
| 1881 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1882 | msg_type := RSL_MT_MODE_MODIFY_REQ, |
| 1883 | ies := { |
| 1884 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1885 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1886 | tr_RSL_IE(RSL_IE_Body:{osmo_training_sequence := { |
| 1887 | len := ?, |
| 1888 | tsc_set := tsc_set, |
| 1889 | tsc := tsc |
| 1890 | } |
| 1891 | }) |
| 1892 | } |
| 1893 | }; |
Pau Espin Pedrol | 8539312 | 2022-09-02 17:56:25 +0200 | [diff] [blame] | 1894 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1895 | /* 8.4.10 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1896 | template (value) RSL_Message ts_RSL_MODE_MODIFY_ACK(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1897 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1898 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1899 | ies := { |
| 1900 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1901 | } |
| 1902 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1903 | template RSL_Message tr_RSL_MODE_MODIFY_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1904 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1905 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1906 | ies := { |
| 1907 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1908 | } |
| 1909 | } |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1910 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1911 | /* 8.4.11 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1912 | template (value) RSL_Message ts_RSL_MODE_MODIFY_NACK(template (value) RslChannelNr chan_nr, |
| 1913 | RSL_Cause cause) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1914 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1915 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1916 | ies := { |
| 1917 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1918 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1919 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1920 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1921 | template RSL_Message tr_RSL_MODE_MODIFY_NACK(template RslChannelNr chan_nr, |
| 1922 | template RSL_Cause cause) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1923 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1924 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1925 | ies := { |
| 1926 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1927 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1928 | } |
| 1929 | } |
| 1930 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1931 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1932 | /* 8.4.14: BTS <- BSC */ |
| 1933 | template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1934 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1935 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1936 | ies := { |
| 1937 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1938 | } |
| 1939 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1940 | template (value) RSL_Message ts_RSL_RF_CHAN_REL(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1941 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1942 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1943 | ies := { |
| 1944 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1945 | } |
| 1946 | } |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1947 | |
Philipp Maier | 4d1e9c9 | 2018-12-20 11:11:56 +0100 | [diff] [blame] | 1948 | /* 8.4.15: BTS <- BSC */ |
| 1949 | template (value) RSL_Message ts_RSL_MS_PWR_CTRL(template (value) RslChannelNr chan_nr, |
| 1950 | template (value) RSL_IE_MS_Power ms_power) := { |
| 1951 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1952 | msg_type := RSL_MT_MS_POWER_CONTROL, |
| 1953 | ies := { |
| 1954 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1955 | t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}) |
| 1956 | /* One optional IE: MS POWER PARAMETERS */ |
| 1957 | } |
| 1958 | } |
| 1959 | |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 1960 | template (value) RSL_Message ts_RSL_MS_PWR_CTRL_with_pp(template (value) RslChannelNr chan_nr, |
| 1961 | integer pwr_level) := { |
| 1962 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1963 | msg_type := RSL_MT_MS_POWER_CONTROL, |
| 1964 | ies := { |
| 1965 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1966 | t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(pwr_level)}), |
| 1967 | t_RSL_IE(RSL_IE_MS_POWER_PARAM, RSL_IE_Body:{ms_power_params := |
| 1968 | ts_RSL_IE_MS_Power_Parameters(''O)}) |
| 1969 | } |
| 1970 | } |
| 1971 | |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 1972 | /* 8.4.16: BTS <- BSC */ |
| 1973 | template (value) RSL_Message ts_RSL_BS_PWR_CTRL(template (value) RslChannelNr chan_nr, |
| 1974 | template (value) RSL_IE_BS_Power bs_power) := { |
| 1975 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1976 | msg_type := RSL_MT_BS_POWER_CONTROL, |
| 1977 | ies := { |
| 1978 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1979 | t_RSL_IE(RSL_IE_BS_POWER, RSL_IE_Body:{bs_power := bs_power}) |
| 1980 | /* One optional IE: BS POWER PARAMETERS */ |
| 1981 | } |
| 1982 | } |
Vadim Yanitskiy | 2a5a1ef | 2021-06-30 00:51:48 +0200 | [diff] [blame] | 1983 | template RSL_Message tr_RSL_BS_PWR_CTRL(template (present) RslChannelNr chan_nr, |
| 1984 | template (present) RSL_IE_BS_Power bs_power) := { |
| 1985 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1986 | msg_type := RSL_MT_BS_POWER_CONTROL, |
| 1987 | ies := { |
| 1988 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1989 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}) |
| 1990 | /* One optional IE: BS POWER PARAMETERS */ |
| 1991 | } |
| 1992 | } |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 1993 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1994 | /* 8.4.19 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1995 | template (value) RSL_Message ts_RSL_RF_CHAN_REL_ACK(template (value) RslChannelNr chan_nr) := |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1996 | ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1997 | RSL_MT_RF_CHAN_REL_ACK, |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1998 | { t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) }); |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1999 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2000 | template RSL_Message tr_RSL_RF_CHAN_REL_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2001 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2002 | msg_type := RSL_MT_RF_CHAN_REL_ACK, |
| 2003 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2004 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2005 | } |
| 2006 | } |
| 2007 | |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 2008 | /* 8.6.20 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2009 | template (value) RSL_Message ts_RSL_SACCH_INF_MOD(template (value) RslChannelNr chan_nr, |
| 2010 | RSL_IE_SysinfoType si_type, |
| 2011 | octetstring l3_info) := { |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 2012 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2013 | msg_type := RSL_MT_SACCH_INFO_MODIFY, |
| 2014 | ies := { |
| 2015 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2016 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 2017 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 2018 | } |
| 2019 | } |
| 2020 | |
Neels Hofmeyr | 378a49c | 2018-06-15 22:18:43 +0200 | [diff] [blame] | 2021 | /* 8.4.7 BTS -> BSC */ |
| 2022 | template (value) RSL_Message ts_RSL_HANDO_DET(template (value) RslChannelNr chan_nr) := { |
| 2023 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2024 | msg_type := RSL_MT_HANDO_DET, |
| 2025 | ies := { |
| 2026 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2027 | } |
| 2028 | } |
Vadim Yanitskiy | 7c2c10c | 2019-05-31 20:42:01 +0700 | [diff] [blame] | 2029 | template RSL_Message tr_RSL_HANDO_DET(template RslChannelNr chan_nr, |
| 2030 | template uint8_t acc_delay := ?) := { |
| 2031 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2032 | msg_type := RSL_MT_HANDO_DET, |
| 2033 | ies := { |
| 2034 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2035 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_delay}) |
| 2036 | } |
| 2037 | } |
Neels Hofmeyr | 378a49c | 2018-06-15 22:18:43 +0200 | [diff] [blame] | 2038 | |
Andreas Eversberg | 06c4463 | 2023-05-09 12:41:32 +0200 | [diff] [blame] | 2039 | /* 8.4.21 BTS -> BSC */ |
| 2040 | template (value) RSL_Message ts_RSL_TALKER_DET(template (value) RslChannelNr chan_nr) := { |
| 2041 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2042 | msg_type := RSL_MT_TALKER_DET, |
| 2043 | ies := { |
| 2044 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2045 | } |
| 2046 | } |
| 2047 | template RSL_Message tr_RSL_TALKER_DET(template RslChannelNr chan_nr, |
| 2048 | template uint8_t acc_delay := ?) := { |
| 2049 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2050 | msg_type := RSL_MT_TALKER_DET, |
| 2051 | ies := { |
| 2052 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2053 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_delay}) |
| 2054 | } |
| 2055 | } |
| 2056 | |
| 2057 | /* 8.4.22 BTS -> BSC */ |
| 2058 | template (value) RSL_Message ts_RSL_LISTENER_DET(template (value) RslChannelNr chan_nr) := { |
| 2059 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2060 | msg_type := RSL_MT_LISTENER_DET, |
| 2061 | ies := { |
| 2062 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2063 | } |
| 2064 | } |
| 2065 | template RSL_Message tr_RSL_LISTENER_DET(template RslChannelNr chan_nr, |
| 2066 | template uint8_t acc_delay := ?) := { |
| 2067 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2068 | msg_type := RSL_MT_LISTENER_DET, |
| 2069 | ies := { |
| 2070 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2071 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_delay}) |
| 2072 | } |
| 2073 | } |
| 2074 | |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 2075 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2076 | /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| 2077 | |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 2078 | /* 8.5.1 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2079 | template (value) RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, |
| 2080 | octetstring full_bcch_info) := { |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 2081 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2082 | msg_type := RSL_MT_BCCH_INFO, |
| 2083 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2084 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_BCCH(0)}), |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 2085 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 2086 | t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := ts_RSL_LV(full_bcch_info)}) |
| 2087 | } |
| 2088 | } |
Harald Welte | 09538f8 | 2019-08-01 09:50:25 +0200 | [diff] [blame] | 2089 | template RSL_Message tr_RSL_NO_BCCH_INFO(template RSL_IE_SysinfoType si_type := ?) := { |
| 2090 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2091 | msg_type := RSL_MT_BCCH_INFO, |
| 2092 | ies := { |
| 2093 | tr_RSL_IE(RSL_IE_Body:{chan_nr := ts_RslChanNr_BCCH(0)}), |
| 2094 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}) |
| 2095 | } |
| 2096 | } |
| 2097 | template RSL_Message tr_RSL_BCCH_INFO(template RSL_IE_SysinfoType si_type := ?, |
| 2098 | template octetstring full_bcch_info := ?) := { |
| 2099 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2100 | msg_type := RSL_MT_BCCH_INFO, |
| 2101 | ies := { |
| 2102 | tr_RSL_IE(RSL_IE_Body:{chan_nr := ts_RslChanNr_BCCH(0)}), |
| 2103 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}), |
| 2104 | tr_RSL_IE(RSL_IE_Body:{other := tr_RSL_LV(full_bcch_info)}), |
| 2105 | * |
| 2106 | } |
| 2107 | } |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 2108 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 2109 | /* 8.5.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2110 | template (value) RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, |
| 2111 | uint16_t acc_ct) := { |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 2112 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2113 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 2114 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2115 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_RACH(0)}), |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 2116 | t_RSL_IE(RSL_IE_RACH_LOAD, RSL_IE_Body:{rach_load := ts_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 2117 | } |
| 2118 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2119 | template RSL_Message tr_RSL_RACH_LOAD_IND(template uint16_t slot_ct := ?, |
| 2120 | template uint16_t busy_ct := ?, |
Harald Welte | 09538f8 | 2019-08-01 09:50:25 +0200 | [diff] [blame] | 2121 | template uint16_t acc_ct := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2122 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2123 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 2124 | ies := { |
| 2125 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 2126 | tr_RSL_IE(RSL_IE_Body:{rach_load := tr_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| 2127 | } |
| 2128 | } |
| 2129 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2130 | template (value) RSL_Message ts_RSL_PAGING_LOAD_IND(uint16_t buffer_space) := { |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 2131 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2132 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 2133 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2134 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(0)}), |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 2135 | t_RSL_IE(RSL_IE_PAGING_LOAD, RSL_IE_Body:{paging_load := buffer_space}) |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 2136 | } |
| 2137 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2138 | template RSL_Message tr_RSL_PAGING_LOAD_IND(template uint16_t buffer_space := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2139 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2140 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 2141 | ies := { |
| 2142 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 2143 | tr_RSL_IE(RSL_IE_Body:{paging_load := buffer_space}) |
| 2144 | } |
| 2145 | } |
| 2146 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 2147 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2148 | /* 8.5.3 BTS -> BSC */ |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 2149 | template (value) RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, |
| 2150 | template (value) RslChannelNr chan_nr := ts_RslChanNr_RACH(0), |
| 2151 | uint8_t acc_del := 0) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2152 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2153 | msg_type := RSL_MT_CHAN_RQD, |
| 2154 | ies := { |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 2155 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2156 | /* TODO: we may need to have optional RSL_IE_LINK_IDENT IE here */ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 2157 | t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| 2158 | t_RSL_IE(RSL_IE_ACCESS_DELAY, RSL_IE_Body:{access_delay := acc_del}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2159 | } |
| 2160 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2161 | template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 2162 | template RslChannelNr chan_nr := ts_RslChanNr_RACH(0), |
| 2163 | template uint8_t acc_del := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2164 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2165 | msg_type := RSL_MT_CHAN_RQD, |
| 2166 | ies := { |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 2167 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2168 | /* TODO: we may need to have optional RSL_IE_LINK_IDENT IE here */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2169 | tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), |
| 2170 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) |
| 2171 | } |
| 2172 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2173 | |
| 2174 | /* 8.5.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2175 | template (value) RSL_Message ts_DELETE_IND(template (value) RslChannelNr chan_nr, |
| 2176 | octetstring imm_ass) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2177 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2178 | msg_type := RSL_MT_DELETE_IND, |
| 2179 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 2180 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2181 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(imm_ass)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2182 | } |
| 2183 | } |
Harald Welte | e8d750e | 2018-06-10 21:41:35 +0200 | [diff] [blame] | 2184 | template RSL_Message tr_RSL_DELETE_IND(template octetstring imm_ass := ?, template uint3_t tn) := { |
| 2185 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2186 | msg_type := RSL_MT_DELETE_IND, |
| 2187 | ies := { |
| 2188 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 2189 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := tr_RSL_LV(imm_ass)}), |
| 2190 | * |
| 2191 | } |
| 2192 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2193 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 2194 | /* 8.5.5 BSC -> BTS */ |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 2195 | template RSL_Message tr_RSL_PAGING_CMD(template MobileIdentityV mi, template uint3_t tn := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2196 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 2197 | msg_type := RSL_MT_PAGING_CMD, |
| 2198 | ies := { |
| 2199 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 2200 | tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 2201 | tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_MI_LV(mi)}), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 2202 | * /* opt: channel needed, eMLPP prio */ |
| 2203 | } |
| 2204 | } |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 2205 | template (value) RSL_Message ts_RSL_PAGING_CMD(MobileIdentityV mi, uint8_t pg, uint3_t tn := 0) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2206 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2207 | msg_type := RSL_MT_PAGING_CMD, |
| 2208 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2209 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(tn)}), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2210 | t_RSL_IE(RSL_IE_PAGING_GROUP, RSL_IE_Body:{paging_group := pg}), |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 2211 | t_RSL_IE(RSL_IE_MS_IDENTITY, RSL_IE_Body:{ms_identity := ts_MI_LV(mi)}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2212 | } |
| 2213 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 2214 | |
| 2215 | /* 8.5.6 BSC -> BTS */ |
| 2216 | template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2217 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 2218 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 2219 | ies := { |
| 2220 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 2221 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| 2222 | } |
| 2223 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2224 | template (value) RSL_Message ts_RSL_IMM_ASSIGN(octetstring f_ass_inf, uint3_t tn := 0) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2225 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2226 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 2227 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2228 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(tn)}), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2229 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(f_ass_inf)}) |
| 2230 | } |
| 2231 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 2232 | |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 2233 | /* 8.5.8 BTS <- BSC SMS BROADCAST COMMAND */ |
| 2234 | template RSL_Message tr_RSL_SMSCB_CMD(template RSL_IE_CbCommandType cb_cmd := ?, |
| 2235 | template octetstring msg := ?, |
| 2236 | template RslChannelNr chan_nr := ?) := { |
| 2237 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2238 | msg_type := RSL_MT_SMS_BC_CMD, |
| 2239 | ies := { |
| 2240 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2241 | tr_RSL_IE(RSL_IE_Body:{cb_cmd_type := cb_cmd}), |
| 2242 | tr_RSL_IE(RSL_IE_Body:{smscb_message := tr_RSL_LV(msg)}), |
| 2243 | * |
| 2244 | } |
| 2245 | } |
| 2246 | template (value) RSL_Message ts_RSL_SMSCB_CMD(template (value) RSL_IE_CbCommandType cb_cmd, |
| 2247 | template (value) octetstring msg, |
| 2248 | template (value) RslChannelNr chan_nr := |
| 2249 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 2250 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2251 | msg_type := RSL_MT_SMS_BC_CMD, |
| 2252 | ies := { |
| 2253 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2254 | t_RSL_IE(RSL_IE_CB_CMD_TYPE, RSL_IE_Body:{cb_cmd_type := cb_cmd}), |
| 2255 | t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message := ts_RSL_LV(msg)}) |
| 2256 | /* optional channel type for extended CBCH */ |
| 2257 | } |
| 2258 | } |
| 2259 | |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 2260 | /* 8.5.9 BTS -> BSC CBCH LOAD INDICATION */ |
| 2261 | template RSL_Message tr_RSL_CBCH_LOAD_IND_BASIC(template boolean overflow := ?, |
| 2262 | template uint4_t slot_count := ?, |
| 2263 | template RslChannelNr chan_nr := ?) := { |
| 2264 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2265 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 2266 | ies := { |
| 2267 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2268 | tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}) |
| 2269 | } |
| 2270 | } |
| 2271 | template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_BASIC(boolean overflow, uint4_t slot_count, |
| 2272 | template (value) RslChannelNr chan_nr := |
| 2273 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 2274 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2275 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 2276 | ies := { |
| 2277 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2278 | t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}) |
| 2279 | } |
| 2280 | } |
| 2281 | template RSL_Message tr_RSL_CBCH_LOAD_IND_EXTD(template boolean overflow := ?, |
| 2282 | template uint4_t slot_count := ?, |
| 2283 | template RslChannelNr chan_nr := ?) := { |
| 2284 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2285 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 2286 | ies := { |
| 2287 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2288 | tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}), |
| 2289 | tr_RSL_IE(RSL_IE_Body:{smscb_chan_ind := 1}) |
| 2290 | } |
| 2291 | } |
| 2292 | template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_EXTD(boolean overflow, uint4_t slot_count, |
| 2293 | template (value) RslChannelNr chan_nr := |
| 2294 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 2295 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2296 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 2297 | ies := { |
| 2298 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2299 | t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}), |
| 2300 | t_RSL_IE(RSL_IE_SMSCB_CHAN_INDICATOR, RSL_IE_Body:{smscb_chan_ind := 1}) |
| 2301 | } |
| 2302 | } |
| 2303 | |
| 2304 | |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 2305 | /* 8.6.1 BTS -> BSC */ |
| 2306 | template (value) RSL_Message |
| 2307 | ts_RSL_RF_RES_IND(template (value) RSL_ResourceInfo info) := { |
| 2308 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2309 | msg_type := RSL_MT_RF_RES_IND, |
| 2310 | ies := { |
| 2311 | t_RSL_IE(RSL_IE_RESOURCE_INFO, RSL_IE_Body:{ |
| 2312 | resource_info := { |
| 2313 | len := 0, /* overwritten */ |
| 2314 | info := info |
| 2315 | } |
| 2316 | }) |
| 2317 | } |
| 2318 | } |
| 2319 | template RSL_Message |
| 2320 | tr_RSL_RF_RES_IND(template (present) RSL_ResourceInfo info := ?) := { |
| 2321 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2322 | msg_type := RSL_MT_RF_RES_IND, |
| 2323 | ies := { |
| 2324 | tr_RSL_IE(RSL_IE_Body:{ |
| 2325 | resource_info := { |
| 2326 | len := ?, |
| 2327 | info := info |
| 2328 | } |
| 2329 | }) |
| 2330 | } |
| 2331 | } |
| 2332 | |
| 2333 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2334 | /* 8.6.2 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2335 | template (value) RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2336 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2337 | msg_type := RSL_MT_SACCH_FILL, |
| 2338 | ies := { |
| 2339 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 2340 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 2341 | } |
| 2342 | } |
Harald Welte | 09538f8 | 2019-08-01 09:50:25 +0200 | [diff] [blame] | 2343 | template RSL_Message tr_RSL_NO_SACCH_FILL(template RSL_IE_SysinfoType si_type := ?) := { |
| 2344 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2345 | msg_type := RSL_MT_SACCH_FILL, |
| 2346 | ies := { |
| 2347 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}) |
| 2348 | } |
| 2349 | } |
| 2350 | template RSL_Message tr_RSL_SACCH_FILL(template RSL_IE_SysinfoType si_type := ?, |
| 2351 | template octetstring l3_info := ?) := { |
| 2352 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2353 | msg_type := RSL_MT_SACCH_FILL, |
| 2354 | ies := { |
| 2355 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}), |
| 2356 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 2357 | * |
| 2358 | } |
| 2359 | } |
| 2360 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2361 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2362 | /* 8.6.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2363 | template (value) RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 2364 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2365 | msg_type := RSL_MT_ERROR_REPORT, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2366 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 2367 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2368 | } |
| 2369 | } |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 2370 | template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2371 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 2372 | msg_type := RSL_MT_ERROR_REPORT, |
| 2373 | ies := { |
| 2374 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}), |
| 2375 | * |
| 2376 | } |
| 2377 | } |
| 2378 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2379 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2380 | |
| 2381 | /* Abis/IP specific messages */ |
| 2382 | |
Vadim Yanitskiy | 1567bac | 2022-05-01 03:36:24 +0300 | [diff] [blame] | 2383 | private function f_ts_RSL_IPA_CRCX_IEs(template (value) RslChannelNr chan_nr, |
| 2384 | template (omit) OCT4 remote_ip, |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2385 | template (omit) uint16_t remote_port, |
| 2386 | template (omit) uint8_t osmux_cid) |
Vadim Yanitskiy | 1567bac | 2022-05-01 03:36:24 +0300 | [diff] [blame] | 2387 | return RSL_IE_List { |
| 2388 | var RSL_IE_List ies; |
| 2389 | |
| 2390 | /* Channel Number is a mandatory IE */ |
| 2391 | ies := { |
| 2392 | valueof(RSL_IE:{ |
| 2393 | iei := RSL_IE_CHAN_NR, |
| 2394 | body := { chan_nr := chan_nr } |
| 2395 | }) |
| 2396 | }; |
| 2397 | /* Remote IP / Port are optional IEs */ |
| 2398 | if (not istemplatekind(remote_ip, "omit")) { |
| 2399 | ies := ies & { |
| 2400 | valueof(RSL_IE:{ |
| 2401 | iei := RSL_IE_IPAC_REMOTE_IP, |
| 2402 | body := { ipa_remote_ip := remote_ip } |
| 2403 | }) |
| 2404 | }; |
| 2405 | } |
| 2406 | if (not istemplatekind(remote_port, "omit")) { |
| 2407 | ies := ies & { |
| 2408 | valueof(RSL_IE:{ |
| 2409 | iei := RSL_IE_IPAC_REMOTE_PORT, |
| 2410 | body := { ipa_remote_port := remote_port } |
| 2411 | }) |
| 2412 | }; |
| 2413 | } |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2414 | /* Osmux CID extension IE is optional: */ |
| 2415 | if (not istemplatekind(osmux_cid, "omit")) { |
| 2416 | ies := ies & { |
| 2417 | valueof(RSL_IE:{ |
| 2418 | iei := RSL_IE_OSMO_OSMUX_CID, |
| 2419 | body := { osmux_cid := ts_RSL_IE_OSMO_Osmux_CID(osmux_cid) } |
| 2420 | }) |
| 2421 | }; |
| 2422 | } |
Vadim Yanitskiy | 1567bac | 2022-05-01 03:36:24 +0300 | [diff] [blame] | 2423 | |
| 2424 | return ies; |
| 2425 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2426 | template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2427 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2428 | msg_type := RSL_MT_IPAC_CRCX, |
| 2429 | ies := { |
| 2430 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2431 | * |
| 2432 | } |
| 2433 | } |
Vadim Yanitskiy | e9141c2 | 2021-07-03 01:45:40 +0200 | [diff] [blame] | 2434 | template (value) RSL_Message |
| 2435 | ts_RSL_IPA_CRCX(template (value) RslChannelNr chan_nr, |
Vadim Yanitskiy | 1567bac | 2022-05-01 03:36:24 +0300 | [diff] [blame] | 2436 | template (omit) OCT4 remote_ip := omit, |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2437 | template (omit) uint16_t remote_port := omit, |
| 2438 | template (omit) uint8_t osmux_cid := omit) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2439 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2440 | msg_type := RSL_MT_IPAC_CRCX, |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2441 | ies := f_ts_RSL_IPA_CRCX_IEs(chan_nr, remote_ip, remote_port, osmux_cid) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2442 | } |
| 2443 | |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 2444 | function ts_RSL_IPA_CRCX_ACK(template (value) RslChannelNr chan_nr, |
| 2445 | uint16_t ipa_conn_id, OCT4 local_ip, |
| 2446 | uint16_t local_port, uint7_t rtp_pt2, |
| 2447 | template (omit) uint8_t osmux_cid := omit) |
| 2448 | return template (value) RSL_Message { |
| 2449 | var template (value) RSL_Message msg := { |
| 2450 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2451 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 2452 | ies := { |
| 2453 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2454 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2455 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2456 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 2457 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 2458 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2459 | } |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 2460 | if (not istemplatekind(osmux_cid, "omit")) { |
| 2461 | msg.ies[lengthof(msg.ies)] := t_RSL_IE(RSL_IE_OSMO_OSMUX_CID, RSL_IE_Body:{osmux_cid := ts_RSL_IE_OSMO_Osmux_CID(osmux_cid)}); |
| 2462 | } |
| 2463 | return msg; |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2464 | } |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 2465 | |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2466 | function tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr, |
| 2467 | template uint16_t ipa_conn_id, |
| 2468 | template OCT4 local_ip, |
| 2469 | template uint16_t local_port, |
| 2470 | template uint8_t osmux_cid := omit) |
| 2471 | return template RSL_Message { |
| 2472 | var template RSL_Message msg := { |
| 2473 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2474 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 2475 | ies := { |
| 2476 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2477 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2478 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2479 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}) |
| 2480 | /* Optional: RTP Payload Type 2 IE */ |
| 2481 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2482 | } |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2483 | if (not istemplatekind(osmux_cid, "omit")) { |
| 2484 | msg.ies[lengthof(msg.ies)] := tr_RSL_IE(RSL_IE_Body:{osmux_cid := f_tr_RSL_IE_OSMO_Osmux_CID(osmux_cid)}); |
| 2485 | } |
| 2486 | return msg; |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2487 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2488 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2489 | template (value) RSL_Message ts_RSL_IPA_CRCX_NACK(template (value) RslChannelNr chan_nr, |
| 2490 | RSL_Cause cause) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2491 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2492 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 2493 | ies := { |
| 2494 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2495 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2496 | } |
| 2497 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2498 | template RSL_Message tr_RSL_IPA_CRCX_NACK(template RslChannelNr chan_nr, |
| 2499 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2500 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2501 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 2502 | ies := { |
| 2503 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2504 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2505 | } |
| 2506 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2507 | |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2508 | function ts_RSL_IPA_MDCX(template (value) RslChannelNr chan_nr, |
| 2509 | uint16_t ipa_conn_id, |
| 2510 | OCT4 remote_ip, uint16_t remote_port, |
| 2511 | uint7_t rtp_pt2, |
| 2512 | template (omit) uint8_t osmux_cid := omit) |
| 2513 | return template (value) RSL_Message { |
| 2514 | var template (value) RSL_Message msg := { |
| 2515 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2516 | msg_type := RSL_MT_IPAC_MDCX, |
| 2517 | ies := { |
| 2518 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2519 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2520 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 2521 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| 2522 | /* optional: RTP Payload Type */ |
| 2523 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 2524 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2525 | } |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2526 | if (not istemplatekind(osmux_cid, "omit")) { |
| 2527 | msg.ies[lengthof(msg.ies)] := t_RSL_IE(RSL_IE_OSMO_OSMUX_CID, RSL_IE_Body:{osmux_cid := ts_RSL_IE_OSMO_Osmux_CID(osmux_cid)}); |
| 2528 | } |
| 2529 | return msg; |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2530 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2531 | template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| 2532 | template uint16_t ipa_conn_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2533 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2534 | msg_type := RSL_MT_IPAC_MDCX, |
| 2535 | ies := { |
| 2536 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2537 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2538 | * |
| 2539 | } |
| 2540 | } |
| 2541 | |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 2542 | function ts_RSL_IPA_MDCX_ACK(template (value) RslChannelNr chan_nr, |
| 2543 | uint16_t ipa_conn_id, |
| 2544 | OCT4 local_ip, uint16_t local_port, |
| 2545 | uint7_t rtp_pt2, |
| 2546 | template (omit) uint8_t osmux_cid := omit) |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2547 | return template (value) RSL_Message { |
| 2548 | var template (value) RSL_Message msg := { |
| 2549 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2550 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
| 2551 | ies := { |
| 2552 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2553 | /* optional */ |
| 2554 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2555 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2556 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 2557 | /* optional: RTP Payload Type */ |
| 2558 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 2559 | } |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2560 | } |
| 2561 | if (not istemplatekind(osmux_cid, "omit")) { |
| 2562 | msg.ies[lengthof(msg.ies)] := t_RSL_IE(RSL_IE_OSMO_OSMUX_CID, RSL_IE_Body:{osmux_cid := ts_RSL_IE_OSMO_Osmux_CID(osmux_cid)}); |
| 2563 | } |
| 2564 | return msg; |
| 2565 | } |
| 2566 | function tr_RSL_IPA_MDCX_ACK(template RslChannelNr chan_nr, |
| 2567 | template uint16_t ipa_conn_id, |
| 2568 | template OCT4 local_ip, |
| 2569 | template uint16_t local_port, |
| 2570 | template uint7_t rtp_pt2, |
| 2571 | template uint8_t osmux_cid := omit) |
| 2572 | return template RSL_Message { |
| 2573 | var template RSL_Message msg := { |
| 2574 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2575 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
| 2576 | ies := { |
| 2577 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2578 | /* optional */ |
| 2579 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2580 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2581 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}), |
| 2582 | /* optional: RTP Payload Type */ |
| 2583 | tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
Pau Espin Pedrol | 29c6dfb | 2022-08-08 18:37:56 +0200 | [diff] [blame] | 2584 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2585 | } |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2586 | if (not istemplatekind(osmux_cid, "omit")) { |
| 2587 | msg.ies[lengthof(msg.ies)] := tr_RSL_IE(RSL_IE_Body:{osmux_cid := f_tr_RSL_IE_OSMO_Osmux_CID(osmux_cid)}); |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2588 | } |
Pau Espin Pedrol | 39bfa02 | 2022-08-12 14:56:12 +0200 | [diff] [blame] | 2589 | return msg; |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2590 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2591 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2592 | template (value) RSL_Message ts_RSL_IPA_MDCX_NACK(template (value) RslChannelNr chan_nr, |
| 2593 | RSL_Cause cause, |
| 2594 | template (value) uint16_t ipa_conn_id) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2595 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2596 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 2597 | ies := { |
| 2598 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2599 | /* optional connection ID */ |
| 2600 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2601 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2602 | } |
| 2603 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2604 | template RSL_Message tr_RSL_IPA_MDCX_NACK(template RslChannelNr chan_nr, |
| 2605 | template RSL_Cause cause, |
| 2606 | template uint16_t ipa_conn_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2607 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2608 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 2609 | ies := { |
| 2610 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2611 | /* optional connection ID */ |
| 2612 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2613 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2614 | } |
| 2615 | } |
| 2616 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2617 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2618 | template (value) RSL_Message ts_RSL_IPA_DLCX_IND(template (value) RslChannelNr chan_nr, |
| 2619 | uint16_t ipa_conn_id, |
| 2620 | template (value) RSL_IE_IPA_ConnectionStats stats, |
| 2621 | RSL_Cause cause) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2622 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2623 | msg_type := RSL_MT_IPAC_DLCX_IND, |
| 2624 | ies := { |
| 2625 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2626 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2627 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| 2628 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2629 | } |
| 2630 | } |
| 2631 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2632 | template (value) RSL_Message ts_RSL_IPA_DLCX(template (value) RslChannelNr chan_nr, |
| 2633 | uint16_t ipa_conn_id) := { |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2634 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2635 | msg_type := RSL_MT_IPAC_DLCX, |
| 2636 | ies := { |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 2637 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2638 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}) |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2639 | } |
| 2640 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2641 | template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| 2642 | template uint16_t ipa_conn_id := omit) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2643 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2644 | msg_type := RSL_MT_IPAC_DLCX, |
| 2645 | ies := { |
| 2646 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2647 | /* FIXME: optional conn_id */ |
| 2648 | * |
| 2649 | } |
| 2650 | } |
| 2651 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2652 | template (value) RSL_Message ts_RSL_IPA_DLCX_ACK(template (value) RslChannelNr chan_nr, |
| 2653 | uint16_t ipa_conn_id, |
| 2654 | RSL_IE_IPA_ConnectionStats stats) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2655 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2656 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 2657 | ies := { |
| 2658 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2659 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2660 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| 2661 | } |
| 2662 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2663 | template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr, |
| 2664 | template uint16_t ipa_conn_id, |
| 2665 | template RSL_IE_IPA_ConnectionStats stats) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2666 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2667 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 2668 | ies := { |
| 2669 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2670 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2671 | tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats}) |
| 2672 | } |
| 2673 | } |
| 2674 | |
| 2675 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2676 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2677 | template (value) RSL_Message ts_RSL_IPA_DLCX_NACK(template (value) RslChannelNr chan_nr, |
| 2678 | RSL_Cause cause, uint16_t ipa_conn_id) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2679 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2680 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 2681 | ies := { |
| 2682 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2683 | /* optional connection ID */ |
| 2684 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2685 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2686 | } |
| 2687 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2688 | template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr, |
| 2689 | template RSL_Cause cause) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2690 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2691 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 2692 | ies := { |
| 2693 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2694 | /* optional connection ID */ |
| 2695 | *, |
| 2696 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2697 | } |
| 2698 | } |
| 2699 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2700 | |
Vadim Yanitskiy | 58b1653 | 2021-10-09 20:27:39 +0600 | [diff] [blame] | 2701 | template (value) RSL_Message |
| 2702 | ts_RSL_IPA_PDCH_ACT(template (value) RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2703 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2704 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 2705 | ies := { |
| 2706 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2707 | } |
| 2708 | } |
Vadim Yanitskiy | 58b1653 | 2021-10-09 20:27:39 +0600 | [diff] [blame] | 2709 | template RSL_Message |
| 2710 | tr_RSL_IPA_PDCH_ACT(template (present) RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2711 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2712 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 2713 | ies := { |
| 2714 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 2715 | } |
| 2716 | } |
| 2717 | |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2718 | |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 2719 | template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, |
| 2720 | template (value) RSL_IE_FrameNumber fn) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2721 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2722 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 2723 | ies := { |
| 2724 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2725 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| 2726 | } |
| 2727 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2728 | template RSL_Message tr_RSL_IPA_PDCH_ACT_ACK(template RslChannelNr chan_nr, |
| 2729 | template RSL_IE_FrameNumber fn) := { |
| 2730 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2731 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 2732 | ies := { |
| 2733 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2734 | tr_RSL_IE(RSL_IE_Body:{frame_nr := fn}) |
| 2735 | } |
| 2736 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2737 | |
| 2738 | template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2739 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2740 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 2741 | ies := { |
| 2742 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2743 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2744 | } |
| 2745 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2746 | template RSL_Message tr_RSL_IPA_PDCH_ACT_NACK(template RslChannelNr chan_nr, |
| 2747 | template RSL_Cause cause) := { |
| 2748 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2749 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 2750 | ies := { |
| 2751 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2752 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2753 | } |
| 2754 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2755 | |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2756 | template RSL_Message ts_RSL_IPA_PDCH_DEACT(RslChannelNr chan_nr) := { |
| 2757 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2758 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 2759 | ies := { |
| 2760 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2761 | } |
| 2762 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2763 | template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2764 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2765 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 2766 | ies := { |
| 2767 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 2768 | } |
| 2769 | } |
| 2770 | |
| 2771 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2772 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2773 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 2774 | ies := { |
| 2775 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2776 | } |
| 2777 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2778 | template RSL_Message tr_RSL_IPA_PDCH_DEACT_ACK(template RslChannelNr chan_nr) := { |
| 2779 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2780 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 2781 | ies := { |
| 2782 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 2783 | } |
| 2784 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2785 | |
| 2786 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2787 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2788 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 2789 | ies := { |
| 2790 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2791 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2792 | } |
| 2793 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2794 | template RSL_Message tr_RSL_IPA_PDCH_DEACT_NACK(template RslChannelNr chan_nr, |
| 2795 | template RSL_Cause cause) := { |
| 2796 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2797 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 2798 | ies := { |
| 2799 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2800 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2801 | } |
| 2802 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2803 | |
Harald Welte | 908ce54 | 2019-09-04 23:05:40 +0200 | [diff] [blame] | 2804 | template (value) RSL_Message ts_RSL_OSMO_ETWS_CMD(template (value) octetstring msg, |
| 2805 | template (value) RslChannelNr chan_nr := ts_RslChanNr_PCH_AGCH(0)) := { |
| 2806 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2807 | msg_type := RSL_MT_OSMO_ETWS_CMD, |
| 2808 | ies := { |
| 2809 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2810 | t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message := ts_RSL_LV(msg)}) |
| 2811 | } |
| 2812 | } |
| 2813 | template RSL_Message tr_RSL_OSMO_ETWS_CMD(template RslChannelNr chan_nr := ?, |
| 2814 | template octetstring msg := ?) := { |
| 2815 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2816 | msg_type := RSL_MT_OSMO_ETWS_CMD, |
| 2817 | ies := { |
| 2818 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2819 | tr_RSL_IE(RSL_IE_Body:{smscb_message := tr_RSL_LV(msg)}) |
| 2820 | } |
| 2821 | } |
| 2822 | |
Harald Welte | e33e515 | 2023-04-09 23:29:48 +0200 | [diff] [blame] | 2823 | template (value) RSL_Message ts_RSL_NOTIF_CMD_START(template (value) GroupCallRef group_call_ref, |
| 2824 | template (value) octetstring chan_desc) := { |
| 2825 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2826 | msg_type := RSL_MT_NOT_CMD, |
| 2827 | ies := { |
| 2828 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(0)}), |
| 2829 | t_RSL_IE(RSL_IE_CMD_INDICATOR, RSL_IE_Body:{cmd_indicator := ts_CommandInd(CMD_IND_START)}), |
| 2830 | t_RSL_IE(RSL_IE_GROUP_CALL_REF, RSL_IE_Body:{group_call_ref := ts_GroupCallRef(group_call_ref)}), |
| 2831 | t_RSL_IE(RSL_IE_GROUP_CHAN_DESC, RSL_IE_Body:{group_chan_desc := ts_GroupChanDesc(chan_desc)}) |
| 2832 | } |
| 2833 | } |
| 2834 | template RSL_Message tr_RSL_NOTIF_CMD_START(template (present) GroupCallRef group_call_ref, |
| 2835 | template (present) octetstring chan_desc := ?) := { |
| 2836 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2837 | msg_type := RSL_MT_NOT_CMD, |
| 2838 | ies := { |
| 2839 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 2840 | tr_RSL_IE(RSL_IE_Body:{cmd_indicator := tr_CommandInd(CMD_IND_START)}), |
| 2841 | tr_RSL_IE(RSL_IE_Body:{group_call_ref := tr_GroupCallRef(group_call_ref)}), |
| 2842 | tr_RSL_IE(RSL_IE_Body:{group_chan_desc := tr_GroupChanDesc(chan_desc)}), |
| 2843 | * |
| 2844 | } |
| 2845 | } |
| 2846 | |
| 2847 | template (value) RSL_Message ts_RSL_NOTIF_CMD_STOP(template (value) GroupCallRef group_call_ref) := { |
| 2848 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2849 | msg_type := RSL_MT_NOT_CMD, |
| 2850 | ies := { |
| 2851 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(0)}), |
| 2852 | t_RSL_IE(RSL_IE_CMD_INDICATOR, RSL_IE_Body:{cmd_indicator := ts_CommandInd(CMD_IND_STOP)}), |
| 2853 | t_RSL_IE(RSL_IE_GROUP_CALL_REF, RSL_IE_Body:{group_call_ref := ts_GroupCallRef(group_call_ref)}) |
| 2854 | } |
| 2855 | } |
| 2856 | template RSL_Message tr_RSL_NOTIF_CMD_STOP(template (present) GroupCallRef group_call_ref) := { |
| 2857 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2858 | msg_type := RSL_MT_NOT_CMD, |
| 2859 | ies := { |
| 2860 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 2861 | tr_RSL_IE(RSL_IE_Body:{cmd_indicator := tr_CommandInd(CMD_IND_STOP)}), |
| 2862 | tr_RSL_IE(RSL_IE_Body:{group_call_ref := tr_GroupCallRef(group_call_ref)}), |
| 2863 | * |
| 2864 | } |
| 2865 | } |
| 2866 | |
Harald Welte | 908ce54 | 2019-09-04 23:05:40 +0200 | [diff] [blame] | 2867 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2868 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 2869 | function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean { |
| 2870 | for (var integer i := 0; i < sizeof(msg.ies); i := i+1) { |
| 2871 | if (msg.ies[i].iei == iei) { |
| 2872 | ret := msg.ies[i].body; |
| 2873 | return true; |
| 2874 | } |
| 2875 | } |
| 2876 | return false; |
| 2877 | } |
| 2878 | |
| 2879 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2880 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2881 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |