aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/db.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-22 19:07:32 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-22 20:42:40 +0100
commitffa55a4e8783419f60932ef2f9e872293cf932b9 (patch)
treec615771fe04a89807a012d8e100de53847b70d0f /openbsc/include/openbsc/db.h
parent4983921af1a84ea20c6be7944bf0ff4928578a69 (diff)
statistics: Introduce 'struct counter' instead of using unsigned long
This has the advantage that counters can be added all over the code very easily, while having only one routine that stores all of the current counter values to the database. The counters are synced every 60 seconds, providing relatively fine grained statistics about the network usage as time passes by.
Diffstat (limited to 'openbsc/include/openbsc/db.h')
-rw-r--r--openbsc/include/openbsc/db.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h
index 07135937b..fca736493 100644
--- a/openbsc/include/openbsc/db.h
+++ b/openbsc/include/openbsc/db.h
@@ -53,4 +53,8 @@ int db_sms_mark_sent(struct gsm_sms *sms);
int db_apdu_blob_store(struct gsm_subscriber *subscr,
u_int8_t apdu_id_flags, u_int8_t len,
u_int8_t *apdu);
+
+/* Statistics counter storage */
+int db_store_counter(struct counter *ctr);
+
#endif /* _DB_H */