aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-05 17:46:08 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-05 17:46:08 +0800
commit81f6a4c0bf71bdd2da63fc81465ee3b5147af900 (patch)
tree81ab61498613b8e2e471de749d8046eb7dd5a95d
parent3978de52c14a1e6848c3c69d81f52b24e42bd1d4 (diff)
bsc_msc_ip: Add VTY code for ping/pong timeout.
-rw-r--r--openbsc/src/vty_interface.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 662f7cc3..6cb10264 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -480,6 +480,8 @@ static int config_write_net(struct vty *vty)
vty_out(vty, " bsc_token %s%s", gsmnet->bsc_token, VTY_NEWLINE);
vty_out(vty, " msc ip %s%s", gsmnet->msc_ip, VTY_NEWLINE);
vty_out(vty, " msc port %d%s", gsmnet->msc_port, VTY_NEWLINE);
+ vty_out(vty, " timeout ping %d%s", gsmnet->ping_timeout, VTY_NEWLINE);
+ vty_out(vty, " timeout pong %d%s", gsmnet->pong_timeout, VTY_NEWLINE);
return CMD_SUCCESS;
}
@@ -1335,6 +1337,23 @@ DEFUN(cfg_net_msc_port,
return CMD_SUCCESS;
}
+DEFUN(cfg_net_ping_time,
+ cfg_net_ping_time_cmd,
+ "timeout ping NR",
+ "Set the PING interval, negative for not sending PING")
+{
+ gsmnet->ping_timeout = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_net_pong_time,
+ cfg_net_pong_time_cmd,
+ "timeout pong NR",
+ "Set the time to wait for a PONG.")
+{
+ gsmnet->pong_timeout = atoi(argv[0]);
+ return CMD_SUCCESS;
+}
#define DECLARE_TIMER(number, doc) \
DEFUN(cfg_net_T##number, \
@@ -2070,6 +2089,8 @@ int bsc_vty_init(struct gsm_network *net)
install_element(GSMNET_NODE, &cfg_net_pag_any_tch_cmd);
install_element(GSMNET_NODE, &cfg_net_msc_ip_cmd);
install_element(GSMNET_NODE, &cfg_net_msc_port_cmd);
+ install_element(GSMNET_NODE, &cfg_net_ping_time_cmd);
+ install_element(GSMNET_NODE, &cfg_net_pong_time_cmd);
install_element(GSMNET_NODE, &cfg_bts_cmd);
install_node(&bts_node, config_write_bts);