diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-08-18 18:39:53 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-08-18 18:39:53 +0200 |
commit | f416463a3c4fa3d94d8f8c7cdcfb04123fbee994 (patch) | |
tree | 967d98c2ed74747129d52ada3992a23d186a18c0 /include | |
parent | 918be5133883b0d6aaaf08046d39e91396740999 (diff) |
client: First round of statistics in the pcap client
Count certain events that can help to understand what is going on.
This includes OOM, failure to queues.
Change-Id: I4a2dad32afb577822c7181d2813ea5a7e693c704
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-pcap/osmo_pcap_client.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h index 30b55ee..3cc3080 100644 --- a/include/osmo-pcap/osmo_pcap_client.h +++ b/include/osmo-pcap/osmo_pcap_client.h @@ -1,7 +1,7 @@ /* * osmo-pcap-client code * - * (C) 2011 by Holger Hans Peter Freyther <zecke@selfish.org> + * (C) 2011-2016 by Holger Hans Peter Freyther <holger@moiji-mobile.com> * (C) 2011 by On-Waves * All Rights Reserved * @@ -27,6 +27,16 @@ #include <osmocom/core/timer.h> #include <osmocom/core/write_queue.h> +struct rate_ctr_group; + +enum { + CLIENT_CTR_CONNECT, + CLIENT_CTR_BYTES, + CLIENT_CTR_PKTS, + CLIENT_CTR_2BIG, + CLIENT_CTR_NOMEM, + CLIENT_CTR_QERR, +}; struct osmo_pcap_client { char *device; @@ -43,6 +53,9 @@ struct osmo_pcap_client { int srv_port; struct osmo_wqueue wqueue; struct osmo_timer_list timer; + + /* statistics */ + struct rate_ctr_group *ctrg; }; extern struct osmo_pcap_client *pcap_client; |