aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_rsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/abis_rsl.c')
-rw-r--r--openbsc/src/abis_rsl.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c
index a5b9a9059..6f14c60bf 100644
--- a/openbsc/src/abis_rsl.c
+++ b/openbsc/src/abis_rsl.c
@@ -107,9 +107,9 @@ static const struct tlv_definition rsl_att_tlvdef = {
[RSL_IE_IPAC_REMOTE_PORT] = { TLV_TYPE_FIXED, 2 },
[RSL_IE_IPAC_LOCAL_IP] = { TLV_TYPE_FIXED, 4 },
[RSL_IE_IPAC_LOCAL_PORT] = { TLV_TYPE_FIXED, 2 },
- [0xf4] = { TLV_TYPE_TV },
- [0xf8] = { TLV_TYPE_FIXED, 2 },
- [0xfc] = { TLV_TYPE_TV },
+ [RSL_IE_IPAC_SPEECH_MODE] = { TLV_TYPE_TV },
+ [RSL_IE_IPAC_CONN_ID] = { TLV_TYPE_FIXED, 2 },
+ [RSL_IE_IPAC_RTP_PAYLOAD2] = { TLV_TYPE_TV },
},
};
#define rsl_tlv_parse(dec, buf, len) \
@@ -850,7 +850,7 @@ static int rsl_rx_meas_res(struct msgb *msg)
DEBUGPC(DMEAS, "MS_TO=%d ",
*TLVP_VAL(&tp, RSL_IE_MS_TIMING_OFFSET));
if (TLVP_PRESENT(&tp, RSL_IE_L1_INFO)) {
- u_int8_t *val = TLVP_VAL(&tp, RSL_IE_L1_INFO);
+ const u_int8_t *val = TLVP_VAL(&tp, RSL_IE_L1_INFO);
u_int8_t pwr_lvl = val[0] >> 3;
DEBUGPC(DMEAS, "L1_MS_PWR=%ddBm ",
ms_pwr_dbm(msg->trx->bts->band, pwr_lvl));
@@ -1195,7 +1195,7 @@ int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port, u_i
dh->chan_nr = lchan2chan_nr(lchan);
att_f8 = msgb_put(msg, sizeof(f8)+1);
- att_f8[0] = 0xf8;
+ att_f8[0] = RSL_IE_IPAC_CONN_ID;
att_f8[1] = f8 >> 8;
att_f8[2] = f8 & 0xff;
@@ -1212,8 +1212,8 @@ int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port, u_i
att_port[1] = port >> 8;
att_port[2] = port & 0xff;
- msgb_tv_put(msg, 0xf4, 1); /* F4 01 */
- msgb_tv_put(msg, 0xfc, fc); /* FC 7F */
+ msgb_tv_put(msg, RSL_IE_IPAC_SPEECH_MODE, 1); /* F4 01 */
+ msgb_tv_put(msg, RSL_IE_IPAC_RTP_PAYLOAD2, fc); /* FC 7F */
msg->trx = lchan->ts->trx;
return abis_rsl_sendmsg(msg);
@@ -1234,8 +1234,8 @@ static int abis_rsl_rx_ipacc_bindack(struct msgb *msg)
rsl_tlv_parse(&tv, dh->data, msgb_l2len(msg)-sizeof(*dh));
if (!TLVP_PRESENT(&tv, RSL_IE_IPAC_LOCAL_PORT) ||
!TLVP_PRESENT(&tv, RSL_IE_IPAC_LOCAL_IP) ||
- !TLVP_PRESENT(&tv, 0xfc) ||
- !TLVP_PRESENT(&tv, 0xf8)) {
+ !TLVP_PRESENT(&tv, RSL_IE_IPAC_RTP_PAYLOAD2) ||
+ !TLVP_PRESENT(&tv, RSL_IE_IPAC_CONN_ID)) {
DEBUGPC(DRSL, "mandatory IE missing");
return -EINVAL;
}
@@ -1243,7 +1243,7 @@ static int abis_rsl_rx_ipacc_bindack(struct msgb *msg)
port = *((u_int16_t *) TLVP_VAL(&tv, RSL_IE_IPAC_LOCAL_PORT));
attr_f8 = *((u_int16_t *) TLVP_VAL(&tv, 0xf8));
- DEBUGPC(DRSL, "IP=%s PORT=%d FC=%d F8=%d",
+ DEBUGPC(DRSL, "IP=%s PORT=%d RTP_PAYLOAD2=%d CONN_ID=%d",
inet_ntoa(ip), ntohs(port), *TLVP_VAL(&tv, 0xfc),
ntohs(attr_f8));
@@ -1251,7 +1251,7 @@ static int abis_rsl_rx_ipacc_bindack(struct msgb *msg)
ts->abis_ip.bound_ip = ntohl(ip.s_addr);
ts->abis_ip.bound_port = ntohs(port);
ts->abis_ip.attr_f8 = ntohs(attr_f8);
- ts->abis_ip.attr_fc = *TLVP_VAL(&tv, 0xfc);
+ ts->abis_ip.attr_fc = *TLVP_VAL(&tv, RSL_IE_IPAC_RTP_PAYLOAD2);
dispatch_signal(SS_ABISIP, S_ABISIP_BIND_ACK, msg->lchan);