tcpdump mailing list archives
Re: Endless pcap_stats + patch
From: Max Laier <max () love2party net>
Date: Thu, 22 Nov 2007 17:09:01 +0100
On Wednesday 21 November 2007, Guy Harris wrote:
Max Laier wrote:this problem was reported by Giorgos Keramidas as a FreeBSD PR. When dumpping from a file (-r) hitting ^T (sending SIGINFO) results in an endless stream of "pcap_stats: Statistics aren't available from savefiles". The attached patch should fix this and other possible error cases of pcap_stats.Checked in - along with a change not to bother catching SIGINFO at all if tcpdump is reading from a file rather than doing a live capture, so you won't get any errors.
I'm not sure that's the best sollution. For one, libpcap could choose to implement pcap_stats for files later on. Also I'd find it to be surprising if I step up to a running tcpdump and ^T doesn't do anything - I'd assume that something went wrong. A short error message to stderr seems to be the right sollution, at least in my mind. -- /"\ Best regards, | mlaier () freebsd org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News
Attachment:
signature.asc
Description: This is a digitally signed message part.
Current thread:
- Endless pcap_stats + patch Max Laier (Nov 21)
- Re: Endless pcap_stats + patch Guy Harris (Nov 21)
- Re: Endless pcap_stats + patch Max Laier (Nov 22)
- Re: Endless pcap_stats + patch Guy Harris (Nov 22)
- Re: Endless pcap_stats + patch Max Laier (Nov 22)
- Re: Endless pcap_stats + patch Guy Harris (Nov 21)