]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-enc.c
Use more the ND_TTEST_1() macro
[tcpdump] / print-enc.c
index 05775c868b90ccd620a934b09f9b84f9f879158f..c3fcf10c7da0d287c590282092b09bfbe82ad464 100644 (file)
@@ -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;