diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-11-13 14:43:15 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-11-13 14:43:15 +0100 |
commit | cf01b8ff56d12a6fef4960ae5e9dc3af9b94f5ec (patch) | |
tree | 5c81d3e15fa473b0004fadbe4eb1b2b7238a0fc6 /openbsc | |
parent | 654c9df3c83b00e1331f85df36835962adfa7782 (diff) |
ipaccess-config: Print BCCH info test reports
This will print test rep[orts that look like:
<0020> ipaccess-config.c:91 TEST REPORT: test_no=0x43 test_res=PARTIAL
<0020> ipaccess-config.c:140 ==> ARFCN 37, RxLev 24, RxQual 0: 262-1, LAC 13830 CI 10759
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/ipaccess-config.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/openbsc/src/ipaccess-config.c b/openbsc/src/ipaccess-config.c index 62be5ff95..49c0ea31f 100644 --- a/openbsc/src/ipaccess-config.c +++ b/openbsc/src/ipaccess-config.c @@ -85,7 +85,8 @@ static int test_rep(void *_msg) struct abis_om_fom_hdr *foh = msgb_l3(msg); u_int16_t test_rep_len, ferr_list_len; struct ipacc_ferr_elem *ife; - int i; + struct ipac_bcch_info binfo; + int i, rc; DEBUGP(DNM, "TEST REPORT: "); @@ -102,7 +103,7 @@ static int test_rep(void *_msg) /* data[6]: ip.access nested IE. 3 == freq_err_list */ switch (foh->data[6]) { - case 3: + case NM_IPAC_EIE_FREQ_ERR_LIST: /* data[7..8]: length of ferr_list */ ferr_list_len = ntohs(*(u_int16_t *) &foh->data[7]); @@ -113,7 +114,7 @@ static int test_rep(void *_msg) ife->arfcn, ntohs(ife->freq_err)); } break; - case 4: + case NM_IPAC_EIE_CHAN_USE_LIST: /* data[7..8]: length of ferr_list */ ferr_list_len = ntohs(*(u_int16_t *) &foh->data[7]); @@ -125,6 +126,19 @@ static int test_rep(void *_msg) cu & 0x3ff, cu >> 10); } break; + case NM_IPAC_EIE_BCCH_INFO_TYPE: + break; + case NM_IPAC_EIE_BCCH_INFO: + rc = ipac_parse_bcch_info(&binfo, foh->data+6); + if (rc < 0) { + DEBUGP(DNM, "BCCH Info parsing failed\n"); + break; + } + DEBUGP(DNM, "==> ARFCN %u, RxLev %2u, RxQual %2u: %3d-%d, LAC %d CI %d\n", + binfo.arfcn, binfo.rx_lev, binfo.rx_qual, + binfo.cgi.mcc, binfo.cgi.mnc, + binfo.cgi.lac, binfo.cgi.ci); + break; default: break; } |