Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1 | module RSL_Types { |
| 2 | |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 3 | /* GSUP_Types, defining abstract TTCN-3 data types for the A-bis RSL protocol. |
| 4 | * |
| 5 | * RSL is a 3GPP standard protocol used between BTS and BSC in a GSM network. |
| 6 | * |
| 7 | * (C) 2017 by Harald Welte <laforge@gnumonks.org> |
| 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. |
| 12 | */ |
| 13 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 14 | import from General_Types all; |
| 15 | import from Osmocom_Types all; |
| 16 | import from GSM_Types all; |
| 17 | |
| 18 | /* Section 9.1 */ |
| 19 | type enumerated RSL_MessageGroup { |
| 20 | RSL_MDISC_RESERVED ('0000000'B), |
| 21 | RSL_MDISC_RLL ('0000001'B), |
| 22 | RSL_MDISC_DCHAN ('0000100'B), |
| 23 | RSL_MDISC_CCHAN ('0000110'B), |
| 24 | RSL_MDISC_TRX_MGMT ('0001000'B), |
| 25 | RSL_MDISC_LCS ('0010000'B), |
| 26 | RSL_MDISC_IPACCESS ('0111111'B) |
| 27 | } with { variant "FIELDLENGTH(7)" }; |
| 28 | |
| 29 | /* Section 9.1 */ |
| 30 | type record RSL_MessageDiscriminator { |
| 31 | RSL_MessageGroup msg_group, |
| 32 | boolean transparent |
| 33 | } with { variant "FIELDORDER(msb)" }; |
| 34 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 35 | 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] | 36 | msg_group := mg, |
| 37 | transparent := t |
| 38 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 39 | template RSL_MessageDiscriminator tr_RSL_MsgDisc(template RSL_MessageGroup mg, boolean t := true) := { |
| 40 | msg_group := mg, |
| 41 | transparent := t |
| 42 | } |
| 43 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 44 | |
| 45 | /* Section 9.2 */ |
| 46 | type enumerated RSL_MessageType { |
| 47 | /* Radio Link Layer Management */ |
| 48 | RSL_MT_DATA_REQ ('00000001'B), |
| 49 | RSL_MT_DATA_IND ('00000010'B), |
| 50 | RSL_MT_ERROR_IND ('00000011'B), |
| 51 | RSL_MT_EST_REQ ('00000100'B), |
| 52 | RSL_MT_EST_CONF ('00000101'B), |
| 53 | RSL_MT_EST_IND ('00000110'B), |
| 54 | RSL_MT_REL_REQ ('00000111'B), |
| 55 | RSL_MT_REL_CONF ('00001000'B), |
| 56 | RSL_MT_REL_IND ('00001001'B), |
| 57 | RSL_MT_UNIT_DATA_REQ ('00001010'B), |
| 58 | RSL_MT_UNIT_DATA_IND ('00001011'B), |
| 59 | |
| 60 | /* non-standard below */ |
| 61 | RSL_MT_SUSP_REQ ('00001100'B), |
| 62 | RSL_MT_SUSP_CONF ('00001101'B), |
| 63 | RSL_MT_RES_REQ ('00001110'B), |
| 64 | RSL_MT_RECON_REQ ('00001111'B), |
| 65 | |
| 66 | /* Common Channel Management / TRX Management */ |
| 67 | RSL_MT_BCCH_INFO ('00010001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 68 | RSL_MT_CCCH_LOAD_IND ('00010010'B), |
| 69 | RSL_MT_CHAN_RQD ('00010011'B), |
| 70 | RSL_MT_DELETE_IND ('00010100'B), |
| 71 | RSL_MT_PAGING_CMD ('00010101'B), |
| 72 | RSL_MT_IMMEDIATE_ASSIGN_CMD ('00010110'B), |
| 73 | RSL_MT_SMS_BC_REQ ('00010111'B), |
| 74 | RSL_MT_CHAN_CONF ('00011000'B), /* non-standard element */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 75 | /* empty */ |
| 76 | RSL_MT_RF_RES_IND ('00011001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 77 | RSL_MT_SACCH_FILL ('00011010'B), |
| 78 | RSL_MT_OVERLOAD ('00011011'B), |
| 79 | RSL_MT_ERROR_REPORT ('00011100'B), |
| 80 | RSL_MT_SMS_BC_CMD ('00011101'B), |
| 81 | RSL_MT_CBCH_LOAD_IND ('00011110'B), |
| 82 | RSL_MT_NOT_CMD ('00011111'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 83 | |
| 84 | /* Dedicate Channel Management */ |
| 85 | RSL_MT_CHAN_ACTIV ('00100001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 86 | RSL_MT_CHAN_ACTIV_ACK ('00100010'B), |
| 87 | RSL_MT_CHAN_ACTIV_NACK ('00100011'B), |
| 88 | RSL_MT_CONN_FAIL ('00100100'B), |
| 89 | RSL_MT_DEACTIVATE_SACCH ('00100101'B), |
| 90 | RSL_MT_ENCR_CMD ('00100110'B), |
| 91 | RSL_MT_HANDO_DET ('00100111'B), |
| 92 | RSL_MT_MEAS_RES ('00101000'B), |
| 93 | RSL_MT_MODE_MODIFY_REQ ('00101001'B), |
| 94 | RSL_MT_MODE_MODIFY_ACK ('00101010'B), |
| 95 | RSL_MT_MODE_MODIFY_NACK ('00101011'B), |
| 96 | RSL_MT_PHY_CONTEXT_REQ ('00101100'B), |
| 97 | RSL_MT_PHY_CONTEXT_CONF ('00101101'B), |
| 98 | RSL_MT_RF_CHAN_REL ('00101110'B), |
| 99 | RSL_MT_MS_POWER_CONTROL ('00101111'B), |
| 100 | RSL_MT_BS_POWER_CONTROL ('00110000'B), /* 0x30 */ |
| 101 | RSL_MT_PREPROC_CONFIG ('00110001'B), |
| 102 | RSL_MT_PREPROC_MEAS_RES ('00110010'B), |
| 103 | RSL_MT_RF_CHAN_REL_ACK ('00110011'B), |
| 104 | RSL_MT_SACCH_INFO_MODIFY('00110100'B), |
| 105 | RSL_MT_TALKER_DET ('00110101'B), |
| 106 | RSL_MT_LISTENER_DET ('00110110'B), |
| 107 | RSL_MT_REMOTE_CODEC_CONF_REP ('00110111'B), |
| 108 | RSL_MT_RTD_REP ('00111000'B), |
| 109 | RSL_MT_PRE_HANDO_NOTIF ('00111001'B), |
| 110 | RSL_MT_MR_CODEC_MOD_REQ ('00111010'B), |
| 111 | RSL_MT_MR_CODEC_MOD_ACK ('00111011'B), |
| 112 | RSL_MT_MR_CODEC_MOD_NACK ('00111100'B), |
| 113 | RSL_MT_MR_CODEC_MOD_PER ('00111101'B), |
| 114 | RSL_MT_TFO_REP ('00111110'B), |
| 115 | RSL_MT_TFO_MOD_REQ ('00111111'B), /* 0x3f */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 116 | |
| 117 | RSL_MT_LOCATION_INFO ('01000001'B), |
| 118 | |
| 119 | /* ip.access specific RSL message types */ |
| 120 | RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B), |
| 121 | |
| 122 | RSL_MT_IPAC_PDCH_ACT ('01001000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 123 | RSL_MT_IPAC_PDCH_ACT_ACK ('01001001'B), |
| 124 | RSL_MT_IPAC_PDCH_ACT_NACK ('01001010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 125 | RSL_MT_IPAC_PDCH_DEACT ('01001011'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 126 | RSL_MT_IPAC_PDCH_DEACT_ACK ('01001100'B), |
| 127 | RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 128 | |
| 129 | RSL_MT_IPAC_CONNECT_MUX ('01010000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 130 | RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), |
| 131 | RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), |
| 132 | RSL_MT_IPAC_BIND_MUX ('01010011'B), |
| 133 | RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), |
| 134 | RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), |
| 135 | RSL_MT_IPAC_DISC_MUX ('01010110'B), |
| 136 | RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), |
| 137 | RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 138 | RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 139 | RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), |
| 140 | RSL_MT_IPAC_HO_CAN_RES ('01100010'B), |
| 141 | RSL_MT_IPAC_CRCX ('01110000'B), |
| 142 | RSL_MT_IPAC_CRCX_ACK ('01110001'B), |
| 143 | RSL_MT_IPAC_CRCX_NACK ('01110010'B), |
| 144 | RSL_MT_IPAC_MDCX ('01110011'B), |
| 145 | RSL_MT_IPAC_MDCX_ACK ('01110100'B), |
| 146 | RSL_MT_IPAC_MDCX_NACK ('01110101'B), |
| 147 | RSL_MT_IPAC_DLCX_IND ('01110110'B), |
| 148 | RSL_MT_IPAC_DLCX ('01110111'B), |
| 149 | RSL_MT_IPAC_DLCX_ACK ('01111000'B), |
| 150 | RSL_MT_IPAC_DLCX_NACK ('01111001'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 151 | } with { variant "FIELDLENGTH(8)" }; |
| 152 | |
| 153 | /*! RSL Information Element Identifiers (Chapter 9.3) */ |
| 154 | type enumerated RSL_IE_Type { |
| 155 | RSL_IE_CHAN_NR ('00000001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 156 | RSL_IE_LINK_IDENT ('00000010'B), |
| 157 | RSL_IE_ACT_TYPE ('00000011'B), |
| 158 | RSL_IE_BS_POWER ('00000100'B), |
| 159 | RSL_IE_CHAN_IDENT ('00000101'B), |
| 160 | RSL_IE_CHAN_MODE ('00000110'B), |
| 161 | RSL_IE_ENCR_INFO ('00000111'B), |
| 162 | RSL_IE_FRAME_NUMBER ('00001000'B), |
| 163 | RSL_IE_HANDO_REF ('00001001'B), |
| 164 | RSL_IE_L1_INFO ('00001010'B), |
| 165 | RSL_IE_L3_INFO ('00001011'B), |
| 166 | RSL_IE_MS_IDENTITY ('00001100'B), |
| 167 | RSL_IE_MS_POWER ('00001101'B), |
| 168 | RSL_IE_PAGING_GROUP ('00001110'B), |
| 169 | RSL_IE_PAGING_LOAD ('00001111'B), |
| 170 | RSL_IE_PYHS_CONTEXT ('00010000'B), |
| 171 | RSL_IE_ACCESS_DELAY ('00010001'B), |
| 172 | RSL_IE_RACH_LOAD ('00010010'B), |
| 173 | RSL_IE_REQ_REFERENCE ('00010011'B), |
| 174 | RSL_IE_RELEASE_MODE ('00010100'B), |
| 175 | RSL_IE_RESOURCE_INFO ('00010101'B), |
| 176 | RSL_IE_RLM_CAUSE ('00010110'B), |
| 177 | RSL_IE_STARTNG_TIME ('00010111'B), |
| 178 | RSL_IE_TIMING_ADVANCE ('00011000'B), |
| 179 | RSL_IE_UPLINK_MEAS ('00011001'B), |
| 180 | RSL_IE_CAUSE ('00011010'B), |
| 181 | RSL_IE_MEAS_RES_NR ('00011011'B), |
| 182 | RSL_IE_MSG_ID ('00011100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 183 | /* reserved */ |
| 184 | RSL_IE_SYSINFO_TYPE ('00011110'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 185 | RSL_IE_MS_POWER_PARAM ('00011111'B), |
| 186 | RSL_IE_BS_POWER_PARAM ('00100000'B), |
| 187 | RSL_IE_PREPROC_PARAM ('00100001'B), |
| 188 | RSL_IE_PREPROC_MEAS ('00100010'B), |
| 189 | RSL_IE_IMM_ASS_INFO ('00100011'B),/* Phase 1 (3.6.0), later Full below */ |
| 190 | RSL_IE_SMSCB_INFO ('00100100'B), |
| 191 | RSL_IE_MS_TIMING_OFFSET ('00100101'B), |
| 192 | RSL_IE_ERR_MSG ('00100110'B), |
| 193 | RSL_IE_FULL_BCCH_INFO ('00100111'B), |
| 194 | RSL_IE_CHAN_NEEDED ('00101000'B), |
| 195 | RSL_IE_CB_CMD_TYPE ('00101001'B), |
| 196 | RSL_IE_SMSCB_MSG ('00101010'B), |
| 197 | RSL_IE_FULL_IMM_ASS_INFO ('00101011'B), |
| 198 | RSL_IE_SACCH_INFO ('00101100'B), |
| 199 | RSL_IE_CBCH_LOAD_INFO ('00101101'B), |
| 200 | RSL_IE_SMSCB_CHAN_INDICATOR ('00101110'B), |
| 201 | RSL_IE_GROUP_CALL_REF ('00101111'B), |
| 202 | RSL_IE_CHAN_DESC ('00110000'B), |
| 203 | RSL_IE_NCH_DRX_INFO ('00110001'B), |
| 204 | RSL_IE_CMD_INDICATOR ('00110010'B), |
| 205 | RSL_IE_EMLPP_PRIO ('00110011'B), |
| 206 | RSL_IE_UIC ('00110100'B), |
| 207 | RSL_IE_MAIN_CHAN_REF ('00110101'B), |
| 208 | RSL_IE_MR_CONFIG ('00110110'B), |
| 209 | RSL_IE_MR_CONTROL ('00110111'B), |
| 210 | RSL_IE_SUP_CODEC_TYPES ('00111000'B), |
| 211 | RSL_IE_CODEC_CONFIG ('00111001'B), |
| 212 | RSL_IE_RTD ('00111010'B), |
| 213 | RSL_IE_TFO_STATUS ('00111011'B), |
| 214 | RSL_IE_LLP_APDU ('00111100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 215 | |
| 216 | /* ip.access */ |
| 217 | RSL_IE_IPAC_SRTP_CONFIG ('11100000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 218 | RSL_IE_IPAC_PROXY_UDP ('11100001'B), |
| 219 | RSL_IE_IPAC_BSCMPL_TOUT ('11100010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 220 | |
| 221 | RSL_IE_IPAC_REMOTE_IP ('11110000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 222 | RSL_IE_IPAC_REMOTE_PORT ('11110001'B), |
| 223 | RSL_IE_IPAC_RTP_PAYLOAD ('11110010'B), |
| 224 | RSL_IE_IPAC_LOCAL_PORT ('11110011'B), |
| 225 | RSL_IE_IPAC_SPEECH_MODE ('11110100'B), |
| 226 | RSL_IE_IPAC_LOCAL_IP ('11110101'B), |
| 227 | RSL_IE_IPAC_CONN_STAT ('11110110'B), |
| 228 | RSL_IE_IPAC_HO_C_PARMS ('11110111'B), |
| 229 | RSL_IE_IPAC_CONN_ID ('11111000'B), |
| 230 | RSL_IE_IPAC_RTP_CSD_FMT ('11111001'B), |
| 231 | RSL_IE_IPAC_RTP_JIT_BUF ('11111010'B), |
| 232 | RSL_IE_IPAC_RTP_COMPR ('11111011'B), |
| 233 | RSL_IE_IPAC_RTP_PAYLOAD2 ('11111100'B), |
| 234 | RSL_IE_IPAC_RTP_MPLEX ('11111101'B), |
| 235 | RSL_IE_IPAC_RTP_MPLEX_ID ('11111110'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 236 | } with { variant "FIELDLENGTH(8)" }; |
| 237 | |
| 238 | type record RSL_LV { |
| 239 | uint8_t len, |
| 240 | octetstring payload |
| 241 | } with { variant (len) "LENGTHTO(payload)" } |
| 242 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 243 | template (value) RSL_LV ts_RSL_LV(template (value) octetstring pl) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 244 | len := 0, |
| 245 | payload := pl |
| 246 | } |
| 247 | |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 248 | template RSL_LV tr_RSL_LV(template octetstring pl) := { |
| 249 | len := ?, |
| 250 | payload := pl |
| 251 | } |
| 252 | |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 253 | type record RSL_L16V { |
| 254 | uint16_t len, |
| 255 | octetstring payload |
| 256 | } with { variant (len) "LENGTHTO(payload)" } |
| 257 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 258 | template (value) RSL_L16V ts_RSL_L16V(template (value) octetstring pl) := { |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 259 | len := 0, |
| 260 | payload := pl |
| 261 | } |
| 262 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 263 | template RSL_L16V tr_RSL_L16V(template octetstring pl) := { |
| 264 | len := ?, |
| 265 | payload := pl |
| 266 | } |
| 267 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 268 | type record RSL_IE_V { |
| 269 | uint8_t val |
| 270 | } |
| 271 | |
| 272 | /* 9.3.3 */ |
| 273 | type record RSL_IE_ActivationType { |
| 274 | boolean reactivation, |
| 275 | uint4_t reserved, |
| 276 | uint3_t a_bits |
| 277 | } |
| 278 | |
| 279 | template RSL_IE_ActivationType t_RSL_IE_ActType := { |
| 280 | reactivation := false, |
| 281 | reserved := 0, |
| 282 | a_bits := 0 /* related to immediate assignment */ |
| 283 | } |
| 284 | |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 285 | /* osmocom-style dynamic PDCH */ |
| 286 | template RSL_IE_ActivationType t_RSL_IE_ActType_PDCH := { |
| 287 | reactivation := false, |
| 288 | reserved := 1, |
| 289 | a_bits := 7 /* related to immediate assignment */ |
| 290 | } |
| 291 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 292 | /* 9.3.6 */ |
| 293 | type enumerated RSL_SpeechDataInd { |
| 294 | RSL_SPDI_SPEECH ('00000001'B), |
| 295 | RSL_SPDI_DATA ('00000010'B), |
| 296 | RSL_SPDI_SIGN ('00000011'B) |
| 297 | } with { variant "FIELDLENGTH(8)" }; |
| 298 | type enumerated RSL_ChanRateType { |
| 299 | RSL_CHRT_SDCCH ('00000001'B), |
| 300 | RSL_CHRT_TCH_F ('00001000'B), |
| 301 | RSL_CHRT_TCH_H ('00001001'B), |
| 302 | RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B), |
| 303 | RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B), |
| 304 | RSL_CHRT_TCH_F_GROUP ('00011000'B), |
| 305 | RSL_CHRT_TCH_H_GROUP ('00011001'B), |
| 306 | RSL_CHRT_TCH_F_BCAST ('00101000'B), |
| 307 | RSL_CHRT_TCH_H_BCAST ('00101001'B) |
| 308 | } with { variant "FIELDLENGTH(8)" }; |
| 309 | type enumerated RSL_SpeechAlgo { |
| 310 | RSL_CMOD_NO_RESOURCE ('00000000'B), |
| 311 | RSL_CMOD_SP_GSM1 ('00000001'B), |
| 312 | RSL_CMOD_SP_GSM2 ('00010001'B), |
| 313 | RSL_CMOD_SP_GSM3 ('00100001'B), |
| 314 | RSL_CMOD_SP_GSM4 ('00110001'B), |
| 315 | RSL_CMOD_SP_GSM5 ('00001001'B), |
| 316 | RSL_CMOD_SP_GSM6 ('00001101'B) |
| 317 | } with { variant "FIELDLENGTH(8)" }; |
| 318 | type record RSL_IE_ChannelMode { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 319 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 320 | BIT6 reserved, |
| 321 | boolean dtx_d, |
| 322 | boolean dtx_u, |
| 323 | RSL_SpeechDataInd spd_ind, |
| 324 | RSL_ChanRateType ch_rate_type, |
| 325 | RSL_SpeechAlgo coding_alg_rate |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 326 | } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,coding_alg_rate)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 327 | |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 328 | template (value) RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN(boolean dtx_downlink := false) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 329 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 330 | reserved := '000000'B, |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 331 | dtx_d := dtx_downlink, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 332 | dtx_u := false, |
| 333 | spd_ind := RSL_SPDI_SIGN, |
| 334 | ch_rate_type := RSL_CHRT_SDCCH, |
| 335 | coding_alg_rate := RSL_CMOD_NO_RESOURCE |
| 336 | } |
| 337 | |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 338 | template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg, |
| 339 | boolean dtx_downlink := false) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 340 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 341 | reserved := '000000'B, |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 342 | dtx_d := dtx_downlink, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 343 | dtx_u := false, |
| 344 | spd_ind := RSL_SPDI_SPEECH, |
| 345 | ch_rate_type := t, |
| 346 | coding_alg_rate := alg |
| 347 | } |
Harald Welte | 3618d9d | 2018-03-21 18:45:27 +0100 | [diff] [blame] | 348 | template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t, |
| 349 | template RSL_SpeechAlgo alg) := { |
| 350 | len := ?, |
| 351 | reserved := '000000'B, |
| 352 | dtx_d := ?, |
| 353 | dtx_u := ?, |
| 354 | spd_ind := RSL_SPDI_SPEECH, |
| 355 | ch_rate_type := t, |
| 356 | coding_alg_rate := alg |
| 357 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 358 | |
| 359 | /* 9.3.4 */ |
| 360 | type record RSL_IE_BS_Power { |
| 361 | uint1_t reserved, |
| 362 | boolean epc, |
| 363 | boolean fpc, |
| 364 | uint5_t power_level |
| 365 | } |
| 366 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 367 | /* 9.3.7 */ |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 368 | type enumerated RSL_AlgId { |
| 369 | RSL_ALG_ID_A5_0 ('00000001'B), |
| 370 | RSL_ALG_ID_A5_1 ('00000010'B), |
| 371 | RSL_ALG_ID_A5_2 ('00000011'B), |
| 372 | RSL_ALG_ID_A5_3 ('00000100'B), |
| 373 | RSL_ALG_ID_A5_4 ('00000101'B), |
| 374 | RSL_ALG_ID_A5_5 ('00000110'B), |
| 375 | RSL_ALG_ID_A5_6 ('00000111'B), |
| 376 | RSL_ALG_ID_A5_7 ('00001000'B) |
| 377 | } with { variant "FIELDLENGTH(8)" }; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 378 | type record RSL_IE_EncryptionInfo { |
| 379 | uint8_t len, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 380 | RSL_AlgId alg_id, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 381 | octetstring key |
| 382 | } with { variant (len) "LENGTHTO(alg_id,key)" }; |
| 383 | |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 384 | template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template RSL_AlgId alg, |
| 385 | template octetstring key) := { |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 386 | len := ?, |
| 387 | alg_id := alg, |
| 388 | key := key |
| 389 | } |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 390 | template (value) RSL_IE_EncryptionInfo ts_RSL_IE_EncrInfo(template (value) RSL_AlgId alg, |
| 391 | octetstring key) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 392 | len := 0, /* overwritten */ |
| 393 | alg_id := alg, |
| 394 | key := key |
| 395 | } |
| 396 | |
| 397 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 398 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 399 | /* 9.3.8 */ |
| 400 | type record RSL_IE_FrameNumber { |
| 401 | uint5_t t1_p, |
| 402 | uint6_t t3, |
| 403 | uint5_t t2 |
| 404 | } |
| 405 | type RSL_IE_FrameNumber RSL_IE_StartingTime; |
| 406 | |
| 407 | /* 9.3.10 */ |
| 408 | type record RSL_IE_L1Info { |
| 409 | uint5_t ms_power_lvl, |
| 410 | boolean fpc, |
| 411 | uint2_t reserved, |
| 412 | uint8_t actual_ta |
| 413 | } |
| 414 | |
| 415 | /* 9.3.13 */ |
| 416 | type record RSL_IE_MS_Power { |
| 417 | uint2_t reserved, |
| 418 | boolean fpc_epc, |
| 419 | uint5_t power_level |
| 420 | } |
| 421 | |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 422 | /* 9.3.18 */ |
| 423 | type record RSL_IE_RachLoad { |
| 424 | uint8_t len, |
| 425 | uint16_t slot_count, |
| 426 | uint16_t busy_count, |
| 427 | uint16_t access_count |
| 428 | } with { variant (len) "LENGTHTO(slot_count,busy_count,access_count)" } |
| 429 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 430 | 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] | 431 | len := 0, /* overwritten */ |
| 432 | slot_count := slot, |
| 433 | busy_count := busy, |
| 434 | access_count := acc |
| 435 | } |
| 436 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 437 | template RSL_IE_RachLoad tr_RSL_IE_RachLoad(template uint16_t slot, |
| 438 | template uint16_t busy, |
| 439 | template uint16_t acc) := { |
| 440 | len := ?, /* overwritten */ |
| 441 | slot_count := slot, |
| 442 | busy_count := busy, |
| 443 | access_count := acc |
| 444 | } |
| 445 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 446 | /* 9.3.19 */ |
| 447 | type record RSL_IE_RequestRef { |
| 448 | OCT1 ra, |
| 449 | RSL_IE_FrameNumber frame_nr |
| 450 | } |
| 451 | |
| 452 | /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */ |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 453 | template (value) RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 454 | t1_p := (fn / 1326) mod 32, |
| 455 | t3 := fn mod 51, |
| 456 | t2 := fn mod 26 |
| 457 | } |
| 458 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 459 | function tr_RSL_IE_FrameNumber(template GsmFrameNumber fn) return template RSL_IE_FrameNumber { |
| 460 | if (istemplatekind(fn, "?")) { |
| 461 | return ?; |
| 462 | } else { |
| 463 | return ts_RSL_IE_FrameNumber(valueof(fn)); |
| 464 | } |
| 465 | } |
| 466 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 467 | 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] | 468 | ra := ra, |
| 469 | frame_nr := ts_RSL_IE_FrameNumber(frame_nr) |
| 470 | } |
| 471 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 472 | template RSL_IE_RequestRef tr_RSL_IE_ReqRef(template OCT1 ra, template GsmFrameNumber frame_nr) := { |
| 473 | ra := ra, |
| 474 | frame_nr := tr_RSL_IE_FrameNumber(frame_nr) |
| 475 | } |
| 476 | |
Harald Welte | 15de8ba | 2018-06-29 08:51:42 +0200 | [diff] [blame] | 477 | /* Osmocom Extension */ |
| 478 | type record RSL_IE_UplinkMeasSuppMeasInfo { |
| 479 | int16_t toa256_mean, |
| 480 | int16_t toa256_min, |
| 481 | int16_t toa256_max, |
| 482 | uint16_t toa256_std_dev |
| 483 | }; |
| 484 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 485 | /* 9.3.25 */ |
| 486 | type record RSL_IE_UplinkMeas { |
| 487 | uint8_t len, |
| 488 | BIT1 rfu, |
| 489 | boolean dtx_d, |
| 490 | uint6_t rxlev_f_u, |
| 491 | BIT2 reserved1, |
| 492 | uint6_t rxlev_s_u, |
| 493 | BIT2 reserved2, |
| 494 | uint3_t rxq_f_u, |
| 495 | uint3_t rxq_s_u, |
Harald Welte | 15de8ba | 2018-06-29 08:51:42 +0200 | [diff] [blame] | 496 | RSL_IE_UplinkMeasSuppMeasInfo supp_meas_info optional |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 497 | } 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] | 498 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 499 | /* 9.3.26 */ |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 500 | type enumerated RSL_Cause { |
| 501 | /* normal event */ |
| 502 | RSL_ERR_RADIO_IF_FAIL ('00'O), |
| 503 | RSL_ERR_RADIO_LINK_FAIL ('01'O), |
| 504 | RSL_ERR_HANDOVER_ACC_FAIL ('02'O), |
| 505 | RSL_ERR_TALKER_ACC_FAIL ('03'O), |
| 506 | RSL_ERR_OM_INTERVENTION ('07'O), |
| 507 | RSL_ERR_NORMAL_UNSPEC ('0f'O), |
| 508 | RSL_ERR_T_MSRFPCI_EXP ('18'O), |
| 509 | /* resource unavailable */ |
| 510 | RSL_ERR_EQUIPMENT_FAIL ('20'O), |
| 511 | RSL_ERR_RR_UNAVAIL ('21'O), |
| 512 | RSL_ERR_TERR_CH_FAIL ('22'O), |
| 513 | RSL_ERR_CCCH_OVERLOAD ('23'O), |
| 514 | RSL_ERR_ACCH_OVERLOAD ('24'O), |
| 515 | RSL_ERR_PROCESSOR_OVERLOAD ('25'O), |
| 516 | RSL_ERR_BTS_NOT_EQUIPPED ('27'O), |
| 517 | RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), |
| 518 | RSL_ERR_NOTIF_OVERFLOW ('29'O), |
| 519 | RSL_ERR_RES_UNAVAIL ('2f'O), |
| 520 | /* service or option not available */ |
| 521 | RSL_ERR_TRANSC_UNAVAIL ('30'O), |
| 522 | RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), |
| 523 | /* service or option not implemented */ |
| 524 | RSL_ERR_ENCR_UNIMPL ('40'O), |
| 525 | RSL_ERR_SERV_OPT_UNIMPL ('4f'O), |
| 526 | /* invalid message */ |
| 527 | RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), |
Harald Welte | 9912eb5 | 2018-02-25 13:30:15 +0100 | [diff] [blame] | 528 | RSL_ERR_IPA_RCH_NOT_ACTV_ALLOC ('51'O), |
| 529 | RSL_ERR_IPA_CONN_INVALID ('52'O), |
| 530 | RSL_ERR_IPA_CONN_IN_USE ('53'O), |
| 531 | RSL_ERR_IPA_CONN_ALREADY_EXISTS ('54'O), |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 532 | RSL_ERR_INVALID_MESSAGE ('5f'O), |
| 533 | /* protocol error */ |
| 534 | RSL_ERR_MSG_DISCR ('60'O), |
| 535 | RSL_ERR_MSG_TYPE ('61'O), |
| 536 | RSL_ERR_MSG_SEQ ('62'O), |
| 537 | RSL_ERR_IE_ERROR ('63'O), |
| 538 | RSL_ERR_MAND_IE_ERROR ('64'O), |
| 539 | RSL_ERR_OPT_IE_ERROR ('65'O), |
| 540 | RSL_ERR_IE_NONEXIST ('66'O), |
| 541 | RSL_ERR_IE_LENGTH ('67'O), |
| 542 | RSL_ERR_IE_CONTENT ('68'O), |
| 543 | RSL_ERR_PROTO ('6f'O), |
| 544 | /* interworking */ |
| 545 | RSL_ERR_INTERWORKING ('7f'O) |
| 546 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 547 | type record RSL_IE_Cause { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 548 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 549 | uint1_t e, |
| 550 | RSL_Cause cause, |
| 551 | octetstring cause_ext optional |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 552 | } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 553 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 554 | template (value) RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 555 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 556 | e := 0, |
| 557 | cause := cause, |
| 558 | cause_ext := omit |
| 559 | } |
| 560 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 561 | template RSL_IE_Cause tr_RSL_IE_Cause(template RSL_Cause cause) := { |
| 562 | len := ?, |
| 563 | e := 0, |
| 564 | cause := cause, |
| 565 | cause_ext := omit |
| 566 | } |
| 567 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 568 | /* 9.3.40 */ |
| 569 | type enumerated RSL_ChanNeeded { |
| 570 | RSL_CHANNEED_ANY ('00'B), |
| 571 | RSL_CHANNEED_SDCCH ('01'B), |
| 572 | RSL_CHANNEED_TCH_F ('10'B), |
| 573 | RSL_CHANNEED_TCH_ForH ('11'B) |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 574 | } with { variant "FIELDLENGTH(2)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 575 | type record RSL_IE_ChanNeeded { |
| 576 | uint6_t reserved, |
| 577 | RSL_ChanNeeded chan_needed |
| 578 | } |
| 579 | |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 580 | /* 9.3.41 CB Command Type */ |
| 581 | type enumerated RSL_CbCommand { |
| 582 | RSL_CB_CMD_NORMAL ('0000'B), |
| 583 | RSL_CB_CMD_SCHEDULE ('1000'B), |
| 584 | RSL_CB_CMD_DEFAULT ('1110'B), |
| 585 | RSL_CB_CMD_NULL ('1111'B) |
| 586 | } with { variant "FIELDLENGTH(4)" }; |
| 587 | type record RSL_IE_CbCommandType { |
| 588 | RSL_CbCommand command, |
| 589 | boolean default_bcast_null, |
| 590 | BIT1 spare, |
| 591 | uint2_t last_block |
| 592 | }; |
| 593 | template (value) RSL_IE_CbCommandType ts_RSL_IE_CbCmdType(RSL_CbCommand cmd := RSL_CB_CMD_NORMAL, |
| 594 | uint2_t last_block := 1, |
| 595 | boolean def_bcast_null := true) := { |
| 596 | command := cmd, |
| 597 | default_bcast_null := def_bcast_null, |
| 598 | spare := '0'B, |
| 599 | last_block := last_block |
| 600 | } |
| 601 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 602 | /* 9.3.53 */ |
| 603 | type record RSL_IE_MultirateCtrl { |
| 604 | uint3_t spare, |
| 605 | boolean od, |
| 606 | boolean pre, |
| 607 | uint2_t rae, |
| 608 | boolean tfo |
| 609 | } |
| 610 | |
| 611 | type enumerated RSL_IE_SysinfoType { |
| 612 | RSL_SYSTEM_INFO_8 ('00000000'B), |
| 613 | RSL_SYSTEM_INFO_1 ('00000001'B), |
| 614 | RSL_SYSTEM_INFO_2 ('00000010'B), |
| 615 | RSL_SYSTEM_INFO_3 ('00000011'B), |
| 616 | RSL_SYSTEM_INFO_4 ('00000100'B), |
| 617 | RSL_SYSTEM_INFO_5 ('00000101'B), |
| 618 | RSL_SYSTEM_INFO_6 ('00000110'B), |
| 619 | RSL_SYSTEM_INFO_7 ('00000111'B), |
| 620 | RSL_SYSTEM_INFO_16 ('00001000'B), |
| 621 | RSL_SYSTEM_INFO_17 ('00001001'B), |
| 622 | RSL_SYSTEM_INFO_2bis ('00001010'B), |
| 623 | RSL_SYSTEM_INFO_2ter ('00001011'B), |
| 624 | RSL_SYSTEM_INFO_5bis ('00001101'B), |
| 625 | RSL_SYSTEM_INFO_5ter ('00001110'B), |
| 626 | RSL_SYSTEM_INFO_10 ('00001111'B), |
| 627 | RSL_EXT_MEAS_ORDER ('01000111'B), |
| 628 | RSL_MEAS_INFO ('01001000'B), |
| 629 | RSL_SYSTEM_INFO_13 ('00101000'B), |
| 630 | RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| 631 | RSL_SYSTEM_INFO_2quater ('00101001'B), |
| 632 | RSL_SYSTEM_INFO_9 ('00101010'B), |
| 633 | RSL_SYSTEM_INFO_18 ('00101011'B), |
| 634 | RSL_SYSTEM_INFO_19 ('00101100'B), |
| 635 | RSL_SYSTEM_INFO_20 ('00101101'B) |
| 636 | } with { variant "FIELDLENGTH(8)" } |
| 637 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 638 | type record RSL_IE_IPA_ConnectionStats { |
| 639 | uint8_t len, |
| 640 | uint32_t tx_packets, |
| 641 | uint32_t tx_octets, |
| 642 | uint32_t rx_packets, |
| 643 | uint32_t rx_octets, |
| 644 | uint32_t lost_packets, |
| 645 | uint32_t jitter, |
| 646 | uint32_t avg_delay |
| 647 | } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| 648 | |
| 649 | type enumerated RSL_IPA_SpeechMode { |
| 650 | RSL_IPA_SPM_SENDRECV ('00'B), |
| 651 | RSL_IPA_SPM_RECVONLY ('01'B), |
| 652 | RSL_IPA_SPM_SENDONLY ('10'B), |
| 653 | RSL_IPA_SPM_RESERVED ('11'B) |
| 654 | } with { variant "FIELDLENGTH(2)" } |
| 655 | |
| 656 | type enumerated RSL_IPA_Codec { |
| 657 | RSL_IPA_CODEC_FR ('0000'B), |
| 658 | RSL_IPA_CODEC_EFR ('0001'B), |
| 659 | RSL_IPA_CODEC_AMR_F ('0010'B), |
| 660 | RSL_IPA_CODEC_HR ('0011'B), |
| 661 | RSL_IPA_CODEC_AMR_H ('0101'B), |
| 662 | RSL_IPA_CODEC_RTP_PT ('1111'B) |
| 663 | } with { variant "FIELDLENGTH(4)" } |
| 664 | |
| 665 | type record RSL_IE_IPA_SpeechMode { |
| 666 | BIT2 reserved, |
| 667 | RSL_IPA_SpeechMode mode, |
| 668 | RSL_IPA_Codec codec |
| 669 | } |
| 670 | |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 671 | /* 9.3.20 */ |
| 672 | type enumerated RSL_IE_ReleaseMode { |
| 673 | RSL_REL_MODE_NORMAL ('00'B), |
| 674 | REL_REL_MODE_LOCAL ('01'B) |
| 675 | } |
| 676 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 677 | /* union of all IE bodies */ |
| 678 | type union RSL_IE_Body { |
| 679 | RslChannelNr chan_nr, |
| 680 | RslLinkId link_id, |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 681 | RSL_L16V l3_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 682 | RSL_LV rlm_cause, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 683 | RSL_IE_ReleaseMode release_mode, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 684 | RSL_IE_ActivationType act_type, |
| 685 | RSL_IE_ChannelMode chan_mode, |
| 686 | uint8_t handover_ref, |
| 687 | RSL_IE_BS_Power bs_power, |
| 688 | RSL_IE_MS_Power ms_power, |
| 689 | uint8_t timing_adv, |
| 690 | RSL_IE_MultirateCtrl multirate_ctrl, |
| 691 | RSL_IE_FrameNumber frame_nr, |
| 692 | RSL_IE_Cause cause, |
| 693 | uint8_t access_delay, |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 694 | RSL_IE_RachLoad rach_load, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 695 | uint8_t meas_res_nr, |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 696 | uint8_t ms_timing_offset, |
| 697 | RSL_IE_UplinkMeas uplink_meas, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 698 | RSL_IE_L1Info l1_info, |
| 699 | RSL_IE_SysinfoType sysinfo_type, |
| 700 | uint16_t paging_load, |
| 701 | uint8_t paging_group, |
| 702 | RSL_IE_ChanNeeded chan_needed, |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 703 | RSL_IE_CbCommandType cb_cmd_type, |
| 704 | RSL_LV smscb_message, |
| 705 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 706 | RSL_IE_StartingTime starting_time, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 707 | RSL_IE_EncryptionInfo encr_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 708 | RSL_IE_RequestRef req_ref, |
| 709 | RSL_LV full_imm_ass_info, |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 710 | RSL_LV ms_identity, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 711 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 712 | uint16_t ipa_conn_id, |
| 713 | uint16_t ipa_local_port, |
| 714 | uint16_t ipa_remote_port, |
| 715 | uint32_t ipa_local_ip, |
| 716 | uint32_t ipa_remote_ip, |
| 717 | uint8_t ipa_rtp_pt, |
| 718 | uint8_t ipa_rtp_pt2, |
| 719 | RSL_IE_IPA_ConnectionStats ipa_stats, |
| 720 | RSL_IE_IPA_SpeechMode ipa_speech_mode, |
| 721 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 722 | RSL_LV other |
| 723 | } |
| 724 | |
| 725 | type record RSL_IE { |
| 726 | RSL_IE_Type iei, |
| 727 | RSL_IE_Body body |
| 728 | } with { variant (body) "CROSSTAG( |
| 729 | chan_nr, iei = RSL_IE_CHAN_NR; |
| 730 | link_id, iei = RSL_IE_LINK_IDENT; |
| 731 | l3_info, iei = RSL_IE_L3_INFO; |
| 732 | rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| 733 | release_mode, iei = RSL_IE_RELEASE_MODE; |
| 734 | act_type, iei = RSL_IE_ACT_TYPE; |
| 735 | chan_mode, iei = RSL_IE_CHAN_MODE; |
| 736 | handover_ref, iei = RSL_IE_HANDO_REF; |
| 737 | bs_power, iei = RSL_IE_BS_POWER; |
| 738 | ms_power, iei = RSL_IE_MS_POWER; |
| 739 | timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
| 740 | multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
| 741 | |
| 742 | frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| 743 | cause, iei = RSL_IE_CAUSE; |
| 744 | access_delay, iei = RSL_IE_ACCESS_DELAY; |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 745 | rach_load, iei = RSL_IE_RACH_LOAD; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 746 | meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 747 | ms_timing_offset, iei = RSL_IE_MS_TIMING_OFFSET; |
| 748 | uplink_meas, iei = RSL_IE_UPLINK_MEAS; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 749 | l1_info, iei = RSL_IE_L1_INFO; |
| 750 | sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| 751 | paging_load, iei = RSL_IE_PAGING_LOAD; |
| 752 | paging_group, iei = RSL_IE_PAGING_GROUP; |
| 753 | chan_needed, iei = RSL_IE_CHAN_NEEDED; |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 754 | cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; |
| 755 | smscb_message, iei = RSL_IE_SMSCB_MSG; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 756 | starting_time, iei = RSL_IE_STARTNG_TIME; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 757 | encr_info, iei = RSL_IE_ENCR_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 758 | |
| 759 | req_ref, iei = RSL_IE_REQ_REFERENCE; |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 760 | full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| 761 | ms_identity, iei = RSL_IE_MS_IDENTITY; |
| 762 | other, iei = RSL_IE_FULL_BCCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 763 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 764 | ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| 765 | ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| 766 | ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| 767 | ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| 768 | ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| 769 | ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| 770 | ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| 771 | ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| 772 | ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
| 773 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 774 | other, OTHERWISE; |
| 775 | )" }; |
| 776 | |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 777 | /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| 778 | * that it needs to set for a given union-choice (body). So we have to explicitly |
| 779 | * specify the IEI by the caller :( */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 780 | 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] | 781 | iei := iei, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 782 | body := body |
| 783 | } |
| 784 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 785 | template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| 786 | iei := ?, /* overwritten? */ |
| 787 | body := body |
| 788 | } |
| 789 | |
| 790 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 791 | type record of RSL_IE RSL_IE_List; |
| 792 | |
| 793 | type record RSL_Message { |
| 794 | RSL_MessageDiscriminator msg_disc, |
| 795 | RSL_MessageType msg_type, |
| 796 | RSL_IE_List ies optional |
| 797 | } |
| 798 | |
| 799 | external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| 800 | with { extension "prototype(convert) encode(RAW)" }; |
| 801 | external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| 802 | with { extension "prototype(convert) decode(RAW)" }; |
| 803 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 804 | template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 805 | RSL_MessageType m_type) := { |
| 806 | msg_disc := m_disc, |
| 807 | msg_type := m_type, |
| 808 | ies := * |
| 809 | } |
| 810 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 811 | template (value) RSL_Message ts_RSL_MsgDiscType(template (value) RSL_MessageDiscriminator m_disc, |
| 812 | template (value) RSL_MessageType msg_type, |
| 813 | template (omit) RSL_IE_List ies := omit) := { |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 814 | msg_disc := m_disc, |
| 815 | msg_type := msg_type, |
| 816 | ies := ies |
| 817 | } |
| 818 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 819 | template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| 820 | msg_disc := ?, |
| 821 | msg_type := msg_type, |
| 822 | ies := * |
| 823 | } |
| 824 | |
| 825 | /* Common Channel Management */ |
| 826 | template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 827 | msg_disc := { RSL_MDISC_CCHAN, ? } |
| 828 | } |
| 829 | |
| 830 | /* RLL */ |
| 831 | template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 832 | msg_disc := { RSL_MDISC_RLL, true } |
| 833 | } |
| 834 | |
| 835 | /* Dedicated Channel Management */ |
| 836 | template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 837 | msg_disc := { RSL_MDISC_DCHAN, ? } |
| 838 | } |
| 839 | |
| 840 | /* Dedicated Channel Management */ |
| 841 | template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 842 | msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| 843 | } |
| 844 | |
| 845 | |
| 846 | /* dedicated channel or RLL */ |
| 847 | 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] | 848 | msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,?}, {RSL_MDISC_IPACCESS,false}) |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 849 | } |
| 850 | |
| 851 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 852 | /* 8.3.1 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 853 | template (value) RSL_Message ts_RSL_DATA_REQ(template (value) RslChannelNr chan_nr, |
| 854 | template (value) RslLinkId link_id, |
| 855 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 856 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 857 | msg_type := RSL_MT_DATA_REQ, |
| 858 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 859 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 860 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 861 | 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] | 862 | } |
| 863 | } |
| 864 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 865 | template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| 866 | template RslLinkId link_id := ?, |
| 867 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 868 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, true), |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 869 | msg_type := RSL_MT_DATA_REQ, |
| 870 | ies :={ |
| 871 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 872 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 873 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 878 | /* 8.3.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 879 | template (value) RSL_Message ts_RSL_DATA_IND(template (value) RslChannelNr chan_nr, |
| 880 | template (value) RslLinkId link_id, |
| 881 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 882 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 883 | msg_type := RSL_MT_DATA_IND, |
| 884 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 885 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 886 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 887 | 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] | 888 | } |
| 889 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 890 | template RSL_Message tr_RSL_DATA_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 891 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 892 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, true), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 893 | msg_type := RSL_MT_DATA_IND, |
| 894 | ies :={ |
| 895 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 896 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 897 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 898 | } |
| 899 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 900 | |
| 901 | /* 8.3.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 902 | template (value) RSL_Message ts_RSL_ERROR_IND(template (value) RslChannelNr chan_nr, |
| 903 | template (value) RslLinkId link_id, RSL_Cause cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 904 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 905 | msg_type := RSL_MT_ERROR_IND, |
| 906 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 907 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 908 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 909 | 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] | 910 | } |
| 911 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 912 | template RSL_Message tr_RSL_ERROR_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 913 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 914 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 915 | msg_type := RSL_MT_ERROR_IND, |
| 916 | ies :={ |
| 917 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 918 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 919 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 920 | } |
| 921 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 922 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 923 | /* 8.3.4 BTS <- BSC */ |
| 924 | template (value) RSL_Message ts_RSL_EST_REQ(template (value) RslChannelNr chan_nr, |
| 925 | template (value) RslLinkId link_id) := { |
| 926 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 927 | msg_type := RSL_MT_EST_REQ, |
| 928 | ies := { |
| 929 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 930 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| 931 | } |
| 932 | } |
| 933 | template RSL_Message tr_RSL_EST_REQ(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 934 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 935 | msg_type := RSL_MT_EST_REQ, |
| 936 | ies := { |
| 937 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 938 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 939 | } |
| 940 | } |
| 941 | |
| 942 | /* 8.3.5 BTS -> BSC */ |
| 943 | template (value) RSL_Message ts_RSL_EST_CONF(template (value) RslChannelNr chan_nr, |
| 944 | template (value) RslLinkId link_id) := { |
| 945 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 946 | msg_type := RSL_MT_EST_CONF, |
| 947 | ies := { |
| 948 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 949 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| 950 | } |
| 951 | } |
| 952 | template RSL_Message tr_RSL_EST_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 953 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 954 | msg_type := RSL_MT_EST_CONF, |
| 955 | ies := { |
| 956 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 957 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 958 | } |
| 959 | } |
| 960 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 961 | /* 8.3.6 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 962 | template (value) RSL_Message ts_RSL_EST_IND(template (value) RslChannelNr chan_nr, |
| 963 | template (value) RslLinkId link_id, |
| 964 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 965 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 966 | msg_type := RSL_MT_EST_IND, |
| 967 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 968 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 969 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 970 | 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] | 971 | } |
| 972 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 973 | template RSL_Message tr_RSL_EST_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 974 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 975 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 976 | msg_type := RSL_MT_EST_IND, |
| 977 | ies := { |
| 978 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 979 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 980 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 981 | } |
| 982 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 983 | template RSL_Message tr_RSL_EST_IND_NOL3(template RslChannelNr chan_nr, template RslLinkId link_id) := |
| 984 | { |
| 985 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 986 | msg_type := RSL_MT_EST_IND, |
| 987 | ies := { |
| 988 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 989 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 990 | } |
| 991 | } |
| 992 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 993 | |
| 994 | /* 8.3.7 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 995 | 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] | 996 | template (value) RslLinkId link_id, |
| 997 | template (value) RSL_IE_ReleaseMode rel_mode := RSL_REL_MODE_NORMAL) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 998 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 999 | msg_type := RSL_MT_REL_REQ, |
| 1000 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1001 | 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] | 1002 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1003 | 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] | 1004 | } |
| 1005 | } |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1006 | template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1007 | template RslLinkId link_id, |
| 1008 | template RSL_IE_ReleaseMode rel_mode := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1009 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1010 | msg_type := RSL_MT_REL_REQ, |
| 1011 | ies :={ |
| 1012 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1013 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1014 | tr_RSL_IE(RSL_IE_Body:{release_mode := rel_mode}) |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1015 | } |
| 1016 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1017 | |
| 1018 | /* 8.3.8 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1019 | template (value) RSL_Message ts_RSL_REL_CONF(template (value) RslChannelNr chan_nr, |
| 1020 | template (value) RslLinkId link_id) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1021 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1022 | msg_type := RSL_MT_REL_CONF, |
| 1023 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1024 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1025 | 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] | 1026 | } |
| 1027 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1028 | 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] | 1029 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1030 | msg_type := RSL_MT_REL_CONF, |
| 1031 | ies :={ |
| 1032 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1033 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1034 | } |
| 1035 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1036 | |
| 1037 | /* 8.3.9 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1038 | template (value) RSL_Message ts_RSL_REL_IND(template (value) RslChannelNr chan_nr, |
| 1039 | template (value) RslLinkId link_id) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1040 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1041 | msg_type := RSL_MT_REL_IND, |
| 1042 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1043 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1044 | 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] | 1045 | } |
| 1046 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1047 | 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] | 1048 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1049 | msg_type := RSL_MT_REL_IND, |
| 1050 | ies :={ |
| 1051 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1052 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1053 | } |
| 1054 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1055 | |
| 1056 | /* 8.3.10 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1057 | template (value) RSL_Message ts_RSL_UNITDATA_REQ(template (value) RslChannelNr chan_nr, |
| 1058 | template (value) RslLinkId link_id, |
| 1059 | octetstring l3_info) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1060 | modifies ts_RSL_DATA_REQ := { |
| 1061 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 1062 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1063 | template RSL_Message tr_RSL_UNITDATA_REQ(template RslChannelNr chan_nr, |
| 1064 | template RslLinkId link_id, |
Vadim Yanitskiy | 8f98d3f | 2018-10-03 17:58:10 +0700 | [diff] [blame] | 1065 | template octetstring l3_info := ?) |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1066 | modifies tr_RSL_DATA_REQ := { |
| 1067 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 1068 | } |
| 1069 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1070 | |
| 1071 | /* 8.3.11 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1072 | template (value) RSL_Message ts_RSL_UNITDATA_IND(template (value) RslChannelNr chan_nr, |
| 1073 | template (value) RslLinkId link_id, |
| 1074 | octetstring l3_info) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1075 | modifies ts_RSL_DATA_IND := { |
| 1076 | msg_type := RSL_MT_UNIT_DATA_IND |
| 1077 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1078 | template RSL_Message tr_RSL_UNITDATA_IND(template RslChannelNr chan_nr, |
Vadim Yanitskiy | fabe0f2 | 2018-10-03 17:51:47 +0700 | [diff] [blame] | 1079 | template RslLinkId link_id, |
Vadim Yanitskiy | 8f98d3f | 2018-10-03 17:58:10 +0700 | [diff] [blame] | 1080 | template octetstring l3_info := ?) |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1081 | modifies tr_RSL_DATA_IND := { |
| 1082 | msg_type := RSL_MT_UNIT_DATA_IND |
| 1083 | } |
| 1084 | |
| 1085 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1086 | |
| 1087 | |
| 1088 | /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| 1089 | |
| 1090 | /* 8.4.1 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1091 | template (value) RSL_Message ts_RSL_CHAN_ACT(template (value) RslChannelNr chan_nr, |
| 1092 | template (value) RSL_IE_ChannelMode mode) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1093 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1094 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1095 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1096 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1097 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), |
| 1098 | 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] | 1099 | /* lots of optional IEs */ |
| 1100 | } |
| 1101 | } |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1102 | template RSL_Message tr_RSL_CHAN_ACT(template RslChannelNr chan_nr, |
| 1103 | template RSL_IE_ChannelMode mode) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1104 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1105 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1106 | ies :={ |
| 1107 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1108 | tr_RSL_IE(RSL_IE_Body:{act_type := t_RSL_IE_ActType}), |
| 1109 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1110 | /* lots of optional IEs */ |
| 1111 | * |
| 1112 | } |
| 1113 | } |
| 1114 | template RSL_Message tr_RSL_CHAN_ACT_PDCH(template RslChannelNr chan_nr, |
| 1115 | template RSL_IE_ChannelMode mode) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1116 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1117 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1118 | ies :={ |
| 1119 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1120 | tr_RSL_IE(RSL_IE_Body:{act_type := t_RSL_IE_ActType_PDCH}), |
| 1121 | /* lots of optional IEs */ |
| 1122 | * |
| 1123 | } |
| 1124 | } |
| 1125 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1126 | |
| 1127 | /* 8.4.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1128 | template (value) RSL_Message ts_RSL_CHAN_ACT_ACK(template (value) RslChannelNr chan_nr, |
| 1129 | GsmFrameNumber fn) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1130 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1131 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 1132 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1133 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1134 | 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] | 1135 | } |
| 1136 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1137 | template RSL_Message tr_RSL_CHAN_ACT_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1138 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1139 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 1140 | ies := { |
| 1141 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1142 | tr_RSL_IE(RSL_IE_Body:{frame_nr := ?}) |
| 1143 | } |
| 1144 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1145 | |
| 1146 | /* 8.4.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1147 | template (value) RSL_Message ts_RSL_CHAN_ACT_NACK(template (value) RslChannelNr chan_nr, |
| 1148 | RSL_Cause cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1149 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1150 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 1151 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1152 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1153 | 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] | 1154 | } |
| 1155 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1156 | template RSL_Message tr_RSL_CHAN_ACT_NACK(template RslChannelNr chan_nr, |
| 1157 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1158 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1159 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 1160 | ies := { |
| 1161 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1162 | tr_RSL_IE(RSL_IE_Body:{cause := ?}) |
| 1163 | } |
| 1164 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1165 | |
| 1166 | /* 8.4.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1167 | 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] | 1168 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1169 | msg_type := RSL_MT_CONN_FAIL, |
| 1170 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1171 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1172 | 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] | 1173 | } |
| 1174 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1175 | template RSL_Message tr_RSL_CONN_FAIL_IND(template RslChannelNr chan_nr, |
| 1176 | template RSL_Cause cause := ?) := { |
| 1177 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1178 | msg_type := RSL_MT_CONN_FAIL, |
| 1179 | ies :={ |
| 1180 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1181 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1182 | } |
| 1183 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1184 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1185 | /* 8.4.5 BSC -> BTS */ |
| 1186 | template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| 1187 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1188 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1189 | ies := { |
| 1190 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1191 | } |
| 1192 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1193 | 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] | 1194 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1195 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1196 | ies := { |
| 1197 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1198 | } |
| 1199 | } |
| 1200 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1201 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1202 | /* 8.4.6 BSC ->BTS */ |
| 1203 | template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, |
| 1204 | template RslLinkId link_id := ?, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 1205 | template RSL_AlgId alg := ?, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1206 | template octetstring key := ?, |
| 1207 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1208 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1209 | msg_type := RSL_MT_ENCR_CMD, |
| 1210 | ies := { |
| 1211 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1212 | tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1213 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1214 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1215 | } |
| 1216 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1217 | template (value) RSL_Message ts_RSL_ENCR_CMD(template (value) RslChannelNr chan_nr, |
| 1218 | template (value) RslLinkId link_id, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 1219 | template (value) RSL_AlgId alg, octetstring key, |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1220 | octetstring l3_info) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1221 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1222 | msg_type := RSL_MT_ENCR_CMD, |
| 1223 | ies := { |
| 1224 | 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] | 1225 | 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] | 1226 | 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] | 1227 | 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] | 1228 | } |
| 1229 | } |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1230 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1231 | template RSL_Message tr_RSL_MEAS_RES(template RslChannelNr chan_nr, |
| 1232 | template uint8_t meas_res_nr := ?, |
| 1233 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1234 | template RSL_IE_BS_Power bs_power := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1235 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1236 | msg_type := RSL_MT_MEAS_RES, |
| 1237 | ies := { |
| 1238 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1239 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1240 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1241 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1242 | * |
| 1243 | } |
| 1244 | } |
| 1245 | |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1246 | /* Osmocom specific template, require lots of optional fields to be present */ |
| 1247 | template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr, |
| 1248 | template uint8_t meas_res_nr := ?, |
| 1249 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1250 | template RSL_IE_BS_Power bs_power := ?, |
| 1251 | template RSL_IE_L1Info l1_info := ?, |
| 1252 | template octetstring l3_info := ?, |
| 1253 | template uint8_t ms_to := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1254 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1255 | msg_type := RSL_MT_MEAS_RES, |
| 1256 | ies := { |
| 1257 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1258 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1259 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1260 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1261 | tr_RSL_IE(RSL_IE_Body:{l1_info := l1_info}), |
| 1262 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 1263 | tr_RSL_IE(RSL_IE_Body:{ms_timing_offset := ms_to}) |
| 1264 | } |
| 1265 | } |
| 1266 | |
| 1267 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1268 | /* 8.4.10 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1269 | 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] | 1270 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1271 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1272 | ies := { |
| 1273 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1274 | } |
| 1275 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1276 | template RSL_Message tr_RSL_MODE_MODIFY_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1277 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1278 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1279 | ies := { |
| 1280 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1281 | } |
| 1282 | } |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1283 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1284 | /* 8.4.11 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1285 | template (value) RSL_Message ts_RSL_MODE_MODIFY_NACK(template (value) RslChannelNr chan_nr, |
| 1286 | RSL_Cause cause) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1287 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1288 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1289 | ies := { |
| 1290 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1291 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1292 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1293 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1294 | template RSL_Message tr_RSL_MODE_MODIFY_NACK(template RslChannelNr chan_nr, |
| 1295 | template RSL_Cause cause) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1296 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1297 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1298 | ies := { |
| 1299 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1300 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1301 | } |
| 1302 | } |
| 1303 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1304 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1305 | /* 8.4.14: BTS <- BSC */ |
| 1306 | template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1307 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1308 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1309 | ies := { |
| 1310 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1311 | } |
| 1312 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1313 | 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] | 1314 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1315 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1316 | ies := { |
| 1317 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1318 | } |
| 1319 | } |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1320 | |
Philipp Maier | 4d1e9c9 | 2018-12-20 11:11:56 +0100 | [diff] [blame] | 1321 | /* 8.4.15: BTS <- BSC */ |
| 1322 | template (value) RSL_Message ts_RSL_MS_PWR_CTRL(template (value) RslChannelNr chan_nr, |
| 1323 | template (value) RSL_IE_MS_Power ms_power) := { |
| 1324 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1325 | msg_type := RSL_MT_MS_POWER_CONTROL, |
| 1326 | ies := { |
| 1327 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1328 | t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}) |
| 1329 | /* One optional IE: MS POWER PARAMETERS */ |
| 1330 | } |
| 1331 | } |
| 1332 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1333 | /* 8.4.19 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1334 | 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] | 1335 | ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1336 | RSL_MT_RF_CHAN_REL_ACK, |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1337 | { 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] | 1338 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1339 | 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] | 1340 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1341 | msg_type := RSL_MT_RF_CHAN_REL_ACK, |
| 1342 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1343 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1344 | } |
| 1345 | } |
| 1346 | |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 1347 | /* 8.6.20 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1348 | template (value) RSL_Message ts_RSL_SACCH_INF_MOD(template (value) RslChannelNr chan_nr, |
| 1349 | RSL_IE_SysinfoType si_type, |
| 1350 | octetstring l3_info) := { |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 1351 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1352 | msg_type := RSL_MT_SACCH_INFO_MODIFY, |
| 1353 | ies := { |
| 1354 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1355 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1356 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 1357 | } |
| 1358 | } |
| 1359 | |
Neels Hofmeyr | 378a49c | 2018-06-15 22:18:43 +0200 | [diff] [blame] | 1360 | /* 8.4.7 BTS -> BSC */ |
| 1361 | template (value) RSL_Message ts_RSL_HANDO_DET(template (value) RslChannelNr chan_nr) := { |
| 1362 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1363 | msg_type := RSL_MT_HANDO_DET, |
| 1364 | ies := { |
| 1365 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1366 | } |
| 1367 | } |
| 1368 | |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 1369 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1370 | /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| 1371 | |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1372 | /* 8.5.1 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1373 | template (value) RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, |
| 1374 | octetstring full_bcch_info) := { |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1375 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1376 | msg_type := RSL_MT_BCCH_INFO, |
| 1377 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1378 | 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] | 1379 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1380 | t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := ts_RSL_LV(full_bcch_info)}) |
| 1381 | } |
| 1382 | } |
| 1383 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1384 | /* 8.5.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1385 | template (value) RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, |
| 1386 | uint16_t acc_ct) := { |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1387 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1388 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1389 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1390 | 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] | 1391 | 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] | 1392 | } |
| 1393 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1394 | template RSL_Message tr_RSL_RACH_LOAD_IND(template uint16_t slot_ct := ?, |
| 1395 | template uint16_t busy_ct := ?, |
| 1396 | template uint16_t acc_ct) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1397 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1398 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1399 | ies := { |
| 1400 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1401 | tr_RSL_IE(RSL_IE_Body:{rach_load := tr_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| 1402 | } |
| 1403 | } |
| 1404 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1405 | 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] | 1406 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1407 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1408 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1409 | 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] | 1410 | 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] | 1411 | } |
| 1412 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1413 | 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] | 1414 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1415 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1416 | ies := { |
| 1417 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 1418 | tr_RSL_IE(RSL_IE_Body:{paging_load := buffer_space}) |
| 1419 | } |
| 1420 | } |
| 1421 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1422 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1423 | /* 8.5.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1424 | template (value) RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, uint8_t acc_del := 0) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1425 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1426 | msg_type := RSL_MT_CHAN_RQD, |
| 1427 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1428 | 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] | 1429 | t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| 1430 | 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] | 1431 | } |
| 1432 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1433 | template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, |
| 1434 | template uint8_t acc_del := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1435 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1436 | msg_type := RSL_MT_CHAN_RQD, |
| 1437 | ies := { |
| 1438 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1439 | tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), |
| 1440 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) |
| 1441 | } |
| 1442 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1443 | |
| 1444 | /* 8.5.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1445 | template (value) RSL_Message ts_DELETE_IND(template (value) RslChannelNr chan_nr, |
| 1446 | octetstring imm_ass) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1447 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1448 | msg_type := RSL_MT_DELETE_IND, |
| 1449 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1450 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1451 | 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] | 1452 | } |
| 1453 | } |
Harald Welte | e8d750e | 2018-06-10 21:41:35 +0200 | [diff] [blame] | 1454 | template RSL_Message tr_RSL_DELETE_IND(template octetstring imm_ass := ?, template uint3_t tn) := { |
| 1455 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1456 | msg_type := RSL_MT_DELETE_IND, |
| 1457 | ies := { |
| 1458 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1459 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := tr_RSL_LV(imm_ass)}), |
| 1460 | * |
| 1461 | } |
| 1462 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1463 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1464 | /* 8.5.5 BSC -> BTS */ |
| 1465 | template RSL_Message tr_RSL_PAGING_CMD(template octetstring identity, template uint3_t tn := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1466 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1467 | msg_type := RSL_MT_PAGING_CMD, |
| 1468 | ies := { |
| 1469 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1470 | tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 1471 | tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_RSL_LV(identity)}), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1472 | * /* opt: channel needed, eMLPP prio */ |
| 1473 | } |
| 1474 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1475 | template (value) RSL_Message ts_RSL_PAGING_CMD(octetstring identity, uint8_t pg, uint3_t tn := 0) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1476 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1477 | msg_type := RSL_MT_PAGING_CMD, |
| 1478 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1479 | 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] | 1480 | t_RSL_IE(RSL_IE_PAGING_GROUP, RSL_IE_Body:{paging_group := pg}), |
| 1481 | t_RSL_IE(RSL_IE_MS_IDENTITY, RSL_IE_Body:{ms_identity := ts_RSL_LV(identity)}) |
| 1482 | } |
| 1483 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1484 | |
| 1485 | /* 8.5.6 BSC -> BTS */ |
| 1486 | template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1487 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1488 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1489 | ies := { |
| 1490 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1491 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| 1492 | } |
| 1493 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1494 | 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] | 1495 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1496 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1497 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1498 | 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] | 1499 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(f_ass_inf)}) |
| 1500 | } |
| 1501 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1502 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1503 | template RSL_Message tr_RSL_RF_RES_IND := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1504 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1505 | msg_type := RSL_MT_RF_RES_IND, |
| 1506 | ies := * |
| 1507 | } |
| 1508 | |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 1509 | /* 8.5.8 BTS <- BSC SMS BROADCAST COMMAND */ |
| 1510 | template RSL_Message tr_RSL_SMSCB_CMD(template RSL_IE_CbCommandType cb_cmd := ?, |
| 1511 | template octetstring msg := ?, |
| 1512 | template RslChannelNr chan_nr := ?) := { |
| 1513 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1514 | msg_type := RSL_MT_SMS_BC_CMD, |
| 1515 | ies := { |
| 1516 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1517 | tr_RSL_IE(RSL_IE_Body:{cb_cmd_type := cb_cmd}), |
| 1518 | tr_RSL_IE(RSL_IE_Body:{smscb_message := tr_RSL_LV(msg)}), |
| 1519 | * |
| 1520 | } |
| 1521 | } |
| 1522 | template (value) RSL_Message ts_RSL_SMSCB_CMD(template (value) RSL_IE_CbCommandType cb_cmd, |
| 1523 | template (value) octetstring msg, |
| 1524 | template (value) RslChannelNr chan_nr := |
| 1525 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 1526 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1527 | msg_type := RSL_MT_SMS_BC_CMD, |
| 1528 | ies := { |
| 1529 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1530 | t_RSL_IE(RSL_IE_CB_CMD_TYPE, RSL_IE_Body:{cb_cmd_type := cb_cmd}), |
| 1531 | t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message := ts_RSL_LV(msg)}) |
| 1532 | /* optional channel type for extended CBCH */ |
| 1533 | } |
| 1534 | } |
| 1535 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1536 | /* 8.6.2 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1537 | 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] | 1538 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1539 | msg_type := RSL_MT_SACCH_FILL, |
| 1540 | ies := { |
| 1541 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1542 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 1543 | } |
| 1544 | } |
| 1545 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1546 | /* 8.6.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1547 | template (value) RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1548 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1549 | msg_type := RSL_MT_ERROR_REPORT, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1550 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1551 | 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] | 1552 | } |
| 1553 | } |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1554 | template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1555 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1556 | msg_type := RSL_MT_ERROR_REPORT, |
| 1557 | ies := { |
| 1558 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}), |
| 1559 | * |
| 1560 | } |
| 1561 | } |
| 1562 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1563 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1564 | |
| 1565 | /* Abis/IP specific messages */ |
| 1566 | |
| 1567 | template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1568 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1569 | msg_type := RSL_MT_IPAC_CRCX, |
| 1570 | ies := { |
| 1571 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1572 | * |
| 1573 | } |
| 1574 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1575 | template (value) RSL_Message ts_RSL_IPA_CRCX(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1576 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1577 | msg_type := RSL_MT_IPAC_CRCX, |
| 1578 | ies := { |
| 1579 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1580 | } |
| 1581 | } |
| 1582 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1583 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1584 | template (value) RSL_Message ts_RSL_IPA_CRCX_ACK(template (value) RslChannelNr chan_nr, |
| 1585 | uint16_t ipa_conn_id, uint32_t local_ip, |
| 1586 | uint16_t local_port, uint7_t rtp_pt2) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1587 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1588 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 1589 | ies := { |
| 1590 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1591 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1592 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1593 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 1594 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1595 | } |
| 1596 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1597 | template RSL_Message tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr, |
| 1598 | template uint16_t ipa_conn_id, |
| 1599 | template uint32_t local_ip, |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 1600 | template uint16_t local_port) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1601 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1602 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 1603 | ies := { |
| 1604 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1605 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1606 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 1607 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}) |
| 1608 | /* Optional: RTP Payload Type 2 IE */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1609 | } |
| 1610 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1611 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1612 | template (value) RSL_Message ts_RSL_IPA_CRCX_NACK(template (value) RslChannelNr chan_nr, |
| 1613 | RSL_Cause cause) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1614 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1615 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 1616 | ies := { |
| 1617 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1618 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1619 | } |
| 1620 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1621 | template RSL_Message tr_RSL_IPA_CRCX_NACK(template RslChannelNr chan_nr, |
| 1622 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1623 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1624 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 1625 | ies := { |
| 1626 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1627 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1628 | } |
| 1629 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1630 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1631 | template (value) RSL_Message ts_RSL_IPA_MDCX(template (value) RslChannelNr chan_nr, |
| 1632 | uint16_t ipa_conn_id, |
| 1633 | uint32_t remote_ip, uint16_t remote_port, |
| 1634 | uint7_t rtp_pt2) := { |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1635 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1636 | msg_type := RSL_MT_IPAC_MDCX, |
| 1637 | ies := { |
| 1638 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1639 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1640 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 1641 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| 1642 | /* optional: RTP Payload Type */ |
| 1643 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1644 | } |
| 1645 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1646 | template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| 1647 | template uint16_t ipa_conn_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1648 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1649 | msg_type := RSL_MT_IPAC_MDCX, |
| 1650 | ies := { |
| 1651 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1652 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1653 | * |
| 1654 | } |
| 1655 | } |
| 1656 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1657 | template (value) RSL_Message ts_RSL_IPA_MDCX_ACK(template (value) RslChannelNr chan_nr, |
| 1658 | uint16_t ipa_conn_id, |
| 1659 | uint32_t local_ip, uint16_t local_port, |
| 1660 | uint7_t rtp_pt2) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1661 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 71b5ec8 | 2017-12-16 23:01:10 +0100 | [diff] [blame] | 1662 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1663 | ies := { |
| 1664 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1665 | /* optional */ |
| 1666 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
Harald Welte | 6cb400a | 2018-02-25 12:45:25 +0100 | [diff] [blame] | 1667 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1668 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1669 | /* optional: RTP Payload Type */ |
| 1670 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1671 | } |
| 1672 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1673 | template RSL_Message tr_RSL_IPA_MDCX_ACK(template RslChannelNr chan_nr, |
| 1674 | template uint16_t ipa_conn_id, |
| 1675 | template uint32_t local_ip, |
| 1676 | template uint16_t local_port, |
| 1677 | template uint7_t rtp_pt2) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1678 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1679 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
| 1680 | ies := { |
| 1681 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1682 | /* optional */ |
| 1683 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1684 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1685 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}), |
| 1686 | /* optional: RTP Payload Type */ |
| 1687 | tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1688 | } |
| 1689 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1690 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1691 | template (value) RSL_Message ts_RSL_IPA_MDCX_NACK(template (value) RslChannelNr chan_nr, |
| 1692 | RSL_Cause cause, |
| 1693 | template (value) uint16_t ipa_conn_id) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1694 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1695 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1696 | ies := { |
| 1697 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1698 | /* optional connection ID */ |
| 1699 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1700 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1701 | } |
| 1702 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1703 | template RSL_Message tr_RSL_IPA_MDCX_NACK(template RslChannelNr chan_nr, |
| 1704 | template RSL_Cause cause, |
| 1705 | template uint16_t ipa_conn_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1706 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1707 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1708 | ies := { |
| 1709 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1710 | /* optional connection ID */ |
| 1711 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1712 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1713 | } |
| 1714 | } |
| 1715 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1716 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1717 | template (value) RSL_Message ts_RSL_IPA_DLCX_IND(template (value) RslChannelNr chan_nr, |
| 1718 | uint16_t ipa_conn_id, |
| 1719 | template (value) RSL_IE_IPA_ConnectionStats stats, |
| 1720 | RSL_Cause cause) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1721 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1722 | msg_type := RSL_MT_IPAC_DLCX_IND, |
| 1723 | ies := { |
| 1724 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1725 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1726 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| 1727 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1728 | } |
| 1729 | } |
| 1730 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1731 | template (value) RSL_Message ts_RSL_IPA_DLCX(template (value) RslChannelNr chan_nr, |
| 1732 | uint16_t ipa_conn_id) := { |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1733 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1734 | msg_type := RSL_MT_IPAC_DLCX, |
| 1735 | ies := { |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 1736 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1737 | 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] | 1738 | } |
| 1739 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1740 | template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| 1741 | template uint16_t ipa_conn_id := omit) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1742 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1743 | msg_type := RSL_MT_IPAC_DLCX, |
| 1744 | ies := { |
| 1745 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1746 | /* FIXME: optional conn_id */ |
| 1747 | * |
| 1748 | } |
| 1749 | } |
| 1750 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1751 | template (value) RSL_Message ts_RSL_IPA_DLCX_ACK(template (value) RslChannelNr chan_nr, |
| 1752 | uint16_t ipa_conn_id, |
| 1753 | RSL_IE_IPA_ConnectionStats stats) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1754 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1755 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1756 | ies := { |
| 1757 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1758 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1759 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| 1760 | } |
| 1761 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1762 | template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr, |
| 1763 | template uint16_t ipa_conn_id, |
| 1764 | template RSL_IE_IPA_ConnectionStats stats) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1765 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1766 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1767 | ies := { |
| 1768 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1769 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1770 | tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats}) |
| 1771 | } |
| 1772 | } |
| 1773 | |
| 1774 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1775 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1776 | template (value) RSL_Message ts_RSL_IPA_DLCX_NACK(template (value) RslChannelNr chan_nr, |
| 1777 | RSL_Cause cause, uint16_t ipa_conn_id) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1778 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1779 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1780 | ies := { |
| 1781 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1782 | /* optional connection ID */ |
| 1783 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1784 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1785 | } |
| 1786 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1787 | template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr, |
| 1788 | template RSL_Cause cause) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1789 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1790 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1791 | ies := { |
| 1792 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1793 | /* optional connection ID */ |
| 1794 | *, |
| 1795 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1796 | } |
| 1797 | } |
| 1798 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1799 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1800 | template (value) RSL_Message ts_RSL_IPA_PDCH_ACT(RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1801 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1802 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 1803 | ies := { |
| 1804 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1805 | } |
| 1806 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1807 | template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1808 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1809 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 1810 | ies := { |
| 1811 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1812 | } |
| 1813 | } |
| 1814 | |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1815 | |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1816 | template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, |
| 1817 | template (value) RSL_IE_FrameNumber fn) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1818 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1819 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 1820 | ies := { |
| 1821 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1822 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| 1823 | } |
| 1824 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1825 | template RSL_Message tr_RSL_IPA_PDCH_ACT_ACK(template RslChannelNr chan_nr, |
| 1826 | template RSL_IE_FrameNumber fn) := { |
| 1827 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1828 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 1829 | ies := { |
| 1830 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1831 | tr_RSL_IE(RSL_IE_Body:{frame_nr := fn}) |
| 1832 | } |
| 1833 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1834 | |
| 1835 | 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] | 1836 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1837 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 1838 | ies := { |
| 1839 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1840 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1841 | } |
| 1842 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1843 | template RSL_Message tr_RSL_IPA_PDCH_ACT_NACK(template RslChannelNr chan_nr, |
| 1844 | template RSL_Cause cause) := { |
| 1845 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1846 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 1847 | ies := { |
| 1848 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1849 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1850 | } |
| 1851 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1852 | |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1853 | template RSL_Message ts_RSL_IPA_PDCH_DEACT(RslChannelNr chan_nr) := { |
| 1854 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1855 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 1856 | ies := { |
| 1857 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1858 | } |
| 1859 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1860 | template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1861 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1862 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 1863 | ies := { |
| 1864 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1865 | } |
| 1866 | } |
| 1867 | |
| 1868 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1869 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1870 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 1871 | ies := { |
| 1872 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1873 | } |
| 1874 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1875 | template RSL_Message tr_RSL_IPA_PDCH_DEACT_ACK(template RslChannelNr chan_nr) := { |
| 1876 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1877 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 1878 | ies := { |
| 1879 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1880 | } |
| 1881 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1882 | |
| 1883 | 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] | 1884 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1885 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 1886 | ies := { |
| 1887 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1888 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1889 | } |
| 1890 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 1891 | template RSL_Message tr_RSL_IPA_PDCH_DEACT_NACK(template RslChannelNr chan_nr, |
| 1892 | template RSL_Cause cause) := { |
| 1893 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1894 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 1895 | ies := { |
| 1896 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1897 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1898 | } |
| 1899 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1900 | |
| 1901 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1902 | function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean { |
| 1903 | for (var integer i := 0; i < sizeof(msg.ies); i := i+1) { |
| 1904 | if (msg.ies[i].iei == iei) { |
| 1905 | ret := msg.ies[i].body; |
| 1906 | return true; |
| 1907 | } |
| 1908 | } |
| 1909 | return false; |
| 1910 | } |
| 1911 | |
| 1912 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1913 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1914 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |