This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/94/12894/1
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: newchange
Gerrit-Change-Id: I0a09063f30c1116803994117f49df9d02bcc9181
Gerrit-Change-Number: 12894
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190213/8100222b/attachment.htm>