Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1 | module RSL_Types { |
| 2 | |
| 3 | import from General_Types all; |
| 4 | import from Osmocom_Types all; |
| 5 | import from GSM_Types all; |
| 6 | |
| 7 | /* Section 9.1 */ |
| 8 | type enumerated RSL_MessageGroup { |
| 9 | RSL_MDISC_RESERVED ('0000000'B), |
| 10 | RSL_MDISC_RLL ('0000001'B), |
| 11 | RSL_MDISC_DCHAN ('0000100'B), |
| 12 | RSL_MDISC_CCHAN ('0000110'B), |
| 13 | RSL_MDISC_TRX_MGMT ('0001000'B), |
| 14 | RSL_MDISC_LCS ('0010000'B), |
| 15 | RSL_MDISC_IPACCESS ('0111111'B) |
| 16 | } with { variant "FIELDLENGTH(7)" }; |
| 17 | |
| 18 | /* Section 9.1 */ |
| 19 | type record RSL_MessageDiscriminator { |
| 20 | RSL_MessageGroup msg_group, |
| 21 | boolean transparent |
| 22 | } with { variant "FIELDORDER(msb)" }; |
| 23 | |
| 24 | template RSL_MessageDiscriminator ts_RSL_MsgDisc(RSL_MessageGroup mg, boolean t := true) := { |
| 25 | msg_group := mg, |
| 26 | transparent := t |
| 27 | } |
| 28 | |
| 29 | /* Section 9.2 */ |
| 30 | type enumerated RSL_MessageType { |
| 31 | /* Radio Link Layer Management */ |
| 32 | RSL_MT_DATA_REQ ('00000001'B), |
| 33 | RSL_MT_DATA_IND ('00000010'B), |
| 34 | RSL_MT_ERROR_IND ('00000011'B), |
| 35 | RSL_MT_EST_REQ ('00000100'B), |
| 36 | RSL_MT_EST_CONF ('00000101'B), |
| 37 | RSL_MT_EST_IND ('00000110'B), |
| 38 | RSL_MT_REL_REQ ('00000111'B), |
| 39 | RSL_MT_REL_CONF ('00001000'B), |
| 40 | RSL_MT_REL_IND ('00001001'B), |
| 41 | RSL_MT_UNIT_DATA_REQ ('00001010'B), |
| 42 | RSL_MT_UNIT_DATA_IND ('00001011'B), |
| 43 | |
| 44 | /* non-standard below */ |
| 45 | RSL_MT_SUSP_REQ ('00001100'B), |
| 46 | RSL_MT_SUSP_CONF ('00001101'B), |
| 47 | RSL_MT_RES_REQ ('00001110'B), |
| 48 | RSL_MT_RECON_REQ ('00001111'B), |
| 49 | |
| 50 | /* Common Channel Management / TRX Management */ |
| 51 | RSL_MT_BCCH_INFO ('00010001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 52 | RSL_MT_CCCH_LOAD_IND ('00010010'B), |
| 53 | RSL_MT_CHAN_RQD ('00010011'B), |
| 54 | RSL_MT_DELETE_IND ('00010100'B), |
| 55 | RSL_MT_PAGING_CMD ('00010101'B), |
| 56 | RSL_MT_IMMEDIATE_ASSIGN_CMD ('00010110'B), |
| 57 | RSL_MT_SMS_BC_REQ ('00010111'B), |
| 58 | RSL_MT_CHAN_CONF ('00011000'B), /* non-standard element */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 59 | /* empty */ |
| 60 | RSL_MT_RF_RES_IND ('00011001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 61 | RSL_MT_SACCH_FILL ('00011010'B), |
| 62 | RSL_MT_OVERLOAD ('00011011'B), |
| 63 | RSL_MT_ERROR_REPORT ('00011100'B), |
| 64 | RSL_MT_SMS_BC_CMD ('00011101'B), |
| 65 | RSL_MT_CBCH_LOAD_IND ('00011110'B), |
| 66 | RSL_MT_NOT_CMD ('00011111'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 67 | |
| 68 | /* Dedicate Channel Management */ |
| 69 | RSL_MT_CHAN_ACTIV ('00100001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 70 | RSL_MT_CHAN_ACTIV_ACK ('00100010'B), |
| 71 | RSL_MT_CHAN_ACTIV_NACK ('00100011'B), |
| 72 | RSL_MT_CONN_FAIL ('00100100'B), |
| 73 | RSL_MT_DEACTIVATE_SACCH ('00100101'B), |
| 74 | RSL_MT_ENCR_CMD ('00100110'B), |
| 75 | RSL_MT_HANDO_DET ('00100111'B), |
| 76 | RSL_MT_MEAS_RES ('00101000'B), |
| 77 | RSL_MT_MODE_MODIFY_REQ ('00101001'B), |
| 78 | RSL_MT_MODE_MODIFY_ACK ('00101010'B), |
| 79 | RSL_MT_MODE_MODIFY_NACK ('00101011'B), |
| 80 | RSL_MT_PHY_CONTEXT_REQ ('00101100'B), |
| 81 | RSL_MT_PHY_CONTEXT_CONF ('00101101'B), |
| 82 | RSL_MT_RF_CHAN_REL ('00101110'B), |
| 83 | RSL_MT_MS_POWER_CONTROL ('00101111'B), |
| 84 | RSL_MT_BS_POWER_CONTROL ('00110000'B), /* 0x30 */ |
| 85 | RSL_MT_PREPROC_CONFIG ('00110001'B), |
| 86 | RSL_MT_PREPROC_MEAS_RES ('00110010'B), |
| 87 | RSL_MT_RF_CHAN_REL_ACK ('00110011'B), |
| 88 | RSL_MT_SACCH_INFO_MODIFY('00110100'B), |
| 89 | RSL_MT_TALKER_DET ('00110101'B), |
| 90 | RSL_MT_LISTENER_DET ('00110110'B), |
| 91 | RSL_MT_REMOTE_CODEC_CONF_REP ('00110111'B), |
| 92 | RSL_MT_RTD_REP ('00111000'B), |
| 93 | RSL_MT_PRE_HANDO_NOTIF ('00111001'B), |
| 94 | RSL_MT_MR_CODEC_MOD_REQ ('00111010'B), |
| 95 | RSL_MT_MR_CODEC_MOD_ACK ('00111011'B), |
| 96 | RSL_MT_MR_CODEC_MOD_NACK ('00111100'B), |
| 97 | RSL_MT_MR_CODEC_MOD_PER ('00111101'B), |
| 98 | RSL_MT_TFO_REP ('00111110'B), |
| 99 | RSL_MT_TFO_MOD_REQ ('00111111'B), /* 0x3f */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 100 | |
| 101 | RSL_MT_LOCATION_INFO ('01000001'B), |
| 102 | |
| 103 | /* ip.access specific RSL message types */ |
| 104 | RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B), |
| 105 | |
| 106 | RSL_MT_IPAC_PDCH_ACT ('01001000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 107 | RSL_MT_IPAC_PDCH_ACT_ACK ('01001001'B), |
| 108 | RSL_MT_IPAC_PDCH_ACT_NACK ('01001010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 109 | RSL_MT_IPAC_PDCH_DEACT ('01001011'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 110 | RSL_MT_IPAC_PDCH_DEACT_ACK ('01001100'B), |
| 111 | RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 112 | |
| 113 | RSL_MT_IPAC_CONNECT_MUX ('01010000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 114 | RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), |
| 115 | RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), |
| 116 | RSL_MT_IPAC_BIND_MUX ('01010011'B), |
| 117 | RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), |
| 118 | RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), |
| 119 | RSL_MT_IPAC_DISC_MUX ('01010110'B), |
| 120 | RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), |
| 121 | RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 122 | RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 123 | RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), |
| 124 | RSL_MT_IPAC_HO_CAN_RES ('01100010'B), |
| 125 | RSL_MT_IPAC_CRCX ('01110000'B), |
| 126 | RSL_MT_IPAC_CRCX_ACK ('01110001'B), |
| 127 | RSL_MT_IPAC_CRCX_NACK ('01110010'B), |
| 128 | RSL_MT_IPAC_MDCX ('01110011'B), |
| 129 | RSL_MT_IPAC_MDCX_ACK ('01110100'B), |
| 130 | RSL_MT_IPAC_MDCX_NACK ('01110101'B), |
| 131 | RSL_MT_IPAC_DLCX_IND ('01110110'B), |
| 132 | RSL_MT_IPAC_DLCX ('01110111'B), |
| 133 | RSL_MT_IPAC_DLCX_ACK ('01111000'B), |
| 134 | RSL_MT_IPAC_DLCX_NACK ('01111001'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 135 | } with { variant "FIELDLENGTH(8)" }; |
| 136 | |
| 137 | /*! RSL Information Element Identifiers (Chapter 9.3) */ |
| 138 | type enumerated RSL_IE_Type { |
| 139 | RSL_IE_CHAN_NR ('00000001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 140 | RSL_IE_LINK_IDENT ('00000010'B), |
| 141 | RSL_IE_ACT_TYPE ('00000011'B), |
| 142 | RSL_IE_BS_POWER ('00000100'B), |
| 143 | RSL_IE_CHAN_IDENT ('00000101'B), |
| 144 | RSL_IE_CHAN_MODE ('00000110'B), |
| 145 | RSL_IE_ENCR_INFO ('00000111'B), |
| 146 | RSL_IE_FRAME_NUMBER ('00001000'B), |
| 147 | RSL_IE_HANDO_REF ('00001001'B), |
| 148 | RSL_IE_L1_INFO ('00001010'B), |
| 149 | RSL_IE_L3_INFO ('00001011'B), |
| 150 | RSL_IE_MS_IDENTITY ('00001100'B), |
| 151 | RSL_IE_MS_POWER ('00001101'B), |
| 152 | RSL_IE_PAGING_GROUP ('00001110'B), |
| 153 | RSL_IE_PAGING_LOAD ('00001111'B), |
| 154 | RSL_IE_PYHS_CONTEXT ('00010000'B), |
| 155 | RSL_IE_ACCESS_DELAY ('00010001'B), |
| 156 | RSL_IE_RACH_LOAD ('00010010'B), |
| 157 | RSL_IE_REQ_REFERENCE ('00010011'B), |
| 158 | RSL_IE_RELEASE_MODE ('00010100'B), |
| 159 | RSL_IE_RESOURCE_INFO ('00010101'B), |
| 160 | RSL_IE_RLM_CAUSE ('00010110'B), |
| 161 | RSL_IE_STARTNG_TIME ('00010111'B), |
| 162 | RSL_IE_TIMING_ADVANCE ('00011000'B), |
| 163 | RSL_IE_UPLINK_MEAS ('00011001'B), |
| 164 | RSL_IE_CAUSE ('00011010'B), |
| 165 | RSL_IE_MEAS_RES_NR ('00011011'B), |
| 166 | RSL_IE_MSG_ID ('00011100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 167 | /* reserved */ |
| 168 | RSL_IE_SYSINFO_TYPE ('00011110'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 169 | RSL_IE_MS_POWER_PARAM ('00011111'B), |
| 170 | RSL_IE_BS_POWER_PARAM ('00100000'B), |
| 171 | RSL_IE_PREPROC_PARAM ('00100001'B), |
| 172 | RSL_IE_PREPROC_MEAS ('00100010'B), |
| 173 | RSL_IE_IMM_ASS_INFO ('00100011'B),/* Phase 1 (3.6.0), later Full below */ |
| 174 | RSL_IE_SMSCB_INFO ('00100100'B), |
| 175 | RSL_IE_MS_TIMING_OFFSET ('00100101'B), |
| 176 | RSL_IE_ERR_MSG ('00100110'B), |
| 177 | RSL_IE_FULL_BCCH_INFO ('00100111'B), |
| 178 | RSL_IE_CHAN_NEEDED ('00101000'B), |
| 179 | RSL_IE_CB_CMD_TYPE ('00101001'B), |
| 180 | RSL_IE_SMSCB_MSG ('00101010'B), |
| 181 | RSL_IE_FULL_IMM_ASS_INFO ('00101011'B), |
| 182 | RSL_IE_SACCH_INFO ('00101100'B), |
| 183 | RSL_IE_CBCH_LOAD_INFO ('00101101'B), |
| 184 | RSL_IE_SMSCB_CHAN_INDICATOR ('00101110'B), |
| 185 | RSL_IE_GROUP_CALL_REF ('00101111'B), |
| 186 | RSL_IE_CHAN_DESC ('00110000'B), |
| 187 | RSL_IE_NCH_DRX_INFO ('00110001'B), |
| 188 | RSL_IE_CMD_INDICATOR ('00110010'B), |
| 189 | RSL_IE_EMLPP_PRIO ('00110011'B), |
| 190 | RSL_IE_UIC ('00110100'B), |
| 191 | RSL_IE_MAIN_CHAN_REF ('00110101'B), |
| 192 | RSL_IE_MR_CONFIG ('00110110'B), |
| 193 | RSL_IE_MR_CONTROL ('00110111'B), |
| 194 | RSL_IE_SUP_CODEC_TYPES ('00111000'B), |
| 195 | RSL_IE_CODEC_CONFIG ('00111001'B), |
| 196 | RSL_IE_RTD ('00111010'B), |
| 197 | RSL_IE_TFO_STATUS ('00111011'B), |
| 198 | RSL_IE_LLP_APDU ('00111100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 199 | |
| 200 | /* ip.access */ |
| 201 | RSL_IE_IPAC_SRTP_CONFIG ('11100000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 202 | RSL_IE_IPAC_PROXY_UDP ('11100001'B), |
| 203 | RSL_IE_IPAC_BSCMPL_TOUT ('11100010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 204 | |
| 205 | RSL_IE_IPAC_REMOTE_IP ('11110000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 206 | RSL_IE_IPAC_REMOTE_PORT ('11110001'B), |
| 207 | RSL_IE_IPAC_RTP_PAYLOAD ('11110010'B), |
| 208 | RSL_IE_IPAC_LOCAL_PORT ('11110011'B), |
| 209 | RSL_IE_IPAC_SPEECH_MODE ('11110100'B), |
| 210 | RSL_IE_IPAC_LOCAL_IP ('11110101'B), |
| 211 | RSL_IE_IPAC_CONN_STAT ('11110110'B), |
| 212 | RSL_IE_IPAC_HO_C_PARMS ('11110111'B), |
| 213 | RSL_IE_IPAC_CONN_ID ('11111000'B), |
| 214 | RSL_IE_IPAC_RTP_CSD_FMT ('11111001'B), |
| 215 | RSL_IE_IPAC_RTP_JIT_BUF ('11111010'B), |
| 216 | RSL_IE_IPAC_RTP_COMPR ('11111011'B), |
| 217 | RSL_IE_IPAC_RTP_PAYLOAD2 ('11111100'B), |
| 218 | RSL_IE_IPAC_RTP_MPLEX ('11111101'B), |
| 219 | RSL_IE_IPAC_RTP_MPLEX_ID ('11111110'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 220 | } with { variant "FIELDLENGTH(8)" }; |
| 221 | |
| 222 | type record RSL_LV { |
| 223 | uint8_t len, |
| 224 | octetstring payload |
| 225 | } with { variant (len) "LENGTHTO(payload)" } |
| 226 | |
| 227 | template RSL_LV ts_RSL_LV(template octetstring pl) := { |
| 228 | len := 0, |
| 229 | payload := pl |
| 230 | } |
| 231 | |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 232 | template RSL_LV tr_RSL_LV(template octetstring pl) := { |
| 233 | len := ?, |
| 234 | payload := pl |
| 235 | } |
| 236 | |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 237 | type record RSL_L16V { |
| 238 | uint16_t len, |
| 239 | octetstring payload |
| 240 | } with { variant (len) "LENGTHTO(payload)" } |
| 241 | |
| 242 | template RSL_L16V ts_RSL_L16V(template octetstring pl) := { |
| 243 | len := 0, |
| 244 | payload := pl |
| 245 | } |
| 246 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 247 | template RSL_L16V tr_RSL_L16V(template octetstring pl) := { |
| 248 | len := ?, |
| 249 | payload := pl |
| 250 | } |
| 251 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 252 | type record RSL_IE_V { |
| 253 | uint8_t val |
| 254 | } |
| 255 | |
| 256 | /* 9.3.3 */ |
| 257 | type record RSL_IE_ActivationType { |
| 258 | boolean reactivation, |
| 259 | uint4_t reserved, |
| 260 | uint3_t a_bits |
| 261 | } |
| 262 | |
| 263 | template RSL_IE_ActivationType t_RSL_IE_ActType := { |
| 264 | reactivation := false, |
| 265 | reserved := 0, |
| 266 | a_bits := 0 /* related to immediate assignment */ |
| 267 | } |
| 268 | |
| 269 | /* 9.3.6 */ |
| 270 | type enumerated RSL_SpeechDataInd { |
| 271 | RSL_SPDI_SPEECH ('00000001'B), |
| 272 | RSL_SPDI_DATA ('00000010'B), |
| 273 | RSL_SPDI_SIGN ('00000011'B) |
| 274 | } with { variant "FIELDLENGTH(8)" }; |
| 275 | type enumerated RSL_ChanRateType { |
| 276 | RSL_CHRT_SDCCH ('00000001'B), |
| 277 | RSL_CHRT_TCH_F ('00001000'B), |
| 278 | RSL_CHRT_TCH_H ('00001001'B), |
| 279 | RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B), |
| 280 | RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B), |
| 281 | RSL_CHRT_TCH_F_GROUP ('00011000'B), |
| 282 | RSL_CHRT_TCH_H_GROUP ('00011001'B), |
| 283 | RSL_CHRT_TCH_F_BCAST ('00101000'B), |
| 284 | RSL_CHRT_TCH_H_BCAST ('00101001'B) |
| 285 | } with { variant "FIELDLENGTH(8)" }; |
| 286 | type enumerated RSL_SpeechAlgo { |
| 287 | RSL_CMOD_NO_RESOURCE ('00000000'B), |
| 288 | RSL_CMOD_SP_GSM1 ('00000001'B), |
| 289 | RSL_CMOD_SP_GSM2 ('00010001'B), |
| 290 | RSL_CMOD_SP_GSM3 ('00100001'B), |
| 291 | RSL_CMOD_SP_GSM4 ('00110001'B), |
| 292 | RSL_CMOD_SP_GSM5 ('00001001'B), |
| 293 | RSL_CMOD_SP_GSM6 ('00001101'B) |
| 294 | } with { variant "FIELDLENGTH(8)" }; |
| 295 | type record RSL_IE_ChannelMode { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 296 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 297 | BIT6 reserved, |
| 298 | boolean dtx_d, |
| 299 | boolean dtx_u, |
| 300 | RSL_SpeechDataInd spd_ind, |
| 301 | RSL_ChanRateType ch_rate_type, |
| 302 | RSL_SpeechAlgo coding_alg_rate |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 303 | } 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] | 304 | |
| 305 | template RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 306 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 307 | reserved := '000000'B, |
| 308 | dtx_d := false, |
| 309 | dtx_u := false, |
| 310 | spd_ind := RSL_SPDI_SIGN, |
| 311 | ch_rate_type := RSL_CHRT_SDCCH, |
| 312 | coding_alg_rate := RSL_CMOD_NO_RESOURCE |
| 313 | } |
| 314 | |
| 315 | template RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 316 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 317 | reserved := '000000'B, |
| 318 | dtx_d := false, |
| 319 | dtx_u := false, |
| 320 | spd_ind := RSL_SPDI_SPEECH, |
| 321 | ch_rate_type := t, |
| 322 | coding_alg_rate := alg |
| 323 | } |
| 324 | |
| 325 | /* 9.3.4 */ |
| 326 | type record RSL_IE_BS_Power { |
| 327 | uint1_t reserved, |
| 328 | boolean epc, |
| 329 | boolean fpc, |
| 330 | uint5_t power_level |
| 331 | } |
| 332 | |
| 333 | /* 9.3.8 */ |
| 334 | type record RSL_IE_FrameNumber { |
| 335 | uint5_t t1_p, |
| 336 | uint6_t t3, |
| 337 | uint5_t t2 |
| 338 | } |
| 339 | type RSL_IE_FrameNumber RSL_IE_StartingTime; |
| 340 | |
| 341 | /* 9.3.10 */ |
| 342 | type record RSL_IE_L1Info { |
| 343 | uint5_t ms_power_lvl, |
| 344 | boolean fpc, |
| 345 | uint2_t reserved, |
| 346 | uint8_t actual_ta |
| 347 | } |
| 348 | |
| 349 | /* 9.3.13 */ |
| 350 | type record RSL_IE_MS_Power { |
| 351 | uint2_t reserved, |
| 352 | boolean fpc_epc, |
| 353 | uint5_t power_level |
| 354 | } |
| 355 | |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 356 | /* 9.3.18 */ |
| 357 | type record RSL_IE_RachLoad { |
| 358 | uint8_t len, |
| 359 | uint16_t slot_count, |
| 360 | uint16_t busy_count, |
| 361 | uint16_t access_count |
| 362 | } with { variant (len) "LENGTHTO(slot_count,busy_count,access_count)" } |
| 363 | |
| 364 | template RSL_IE_RachLoad ts_RSL_IE_RachLoad(uint16_t slot, uint16_t busy, uint16_t acc) := { |
| 365 | len := 0, /* overwritten */ |
| 366 | slot_count := slot, |
| 367 | busy_count := busy, |
| 368 | access_count := acc |
| 369 | } |
| 370 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 371 | /* 9.3.19 */ |
| 372 | type record RSL_IE_RequestRef { |
| 373 | OCT1 ra, |
| 374 | RSL_IE_FrameNumber frame_nr |
| 375 | } |
| 376 | |
| 377 | /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */ |
| 378 | template RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := { |
| 379 | t1_p := (fn / 1326) mod 32, |
| 380 | t3 := fn mod 51, |
| 381 | t2 := fn mod 26 |
| 382 | } |
| 383 | |
| 384 | template RSL_IE_RequestRef ts_RSL_IE_ReqRef(OCT1 ra, GsmFrameNumber frame_nr) := { |
| 385 | ra := ra, |
| 386 | frame_nr := ts_RSL_IE_FrameNumber(frame_nr) |
| 387 | } |
| 388 | |
| 389 | /* 9.3.26 */ |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 390 | type enumerated RSL_Cause { |
| 391 | /* normal event */ |
| 392 | RSL_ERR_RADIO_IF_FAIL ('00'O), |
| 393 | RSL_ERR_RADIO_LINK_FAIL ('01'O), |
| 394 | RSL_ERR_HANDOVER_ACC_FAIL ('02'O), |
| 395 | RSL_ERR_TALKER_ACC_FAIL ('03'O), |
| 396 | RSL_ERR_OM_INTERVENTION ('07'O), |
| 397 | RSL_ERR_NORMAL_UNSPEC ('0f'O), |
| 398 | RSL_ERR_T_MSRFPCI_EXP ('18'O), |
| 399 | /* resource unavailable */ |
| 400 | RSL_ERR_EQUIPMENT_FAIL ('20'O), |
| 401 | RSL_ERR_RR_UNAVAIL ('21'O), |
| 402 | RSL_ERR_TERR_CH_FAIL ('22'O), |
| 403 | RSL_ERR_CCCH_OVERLOAD ('23'O), |
| 404 | RSL_ERR_ACCH_OVERLOAD ('24'O), |
| 405 | RSL_ERR_PROCESSOR_OVERLOAD ('25'O), |
| 406 | RSL_ERR_BTS_NOT_EQUIPPED ('27'O), |
| 407 | RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), |
| 408 | RSL_ERR_NOTIF_OVERFLOW ('29'O), |
| 409 | RSL_ERR_RES_UNAVAIL ('2f'O), |
| 410 | /* service or option not available */ |
| 411 | RSL_ERR_TRANSC_UNAVAIL ('30'O), |
| 412 | RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), |
| 413 | /* service or option not implemented */ |
| 414 | RSL_ERR_ENCR_UNIMPL ('40'O), |
| 415 | RSL_ERR_SERV_OPT_UNIMPL ('4f'O), |
| 416 | /* invalid message */ |
| 417 | RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), |
| 418 | RSL_ERR_INVALID_MESSAGE ('5f'O), |
| 419 | /* protocol error */ |
| 420 | RSL_ERR_MSG_DISCR ('60'O), |
| 421 | RSL_ERR_MSG_TYPE ('61'O), |
| 422 | RSL_ERR_MSG_SEQ ('62'O), |
| 423 | RSL_ERR_IE_ERROR ('63'O), |
| 424 | RSL_ERR_MAND_IE_ERROR ('64'O), |
| 425 | RSL_ERR_OPT_IE_ERROR ('65'O), |
| 426 | RSL_ERR_IE_NONEXIST ('66'O), |
| 427 | RSL_ERR_IE_LENGTH ('67'O), |
| 428 | RSL_ERR_IE_CONTENT ('68'O), |
| 429 | RSL_ERR_PROTO ('6f'O), |
| 430 | /* interworking */ |
| 431 | RSL_ERR_INTERWORKING ('7f'O) |
| 432 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 433 | type record RSL_IE_Cause { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 434 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 435 | uint1_t e, |
| 436 | RSL_Cause cause, |
| 437 | octetstring cause_ext optional |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 438 | } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 439 | |
| 440 | template RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 441 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 442 | e := 0, |
| 443 | cause := cause, |
| 444 | cause_ext := omit |
| 445 | } |
| 446 | |
| 447 | /* 9.3.40 */ |
| 448 | type enumerated RSL_ChanNeeded { |
| 449 | RSL_CHANNEED_ANY ('00'B), |
| 450 | RSL_CHANNEED_SDCCH ('01'B), |
| 451 | RSL_CHANNEED_TCH_F ('10'B), |
| 452 | RSL_CHANNEED_TCH_ForH ('11'B) |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 453 | } with { variant "FIELDLENGTH(2)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 454 | type record RSL_IE_ChanNeeded { |
| 455 | uint6_t reserved, |
| 456 | RSL_ChanNeeded chan_needed |
| 457 | } |
| 458 | |
| 459 | /* 9.3.53 */ |
| 460 | type record RSL_IE_MultirateCtrl { |
| 461 | uint3_t spare, |
| 462 | boolean od, |
| 463 | boolean pre, |
| 464 | uint2_t rae, |
| 465 | boolean tfo |
| 466 | } |
| 467 | |
| 468 | type enumerated RSL_IE_SysinfoType { |
| 469 | RSL_SYSTEM_INFO_8 ('00000000'B), |
| 470 | RSL_SYSTEM_INFO_1 ('00000001'B), |
| 471 | RSL_SYSTEM_INFO_2 ('00000010'B), |
| 472 | RSL_SYSTEM_INFO_3 ('00000011'B), |
| 473 | RSL_SYSTEM_INFO_4 ('00000100'B), |
| 474 | RSL_SYSTEM_INFO_5 ('00000101'B), |
| 475 | RSL_SYSTEM_INFO_6 ('00000110'B), |
| 476 | RSL_SYSTEM_INFO_7 ('00000111'B), |
| 477 | RSL_SYSTEM_INFO_16 ('00001000'B), |
| 478 | RSL_SYSTEM_INFO_17 ('00001001'B), |
| 479 | RSL_SYSTEM_INFO_2bis ('00001010'B), |
| 480 | RSL_SYSTEM_INFO_2ter ('00001011'B), |
| 481 | RSL_SYSTEM_INFO_5bis ('00001101'B), |
| 482 | RSL_SYSTEM_INFO_5ter ('00001110'B), |
| 483 | RSL_SYSTEM_INFO_10 ('00001111'B), |
| 484 | RSL_EXT_MEAS_ORDER ('01000111'B), |
| 485 | RSL_MEAS_INFO ('01001000'B), |
| 486 | RSL_SYSTEM_INFO_13 ('00101000'B), |
| 487 | RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| 488 | RSL_SYSTEM_INFO_2quater ('00101001'B), |
| 489 | RSL_SYSTEM_INFO_9 ('00101010'B), |
| 490 | RSL_SYSTEM_INFO_18 ('00101011'B), |
| 491 | RSL_SYSTEM_INFO_19 ('00101100'B), |
| 492 | RSL_SYSTEM_INFO_20 ('00101101'B) |
| 493 | } with { variant "FIELDLENGTH(8)" } |
| 494 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 495 | type record RSL_IE_IPA_ConnectionStats { |
| 496 | uint8_t len, |
| 497 | uint32_t tx_packets, |
| 498 | uint32_t tx_octets, |
| 499 | uint32_t rx_packets, |
| 500 | uint32_t rx_octets, |
| 501 | uint32_t lost_packets, |
| 502 | uint32_t jitter, |
| 503 | uint32_t avg_delay |
| 504 | } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| 505 | |
| 506 | type enumerated RSL_IPA_SpeechMode { |
| 507 | RSL_IPA_SPM_SENDRECV ('00'B), |
| 508 | RSL_IPA_SPM_RECVONLY ('01'B), |
| 509 | RSL_IPA_SPM_SENDONLY ('10'B), |
| 510 | RSL_IPA_SPM_RESERVED ('11'B) |
| 511 | } with { variant "FIELDLENGTH(2)" } |
| 512 | |
| 513 | type enumerated RSL_IPA_Codec { |
| 514 | RSL_IPA_CODEC_FR ('0000'B), |
| 515 | RSL_IPA_CODEC_EFR ('0001'B), |
| 516 | RSL_IPA_CODEC_AMR_F ('0010'B), |
| 517 | RSL_IPA_CODEC_HR ('0011'B), |
| 518 | RSL_IPA_CODEC_AMR_H ('0101'B), |
| 519 | RSL_IPA_CODEC_RTP_PT ('1111'B) |
| 520 | } with { variant "FIELDLENGTH(4)" } |
| 521 | |
| 522 | type record RSL_IE_IPA_SpeechMode { |
| 523 | BIT2 reserved, |
| 524 | RSL_IPA_SpeechMode mode, |
| 525 | RSL_IPA_Codec codec |
| 526 | } |
| 527 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 528 | /* union of all IE bodies */ |
| 529 | type union RSL_IE_Body { |
| 530 | RslChannelNr chan_nr, |
| 531 | RslLinkId link_id, |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 532 | RSL_L16V l3_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 533 | RSL_LV rlm_cause, |
| 534 | uint8_t release_mode, |
| 535 | RSL_IE_ActivationType act_type, |
| 536 | RSL_IE_ChannelMode chan_mode, |
| 537 | uint8_t handover_ref, |
| 538 | RSL_IE_BS_Power bs_power, |
| 539 | RSL_IE_MS_Power ms_power, |
| 540 | uint8_t timing_adv, |
| 541 | RSL_IE_MultirateCtrl multirate_ctrl, |
| 542 | RSL_IE_FrameNumber frame_nr, |
| 543 | RSL_IE_Cause cause, |
| 544 | uint8_t access_delay, |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 545 | RSL_IE_RachLoad rach_load, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 546 | uint8_t meas_res_nr, |
| 547 | RSL_IE_L1Info l1_info, |
| 548 | RSL_IE_SysinfoType sysinfo_type, |
| 549 | uint16_t paging_load, |
| 550 | uint8_t paging_group, |
| 551 | RSL_IE_ChanNeeded chan_needed, |
| 552 | RSL_IE_StartingTime starting_time, |
| 553 | RSL_IE_RequestRef req_ref, |
| 554 | RSL_LV full_imm_ass_info, |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 555 | RSL_LV ms_identity, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 556 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 557 | uint16_t ipa_conn_id, |
| 558 | uint16_t ipa_local_port, |
| 559 | uint16_t ipa_remote_port, |
| 560 | uint32_t ipa_local_ip, |
| 561 | uint32_t ipa_remote_ip, |
| 562 | uint8_t ipa_rtp_pt, |
| 563 | uint8_t ipa_rtp_pt2, |
| 564 | RSL_IE_IPA_ConnectionStats ipa_stats, |
| 565 | RSL_IE_IPA_SpeechMode ipa_speech_mode, |
| 566 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 567 | RSL_LV other |
| 568 | } |
| 569 | |
| 570 | type record RSL_IE { |
| 571 | RSL_IE_Type iei, |
| 572 | RSL_IE_Body body |
| 573 | } with { variant (body) "CROSSTAG( |
| 574 | chan_nr, iei = RSL_IE_CHAN_NR; |
| 575 | link_id, iei = RSL_IE_LINK_IDENT; |
| 576 | l3_info, iei = RSL_IE_L3_INFO; |
| 577 | rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| 578 | release_mode, iei = RSL_IE_RELEASE_MODE; |
| 579 | act_type, iei = RSL_IE_ACT_TYPE; |
| 580 | chan_mode, iei = RSL_IE_CHAN_MODE; |
| 581 | handover_ref, iei = RSL_IE_HANDO_REF; |
| 582 | bs_power, iei = RSL_IE_BS_POWER; |
| 583 | ms_power, iei = RSL_IE_MS_POWER; |
| 584 | timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
| 585 | multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
| 586 | |
| 587 | frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| 588 | cause, iei = RSL_IE_CAUSE; |
| 589 | access_delay, iei = RSL_IE_ACCESS_DELAY; |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 590 | rach_load, iei = RSL_IE_RACH_LOAD; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 591 | meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
| 592 | l1_info, iei = RSL_IE_L1_INFO; |
| 593 | sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| 594 | paging_load, iei = RSL_IE_PAGING_LOAD; |
| 595 | paging_group, iei = RSL_IE_PAGING_GROUP; |
| 596 | chan_needed, iei = RSL_IE_CHAN_NEEDED; |
| 597 | starting_time, iei = RSL_IE_STARTNG_TIME; |
| 598 | |
| 599 | req_ref, iei = RSL_IE_REQ_REFERENCE; |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 600 | full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| 601 | ms_identity, iei = RSL_IE_MS_IDENTITY; |
| 602 | other, iei = RSL_IE_FULL_BCCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 603 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 604 | ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| 605 | ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| 606 | ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| 607 | ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| 608 | ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| 609 | ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| 610 | ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| 611 | ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| 612 | ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
| 613 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 614 | other, OTHERWISE; |
| 615 | )" }; |
| 616 | |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 617 | /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| 618 | * that it needs to set for a given union-choice (body). So we have to explicitly |
| 619 | * specify the IEI by the caller :( */ |
| 620 | template RSL_IE t_RSL_IE(RSL_IE_Type iei, template RSL_IE_Body body) := { |
| 621 | iei := iei, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 622 | body := body |
| 623 | } |
| 624 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 625 | template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| 626 | iei := ?, /* overwritten? */ |
| 627 | body := body |
| 628 | } |
| 629 | |
| 630 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 631 | type record of RSL_IE RSL_IE_List; |
| 632 | |
| 633 | type record RSL_Message { |
| 634 | RSL_MessageDiscriminator msg_disc, |
| 635 | RSL_MessageType msg_type, |
| 636 | RSL_IE_List ies optional |
| 637 | } |
| 638 | |
| 639 | external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| 640 | with { extension "prototype(convert) encode(RAW)" }; |
| 641 | external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| 642 | with { extension "prototype(convert) decode(RAW)" }; |
| 643 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 644 | template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 645 | RSL_MessageType m_type) := { |
| 646 | msg_disc := m_disc, |
| 647 | msg_type := m_type, |
| 648 | ies := * |
| 649 | } |
| 650 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 651 | template RSL_Message ts_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
| 652 | template RSL_MessageType msg_type, |
| 653 | template RSL_IE_List ies := omit) := { |
| 654 | msg_disc := m_disc, |
| 655 | msg_type := msg_type, |
| 656 | ies := ies |
| 657 | } |
| 658 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 659 | template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| 660 | msg_disc := ?, |
| 661 | msg_type := msg_type, |
| 662 | ies := * |
| 663 | } |
| 664 | |
| 665 | /* Common Channel Management */ |
| 666 | template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 667 | msg_disc := { RSL_MDISC_CCHAN, ? } |
| 668 | } |
| 669 | |
| 670 | /* RLL */ |
| 671 | template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 672 | msg_disc := { RSL_MDISC_RLL, true } |
| 673 | } |
| 674 | |
| 675 | /* Dedicated Channel Management */ |
| 676 | template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 677 | msg_disc := { RSL_MDISC_DCHAN, ? } |
| 678 | } |
| 679 | |
| 680 | /* Dedicated Channel Management */ |
| 681 | template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 682 | msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| 683 | } |
| 684 | |
| 685 | |
| 686 | /* dedicated channel or RLL */ |
| 687 | template RSL_Message tr_RSL_MsgTypeDR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 688 | msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,true}, {RSL_MDISC_IPACCESS,false}) |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 689 | } |
| 690 | |
| 691 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 692 | /* 8.3.1 BSC -> BTS */ |
| 693 | template RSL_Message ts_RSL_DATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 694 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 695 | msg_type := RSL_MT_DATA_REQ, |
| 696 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 697 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 698 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 699 | 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] | 700 | } |
| 701 | } |
| 702 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 703 | template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| 704 | template RslLinkId link_id := ?, |
| 705 | template octetstring l3_info := ?) := { |
| 706 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 707 | msg_type := RSL_MT_DATA_REQ, |
| 708 | ies :={ |
| 709 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 710 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 711 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 716 | /* 8.3.2 BTS -> BSC */ |
| 717 | template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 718 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 719 | msg_type := RSL_MT_DATA_IND, |
| 720 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 721 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 722 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 723 | 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] | 724 | } |
| 725 | } |
| 726 | |
| 727 | /* 8.3.3 BTS -> BSC */ |
| 728 | template RSL_Message ts_RSL_ERROR_IND(RslChannelNr chan_nr, RslLinkId link_id, RSL_Cause cause) := { |
| 729 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 730 | msg_type := RSL_MT_ERROR_IND, |
| 731 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 732 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 733 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 734 | 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] | 735 | } |
| 736 | } |
| 737 | |
| 738 | /* 8.3.6 BTS -> BSC */ |
| 739 | template RSL_Message ts_RSL_EST_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 740 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 741 | msg_type := RSL_MT_EST_IND, |
| 742 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 743 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 744 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 745 | 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] | 746 | } |
| 747 | } |
| 748 | |
| 749 | /* 8.3.7 BSC -> BTS */ |
| 750 | template RSL_Message ts_RSL_REL_REQ(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 751 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 752 | msg_type := RSL_MT_REL_REQ, |
| 753 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 754 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 755 | 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] | 756 | } |
| 757 | } |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 758 | template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
| 759 | template RslLinkId link_id) := { |
| 760 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 761 | msg_type := RSL_MT_REL_REQ, |
| 762 | ies :={ |
| 763 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 764 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 765 | * |
| 766 | } |
| 767 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 768 | |
| 769 | /* 8.3.8 BTS -> BSC */ |
| 770 | template RSL_Message ts_RSL_REL_CONF(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 771 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 772 | msg_type := RSL_MT_REL_CONF, |
| 773 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 774 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 775 | 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] | 776 | } |
| 777 | } |
| 778 | |
| 779 | /* 8.3.9 BTS -> BSC */ |
| 780 | template RSL_Message ts_RSL_REL_IND(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 781 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 782 | msg_type := RSL_MT_REL_IND, |
| 783 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 784 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 785 | 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] | 786 | } |
| 787 | } |
| 788 | |
| 789 | /* 8.3.10 BSC -> BTS */ |
| 790 | template RSL_Message ts_RSL_UNITDATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| 791 | modifies ts_RSL_DATA_REQ := { |
| 792 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 793 | } |
| 794 | |
| 795 | /* 8.3.11 BTS -> BSC */ |
| 796 | template RSL_Message ts_RSL_UNITDATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| 797 | modifies ts_RSL_DATA_IND := { |
| 798 | msg_type := RSL_MT_UNIT_DATA_IND |
| 799 | } |
| 800 | |
| 801 | |
| 802 | /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| 803 | |
| 804 | /* 8.4.1 BSC -> BTS */ |
| 805 | template RSL_Message ts_RSL_CHAN_ACT(RslChannelNr chan_nr, RSL_IE_ChannelMode mode) := { |
| 806 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 807 | msg_type := RSL_MT_CHAN_ACTIV, |
| 808 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 809 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 810 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), |
| 811 | 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] | 812 | /* lots of optional IEs */ |
| 813 | } |
| 814 | } |
| 815 | |
| 816 | /* 8.4.2 BTS -> BSC */ |
| 817 | template RSL_Message ts_RSL_CHAN_ACT_ACK(RslChannelNr chan_nr, GsmFrameNumber fn) := { |
| 818 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 819 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 820 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 821 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 822 | 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] | 823 | } |
| 824 | } |
| 825 | |
| 826 | /* 8.4.3 BTS -> BSC */ |
| 827 | template RSL_Message ts_RSL_CHAN_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 828 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 829 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 830 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 831 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 832 | 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] | 833 | } |
| 834 | } |
| 835 | |
| 836 | /* 8.4.4 BTS -> BSC */ |
| 837 | template RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 838 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 839 | msg_type := RSL_MT_CONN_FAIL, |
| 840 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 841 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 842 | 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] | 843 | } |
| 844 | } |
| 845 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 846 | /* 8.4.5 BSC -> BTS */ |
| 847 | template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| 848 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 849 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 850 | ies := { |
| 851 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 852 | } |
| 853 | } |
| 854 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 855 | /* 8.4.10 BTS -> BSC */ |
| 856 | template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { |
| 857 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 858 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 859 | ies := { |
| 860 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 861 | } |
| 862 | } |
| 863 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 864 | /* 8.4.11 BTS -> BSC */ |
| 865 | template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause) |
| 866 | modifies ts_RSL_CHAN_ACT_NACK := { |
| 867 | msg_type := RSL_MT_MODE_MODIFY_NACK |
| 868 | } |
| 869 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 870 | /* 8.4.19 BTS -> BSC */ |
| 871 | template RSL_Message ts_RSL_RF_CHAN_REL_ACK(RslChannelNr chan_nr) := |
| 872 | ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 873 | RSL_MT_RF_CHAN_REL_ACK, |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 874 | { 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] | 875 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 876 | /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| 877 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 878 | /* 8.5.2 BTS -> BSC */ |
| 879 | template RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, uint16_t acc_ct) := { |
| 880 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 881 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 882 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 883 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 884 | 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] | 885 | } |
| 886 | } |
| 887 | template RSL_Message ts_RSL_PAGING_LOAD_IND(uint16_t buffer_space) := { |
| 888 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 889 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 890 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 891 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 892 | 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] | 893 | } |
| 894 | } |
| 895 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 896 | /* 8.5.3 BTS -> BSC */ |
Harald Welte | 101fbed | 2017-12-07 17:56:38 +0100 | [diff] [blame] | 897 | template 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] | 898 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 899 | msg_type := RSL_MT_CHAN_RQD, |
| 900 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 901 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 902 | t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| 903 | 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] | 904 | } |
| 905 | } |
| 906 | |
| 907 | /* 8.5.4 BTS -> BSC */ |
| 908 | template RSL_Message ts_DELETE_IND(RslChannelNr chan_nr, octetstring imm_ass) := { |
| 909 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 910 | msg_type := RSL_MT_DELETE_IND, |
| 911 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 912 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 913 | 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] | 914 | } |
| 915 | } |
| 916 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 917 | /* 8.5.5 BSC -> BTS */ |
| 918 | template RSL_Message tr_RSL_PAGING_CMD(template octetstring identity, template uint3_t tn := ?) := { |
| 919 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 920 | msg_type := RSL_MT_PAGING_CMD, |
| 921 | ies := { |
| 922 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 923 | tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 924 | tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_RSL_LV(identity)}), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 925 | * /* opt: channel needed, eMLPP prio */ |
| 926 | } |
| 927 | } |
| 928 | |
| 929 | /* 8.5.6 BSC -> BTS */ |
| 930 | template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
| 931 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 932 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 933 | ies := { |
| 934 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 935 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 940 | /* 8.6.4 BTS -> BSC */ |
| 941 | template RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
| 942 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 943 | msg_type := RSL_MT_ERROR_IND, |
| 944 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 945 | 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] | 946 | } |
| 947 | } |
| 948 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 949 | |
| 950 | /* Abis/IP specific messages */ |
| 951 | |
| 952 | template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
| 953 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 954 | msg_type := RSL_MT_IPAC_CRCX, |
| 955 | ies := { |
| 956 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 957 | * |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | template RSL_Message ts_RSL_IPA_CRCX_ACK(RslChannelNr chan_nr, |
| 962 | uint16_t ipa_conn_id, uint32_t local_ip, |
| 963 | uint16_t local_port, uint7_t rtp_pt2) := { |
| 964 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 965 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 966 | ies := { |
| 967 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 968 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 969 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 970 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 971 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 972 | } |
| 973 | } |
| 974 | |
| 975 | template RSL_Message ts_RSL_IPA_CRCX_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 976 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 977 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 978 | ies := { |
| 979 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 980 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 981 | } |
| 982 | } |
| 983 | |
| 984 | template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| 985 | template uint16_t ipa_conn_id) := { |
| 986 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 987 | msg_type := RSL_MT_IPAC_MDCX, |
| 988 | ies := { |
| 989 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 990 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 991 | * |
| 992 | } |
| 993 | } |
| 994 | |
| 995 | template RSL_Message ts_RSL_IPA_MDCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
| 996 | uint32_t remote_ip, uint16_t remote_port, |
| 997 | uint7_t rtp_pt2) := { |
| 998 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 71b5ec8 | 2017-12-16 23:01:10 +0100 | [diff] [blame] | 999 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1000 | ies := { |
| 1001 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1002 | /* optional */ |
| 1003 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1004 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 1005 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| 1006 | /* optional: RTP Payload Type */ |
| 1007 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1008 | } |
| 1009 | } |
| 1010 | |
| 1011 | template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| 1012 | template uint16_t ipa_conn_id) := { |
| 1013 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1014 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1015 | ies := { |
| 1016 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1017 | /* optional connection ID */ |
| 1018 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1019 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1020 | } |
| 1021 | } |
| 1022 | |
| 1023 | template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t ipa_conn_id, |
| 1024 | RSL_IE_IPA_ConnectionStats stats, RSL_Cause cause) := { |
| 1025 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1026 | msg_type := RSL_MT_IPAC_DLCX_IND, |
| 1027 | ies := { |
| 1028 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1029 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1030 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| 1031 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1032 | } |
| 1033 | } |
| 1034 | |
| 1035 | template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| 1036 | template uint16_t ipa_conn_id := omit) := { |
| 1037 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1038 | msg_type := RSL_MT_IPAC_DLCX, |
| 1039 | ies := { |
| 1040 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1041 | /* FIXME: optional conn_id */ |
| 1042 | * |
| 1043 | } |
| 1044 | } |
| 1045 | |
| 1046 | template RSL_Message ts_RSL_IPA_DLCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
| 1047 | template RSL_IE_IPA_ConnectionStats stats) := { |
| 1048 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1049 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1050 | ies := { |
| 1051 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1052 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1053 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| 1058 | template uint16_t ipa_conn_id) := { |
| 1059 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1060 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1061 | ies := { |
| 1062 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1063 | /* optional connection ID */ |
| 1064 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1065 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1066 | } |
| 1067 | } |
| 1068 | |
| 1069 | template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { |
| 1070 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1071 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 1072 | ies := { |
| 1073 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1074 | } |
| 1075 | } |
| 1076 | |
| 1077 | template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, RSL_IE_FrameNumber fn) := { |
| 1078 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1079 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 1080 | ies := { |
| 1081 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1082 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| 1083 | } |
| 1084 | } |
| 1085 | |
| 1086 | template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1087 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1088 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 1089 | ies := { |
| 1090 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1091 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1092 | } |
| 1093 | } |
| 1094 | |
| 1095 | template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
| 1096 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1097 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 1098 | ies := { |
| 1099 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1100 | } |
| 1101 | } |
| 1102 | |
| 1103 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
| 1104 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1105 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 1106 | ies := { |
| 1107 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1108 | } |
| 1109 | } |
| 1110 | |
| 1111 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1112 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1113 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 1114 | ies := { |
| 1115 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1116 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1117 | } |
| 1118 | } |
| 1119 | |
| 1120 | |
| 1121 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1122 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |