]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ipcomp.c
Fix a warning
[tcpdump] / print-ipcomp.c
index 2504bfd9ae93511900f15130fe68f64e5c7930ce..82469b3f397db350ada0b5c9e21260a07391d70f 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+/* \summary: IP Payload Compression Protocol (IPComp) printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 struct ipcomp {
        uint8_t comp_nxt;       /* Next Header */
@@ -35,7 +37,7 @@ struct ipcomp {
 #include <zlib.h>
 #endif
 
-#include "interface.h"
+#include "netdissect.h"
 #include "extract.h"
 
 int
@@ -48,13 +50,13 @@ ipcomp_print(netdissect_options *ndo, register const u_char *bp, int *nhdr _U_)
        int advance;
 #endif
 
-       ipcomp = (struct ipcomp *)bp;
+       ipcomp = (const struct ipcomp *)bp;
        cpi = EXTRACT_16BITS(&ipcomp->comp_cpi);
 
        /* 'ep' points to the end of available data. */
        ep = ndo->ndo_snapend;
 
-       if ((u_char *)(ipcomp + 1) >= ep - sizeof(struct ipcomp)) {
+       if ((const u_char *)(ipcomp + 1) >= ep - sizeof(struct ipcomp)) {
                ND_PRINT((ndo, "[|IPCOMP]"));
                goto fail;
        }