diff options
author | Max <msuraev@sysmocom.de> | 2016-11-18 14:07:04 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-12-21 10:27:24 +0000 |
commit | 549ebc7d6c001b9ce134c7462f621335dbf671b9 (patch) | |
tree | 46c5d896c2ffeb74f6eae0bab306174586065964 /openbsc/src/gprs/gprs_llc_xid.c | |
parent | 6903848029071ec91959a53499785195cb2a091a (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_xid.c')
-rw-r--r-- | openbsc/src/gprs/gprs_llc_xid.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gprs_llc_xid.c b/openbsc/src/gprs/gprs_llc_xid.c index 4b1685ebe..fe631715a 100644 --- a/openbsc/src/gprs/gprs_llc_xid.c +++ b/openbsc/src/gprs/gprs_llc_xid.c @@ -35,6 +35,23 @@ #include <openbsc/sgsn.h> #include <openbsc/gprs_llc_xid.h> +const struct value_string gprs_llc_xid_type_names[] = { + { GPRS_LLC_XID_T_VERSION, "VERSION"}, + { GPRS_LLC_XID_T_IOV_UI, "IOV_UI"}, + { GPRS_LLC_XID_T_IOV_I, "IOV_I"}, + { GPRS_LLC_XID_T_T200, "T200"}, + { GPRS_LLC_XID_T_N200, "N200"}, + { GPRS_LLC_XID_T_N201_U, "N201_"}, + { GPRS_LLC_XID_T_N201_I, "N201_I"}, + { GPRS_LLC_XID_T_mD, "mD"}, + { GPRS_LLC_XID_T_mU, "mU"}, + { GPRS_LLC_XID_T_kD, "kD"}, + { GPRS_LLC_XID_T_kU, "kU"}, + { GPRS_LLC_XID_T_L3_PAR, "L3_PAR"}, + { GPRS_LLC_XID_T_RESET, "RESET"}, + { 0, NULL }, +}; + /* Parse XID parameter field */ static int decode_xid_field(struct gprs_llc_xid_field *xid_field, const uint8_t *src, uint8_t src_len) @@ -249,8 +266,10 @@ void gprs_llc_dump_xid_fields(const struct llist_head *xid_fields, if (xid_field->data_len) { OSMO_ASSERT(xid_field->data); LOGP(DLLC, logl, - "XID: type=%d, data_len=%d, data=%s\n", - xid_field->type, xid_field->data_len, + "XID: type %s, data_len=%d, data=%s\n", + get_value_string(gprs_llc_xid_type_names, + xid_field->type), + xid_field->data_len, osmo_hexdump_nospc(xid_field->data, xid_field->data_len)); } else { |