aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-18 02:12:24 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-18 02:40:32 +0800
commitecf5cc294dac3596f260397f2340c9154915142e (patch)
tree21309d4d8c931087185f8245d82c1c17be84ad4e /openbsc
parent82126763a720c8223841fc19efe65a312ff5bc62 (diff)
bsc_msc_ip: Print a small status on active connections
This needs to be improved to print TS of the lchan, when the connection was created, when we received the last IT.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/bsc_msc_ip.c6
-rw-r--r--openbsc/src/vty_interface_bsc.c16
2 files changed, 21 insertions, 1 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index 9b43d7cea..d63041401 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -70,6 +70,12 @@ extern int ipacc_rtp_direct;
extern int bsc_bootstrap_network(int (*layer4)(struct gsm_network *, int, void *), const char *cfg_file);
extern int bsc_shutdown_net(struct gsm_network *net);
+
+struct llist_head *bsc_sccp_connections()
+{
+ return &active_connections;
+}
+
struct bss_sccp_connection_data *bss_sccp_create_data()
{
struct bss_sccp_connection_data *data;
diff --git a/openbsc/src/vty_interface_bsc.c b/openbsc/src/vty_interface_bsc.c
index 1a11defb2..51a95a517 100644
--- a/openbsc/src/vty_interface_bsc.c
+++ b/openbsc/src/vty_interface_bsc.c
@@ -29,12 +29,26 @@
#include <openbsc/gsm_data.h>
#include <openbsc/vty.h>
+#include <sccp/sccp.h>
+
static struct gsm_network *gsmnet = NULL;
+extern struct llist_head *bsc_sccp_connections();
+
DEFUN(show_bsc, show_bsc_cmd, "show bsc",
SHOW_STR "Display information about the BSC\n")
{
- vty_out(vty, "BSC... not implemented yet%s", VTY_NEWLINE);
+ struct bss_sccp_connection_data *con;
+
+ vty_out(vty, "BSC Information%s", VTY_NEWLINE);
+ llist_for_each_entry(con, bsc_sccp_connections(), active_connections) {
+ vty_out(vty, " Connection: LCHAN: %p sec LCHAN: %p SCCP src: %d dest: %d%s",
+ con->lchan, con->secondary_lchan,
+ con->sccp ? (int) sccp_src_ref_to_int(&con->sccp->source_local_reference) : -1,
+ con->sccp ? (int) sccp_src_ref_to_int(&con->sccp->destination_local_reference) : -1,
+ VTY_NEWLINE);
+ }
+
return CMD_SUCCESS;
}