From 11c1cf8ee2404e010992586edd4335aec0e5c719 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 29 Jul 2001 01:22:40 +0000 Subject: Add comments to "pcap_stats()" indicating what the counters mean on the various platforms (assuming the vendors' documentation is correct and that I've correctly interpreted it). --- pcap-dlpi.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pcap-dlpi.c') diff --git a/pcap-dlpi.c b/pcap-dlpi.c index fc53f43..f2c9f58 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -38,7 +38,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.69 2001-07-28 23:12:48 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.70 2001-07-29 01:22:40 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -124,6 +124,17 @@ int pcap_stats(pcap_t *p, struct pcap_stat *ps) { + /* + * "ps_recv" counts packets handed to the filter, not packets + * that passed the filter. + * + * "ps_drop" counts packets dropped inside the DLPI service + * provider device device because of flow control requirements + * or resource exhaustion; it doesn't count packets dropped by + * the interface driver, or packets dropped upstream. As + * filtering is done in userland, it counts packets regardless + * of whether they would've passed the filter. + */ *ps = p->md.stat; return (0); } -- cgit v1.2.3