summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-07-12 09:45:05 +0200
committerHarald Welte <laforge@gnumonks.org>2009-07-12 09:45:05 +0200
commit86c162dce88ac12073d05f4386f00d5c65cabcb3 (patch)
tree11961d70192a5b5a8b0ff79ddca5859339347d28
parent0efe9b7006d9b3efc830a6c66bb7206b78a0980f (diff)
give ip.access RSL IE's their proper names
-rw-r--r--openbsc/include/openbsc/abis_rsl.h14
-rw-r--r--openbsc/src/abis_rsl.c22
2 files changed, 25 insertions, 11 deletions
diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h
index c928ffa2d..22a6a00b1 100644
--- a/openbsc/include/openbsc/abis_rsl.h
+++ b/openbsc/include/openbsc/abis_rsl.h
@@ -198,10 +198,24 @@ enum abis_rsl_ie {
RSL_IE_TFO_STATUS,
RSL_IE_LLP_APDU,
+ RSL_IE_IPAC_SRTP_CONFIG = 0xe0,
+ RSL_IE_IPAC_PROXY_UDP = 0xe1,
+ RSL_IE_IPAC_BSCMPL_TOUT = 0xe2,
RSL_IE_IPAC_REMOTE_IP = 0xf0,
RSL_IE_IPAC_REMOTE_PORT = 0xf1,
+ RSL_IE_IPAC_RTP_PAYLOAD = 0xf2,
RSL_IE_IPAC_LOCAL_PORT = 0xf3,
+ RSL_IE_IPAC_SPEECH_MODE = 0xf4,
RSL_IE_IPAC_LOCAL_IP = 0xf5,
+ RSL_IE_IPAC_CONN_STAT = 0xf6,
+ RSL_IE_IPAC_HO_C_PARMS = 0xf7,
+ RSL_IE_IPAC_CONN_ID = 0xf8,
+ RSL_IE_IPAC_RTP_CSD_FMT = 0xf9,
+ RSL_IE_IPAC_RTP_JIT_BUF = 0xfa,
+ RSL_IE_IPAC_RTP_COMPR = 0xfb,
+ RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc,
+ RSL_IE_IPAC_RTP_MPLEX = 0xfd,
+ RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe,
};
/* Chapter 9.3.1 */
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);