X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fdf8fb7399246033f58fa6864b3970df6257e515..ebb51ef0e725737ca8c1d618da6527a58660d2bf:/print-nflog.c diff --git a/print-nflog.c b/print-nflog.c index cd0428bc..41cbf788 100644 --- a/print-nflog.c +++ b/print-nflog.c @@ -25,23 +25,24 @@ * DAMAGE. */ -#define NETDISSECT_REWORKED +/* \summary: DLT_NFLOG printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" #if defined(DLT_NFLOG) && defined(HAVE_PCAP_NFLOG_H) #include static const struct tok nflog_values[] = { { AF_INET, "IPv4" }, -#ifdef INET6 +#ifdef AF_INET6 { AF_INET6, "IPv6" }, -#endif /*INET6*/ +#endif /*AF_INET6*/ { 0, NULL } }; @@ -81,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; } @@ -145,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)