netsniff-ng: dissector: Remove unused parameter to show_frame_hdr()
authorTobias Klauser <tklauser@distanz.ch>
Tue, 29 Jan 2013 08:50:50 +0000 (29 09:50 +0100)
committerTobias Klauser <tklauser@distanz.ch>
Tue, 29 Jan 2013 09:17:21 +0000 (29 10:17 +0100)
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 <tklauser@distanz.ch>
dissector.h
netsniff-ng.c
ring.h

index b881064..8b11c1e 100644 (file)
@@ -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];
 
index 6c0f345..3004c33 100644 (file)
@@ -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 cbb8144..a55a54a 100644 (file)
--- 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;