|author||guy <guy>||2001-07-29 01:22:40 +0000|
|committer||guy <guy>||2001-07-29 01:22:40 +0000|
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-nit.c')
1 files changed, 11 insertions, 1 deletions
@@ -20,7 +20,7 @@
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.40 2001-07-29 01:22:41 guy Exp $ (LBL)";
@@ -75,6 +75,16 @@ 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" 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.
*ps = p->md.stat;