aboutsummaryrefslogtreecommitdiffstats
path: root/src/abis_nm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-02-18 19:51:53 +0000
committerHarald Welte <laforge@gnumonks.org>2009-02-18 19:51:53 +0000
commit0313394a88540780c64e5f0e9294a147b54c11ba (patch)
tree4c3d1ae28146e3b2cc87a06d25fe1ba2c64bc6af /src/abis_nm.c
parent2c38aa8dcd4e40aac275564fefa8c0f99c82f491 (diff)
* support BS11 specific IE types in abis_nm
* make bs11_config compile again * now that we have a proper TLV parser, use it to parse the status response on the serial port
Diffstat (limited to 'src/abis_nm.c')
-rw-r--r--src/abis_nm.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/abis_nm.c b/src/abis_nm.c
index 33fc0bfbc..9793dc4cd 100644
--- a/src/abis_nm.c
+++ b/src/abis_nm.c
@@ -217,6 +217,8 @@ static const struct tlv_definition nm_att_tlvdef = {
[NM_ATT_BS11_LMT_LOGIN_TIME] = { TLV_TYPE_TLV },
[NM_ATT_BS11_LMT_USER_ACC_LEV] ={ TLV_TYPE_TLV },
[NM_ATT_BS11_LMT_USER_NAME] = { TLV_TYPE_TLV },
+ [NM_ATT_BS11_BTS_STATE] = { TLV_TYPE_TLV },
+ [NM_ATT_BS11_E1_STATE] = { TLV_TYPE_TLV },
/* ip.access specifics */
[NM_ATT_IPACC_RSL_BSC_IP] = { TLV_TYPE_FIXED, 4 },
[NM_ATT_IPACC_RSL_BSC_PORT] = { TLV_TYPE_FIXED, 2 },
@@ -224,7 +226,11 @@ static const struct tlv_definition nm_att_tlvdef = {
},
};
-#define nm_tlv_parse(dec, buf, len) tlv_parse(dec, &nm_att_tlvdef, buf, len)
+
+int abis_nm_tlv_parse(struct tlv_parsed *tp, const u_int8_t *buf, int len)
+{
+ return tlv_parse(tp, &nm_att_tlvdef, buf, len);
+}
static int is_in_arr(enum abis_nm_msgtype mt, const enum abis_nm_msgtype *arr, int size)
{
@@ -462,7 +468,7 @@ static int abis_nm_rx_statechg_rep(struct msgb *mb)
new_state = *nm_state;
- nm_tlv_parse(&tp, foh->data, oh->length-sizeof(*foh));
+ abis_nm_tlv_parse(&tp, foh->data, oh->length-sizeof(*foh));
if (TLVP_PRESENT(&tp, NM_ATT_OPER_STATE)) {
new_state.operational = *TLVP_VAL(&tp, NM_ATT_OPER_STATE);
DEBUGPC(DNM, "OP_STATE=%s ", opstate_name(new_state.operational));
@@ -584,7 +590,7 @@ static int abis_nm_rx_chg_adm_state_ack(struct msgb *mb)
struct tlv_parsed tp;
u_int8_t adm_state;
- nm_tlv_parse(&tp, foh->data, oh->length-sizeof(*foh));
+ abis_nm_tlv_parse(&tp, foh->data, oh->length-sizeof(*foh));
if (!TLVP_PRESENT(&tp, NM_ATT_ADM_STATE))
return -EINVAL;
@@ -1858,7 +1864,7 @@ static int abis_nm_rx_ipacc(struct msgb *msg)
}
foh = (struct abis_om_fom_hdr *) oh->data + 1 + idstrlen;
- nm_tlv_parse(&tp, foh->data, oh->length-sizeof(*foh));
+ abis_nm_tlv_parse(&tp, foh->data, oh->length-sizeof(*foh));
switch (foh->msg_type) {
case NM_MT_IPACC_RSL_CONNECT_ACK: