X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/9106400d038224a4f2b6c5ded816dea6204741db..refs/pull/482/head:/print-ppi.c?ds=sidebyside diff --git a/print-ppi.c b/print-ppi.c index dde1cdb0..ddf674d2 100644 --- a/print-ppi.c +++ b/print-ppi.c @@ -6,9 +6,9 @@ #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #include "extract.h" typedef struct ppi_header { @@ -50,7 +50,7 @@ ppi_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p) { if_printer printer; - ppi_header_t *hdr; + const ppi_header_t *hdr; u_int caplen = h->caplen; u_int length = h->len; uint16_t len; @@ -62,7 +62,7 @@ ppi_print(netdissect_options *ndo, return (caplen); } - hdr = (ppi_header_t *)p; + hdr = (const ppi_header_t *)p; len = EXTRACT_LE_16BITS(&hdr->ppi_len); if (caplen < len) { /* @@ -89,7 +89,7 @@ ppi_print(netdissect_options *ndo, hdrlen = printer(ndo, h, p); } else { if (!ndo->ndo_eflag) - ppi_header_print(ndo, (u_char *)hdr, length + len); + ppi_header_print(ndo, (const u_char *)hdr, length + len); if (!ndo->ndo_suppress_default_print) ND_DEFAULTPRINT(p, caplen);