X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/d526e47658b691c4b5ca0d29759d1f67b7fb037b..refs/pull/1034/head:/print-ipcomp.c diff --git a/print-ipcomp.c b/print-ipcomp.c index acbbb37f..c0c184dd 100644 --- a/print-ipcomp.c +++ b/print-ipcomp.c @@ -22,10 +22,10 @@ /* \summary: IP Payload Compression Protocol (IPComp) printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" #include "netdissect.h" #include "extract.h" @@ -42,11 +42,11 @@ ipcomp_print(netdissect_options *ndo, const u_char *bp) const struct ipcomp *ipcomp; uint16_t cpi; + ndo->ndo_protocol = "ipcomp"; ipcomp = (const struct ipcomp *)bp; - ND_TCHECK_SIZE(ipcomp); - cpi = EXTRACT_BE_U_2(ipcomp->comp_cpi); + cpi = GET_BE_U_2(ipcomp->comp_cpi); - ND_PRINT((ndo, "IPComp(cpi=0x%04x)", cpi)); + ND_PRINT("IPComp(cpi=0x%04x)", cpi); /* * XXX - based on the CPI, we could decompress the packet here. @@ -61,9 +61,4 @@ ipcomp_print(netdissect_options *ndo, const u_char *bp) * stops - there's nothing more it can do with a compressed * payload. */ - return; - -trunc: - ND_PRINT((ndo, "[|IPCOMP]")); - return; }