From 549ebc7d6c001b9ce134c7462f621335dbf671b9 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 18 Nov 2016 14:07:04 +0100 Subject: Improve GPRS logging * log xid type as string instead of int * log packet encryption status, algorithm and IOV-UI in debug mode * print encryption parameters when dumping llme via vty * log key propagation from MM to LLC Related: OS#1794 Change-Id: I30c38fdeb0b88bb39bdb9928851300bc79e6aec6 --- openbsc/src/gprs/gprs_llc_parse.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'openbsc/src/gprs/gprs_llc_parse.c') diff --git a/openbsc/src/gprs/gprs_llc_parse.c b/openbsc/src/gprs/gprs_llc_parse.c index b1f1a56dd..a5a7a7122 100644 --- a/openbsc/src/gprs/gprs_llc_parse.c +++ b/openbsc/src/gprs/gprs_llc_parse.c @@ -67,11 +67,19 @@ int gprs_llc_fcs(uint8_t *data, unsigned int len) return fcs_calc; } -void gprs_llc_hdr_dump(struct gprs_llc_hdr_parsed *gph) +void gprs_llc_hdr_dump(struct gprs_llc_hdr_parsed *gph, struct gprs_llc_lle *lle) { - DEBUGP(DLLC, "LLC SAPI=%u %c %c FCS=0x%06x", - gph->sapi, gph->is_cmd ? 'C' : 'R', gph->ack_req ? 'A' : ' ', - gph->fcs); + const char *gea; + uint32_t iov_ui = 0; + if (lle) { + gea = get_value_string(gprs_cipher_names, lle->llme->algo); + iov_ui = lle->llme->iov_ui; + } else + gea = "GEA?"; + DEBUGP(DLLC, "LLC SAPI=%u %c %c %c %s IOV-UI=0x%06x FCS=0x%06x ", + gph->sapi, gph->is_cmd ? 'C' : 'R', gph->ack_req ? 'A' : ' ', + gph->is_encrypted ? 'E' : 'U', + gea, iov_ui, gph->fcs); if (gph->cmd) DEBUGPC(DLLC, "CMD=%s ", get_value_string(llc_cmd_strs, gph->cmd)); -- cgit v1.2.3