aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty_interface_cmds.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-10 06:11:39 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-10 06:37:35 +0200
commitab79b9b593cbde7064a7e4ad49867c36f969cadd (patch)
tree8008fb085fd3eb90294a89508095c813b609f83a /src/vty_interface_cmds.c
parentc21c0d699f522ed38958cb9b19043efeaec03828 (diff)
m2ua: Print information about number of SCTP connections
It appears that it is possible to have a stale SCTP connection and this added LOGL_NOTICE and the VTY interface might help to identify this situation in the future (the mean time of failure is about five month).
Diffstat (limited to 'src/vty_interface_cmds.c')
-rw-r--r--src/vty_interface_cmds.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vty_interface_cmds.c b/src/vty_interface_cmds.c
index ef8fa95..56b8ada 100644
--- a/src/vty_interface_cmds.c
+++ b/src/vty_interface_cmds.c
@@ -22,6 +22,7 @@
#include <bsc_data.h>
#include <mtp_pcap.h>
#include <msc_connection.h>
+#include <sctp_m2ua.h>
#include <osmocom/core/rate_ctr.h>
@@ -252,6 +253,15 @@ DEFUN(allow_inject, allow_inject_cmd,
return CMD_SUCCESS;
}
+DEFUN(show_sctp, show_sctp_cmd,
+ "show sctp-connections",
+ SHOW_STR "Active SCTP connections\n")
+{
+ int count = sctp_m2ua_conn_count(bsc->m2ua_trans);
+ vty_out(vty, "Active SCTP connections are: %d.%s", count, VTY_NEWLINE);
+ return CMD_SUCCESS;
+}
+
void cell_vty_init_cmds(void)
{
/* special commands */
@@ -268,4 +278,5 @@ void cell_vty_init_cmds(void)
install_element_ve(&show_slc_cmd);
install_element_ve(&show_msc_cmd);
+ install_element_ve(&show_sctp_cmd);
}