tcpdump mailing list archives

Re: Endless pcap_stats + patch


From: Guy Harris <guy () alum mit edu>
Date: Thu, 22 Nov 2007 10:47:39 -0800

Max Laier wrote:

I'm not sure that's the best sollution. For one, libpcap could choose to implement pcap_stats for files later on.

Most of the statistics would be meaningless unless the capture file has packet drop, etc. statistics in it - libpcap format doesn't support that, although pcap-NG does.

However, with pcap-NG, instead of pcap_stats() returning statistics, the application reading the file would see a statistics record, and display statistics at that point. In addition...

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.

        1) You still get the kernel message from ^T.

2) tcpdump isn't the only program or script that could run without producing any output while it's processing data - what if you're running, for example, a grep reading one file and writing matching lines to another file; ^T won't tell you anything, as grep doesn't catch SIGINFO.

3) If it *is* useful to have tcpdump report a progress indicator, the indicator would just be the count of packets processed - you don't need pcap_stats() for that.

A short error message to stderr seems to be the right sollution, at least in my mind.

Not to mine - an error message sounds to me like an indication that either

        1) you did something wrong by typing ^T

or

        2) the program has a bug that should be fixed so that ^T works.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: