summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/pcap-snit.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpcap/pcap-snit.c')
-rw-r--r--contrib/libpcap/pcap-snit.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/libpcap/pcap-snit.c b/contrib/libpcap/pcap-snit.c
index 59cf3ac..d3aaf1d 100644
--- a/contrib/libpcap/pcap-snit.c
+++ b/contrib/libpcap/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.56 2001/12/10 07:14:20 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -88,6 +88,23 @@ int
pcap_stats(pcap_t *p, struct pcap_stat *ps)
{
+ /*
+ * "ps_recv" counts packets handed to the filter, not packets
+ * that passed the filter. As filtering is done in userland,
+ * this does not include packets dropped because we ran out
+ * of buffer space.
+ *
+ * "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.
+ *
+ * These statistics don't include packets not yet read from the
+ * kernel by libpcap or packets not yet read from libpcap by the
+ * application.
+ */
*ps = p->md.stat;
return (0);
}
OpenPOWER on IntegriCloud