]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nflog.c
Regenerate config files.
[tcpdump] / print-nflog.c
index b0046be09c5ef1f10ba381f6959d9a6239b44ce0..41cbf788fd9c00437e624fa13552c7c8f2272dc2 100644 (file)
  * DAMAGE.
  */
 
-#define NETDISSECT_REWORKED
+/* \summary: DLT_NFLOG printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
-#include "interface.h"
+#include "netdissect.h"
 
 #if defined(DLT_NFLOG) && defined(HAVE_PCAP_NFLOG_H)
 #include <pcap/nflog.h>
 
 static const struct tok nflog_values[] = {
        { AF_INET,              "IPv4" },
+#ifdef AF_INET6
        { AF_INET6,             "IPv6" },
-       { 0,                            NULL }
+#endif /*AF_INET6*/
+       { 0,                    NULL }
 };
 
 static inline void
@@ -79,7 +82,7 @@ nflog_if_print(netdissect_options *ndo,
                return h_size;
        }
 
-       if (!(hdr->nflog_version) == 0) {
+       if (hdr->nflog_version != 0) {
                ND_PRINT((ndo, "version %u (unknown)", hdr->nflog_version));
                return h_size;
        }
@@ -143,11 +146,11 @@ nflog_if_print(netdissect_options *ndo,
                ip_print(ndo, p, length);
                break;
 
-#ifdef INET6
+#ifdef AF_INET6
        case AF_INET6:
                ip6_print(ndo, p, length);
                break;
-#endif /*INET6*/
+#endif /* AF_INET6 */
 
        default:
                if (!ndo->ndo_eflag)