Report the packets captured and the packets dropped (either by libpcap or by dumpcap).
authortuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 25 Apr 2012 21:09:33 +0000 (21:09 +0000)
committertuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 25 Apr 2012 21:09:33 +0000 (21:09 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@42245 f5534014-38df-0310-8fa8-9805f1628bb7

dumpcap.c

index ebbf7f949bb9583ce1efee8ee6801f980f699ee2..958c593962028d68b821de4065854fc0f8bef695 100644 (file)
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -2753,8 +2753,8 @@ capture_loop_close_output(capture_options *capture_opts, loop_data *ld, int *err
                     struct pcap_stat stats;
 
                     if (pcap_stats(pcap_opts->pcap_h, &stats) >= 0) {
-                        isb_ifrecv = stats.ps_recv;
-                        isb_ifdrop = stats.ps_drop;
+                        isb_ifrecv = pcap_opts->received;
+                        isb_ifdrop = stats.ps_drop + pcap_opts->dropped;
                    } else {
                         isb_ifrecv = G_MAXUINT64;
                         isb_ifdrop = G_MAXUINT64;
@@ -2762,7 +2762,7 @@ capture_loop_close_output(capture_options *capture_opts, loop_data *ld, int *err
                     libpcap_write_interface_statistics_block(ld->pdh,
                                                              i,
                                                              &ld->bytes_written,
-                                                             "Counters provided by libpcap",
+                                                             "Counters provided by dumpcap",
                                                              start_time,
                                                              end_time,
                                                              isb_ifrecv,