]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pflog.c
Fix the pointer tests in the non-ndoified TTEST2() macro as well.
[tcpdump] / print-pflog.c
index 972cb4b1328c564d1210641763624e15f0e3f858..ac325f4b0e63674b56fd7882f7f049e1d0c1073e 100644 (file)
@@ -42,6 +42,7 @@ static const char rcsid[] _U_ =
 #include <stdio.h>
 #include <pcap.h>
 
+#include "extract.h"
 #include "interface.h"
 #include "addrtoname.h"
 
@@ -94,8 +95,8 @@ pflog_print(const struct pfloghdr *hdr)
 {
        u_int32_t rulenr, subrulenr;
 
-       rulenr = ntohl(hdr->rulenr);
-       subrulenr = ntohl(hdr->subrulenr);
+       rulenr = EXTRACT_32BITS(&hdr->rulenr);
+       subrulenr = EXTRACT_32BITS(&hdr->subrulenr);
        if (subrulenr == (u_int32_t)-1)
                printf("rule %u/", rulenr);
        else
@@ -161,7 +162,7 @@ pflog_if_print(const struct pcap_pkthdr *h, register const u_char *p)
 #if OPENBSD_AF_INET6 != AF_INET6
                case OPENBSD_AF_INET6:          /* XXX: read pcap files */
 #endif
-                       ip6_print(p, length);
+                       ip6_print(gndo, p, length);
                        break;
 #endif