summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-04-06 17:25:44 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-04-12 10:12:36 -0400
commite5686f21d64c804db825b0baa8d1285250d9d650 (patch)
treeeb52ce207fe763f55ff00a58b26400526c421541 /openbsc/src
parent687f048ab04ed135eeb11deb29e6b4cb9727c27d (diff)
NAT: vty command to display number of BSCs
Add command 'show nat num-bscs-configured' to display number of configured BSCs. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
index cd8293cc9..5af6d9743 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -204,6 +204,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")
@@ -1169,6 +1177,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);