X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/513f782ae18791f0c925b9235da749b38159b607..41ef9cfe38f86553ffd8f61b6f87e9c00baf5f07:/print-enc.c diff --git a/print-enc.c b/print-enc.c index 93422adf..e6c27870 100644 --- a/print-enc.c +++ b/print-enc.c @@ -24,7 +24,7 @@ /* \summary: OpenBSD IPsec encapsulation BPF layer printer */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include "netdissect-stdinc.h" @@ -103,8 +103,9 @@ enc_if_print(netdissect_options *ndo, u_int af, flags; const struct enchdr *hdr; + ndo->ndo_protocol = "enc_if"; if (caplen < ENC_HDRLEN) { - ND_PRINT("[|enc]"); + nd_print_trunc(ndo); goto out; } @@ -141,7 +142,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("SPI 0x%08x: ", EXTRACT_BE_U_4(hdr->spi)); + ND_PRINT("SPI 0x%08x: ", GET_BE_U_4(hdr->spi)); length -= ENC_HDRLEN; caplen -= ENC_HDRLEN; @@ -161,11 +162,3 @@ enc_if_print(netdissect_options *ndo, out: return (ENC_HDRLEN); } - - -/* - * Local Variables: - * c-style: whitesmith - * c-basic-offset: 8 - * End: - */