]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ap1394.c
Add program_name field in the netdissect_options structure
[tcpdump] / print-ap1394.c
index 8adf94f420f89c33756bb0bc800c2e705a1ecb8b..178775798d720fa905e71a2824df5e635744bd4d 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <tcpdump-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "extract.h"
 #include "addrtoname.h"
 #include "ethertype.h"
@@ -82,7 +82,7 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
 {
        u_int length = h->len;
        u_int caplen = h->caplen;
-       struct firewire_header *fp;
+       const struct firewire_header *fp;
        u_short ether_type;
 
        if (caplen < FIREWIRE_HDRLEN) {
@@ -95,14 +95,14 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
 
        length -= FIREWIRE_HDRLEN;
        caplen -= FIREWIRE_HDRLEN;
-       fp = (struct firewire_header *)p;
+       fp = (const struct firewire_header *)p;
        p += FIREWIRE_HDRLEN;
 
        ether_type = EXTRACT_16BITS(&fp->firewire_type);
        if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
                /* ether_type not known, print raw packet */
                if (!ndo->ndo_eflag)
-                       ap1394_hdr_print(ndo, (u_char *)fp, length + FIREWIRE_HDRLEN);
+                       ap1394_hdr_print(ndo, (const u_char *)fp, length + FIREWIRE_HDRLEN);
 
                if (!ndo->ndo_suppress_default_print)
                        ND_DEFAULTPRINT(p, caplen);