From: Tobias Klauser Date: Tue, 29 Jan 2013 08:50:50 +0000 (+0100) Subject: netsniff-ng: dissector: Remove unused parameter to show_frame_hdr() X-Git-Url: https://repo.or.cz/w/netsniff-ng.git/commitdiff_plain/345ce89235b475210fef50c37373ce35e4400872 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 --- 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;