aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_llc_parse.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-11-18 14:07:04 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-21 10:27:24 +0000
commit549ebc7d6c001b9ce134c7462f621335dbf671b9 (patch)
tree46c5d896c2ffeb74f6eae0bab306174586065964 /openbsc/src/gprs/gprs_llc_parse.c
parent6903848029071ec91959a53499785195cb2a091a (diff)
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
Diffstat (limited to 'openbsc/src/gprs/gprs_llc_parse.c')
-rw-r--r--openbsc/src/gprs/gprs_llc_parse.c16
1 files changed, 12 insertions, 4 deletions
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));