[PATCH 2/2] NAT: vty command to display number of BSCs

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/OpenBSC@lists.osmocom.org/.

msuraev at sysmocom.de msuraev at sysmocom.de
Wed Apr 6 15:25:44 UTC 2016


From: Max <msuraev at sysmocom.de>

Add command 'show nat num-bscs-configured' to display number of configured BSCs.

Sponsored-by: On-Waves ehf
---
 openbsc/src/osmo-bsc_nat/bsc_nat_vty.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index b9a8d31..26b0fd6 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -214,6 +214,14 @@ DEFUN(show_sccp, show_sccp_cmd, "show sccp connections",
 	return CMD_SUCCESS;
 }
 
+DEFUN(show_nat_bsc, show_nat_bsc_cmd, "show nat num-bscs-configured",
+      SHOW_STR "Display NAT configuration details\n"
+      "BSCs-related\n")
+{
+	vty_out(vty, "%d BSCs configured%s", _nat->num_bsc, VTY_NEWLINE);
+	return CMD_SUCCESS;
+}
+
 DEFUN(show_bsc, show_bsc_cmd, "show bsc connections",
       SHOW_STR BSC_STR
       "All active connections\n")
@@ -1210,6 +1218,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
 	/* show commands */
 	install_element_ve(&show_sccp_cmd);
 	install_element_ve(&show_bsc_cmd);
+	install_element_ve(&show_nat_bsc_cmd);
 	install_element_ve(&show_bsc_cfg_cmd);
 	install_element_ve(&show_stats_cmd);
 	install_element_ve(&show_stats_lac_cmd);
-- 
2.8.1




More information about the OpenBSC mailing list