diff options
author | Denis Ovsienko <infrastation@yandex.ru> | 2013-09-09 14:45:31 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2013-09-09 14:45:31 +0400 |
commit | af231769266c79f6255b93568401143e8611588c (patch) | |
tree | 0d7b57ef755951cf2472376b728df49b7919423c /print-nflog.c | |
parent | ee87840d97b9ba45aea557ef66e6680bc2baff88 (diff) | |
download | tcpdump-af231769266c79f6255b93568401143e8611588c.tar.gz |
NFLOG: remove header dependency, add a test case
This change removes detection of linux/netfilter/nfnetlink_log.h, which
was only used to provide two constants. The constants are now defined in
print-nflog.c, making it possible to compile (and test) the NFLOG
decoder on all systems, not only Linux.
There is now a test case for the decoder, it was produced on a Linux
host with:
iptables -A INPUT -p udp --source 74.82.42.42 -j NFLOG --nflog-group 20
dig @74.82.42.42 ...
Diffstat (limited to 'print-nflog.c')
-rw-r--r-- | print-nflog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/print-nflog.c b/print-nflog.c index fdd21e69..238226e1 100644 --- a/print-nflog.c +++ b/print-nflog.c @@ -37,12 +37,13 @@ #include "netdissect.h" #include "interface.h" -#ifdef HAVE_LINUX_NETFILTER_NFNETLINK_LOG_H -#include <linux/netfilter/nfnetlink_log.h> #include "nflog.h" #ifdef DLT_NFLOG +#define NFULA_PAYLOAD 9 +#define NFULA_MAX 17 + const struct tok nflog_values[] = { { AF_INET, "IPv4" }, { AF_INET6, "IPv6" }, @@ -150,5 +151,4 @@ nflog_if_print(struct netdissect_options *ndo, return (sizeof(nflog_hdr_t)); } -#endif /* HAVE_LINUX_NETFILTER_NFNETLINK_LOG_H */ #endif /* DLT_NFLOG */ |