diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-08-19 20:27:35 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-08-19 20:28:21 +0200 |
commit | fa5572e2afc01903b2e5dd260f475d1f73ded74a (patch) | |
tree | 30409e19fb936cef49a594eb8980c0c31fb05925 /include | |
parent | 99526a6ad07c02e40e0831fd952974c5b7446f31 (diff) |
client: Use pcap_stats and export them as statistics
Attempt to write code that detects the wrap and is doing the
right thing when it happens.
Change-Id: I501ebc49d3e86b0605ec1fbe2f62aee3f362aa36
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-pcap/osmo_pcap_client.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h index 90cd5ad..ee81e50 100644 --- a/include/osmo-pcap/osmo_pcap_client.h +++ b/include/osmo-pcap/osmo_pcap_client.h @@ -38,6 +38,9 @@ enum { CLIENT_CTR_QERR, CLIENT_CTR_PERR, CLIENT_CTR_WERR, + CLIENT_CTR_P_RECV, + CLIENT_CTR_P_DROP, + CLIENT_CTR_P_IFDROP, }; struct osmo_pcap_client { @@ -45,6 +48,11 @@ struct osmo_pcap_client { pcap_t *handle; char errbuf[PCAP_ERRBUF_SIZE]; + u_int last_ps_recv; + u_int last_ps_drop; + u_int last_ps_ifdrop; + struct osmo_timer_list pcap_stat_timer; + struct bpf_program bpf; char *filter_string; int filter_itself; |