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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21429 ) Change subject: gprs_ns2_vty: Differentiate 'show ns binds' and 'show ns entities' ...................................................................... gprs_ns2_vty: Differentiate 'show ns binds' and 'show ns entities' Change-Id: I157467d6a74d6109bc23521c978c5aac6d29fe50 --- M src/gb/gprs_ns2_vty.c 1 file changed, 26 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/21429/1 diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c index 7b27a7e..8514704 100644 --- a/src/gb/gprs_ns2_vty.c +++ b/src/gb/gprs_ns2_vty.c @@ -292,34 +292,48 @@ bind->dump_vty(bind, vty, stats); } -static void dump_ns(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats, bool persistent_only) +static void dump_ns_bind(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats) { struct gprs_ns2_vc_bind *bind; - struct gprs_ns2_nse *nse; llist_for_each_entry(bind, &nsi->binding, list) { dump_bind(vty, bind, stats); } +} + + +static void dump_ns_entities(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats, bool persistent_only) +{ + struct gprs_ns2_nse *nse; llist_for_each_entry(nse, &nsi->nse, list) { dump_nse(vty, nse, stats, persistent_only); } - } -DEFUN(show_ns, show_ns_cmd, "show ns", - SHOW_STR "Display information about the NS protocol") +DEFUN(show_ns_binds, show_ns_binds_cmd, "show ns binds [stats]", + SHOW_STR + "Display information about the NS protocol binds\n" + "Include statistic\n") { - dump_ns(vty, vty_nsi, false, false); + bool stats = false; + if (argc > 0) + stats = true; + + dump_ns_bind(vty, vty_nsi, stats); return CMD_SUCCESS; } -DEFUN(show_ns_stats, show_ns_stats_cmd, "show ns stats", +DEFUN(show_ns_entities, show_ns_entities_cmd, "show ns entities [stats]", SHOW_STR - "Display information about the NS protocol\n" + "Display information about the NS protocol entities (NSEs)\n" "Include statistics\n") { - dump_ns(vty, vty_nsi, true, false); + bool stats = false; + if (argc > 0) + stats = true; + + dump_ns_entities(vty, vty_nsi, stats, false); return CMD_SUCCESS; } @@ -328,7 +342,7 @@ "Display information about the NS protocol\n" "Show only persistent NS\n") { - dump_ns(vty, vty_nsi, true, true); + dump_ns_entities(vty, vty_nsi, true, true); return CMD_SUCCESS; } @@ -776,8 +790,8 @@ return 0; vty_elements_installed = true; - install_lib_element_ve(&show_ns_cmd); - install_lib_element_ve(&show_ns_stats_cmd); + install_lib_element_ve(&show_ns_binds_cmd); + install_lib_element_ve(&show_ns_entities_cmd); install_lib_element_ve(&show_ns_pers_cmd); install_lib_element_ve(&show_nse_cmd); install_lib_element_ve(&logging_fltr_nsvc_cmd); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21429 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I157467d6a74d6109bc23521c978c5aac6d29fe50 Gerrit-Change-Number: 21429 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201201/76e64260/attachment.htm>