]> The Tcpdump Group git mirrors - tcpdump/blobdiff - bpf_dump.c
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / bpf_dump.c
index 511b14e36e193c1be9f7ac7f9dd0c4eda6837cf3..2a55cf87b1c7b42120b641330c9e42ffa6f2387f 100644 (file)
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
-#ifndef lint
-static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.10 1999-11-21 09:36:44 fenner Exp $ (LBL)";
-#endif
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
 
-#include <sys/types.h>
-#include <sys/time.h>
+#include "netdissect-stdinc.h"
 
-#include <pcap.h>
 #include <stdio.h>
 
+#include "netdissect.h"
 #include "interface.h"
 
-extern void bpf_dump(struct bpf_program *, int);
-
 void
-bpf_dump(struct bpf_program *p, int option)
+bpf_dump(const struct bpf_program *p, int option)
 {
-       struct bpf_insn *insn;
+       const struct bpf_insn *insn;
        int i;
        int n = p->bf_len;
 
@@ -60,10 +51,6 @@ bpf_dump(struct bpf_program *p, int option)
                return;
        }
        for (i = 0; i < n; ++insn, ++i) {
-#ifdef BDEBUG
-               extern int bids[];
-               printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1);
-#endif
                puts(bpf_image(insn, i));
        }
 }