summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2011-08-23 11:48:06 -0700
committerSam Roberts <vieuxtech@gmail.com>2011-08-23 11:48:06 -0700
commit5f5a034d217e6beec837b3aafdb6afbb669f648b (patch)
tree685b19ee9a67866753abcb95da7c92e6afea717a
parent037dc4173ba6b84c212694f07857d6a536e6a4c6 (diff)
downloadlibnet-5f5a034d217e6beec837b3aafdb6afbb669f648b.tar.gz
Presence of linux's PF_PACKET sockets is now detected.
The acinclude.m4 merged in from packetfactory's 1.1.3-rc branch mysteriously assumed that that there was no PF_PACKET if the target OS was linux, which is the opposite of what we want.
-rw-r--r--libnet/acinclude.m415
-rw-r--r--libnet/configure.in2
2 files changed, 5 insertions, 12 deletions
diff --git a/libnet/acinclude.m4 b/libnet/acinclude.m4
index 0913021..064b582 100644
--- a/libnet/acinclude.m4
+++ b/libnet/acinclude.m4
@@ -39,17 +39,10 @@ dnl
AC_DEFUN([AC_LIBNET_CHECK_PF_PACKET],
[
- AC_MSG_CHECKING(for packet socket (PF_SOCKET))
+ AC_MSG_CHECKING(for packet socket (PF_PACKET))
AC_CACHE_VAL(libnet_cv_have_packet_socket,
- [case "$target_os" in
-
- linux*)
- libnet_cv_have_packet_socket=no
- AC_MSG_RESULT(no)
- ;;
- *)
-
+ [
cat > pf_packet-test.c << EOF
#include <stdio.h>
#include <errno.h>
@@ -110,8 +103,8 @@ EOF
fi
rm -f pf_packet-test* core core.pf_packet-test
- ;;
- esac])
+
+ ])
if test $libnet_cv_have_packet_socket = yes -o $libnet_cv_have_packet_socket = probably; then
AC_DEFINE(HAVE_PACKET_SOCKET, 1,
diff --git a/libnet/configure.in b/libnet/configure.in
index 9015696..7d57601 100644
--- a/libnet/configure.in
+++ b/libnet/configure.in
@@ -84,7 +84,7 @@ if test -n "${with_link_layer}"; then
none) AC_LIBOBJ([libnet_link_none]) ;;
*) AC_MSG_ERROR([Invalid link type "${with_link_layer}"]) ;;
esac
- AC_MSG_RESULT(forced link layer to ${with_link_layer})
+ AC_MSG_RESULT(user selected link layer ${with_link_layer})
elif test "${cross_compiling}" != "yes" -a -r /dev/bpf0 ; then
AC_LIBOBJ([libnet_link_bpf])
AC_MSG_RESULT(found link layer bpf)