Max has submitted this change and it was merged. ( https://gerrit.osmocom.org/12894 )
Change subject: Improve 'show subscriber cache' vty command ...................................................................... Improve 'show subscriber cache' vty command * don't use spaces when printing hex data like RAND, SRES etc to increase the chance that it'll fit onto single line which will improve readability * don't print non-existent QoS value Change-Id: I0a09063f30c1116803994117f49df9d02bcc9181 --- M src/gprs/sgsn_vty.c 1 file changed, 13 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 3757c07..0147b85 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -749,13 +749,13 @@ at->key_seq); if (at->vec.auth_types & OSMO_AUTH_TYPE_GSM) { vty_out(vty, "RAND: %s, ", - osmo_hexdump(at->vec.rand, + osmo_hexdump_nospc(at->vec.rand, sizeof(at->vec.rand))); vty_out(vty, "SRES: %s, ", - osmo_hexdump(at->vec.sres, + osmo_hexdump_nospc(at->vec.sres, sizeof(at->vec.sres))); vty_out(vty, "Kc: %s%s", - osmo_hexdump(at->vec.kc, + osmo_hexdump_nospc(at->vec.kc, sizeof(at->vec.kc)), VTY_NEWLINE); } if (at->vec.auth_types & OSMO_AUTH_TYPE_UMTS) { @@ -763,19 +763,22 @@ osmo_hexdump(at->vec.autn, sizeof(at->vec.autn))); vty_out(vty, "RES: %s, ", - osmo_hexdump(at->vec.res, at->vec.res_len)); + osmo_hexdump_nospc(at->vec.res, at->vec.res_len)); vty_out(vty, "IK: %s, ", - osmo_hexdump(at->vec.ik, sizeof(at->vec.ik))); + osmo_hexdump_nospc(at->vec.ik, sizeof(at->vec.ik))); vty_out(vty, "CK: %s, ", - osmo_hexdump(at->vec.ck, sizeof(at->vec.ck))); + osmo_hexdump_nospc(at->vec.ck, sizeof(at->vec.ck))); } } llist_for_each_entry(pdp, &gsub->sgsn_data->pdp_list, list) { - vty_out(vty, " PDP info: Id: %d, Type: 0x%04x, APN: '%s' QoS: %s%s", - pdp->context_id, pdp->pdp_type, pdp->apn_str, - osmo_hexdump(pdp->qos_subscribed, pdp->qos_subscribed_len), - VTY_NEWLINE); + vty_out(vty, " PDP info: Id: %d, Type: 0x%04x, APN: '%s'", + pdp->context_id, pdp->pdp_type, pdp->apn_str); + + if (pdp->qos_subscribed_len) + vty_out(vty, " QoS: %s", osmo_hexdump(pdp->qos_subscribed, pdp->qos_subscribed_len)); + + vty_out(vty, "%s", VTY_NEWLINE); } #if 0 -- To view, visit https://gerrit.osmocom.org/12894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I0a09063f30c1116803994117f49df9d02bcc9181 Gerrit-Change-Number: 12894 Gerrit-PatchSet: 1 Gerrit-Owner: Max <msur...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msur...@sysmocom.de>