aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-08-14 19:15:57 +0200
committerHarald Welte <laforge@gnumonks.org>2012-08-14 19:15:57 +0200
commitfe568f235f02067b77f9e0b03bfb3d2d7ffd605a (patch)
tree15b9aa6d0973c7df344d468aea714fb2598bfa1a
parentdf49a983e2523b94bb62fec3076259355fe0b52b (diff)
abis_nm: Add function abis_nm_get_attr() to get attributes from BTS
-rw-r--r--openbsc/include/openbsc/abis_nm.h3
-rw-r--r--openbsc/src/libbsc/abis_nm.c19
2 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h
index ae9b99945..9c4cc3309 100644
--- a/openbsc/include/openbsc/abis_nm.h
+++ b/openbsc/include/openbsc/abis_nm.h
@@ -81,6 +81,9 @@ int abis_nm_conn_terr_sign(struct gsm_bts_trx *trx,
int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts,
uint8_t e1_port, uint8_t e1_timeslot,
uint8_t e1_subslot);
+int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class,
+ uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+ uint8_t *attr, uint8_t attr_len);
int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len);
int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len);
int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb);
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index 673f43e56..ee0dd6068 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -1370,6 +1370,25 @@ int abis_nm_disc_terr_traf(struct abis_nm_h *h, struct abis_om_obj_inst *inst,
}
#endif
+/* Chapter 8.11.1 */
+int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class,
+ uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
+ uint8_t *attr, uint8_t attr_len)
+{
+ struct abis_om_hdr *oh;
+ struct msgb *msg = nm_msgb_alloc();
+ uint8_t *cur;
+
+ DEBUGP(DNM, "Get Attr (bts=%d)\n", bts->nr);
+
+ oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
+ fill_om_fom_hdr(oh, attr_len, NM_MT_GET_ATTR, obj_class,
+ bts_nr, trx_nr, ts_nr);
+ msgb_tl16v_put(msg, NM_ATT_LIST_REQ_ATTR, attr_len, attr);
+
+ return abis_nm_sendmsg(bts, msg);
+}
+
/* Chapter 8.6.1 */
int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len)
{