X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/7b2c5a11a7bc236d72b440c4db5263edb23b4880..0845bc813c1cc48b18cdefff0b387c110647463c:/print-ap1394.c diff --git a/print-ap1394.c b/print-ap1394.c index 8adf94f4..17877579 100644 --- a/print-ap1394.c +++ b/print-ap1394.c @@ -25,7 +25,7 @@ #include -#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);