From 345ce89235b475210fef50c37373ce35e4400872 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 29 Jan 2013 09:50:50 +0100 Subject: [PATCH] netsniff-ng: dissector: Remove unused parameter to show_frame_hdr() The rmode parameter is no longer used since commit 58f49a6a ("dissector: remove redundant code, clean up a bit"), so purge it. Also remove the thus now unused enum ring_mode. Signed-off-by: Tobias Klauser --- dissector.h | 3 +-- netsniff-ng.c | 8 ++++---- ring.h | 5 ----- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dissector.h b/dissector.h index b8810644..8b11c1eb 100644 --- a/dissector.h +++ b/dissector.h @@ -33,8 +33,7 @@ static const char * const packet_types[256]={ extern char *if_indextoname(unsigned ifindex, char *ifname); -static inline void show_frame_hdr(struct frame_map *hdr, int mode, - enum ring_mode rmode) +static inline void show_frame_hdr(struct frame_map *hdr, int mode) { char tmp[IFNAMSIZ]; diff --git a/netsniff-ng.c b/netsniff-ng.c index 6c0f3459..3004c33f 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -303,7 +303,7 @@ static void pcap_to_xmit(struct ctx *ctx) ctx->tx_bytes += hdr->tp_h.tp_len;; ctx->tx_packets++; - show_frame_hdr(hdr, ctx->print_mode, RING_MODE_EGRESS); + show_frame_hdr(hdr, ctx->print_mode); dissector_entry_point(out, hdr->tp_h.tp_snaplen, ctx->link_type, ctx->print_mode); @@ -475,7 +475,7 @@ static void receive_to_xmit(struct ctx *ctx) it_out = 0; } - show_frame_hdr(hdr_in, ctx->print_mode, RING_MODE_INGRESS); + show_frame_hdr(hdr_in, ctx->print_mode); dissector_entry_point(in, hdr_in->tp_h.tp_snaplen, ctx->link_type, ctx->print_mode); @@ -639,7 +639,7 @@ static void read_pcap(struct ctx *ctx) ctx->tx_bytes += fm.tp_h.tp_len; ctx->tx_packets++; - show_frame_hdr(&fm, ctx->print_mode, RING_MODE_EGRESS); + show_frame_hdr(&fm, ctx->print_mode); dissector_entry_point(out, fm.tp_h.tp_snaplen, ctx->link_type, ctx->print_mode); @@ -948,7 +948,7 @@ static void recv_only_or_dump(struct ctx *ctx) panic("Write error to pcap!\n"); } - show_frame_hdr(hdr, ctx->print_mode, RING_MODE_INGRESS); + show_frame_hdr(hdr, ctx->print_mode); dissector_entry_point(packet, hdr->tp_h.tp_snaplen, ctx->link_type, ctx->print_mode); diff --git a/ring.h b/ring.h index cbb81443..a55a54a6 100644 --- a/ring.h +++ b/ring.h @@ -78,11 +78,6 @@ static inline unsigned int ring_size(char *ifname, unsigned int size) return round_up_cacheline(size); } -enum ring_mode { - RING_MODE_EGRESS, - RING_MODE_INGRESS, -}; - static inline unsigned int ring_frame_size(struct ring *ring) { return ring->layout.tp_frame_size; -- 2.11.4.GIT