]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-enc.c
Address Michael's comments.
[tcpdump] / print-enc.c
index 0dc48fd70e7bf32a5f6577f4524fce9675c76a2c..5c01f3ef7b6142c39e59028141857ba310252851 100644 (file)
@@ -35,6 +35,7 @@ static const char rcsid[] _U_ =
 #include <pcap.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "addrtoname.h"
 
 #include "enc.h"
@@ -67,7 +68,7 @@ enc_if_print(const struct pcap_pkthdr *h, register const u_char *p)
        ENC_PRINT_TYPE(flags, M_AUTH, "authentic");
        ENC_PRINT_TYPE(flags, M_CONF, "confidential");
        /* ENC_PRINT_TYPE(flags, M_TUNNEL, "tunnel"); */
-       printf("SPI 0x%08x: ", (u_int32_t)ntohl(hdr->spi));
+       printf("SPI 0x%08x: ", EXTRACT_32BITS(&hdr->spi));
 
        length -= ENC_HDRLEN;
        caplen -= ENC_HDRLEN;
@@ -79,7 +80,7 @@ enc_if_print(const struct pcap_pkthdr *h, register const u_char *p)
                break;
 #ifdef INET6
        case AF_INET6:
-               ip6_print(p, length);
+               ip6_print(gndo, p, length);
                break;
 #endif /*INET6*/
        }