]> gitweb.fperrin.net Git - iftop.git/blobdiff - tui.c
Keep track of lost packets as reported by pcap_stats
[iftop.git] / tui.c
diff --git a/tui.c b/tui.c
index 75c6e08c15eeab7eaccdb57ae6fd344842f2de22..ebf7b4fd03af9f64e1752d02bf750b4ba9179c62 100644 (file)
--- a/tui.c
+++ b/tui.c
@@ -153,6 +153,11 @@ void tui_print() {
   readable_size(history_totals.total_recv + history_totals.total_sent, buf2_10, 10, 1024, 1);
   printf("%s %10s %10s %10s\n", labellong, buf0_10, buf1_10, buf2_10);
 
+  /* Dropped packets */
+  snprintf(labellong, PRINT_WIDTH + 9, "%-*s", PRINT_WIDTH + 9, "Dropped packets:");
+  readable_size(history_totals.lost_packets, buf0_10, 10, 1024, options.bandwidth_unit);
+  printf("%s %10s\n", labellong, buf0_10, buf1_10, buf2_10);
+
   /* Double divider line */
   for (j = 0; j < PRINT_WIDTH + 52; j++) {
     printf("=");