Get basic BTS attributes
Request BTS attributes via OML on connection and parse the response:
request/parse incoming response as sw-config.
Note: only basic BTS-wide KV attributes wrapped in sw-config are
supported for now.
Change-Id: I589be51daca0cb9e1f3473b93e910e46b06e23ae
Related: OS#1614
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 521fc89..cda4350 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -310,6 +310,10 @@
struct input_signal_data *isd = signal_data;
struct gsm_bts_trx *trx = isd->trx;
int ts_no, lchan_no;
+ const uint8_t attr[] = { NM_ATT_SW_CONFIG, };
+
+ /* we should not request more attributes than we're ready to handle */
+ OSMO_ASSERT(sizeof(attr) < MAX_BTS_ATTR);
if (subsys != SS_L_INPUT)
return -EINVAL;
@@ -333,6 +337,8 @@
for (i = 0; i < ARRAY_SIZE(cur_trx->ts); i++)
generate_ma_for_ts(&cur_trx->ts[i]);
}
+
+ abis_nm_get_attr(trx->bts, NM_OC_BTS, trx->bts->nr, trx->nr, 0xFF, attr, sizeof(attr));
}
if (isd->link_type == E1INP_SIGN_RSL)
bootstrap_rsl(trx);