laforge has uploaded this change for review.
nanoBTS: print [supported] versions of MOs
ip.access has the concept of MO versions. We've always received
that information, but never used it in any way. Start by logging it.
The first byte is the default version, the other bytes describe the
optional other versions supported by the BTS. One could switch to
such an alternate version by a Set Attributes before OPSTART.
Change-Id: I9aefcae31dc9139e90161b4690e77d4958021d45
---
M src/osmo-bsc/bts_ipaccess_nanobts.c
1 file changed, 33 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/53/32653/1
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 8669d64..21e9c1c 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -195,12 +195,29 @@
/* Callback function to be called every time we receive a 12.21 SW activated report */
static int sw_activ_rep(struct msgb *mb)
{
+ struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
struct e1inp_sign_link *sign_link = mb->dst;
struct gsm_bts *bts = sign_link->trx->bts;
struct gsm_bts_trx *trx;
struct gsm_gprs_nsvc *nsvc;
struct gsm_bts_trx_ts *ts;
+ struct tlv_parsed tp;
+
+ /* we don't care about the results. Even in erroneous cases, the 'tp' is zero-initialised */
+ abis_nm_tlv_parse(&tp, bts, foh->data, oh->length - sizeof(*foh));
+
+ if (TLVP_PRES_LEN(&tp, NM_ATT_IPACC_OBJ_VERSION, 1)) {
+ const uint8_t *versions = TLVP_VAL(&tp, NM_ATT_IPACC_OBJ_VERSION);
+ char buf[256];
+ struct osmo_strbuf sb = { .buf = buf, .len = sizeof(buf) };
+ unsigned int i;
+
+ for (i = 0; i < TLVP_LEN(&tp, NM_ATT_IPACC_OBJ_VERSION); i++)
+ OSMO_STRBUF_APPEND(sb, snprintf, "%u ", versions[i]);
+
+ LOGPFOH(DNM, LOGL_INFO, foh, "Object Versions supported: %s\n", buf);
+ }
if (!is_ipa_abisip_bts(bts))
return 0;
To view, visit change 32653. To unsubscribe, or for help writing mail filters, visit settings.