aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-05-30 23:45:53 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-02 20:56:17 +0200
commit00965dca2bd78cc57ddb3989b365226908ff1c31 (patch)
tree89b6d86b6be085d710ebb2c521ffa35a44c21855
parent8bf8142dba3a4203afe2578aa99ed8824bba96dd (diff)
VTY: Print some more information in "show conns"
We now print information such as * SCCP connection ID * MSC number * handover decision2 fail count * channel mode (SIGN/SPEECH) * MGW endpoint * secondary lchan (if any, e.g. during assignment) * don't crash if conn->lchan == NULL Change-Id: I2f8000844afc9da93ca39976399e5f76a45530de
-rw-r--r--src/libbsc/bsc_vty.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index e53a14fa1..6c2257dec 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1515,6 +1515,18 @@ DEFUN(show_lchan_summary,
return lchan_summary(vty, argc, argv, lchan_dump_short_vty);
}
+static void dump_one_subscr_conn(struct vty *vty, const struct gsm_subscriber_connection *conn)
+{
+ vty_out(vty, "conn ID=%u, MSC=%u, hodec2_fail=%d, mode=%s, mgw_ep=%s%s",
+ conn->sccp.conn_id, conn->sccp.msc->nr, conn->hodec2.failures,
+ get_value_string(gsm48_chan_mode_names, conn->user_plane.chan_mode),
+ conn->user_plane.mgw_endpoint, VTY_NEWLINE);
+ if (conn->lchan)
+ lchan_dump_full_vty(vty, conn->lchan);
+ if (conn->secondary_lchan)
+ lchan_dump_full_vty(vty, conn->secondary_lchan);
+}
+
DEFUN(show_subscr_conn,
show_subscr_conn_cmd,
"show conns",
@@ -1528,8 +1540,7 @@ DEFUN(show_subscr_conn,
vty_out(vty, "Active subscriber connections: %s", VTY_NEWLINE);
llist_for_each_entry(conn, &net->subscr_conns, entry) {
- vty_out(vty, "conn nr #%u:%s", count, VTY_NEWLINE);
- lchan_dump_full_vty(vty, conn->lchan);
+ dump_one_subscr_conn(vty, conn);
no_conns = false;
count++;
}