X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/99c91c3aec40b691641374f58e798bd8d6b657bd..1a04b92e365f5ed01ca38619b41bcc4fc9cbd63c:/print-enc.c diff --git a/print-enc.c b/print-enc.c index 05775c86..c3fcf10c 100644 --- a/print-enc.c +++ b/print-enc.c @@ -21,6 +21,8 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +/* \summary: OpenBSD IPsec encapsulation BPF layer printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -85,10 +87,10 @@ struct enchdr { u_int enc_if_print(netdissect_options *ndo, - const struct pcap_pkthdr *h, register const u_char *p) + const struct pcap_pkthdr *h, const u_char *p) { - register u_int length = h->len; - register u_int caplen = h->caplen; + u_int length = h->len; + u_int caplen = h->caplen; int flags; const struct enchdr *hdr; @@ -106,7 +108,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_32BITS(&hdr->spi))); + ND_PRINT((ndo, "SPI 0x%08x: ", EXTRACT_BE_U_4(&hdr->spi))); length -= ENC_HDRLEN; caplen -= ENC_HDRLEN;