aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb/gprs_ns2_vty.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-12-02 22:14:00 +0100
committerHarald Welte <laforge@osmocom.org>2020-12-02 22:15:34 +0100
commit25ee755cc7885d8f4418d8b6a4883d76731e9b6c (patch)
tree3c1ee64664fda7ee918f509eab842bf0a997c1e7 /src/gb/gprs_ns2_vty.c
parent6e887ebd3e3f74d6fb00ef3bcf6e25c18a705b8c (diff)
gprs_ns2_vty: Re-introduce a 'show ns' command
In I157467d6a74d6109bc23521c978c5aac6d29fe50 we introduced a split between 'show ns entities' and 'show ns binds'. However, there is at least one test case in osmo-sgsn.git which depends on 'show ns' working. So let's re-add it as a backwards compatible, hidden command. Change-Id: I7571c6d82f7a712803d09d165abb6c7cb5ae2e5c
Diffstat (limited to 'src/gb/gprs_ns2_vty.c')
-rw-r--r--src/gb/gprs_ns2_vty.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 97becf64..8b8a9998 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -324,6 +324,17 @@ static void dump_ns_entities(struct vty *vty, const struct gprs_ns2_inst *nsi, b
}
}
+/* Backwards compatibility, among other things for the TestVTYGbproxy which expects
+ * 'show ns' to output something about binds */
+DEFUN_HIDDEN(show_ns, show_ns_cmd, "show ns",
+ SHOW_STR SHOW_NS_STR)
+{
+ dump_ns_entities(vty, vty_nsi, false, false);
+ dump_ns_bind(vty, vty_nsi, false);
+ return CMD_SUCCESS;
+}
+
+
DEFUN(show_ns_binds, show_ns_binds_cmd, "show ns binds [stats]",
SHOW_STR SHOW_NS_STR
"Display information about the NS protocol binds\n"
@@ -802,6 +813,7 @@ int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi,
return 0;
vty_elements_installed = true;
+ install_lib_element_ve(&show_ns_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);