diff options
Diffstat (limited to 'ring_rx.c')
-rw-r--r-- | ring_rx.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -131,7 +131,7 @@ void bind_rx_ring(int sock, struct ring *ring, int ifindex) bind_ring_generic(sock, ring, ifindex); } -void sock_rx_net_stats(int sock) +void sock_rx_net_stats(int sock, unsigned long seen) { int ret; bool v3 = get_sockopt_tpacket(sock) == TPACKET_V3; @@ -147,7 +147,8 @@ void sock_rx_net_stats(int sock) uint64_t packets = stats.k3.tp_packets; uint64_t drops = stats.k3.tp_drops; - printf("\r%12ld packets incoming\n", packets); + printf("\r%12ld packets incoming (%ld unread on exit)\n", + v3 ? seen : packets, v3 ? packets - seen : 0); printf("\r%12ld packets passed filter\n", packets - drops); printf("\r%12ld packets failed filter (out of space)\n", drops); if (stats.k3.tp_packets > 0) |