A cleaned up fork of ngrep for OpenBSD
git clone git://
Log | Files | Refs | README | LICENSE

commit 65a4c257f1f2b8ceb1c301c9154c94cd6fd286b3
parent 7d5105ac27dbf89fc1cde8f739f7cfafea136fb1
Author: Jordan Ritter <>
Date:   Thu, 12 Apr 2007 05:29:59 +0000

add support for OpenBSD's PFLOG packet capture type (patch #1696074), and
fix an aesthetic bug whereby the configure script would say it was
searching for specific DLT_ types within "bpf.h", when in fact the file
might be named differently (misleading)

Diffstat: | 33+++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/ b/ @@ -322,7 +322,7 @@ dnl libpcap's dnl present="" -AC_MSG_CHECKING(for DLT_LINUX_SLL in bpf.h) +AC_MSG_CHECKING(for DLT_LINUX_SLL in $BPF) AC_EGREP_CPP(yes, [ #include <$BPF> @@ -334,7 +334,7 @@ yes present="" -AC_MSG_CHECKING(for DLT_LOOP in bpf.h) +AC_MSG_CHECKING(for DLT_LOOP in $BPF) AC_EGREP_CPP(yes, [ #include <$BPF> @@ -346,7 +346,7 @@ yes present="" -AC_MSG_CHECKING(for DLT_IEEE802_11 in bpf.h) +AC_MSG_CHECKING(for DLT_IEEE802_11 in $BPF) AC_EGREP_CPP(yes, [ #include <$BPF> @@ -358,7 +358,7 @@ yes present="" -AC_MSG_CHECKING(for DLT_IEEE802_11_RADIO in bpf.h) +AC_MSG_CHECKING(for DLT_IEEE802_11_RADIO in $BPF) AC_EGREP_CPP(yes, [ #include <$BPF> @@ -370,7 +370,7 @@ yes present="" -AC_MSG_CHECKING(for DLT_RAW in bpf.h) +AC_MSG_CHECKING(for DLT_RAW in $BPF) AC_EGREP_CPP(yes, [ #include <$BPF> @@ -381,6 +381,18 @@ yes [HAVE_DLT_RAW="1" && echo yes], [HAVE_DLT_RAW="0" && echo no]) +present="" +AC_MSG_CHECKING(for DLT_PFLOG in $BPF) +AC_EGREP_CPP(yes, +[ +#include <$BPF> +#ifdef DLT_PFLOG +yes +#endif +], +[HAVE_DLT_PFLOG="1" && echo yes], [HAVE_DLT_PFLOG="0" && echo no]) + + dnl dnl Now that we're past the OS-specific stuff, which could have dnl modified our USE_* and other defines, define them all now. @@ -396,11 +408,12 @@ AC_DEFINE_UNQUOTED(DROPPRIVS_USER, "$DROPPRIVS_USER", [pseud AC_DEFINE_UNQUOTED(HAVE_DUMB_UDPHDR, $HAVE_DUMB_UDPHDR, [whether to accommodate broken redhat-glibc udphdr declaration (default no)]) -AC_DEFINE_UNQUOTED(HAVE_DLT_RAW, $HAVE_DLT_RAW, [presence of DLT_RAW in bpf.h]) -AC_DEFINE_UNQUOTED(HAVE_DLT_IEEE802_11, $HAVE_DLT_IEEE802_11, [presence of DLT_IEEE802_11 in bpf.h]) -AC_DEFINE_UNQUOTED(HAVE_DLT_IEEE802_11_RADIO, $HAVE_DLT_IEEE802_11_RADIO, [presence of DLT_IEEE802_11_RADIO in bpf.h]) -AC_DEFINE_UNQUOTED(HAVE_DLT_LOOP, $HAVE_DLT_LOOP, [presence of DLT_LOOP in bpf.h]) -AC_DEFINE_UNQUOTED(HAVE_DLT_LINUX_SLL, $HAVE_DLT_LINUX_SLL, [presence of DLT_LINUX_SLL in bpf.h]) +AC_DEFINE_UNQUOTED(HAVE_DLT_RAW, $HAVE_DLT_RAW, [presence of DLT_RAW in $BPF]) +AC_DEFINE_UNQUOTED(HAVE_DLT_PFLOG, $HAVE_DLT_PFLOG, [presence of DLT_PFLOG in $BPF]) +AC_DEFINE_UNQUOTED(HAVE_DLT_IEEE802_11, $HAVE_DLT_IEEE802_11, [presence of DLT_IEEE802_11 in $BPF]) +AC_DEFINE_UNQUOTED(HAVE_DLT_IEEE802_11_RADIO, $HAVE_DLT_IEEE802_11_RADIO, [presence of DLT_IEEE802_11_RADIO in $BPF]) +AC_DEFINE_UNQUOTED(HAVE_DLT_LOOP, $HAVE_DLT_LOOP, [presence of DLT_LOOP in $BPF]) +AC_DEFINE_UNQUOTED(HAVE_DLT_LINUX_SLL, $HAVE_DLT_LINUX_SLL, [presence of DLT_LINUX_SLL in $BPF]) dnl