X-Git-Url: http://gitweb.fperrin.net/?p=iftop.git;a=blobdiff_plain;f=iftop.c;h=562a45bd33b719b9a5b77e85fa3001748c2c558a;hp=1640b11ffbb67aaaa0f4db48d1b16cbe31d5825f;hb=05a5759674e8e7124984579c67b7bea40b8e3352;hpb=fda4298dc99dfd15c20a7f8b759bb79fab45f393 diff --git a/iftop.c b/iftop.c index 1640b11..562a45b 100644 --- a/iftop.c +++ b/iftop.c @@ -109,6 +109,8 @@ history_type* history_create() { void history_rotate() { hash_node_type* n = NULL; + struct pcap_stat ps; + history_pos = (history_pos + 1) % HISTORY_LENGTH; hash_next_item(history, &n); while(n != NULL) { @@ -134,6 +136,9 @@ void history_rotate() { if(history_len < HISTORY_LENGTH) { history_len++; } + + pcap_stats(pd, &ps); + history_totals.lost_packets = ps.ps_drop + ps.ps_ifdrop; }