diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-02-11 21:29:03 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2001-02-11 21:29:03 +0000 |
commit | 11edc2e64f190f6900d8e9b3dbee17b3daf4c90a (patch) | |
tree | d2a62cd4043089c5fea8685e8594c31b7dab9e71 /capture.c | |
parent | 9d4825808397824916f033a7ab9838623a90327c (diff) |
Report failures of "pcap_stats()", as tcpdump does.
Print the "Capturing on <interface>" message, the running count of
packets captured, and error messages to the standard error in Tethereal,
so that you can pipe the output of a live capture that's printing
packets to a program or script without that script having to worry about
parsing stuff other than dissected packet summaries or details (tcpdump
does the same).
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3017 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture.c')
-rw-r--r-- | capture.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* capture.c * Routines for packet capture windows * - * $Id: capture.c,v 1.139 2001/02/11 09:28:15 guy Exp $ + * $Id: capture.c,v 1.140 2001/02/11 21:29:03 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -1604,6 +1604,11 @@ capture(gboolean *stats_known, struct pcap_stat *stats) dropped. */ if (pcap_stats(pch, stats) >= 0) *stats_known = TRUE; + else { + simple_dialog(ESD_TYPE_WARN, NULL, + "Can't get packet-drop statistics: %s", + pcap_geterr(pch)); + } pcap_close(pch); } |