summaryrefslogtreecommitdiff
path: root/pcap-snit.c
diff options
context:
space:
mode:
authorguy <guy>2001-07-29 01:22:40 +0000
committerguy <guy>2001-07-29 01:22:40 +0000
commit11c1cf8ee2404e010992586edd4335aec0e5c719 (patch)
tree9703a57278d0ab5723f2cfc331115dce72e57f0a /pcap-snit.c
parenta891a1d5d0814a9ffa8227bf37b9d2680b30414d (diff)
downloadlibpcap-11c1cf8ee2404e010992586edd4335aec0e5c719.tar.gz
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).
Diffstat (limited to 'pcap-snit.c')
-rw-r--r--pcap-snit.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/pcap-snit.c b/pcap-snit.c
index 47818e4f..a44812fe 100644
--- a/pcap-snit.c
+++ b/pcap-snit.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.54 2000-10-28 00:01:30 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.55 2001-07-29 01:22:42 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -88,6 +88,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 "/dev/nit"
+ * 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);
}