summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/pcap-nit.c
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-06-21 01:36:27 +0000
committerfenner <fenner@FreeBSD.org>2002-06-21 01:36:27 +0000
commit1e8ea467791f99f6068888787c27fd8b6b923d2c (patch)
tree4bf19d614b784f03cdea171c65cf7b2e9f63715c /contrib/libpcap/pcap-nit.c
parenta6bce8883c0f9dd7fee0eb03667f57b40b1d9dab (diff)
downloadFreeBSD-src-1e8ea467791f99f6068888787c27fd8b6b923d2c.zip
FreeBSD-src-1e8ea467791f99f6068888787c27fd8b6b923d2c.tar.gz
Import libpcap 0.7.1, from
http://www.tcpdump.org/release/libpcap-0.7.1.tar.gz
Diffstat (limited to 'contrib/libpcap/pcap-nit.c')
-rw-r--r--contrib/libpcap/pcap-nit.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/libpcap/pcap-nit.c b/contrib/libpcap/pcap-nit.c
index 6be658d..fe67299 100644
--- a/contrib/libpcap/pcap-nit.c
+++ b/contrib/libpcap/pcap-nit.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.39 2000/10/28 00:01:29 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.41 2001/12/10 07:14:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -75,6 +75,22 @@ 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" presumably counts packets dropped by the socket
+ * because of flow control requirements or resource exhaustion;
+ * it doesn't count packets dropped by the interface driver.
+ * 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