]> The Tcpdump Group git mirrors - libpcap/commitdiff
ps_ifdrop is the number of packets dropped by the interface and not even
authorguy <guy>
Tue, 23 Dec 2008 19:05:48 +0000 (19:05 +0000)
committerguy <guy>
Tue, 23 Dec 2008 19:05:48 +0000 (19:05 +0000)
handed to the host; ps_drop is the number of packets dropped by the
capture mechanism because it ran out of buffer space.  We don't know the
former, so set it to 0; we *do* know the latter, but it's ps_drop, not
ps_ifdrop.

pcap-usb-linux.c

index c78a8e757cd8f7648399ebb224910c5b6c4f8885..ea64d69c9aa7d48e6f2705fc79d491c570c96e27 100644 (file)
@@ -34,7 +34,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-usb-linux.c,v 1.16.2.12 2008-12-23 18:04:29 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-usb-linux.c,v 1.16.2.13 2008-12-23 19:05:48 guy Exp $ (LBL)";
 #endif
  
 #ifdef HAVE_CONFIG_H
@@ -613,7 +613,8 @@ usb_stats_linux_bin(pcap_t *handle, struct pcap_stat *stats)
        }
 
        stats->ps_recv = handle->md.packets_read + st.queued;
-       stats->ps_ifdrop = st.dropped;
+       stats->ps_ifdrop = 0;
+       stats->ps_drop = st.dropped;
        return 0;
 }