From 3e071a78f2a5c7424340b4c8b446d51e82413c13 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Mon, 3 Jun 2013 23:24:18 +0200 Subject: netsniff-ng: v3: fix packet accounting on --num We need to carry frame_count through multiple calls of walk function to account correctly for --num . Also, move socket stats printing into rx ring, since it belongs there. Todo: the kernel socket seems to have a different count that what we see. This needs to be fixed one way or the other. Not yet sure what's causing this. Signed-off-by: Daniel Borkmann --- ring_rx.h | 1 + 1 file changed, 1 insertion(+) (limited to 'ring_rx.h') diff --git a/ring_rx.h b/ring_rx.h index 9c72cda..43b4020 100644 --- a/ring_rx.h +++ b/ring_rx.h @@ -17,6 +17,7 @@ extern void alloc_rx_ring_frames(int sock, struct ring *ring); extern void bind_rx_ring(int sock, struct ring *ring, int ifindex); extern void setup_rx_ring_layout(int sock, struct ring *ring, unsigned int size, bool jumbo_support, bool v3); +extern void sock_rx_net_stats(int sock); static inline int user_may_pull_from_rx(struct tpacket2_hdr *hdr) { -- cgit v1.2.3-54-g00ecf