aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat_vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-22 20:37:35 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-22 20:37:35 +0800
commitf21e453dc9fbd51aed7b452916c4b3d59f64afe5 (patch)
treed85c38aeeef4418e22b001e609e92900707d474a /openbsc/src/nat/bsc_nat_vty.c
parente8723dcb86de41bb5d3289c7fb29bd572efcc2e6 (diff)
nat: Provide an easy view to see if something is connected to the NAT.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_vty.c')
-rw-r--r--openbsc/src/nat/bsc_nat_vty.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c
index cfa5473cc..49ac3e2b4 100644
--- a/openbsc/src/nat/bsc_nat_vty.c
+++ b/openbsc/src/nat/bsc_nat_vty.c
@@ -184,9 +184,21 @@ static void dump_stat_total(struct vty *vty, struct bsc_nat *nat)
static void dump_stat_bsc(struct vty *vty, struct bsc_config *conf)
{
+ int connected = 0;
+ struct bsc_connection *con;
+
vty_out(vty, " BSC lac: %d nr: %d%s",
conf->lac, conf->nr, VTY_NEWLINE);
vty_out_rate_ctr_group(vty, " ", conf->stats.ctrg);
+
+ llist_for_each_entry(con, &conf->nat->bsc_connections, list_entry) {
+ if (con->cfg != conf)
+ continue;
+ connected = 1;
+ break;
+ }
+
+ vty_out(vty, " Connected: %d%s", connected, VTY_NEWLINE);
}
DEFUN(show_stats,