aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-08-14 11:10:34 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-08-14 12:07:07 +0200
commit6cb2cccc8d942b220b2653b15d3ecfcecccc6cb5 (patch)
treebc9bb7f23a1d9ed68ffa42ac967ba21ce6c9155a /openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
parent27876a2df0c76ab43f528f21d942d4461dc3a759 (diff)
nat/ussd: Add 'show ussd-connection' vty command
This command returns the current state of the connection to the USSD side channel provider. It shows whether a provider has been connected and authorized or not. Fixes: OW#953
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_vty.c13
1 files changed, 13 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 6ab48d69e..36a46f2ba 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_vty.c
@@ -1155,6 +1155,18 @@ DEFUN(cfg_pgroup_no_lac, cfg_pgroup_no_lac_cmd,
return CMD_SUCCESS;
}
+DEFUN(show_ussd_connection,
+ show_ussd_connection_cmd,
+ "show ussd-connection",
+ SHOW_STR "USSD connection related information\n")
+{
+ vty_out(vty, "The USSD side channel provider is %sconnected and %sauthorized.%s",
+ _nat->ussd_con ? "" : "not ",
+ _nat->ussd_con && _nat->ussd_con->authorized? "" : "not ",
+ VTY_NEWLINE);
+ return CMD_SUCCESS;
+}
+
int bsc_nat_vty_init(struct bsc_nat *nat)
{
_nat = nat;
@@ -1172,6 +1184,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat)
install_element_ve(&show_acc_lst_cmd);
install_element_ve(&show_bar_lst_cmd);
install_element_ve(&show_prefix_tree_cmd);
+ install_element_ve(&show_ussd_connection_cmd);
install_element(ENABLE_NODE, &set_last_endp_cmd);
install_element(ENABLE_NODE, &block_new_conn_cmd);