aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_sccp.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-12 12:17:09 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-13 09:47:22 +0200
commit1aa2798919f7d517cebf6d211e78e9271b2ee07f (patch)
tree6a64d4cecbb71602e3adc15c716cf34afaf7190e /openbsc/src/nat/bsc_sccp.c
parentb829eac9bc6c6dddcc0814d85ac560c6c48c36e1 (diff)
[statistics] Provide basic statistics for the NAT
Count number of SCCP connections, number of BSC reconnects, number of calls. For most of them we have a per BSC and a global count. Right now all structs using the counters survive until the end of the application so we do not need to free them.
Diffstat (limited to 'openbsc/src/nat/bsc_sccp.c')
-rw-r--r--openbsc/src/nat/bsc_sccp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_sccp.c b/openbsc/src/nat/bsc_sccp.c
index e76d52268..ff98b1b6c 100644
--- a/openbsc/src/nat/bsc_sccp.c
+++ b/openbsc/src/nat/bsc_sccp.c
@@ -100,6 +100,8 @@ int create_sccp_src_ref(struct bsc_connection *bsc, struct msgb *msg, struct bsc
}
llist_add(&conn->list_entry, &bsc->nat->sccp_connections);
+ counter_inc(bsc->cfg->stats.sccp.conn);
+ counter_inc(bsc->cfg->nat->stats.sccp.conn);
LOGP(DNAT, LOGL_DEBUG, "Created 0x%x <-> 0x%x mapping for con %p\n",
sccp_src_ref_to_int(&conn->real_ref),