X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1fdde1543ecb9c70ad051add9917fb49bd4d14bf..0d52da1a967932f479912f8049b35c0112a7c708:/print-enc.c diff --git a/print-enc.c b/print-enc.c index d8f0a9e6..db965efb 100644 --- a/print-enc.c +++ b/print-enc.c @@ -75,9 +75,9 @@ #define M_AUTH 0x0800 /* packet was authenticated (AH) */ struct enchdr { - uint32_t af; - uint32_t spi; - uint32_t flags; + nd_uint32_t af; + nd_uint32_t spi; + nd_uint32_t flags; }; #define ENC_PRINT_TYPE(wh, xf, nam) \ @@ -127,11 +127,11 @@ enc_if_print(netdissect_options *ndo, * The SPI field is always in network byte order, i.e. big- * endian. */ - UNALIGNED_MEMCPY(&af, &hdr->af, sizeof af); - UNALIGNED_MEMCPY(&flags, &hdr->flags, sizeof flags); + UNALIGNED_MEMCPY(&af, &hdr->af, sizeof (af)); + UNALIGNED_MEMCPY(&flags, &hdr->flags, sizeof (flags)); if ((af & 0xFFFF0000) != 0) { af = SWAPLONG(af); - flags = SWAPLONG(hdr->flags); + flags = SWAPLONG(flags); } if (flags == 0) @@ -141,7 +141,7 @@ enc_if_print(netdissect_options *ndo, ENC_PRINT_TYPE(flags, M_AUTH, "authentic"); ENC_PRINT_TYPE(flags, M_CONF, "confidential"); /* ENC_PRINT_TYPE(flags, M_TUNNEL, "tunnel"); */ - ND_PRINT((ndo, "SPI 0x%08x: ", EXTRACT_BE_U_4(&hdr->spi))); + ND_PRINT((ndo, "SPI 0x%08x: ", EXTRACT_BE_U_4(hdr->spi))); length -= ENC_HDRLEN; caplen -= ENC_HDRLEN;