Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-09-21 Thread Guy Harris
On Sep 17, 2009, at 3:24 PM, Dustin Spicuzza wrote: If you call linux_if_drops with a NULL device, then it segfaults when it tries to do strlen(). The only time this happens is if you call pcap_stats() on a pcap handle that is open but not activated (or the activation failed), and thus the de

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-09-17 Thread Dustin Spicuzza
Guy Harris wrote: > > On Aug 31, 2009, at 2:36 PM, Dustin Spicuzza wrote: > >> So... I've changed my patch to populate ps_ifdrop instead, and it should >> be good to go, without screwing with current applications. > > Checked in. > Thanks! Except I found a small problem that I introduced... I

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-09-07 Thread Guy Harris
On Aug 31, 2009, at 2:36 PM, Dustin Spicuzza wrote: So... I've changed my patch to populate ps_ifdrop instead, and it should be good to go, without screwing with current applications. Checked in. I suppose the man page should be updated to mention that ps_ifdrop is only supported on a few

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-09-02 Thread Dustin Spicuzza
Guy Harris wrote: > I think that > >> +handle->md.stat.ps_drop += (handle->md.proc_dropped - >> if_dropped); > > and > >> +stats->ps_drop = handle->md.stat.ps_drop; > > are wrong, because ps_drop is supposed to reflect the number of packets > dropped by the packet capture mechanism

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-09-01 Thread Dustin Spicuzza
Stephen Donnelly wrote: > Dustin Spicuzza wrote: > >>> So after reading the libpcap and kernel source, I see that this is >>> actually how its supposed to work. But it *seems* like it would be quite >>> nice if we could grab the interface driver drop statistics as well as >>> drops resulting from

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in linux

2009-09-01 Thread Guy Harris
On Aug 28, 2009, at 1:24 PM, Dustin Spicuzza wrote: Dustin Spicuzza wrote: So after reading the libpcap and kernel source, I see that this is actually how its supposed to work. But it *seems* like it would be quite nice if we could grab the interface driver drop statistics as well as drops

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-09-01 Thread Guy Harris
On Aug 30, 2009, at 8:26 PM, Stephen Donnelly wrote: The current 'drop' count in libpcap is not intuitive, and frequently arguably undercounts since it does not include 'rx buffer overflow' and similar interface/OS specific packet loss. OTOH, the documentation is quite clear about what it

Re: [PATCH] Re: [tcpdump-workers] Bug: Counting dropped packets in

2009-08-30 Thread Stephen Donnelly
Dustin Spicuzza wrote: So after reading the libpcap and kernel source, I see that this is actually how its supposed to work. But it *seems* like it would be quite nice if we could grab the interface driver drop statistics as well as drops resulting from the capture buffer filling up. I'm lookin