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
diff --git a/openbsc/src/gprs/gprs_llc_parse.c b/openbsc/src/gprs/gprs_llc_parse.c
index b1f1a56..a5a7a71 100644
--- a/openbsc/src/gprs/gprs_llc_parse.c
+++ b/openbsc/src/gprs/gprs_llc_parse.c
@@ -67,11 +67,19 @@
 	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));