Commit d82e4a7c authored by Romain Francoise's avatar Romain Francoise

Import libpcap upstream release 1.6.1

parent 8ec7da1c
Saturday Jul. 19, 2014 mcr@sandelman.ca
Summary for 1.6.1 tcpdump release
some fixes for the any device
changes for how --enable-XXX works
Wednesday Jul. 2, 2014 mcr@sandelman.ca
Summary for 1.6.0 tcpdump release
Don't support D-Bus sniffing on OS X
fixes for byte order issues with NFLOG captures
Handle using cooked mode for DLT_NETLINK in activate_new().
on platforms where you can not capture on down interfaces, do not list them
but: do list interfaces which are down, if you can capture on them!
Wednesday December 18, 2013 guy@alum.mit.edu
Summary for 1.5.3 libpcap release
Don't let packets that don't match the current filter get to the
......@@ -244,7 +257,7 @@ Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap rele
DLT: Add JUNIPER_ST
802.15.4 support
Variable length 802.11 header support
X2E data type support
X2E data type support
SITA ACN Interface support - see README.sita
Support for memory-mapped capture on Linux
Support for zerocopy BPF on platforms that support it
......@@ -256,7 +269,7 @@ Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap rele
can print better diagnostic information
Return PCAP_ERROR_PERM_DENIED if we don't have permission to open a device, so
applications can tell the user they need to go play with permissions
On Linux, ignore ENETDOWN so we can continue to capture packets if the
On Linux, ignore ENETDOWN so we can continue to capture packets if the
interface goes down and comes back up again.
On Linux, support new tpacket frame headers (2.6.27+)
On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist
......@@ -269,14 +282,14 @@ Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 libpcap relea
Change build process to put public libpcap headers into pcap subir
DLT: Add value for IPMI IPMB packets
DLT: Add value for u10 Networks boards
Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted
Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted
libpcap files on an OS other than where the file was generated
Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release
Put the public libpcap headers into a pcap subdirectory in both the
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for
files at the top-level directory to include those headers, for
backwards compatibility.
Add Bluetooth support
Add USB capturing support on Linux
......@@ -284,30 +297,30 @@ Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release
Add support for new FreeBSD BIOCSDIRECTION ioctl
Add additional filter operations for 802.11 frame types
Add support for filtering on MTP2 frame types
Propagate some changes from the main branch, so the x.9 branch has
Propagate some changes from the main branch, so the x.9 branch has
all the DLT_ and LINKTYPE_ values that the main branch does
Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info)
Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info)
encapsulated packets
Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done
Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done
by Linux drivers
Add LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS.
Add DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer
Add DLT for Bluetooth HCI UART transport layer
When building a shared library, build with "-fPIC" on Linux to support x86_64
Link with "$(CC) -shared" rather than "ld -shared" when building a
Link with "$(CC) -shared" rather than "ld -shared" when building a
".so" shared library
Add support for autoconf 2.60
Fixes to discard unread packets when changing filters
Changes to handle name changes in the DAG library resulting from
Changes to handle name changes in the DAG library resulting from
switching to libtool.
Add support for new DAG ERF types.
Add an explicit "-ldag" when building the shared library, so the DAG
Add an explicit "-ldag" when building the shared library, so the DAG
library dependency is explicit.
Mac OSX fixes for dealing with "wlt" devices
Fixes in add_or_find_if() & pcap_findalldevs() to optimize generating
device lists
Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter
was not checked.
was not checked.
Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release
......@@ -319,19 +332,19 @@ Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release
OP_PACKET now matches the beginning of the packet, instead of
beginning+link-layer
Add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay
Fix allocation of buffer for list of link-layer types
Fix allocation of buffer for list of link-layer types
Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communcation Messages
Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_
Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the right value for CAN).
Added definition for DLT_A429 and LINKTYPE_A429 as #184.
Added a new DLT and LINKTYPE value for CAN v2.0B frames.
Add support for DLT_JUNIPER_VP.
Don't double-count received packets on Linux systems that
support the PACKET_STATISTICS getsockopt() argument on
Don't double-count received packets on Linux systems that
support the PACKET_STATISTICS getsockopt() argument on
PF_PACKET sockets.
Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link
Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link
layers in Windows
Add support to build libpcap.lib and wpcap.dll under Cygnus and
Add support to build libpcap.lib and wpcap.dll under Cygnus and
MingW32.
Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release
......
......@@ -111,7 +111,7 @@ Additional people who have contributed patches:
Márton Németh <nm127 at freemail dot hu>
Matthew Luckie <mjl at luckie dot org dot nz>
Max Laier <max at love2party dot net>
Michal Labedzki
Michal Labedzki <michal dot labedzki at tieto dot com>
Michal Sekletar <msekleta at redhat dot com>
Mike Frysinger <vapier at gmail dot com>
Mike Kershaw <dragorn at kismetwireless dot net>
......
@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.29 2008-06-12 20:21:51 guy Exp $ (LBL)
To build libpcap, run "./configure" (a shell script). The configure
script will determine your system attributes and generate an
appropriate Makefile from Makefile.in. Next run "make". If everything
......@@ -31,19 +29,14 @@ where the configure scripts fails to detect it.
You will need an ANSI C compiler to build libpcap. The configure script
will abort if your compiler is not ANSI compliant. If this happens, use
the GNU C compiler, available via anonymous ftp:
ftp://ftp.gnu.org/pub/gnu/gcc/
the generally available GNU C compiler (GCC).
If you use flex, you must use version 2.4.6 or higher. The configure
script automatically detects the version of flex and will not use it
unless it is new enough. You can use "flex -V" to see what version you
have (unless it's really old). The current version of flex is available
via anonymous ftp:
ftp://ftp.ee.lbl.gov/flex-*.tar.Z
As of this writing, the current version is 2.5.4.
at flex.sourceforge.net and often comes packaged by means of the OS.
As of this writing, the current version is 2.5.37.
If you use bison, you must use flex (and visa versa). The configure
script automatically falls back to lex and yacc if both flex and bison
......
......@@ -16,8 +16,6 @@
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
......@@ -85,7 +83,7 @@ YACC = @V_YACC@
@rm -f $@
$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@
FSRC = fad-@V_FINDALLDEVS@.c
SSRC = @SSRC@
CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \
......@@ -107,6 +105,7 @@ PUBHDR = \
pcap/bluetooth.h \
pcap/ipnet.h \
pcap/namedb.h \
pcap/nflog.h \
pcap/pcap.h \
pcap/sll.h \
pcap/vlan.h \
......@@ -129,17 +128,17 @@ HDR = $(PUBHDR) \
sunatmpos.h
TESTS = \
capturetest \
filtertest \
findalldevstest \
nonblocktest \
opentest \
selpolltest \
valgrindtest
TESTS_SRC = \
tests/capturetest.c \
tests/filtertest.c \
tests/findalldevstest.c \
tests/nonblocktest.c \
tests/opentest.c \
tests/reactivatetest.c \
tests/selpolltest.c \
......@@ -296,6 +295,8 @@ EXTRA_DIST = \
pcap-bpf.c \
pcap-bt-linux.c \
pcap-bt-linux.h \
pcap-bt-monitor-linux.c \
pcap-bt-monitor-linux.h \
pcap-can-linux.c \
pcap-can-linux.h \
pcap-canusb-linux.c \
......@@ -526,15 +527,15 @@ pcap-config: $(srcdir)/pcap-config.in ./config.status
#
tests: $(TESTS)
capturetest: tests/capturetest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/tests/capturetest.c libpcap.a $(LIBS)
filtertest: tests/filtertest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS)
findalldevstest: tests/findalldevstest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS)
nonblocktest: tests/nonblocktest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS)
opentest: tests/opentest.c libpcap.a
$(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS)
......@@ -605,6 +606,8 @@ install: install-shared install-archive pcap-config
$(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \
rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \
$(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \
rm -f pcap_tstamp_type_val_to_description.3pcap && \
$(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \
rm -f pcap_getnonblock.3pcap && \
$(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap)
for i in $(MANFILE); do \
......@@ -688,6 +691,7 @@ uninstall: uninstall-shared
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline_with_tstamp_precision.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap
rm -f $(DESTDIR)$(mandir)/man3/pcap_tstamp_type_val_to_description.3pcap
for i in $(MANFILE); do \
rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
for i in $(MANMISC); do \
......@@ -741,4 +745,4 @@ releasetar:
rm -rf $$name
depend: $(GENSRC) $(GENHDR) bpf_filter.c
$(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)
$(MKDEP) -c $(CC) -m $(CFLAGS) $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)
@(#) $Header: /tcpdump/master/libpcap/README,v 1.34 2008-12-14 19:44:14 guy Exp $ (LBL)
LIBPCAP 1.x.y
www.tcpdump.org
......
......@@ -11,6 +11,11 @@ Using BPF:
same, and the configure script should detect that it's on an AIX
system and choose BPF even if the devices aren't there.
Also note that tcpdump _binary_ compiled on AIX 4 may have a problem
doing the initial loading of the BPF driver if copied to AIX 5 and
run there (GH #52). tcpdump binary natively compiled on AIX 5 should
not have this issue.
(2) If libpcap doesn't compile on your machine when configured to use
BPF, or if the workarounds fail to make it work correctly, you
should send to tcpdump-workers@lists.tcpdump.org a detailed bug
......
/* @(#) $Header: /tcpdump/master/libpcap/Win32/Include/Gnuc.h,v 1.1 2002-08-01 08:33:05 risso Exp $ (LBL) */
/* Define __P() macro, if necessary */
#ifndef __P
......
......@@ -27,8 +27,6 @@
* SUCH DAMAGE.
*/
/* $Id: addrinfo.h,v 1.1 2002-08-01 08:33:05 risso Exp $ */
#ifndef HAVE_ADDRINFO
/*
......
......@@ -17,8 +17,6 @@
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL)
*/
/*
......
......@@ -55,11 +55,6 @@
#include <config.h>
#endif
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/Win32/Src/getaddrinfo.c,v 1.3 2008-09-15 23:37:51 guy Exp $";
#endif
#include <pcap-stdinc.h>
#if 0
#include <sys/sysctl.h>
......
......@@ -36,13 +36,6 @@
* SUCH DAMAGE.
*/
/* $Id: inet_aton.c,v 1.2 2003-11-15 23:24:06 guy Exp $ */
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/Win32/Src/inet_aton.c,v 1.2 2003-11-15 23:24:06 guy Exp $";
#endif
#include <sys/types.h>
#include <pcap-stdinc.h>
......
......@@ -36,13 +36,6 @@
* SUCH DAMAGE.
*/
/* $Id: inet_pton.c,v 1.3 2007-09-27 18:02:20 gianluca Exp $ */
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/Win32/Src/inet_pton.c,v 1.3 2007-09-27 18:02:20 gianluca Exp $";
#endif
#include <errno.h>
#ifdef WIN32
......
dnl @(#) $Header: /tcpdump/master/libpcap/aclocal.m4,v 1.93 2008-11-18 07:29:48 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
dnl
......
......@@ -30,8 +30,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#) $Id: arcnet.h,v 1.2 2001-04-24 02:17:52 guy Exp $ (LBL)
*
* from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
*/
......
......@@ -28,8 +28,6 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @(#) $Header: /tcpdump/master/libpcap/atmuni31.h,v 1.3 2007-10-22 19:28:58 guy Exp $ (LBL)
*/
/* Based on UNI3.1 standard by ATM Forum */
......
......@@ -38,11 +38,6 @@
* @(#)bpf.c 7.5 (Berkeley) 7/15/91
*/
#if !(defined(lint) || defined(KERNEL) || defined(_KERNEL))
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v 1.46 2008-01-02 04:16:46 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
......@@ -469,6 +464,12 @@ bpf_filter(pc, p, wirelen, buflen)
A /= X;
continue;
case BPF_ALU|BPF_MOD|BPF_X:
if (X == 0)
return 0;
A %= X;
continue;
case BPF_ALU|BPF_AND|BPF_X:
A &= X;
continue;
......@@ -477,6 +478,10 @@ bpf_filter(pc, p, wirelen, buflen)
A |= X;
continue;
case BPF_ALU|BPF_XOR|BPF_X:
A ^= X;
continue;
case BPF_ALU|BPF_LSH|BPF_X:
A <<= X;
continue;
......@@ -501,6 +506,10 @@ bpf_filter(pc, p, wirelen, buflen)
A /= pc->k;
continue;
case BPF_ALU|BPF_MOD|BPF_K:
A %= pc->k;
continue;
case BPF_ALU|BPF_AND|BPF_K:
A &= pc->k;
continue;
......@@ -509,6 +518,10 @@ bpf_filter(pc, p, wirelen, buflen)
A |= pc->k;
continue;
case BPF_ALU|BPF_XOR|BPF_K:
A ^= pc->k;
continue;
case BPF_ALU|BPF_LSH|BPF_K:
A <<= pc->k;
continue;
......@@ -611,13 +624,16 @@ bpf_validate(f, len)
case BPF_MUL:
case BPF_OR:
case BPF_AND:
case BPF_XOR:
case BPF_LSH:
case BPF_RSH:
case BPF_NEG:
break;
case BPF_DIV:
case BPF_MOD:
/*
* Check for constant division by 0.
* Check for constant division or modulus
* by 0.
*/
if (BPF_SRC(p->code) == BPF_K && p->k == 0)
return 0;
......
......@@ -18,10 +18,6 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/bpf_dump.c,v 1.15 2008-01-02 04:16:46 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
......
......@@ -19,11 +19,6 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.28 2008-01-02 04:16:46 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
......@@ -216,6 +211,11 @@ bpf_image(p, n)
fmt = "x";
break;
case BPF_ALU|BPF_MOD|BPF_X:
op = "mod";
fmt = "x";
break;
case BPF_ALU|BPF_AND|BPF_X:
op = "and";
fmt = "x";
......@@ -226,6 +226,11 @@ bpf_image(p, n)
fmt = "x";
break;
case BPF_ALU|BPF_XOR|BPF_X:
op = "xor";
fmt = "x";
break;
case BPF_ALU|BPF_LSH|BPF_X:
op = "lsh";
fmt = "x";
......@@ -256,6 +261,11 @@ bpf_image(p, n)
fmt = "#%d";
break;
case BPF_ALU|BPF_MOD|BPF_K:
op = "mod";
fmt = "#%d";
break;
case BPF_ALU|BPF_AND|BPF_K:
op = "and";
fmt = "#0x%x";
......@@ -266,6 +276,11 @@ bpf_image(p, n)
fmt = "#0x%x";
break;
case BPF_ALU|BPF_XOR|BPF_K:
op = "xor";
fmt = "#0x%x";
break;
case BPF_ALU|BPF_LSH|BPF_K:
op = "lsh";
fmt = "#%d";
......
This diff is collapsed.
......@@ -256,6 +256,9 @@
/* target host supports Bluetooth sniffing */
#undef PCAP_SUPPORT_BT
/* target host supports Bluetooth Monitor */
#undef PCAP_SUPPORT_BT_MONITOR
/* target host supports CAN sniffing */
#undef PCAP_SUPPORT_CAN
......
This diff is collapsed.
This diff is collapsed.
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.168 2008-12-23 20:49:26 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
......@@ -1456,7 +1455,7 @@ AC_SUBST(NETFILTER_SRC)
AC_ARG_ENABLE([bluetooth],
[AC_HELP_STRING([--enable-bluetooth],[enable Bluetooth support @<:@default=yes, if support available@:>@])],
[],
[enable_bluetooth=yes])
[enable_bluetooth=ifsupportavailable])
if test "x$enable_bluetooth" != "xno" ; then
dnl check for Bluetooth sniffing support
......@@ -1486,23 +1485,56 @@ if test "x$enable_bluetooth" != "xno" ; then
if test $ac_cv_lbl_sockaddr_hci_has_hci_channel = yes ; then
AC_DEFINE(SOCKADDR_HCI_HAS_HCI_CHANNEL,,
[if struct sockaddr_hci has hci_channel member])
#
# OK, is HCI_CHANNEL_MONITOR defined?
#
AC_MSG_CHECKING(if HCI_CHANNEL_MONITOR is defined)
AC_CACHE_VAL(ac_cv_lbl_hci_channel_monitor_is_defined,
AC_TRY_COMPILE(
[
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
],
[u_int i = HCI_CHANNEL_MONITOR],
ac_cv_lbl_hci_channel_monitor_is_defined=yes,
ac_cv_lbl_hci_channel_monitor_is_defined=no))
AC_MSG_RESULT($ac_cv_lbl_hci_channel_monitor_is_defined)
if test $ac_cv_lbl_hci_channel_monitor_is_defined = yes ; then
AC_DEFINE(PCAP_SUPPORT_BT_MONITOR,,
[target host supports Bluetooth Monitor])
BT_MONITOR_SRC=pcap-bt-monitor-linux.c
fi
fi
ac_lbl_bluetooth_available=yes
],
AC_MSG_NOTICE(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
ac_lbl_bluetooth_available=no
)
if test "x$ac_lbl_bluetooth_available" == "xno" ; then
if test "x$enable_bluetooth" = "xyes" ; then
AC_MSG_ERROR(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
else
AC_MSG_NOTICE(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
fi
fi
;;
*)
AC_MSG_NOTICE(no Bluetooth sniffing support implemented for $host_os)
if test "x$enable_bluetooth" = "xyes" ; then
AC_MSG_ERROR(no Bluetooth sniffing support implemented for $host_os)
else
AC_MSG_NOTICE(no Bluetooth sniffing support implemented for $host_os)
fi
;;
esac
AC_SUBST(PCAP_SUPPORT_BT)
AC_SUBST(BT_SRC)
AC_SUBST(BT_MONITOR_SRC)
fi
AC_ARG_ENABLE([canusb],
[AC_HELP_STRING([--enable-canusb],[enable canusb support @<:@default=yes, if support available@:>@])],
[],
[enable_canusb=yes])
[enable_canusb=ifsupportavailable])
if test "x$enable_canusb" != "xno" ; then
dnl check for canusb support
......@@ -1510,16 +1542,34 @@ if test "x$enable_canusb" != "xno" ; then
linux*)
AC_CHECK_HEADER(libusb-1.0/libusb.h,
[
AC_DEFINE(PCAP_SUPPORT_CANUSB, 1, [target host supports canusb])
CANUSB_SRC=pcap-canusb-linux.c
LIBS="-lusb-1.0 -lpthread $LIBS"
AC_MSG_NOTICE(canusb sniffing is supported)
AC_CHECK_LIB(usb-1.0, libusb_init,
[
AC_DEFINE(PCAP_SUPPORT_CANUSB, 1, [target host supports canusb])
CANUSB_SRC=pcap-canusb-linux.c
LIBS="-lusb-1.0 -lpthread $LIBS"
ac_lbl_has_libusb=yes
],
ac_lbl_has_libusb=no
)
],
AC_MSG_NOTICE(canusb sniffing is not supported; install libusb1.0 lib devel to enable it)
ac_lbl_has_libusb=no
)
if test "x$ac_lbl_has_libusb" = "xyes" ; then
AC_MSG_NOTICE(canusb sniffing is supported)
else
if test "x$enable_canusb" = "xyes" ; then
AC_MSG_ERROR(canusb sniffing is not supported; install libusb1.0 lib devel to enable it)
else
AC_MSG_NOTICE(canusb sniffing is not supported; install libusb1.0 lib devel to enable it)
fi
fi
;;
*)
AC_MSG_NOTICE(no canusb support implemented for $host_os)
if test "x$enable_canusb" = "xyes" ; then
AC_MSG_ERROR(no canusb support implemented for $host_os)
else
AC_MSG_NOTICE(no canusb support implemented for $host_os)
fi
;;
esac
AC_SUBST(PCAP_SUPPORT_CANUSB)
......@@ -1529,22 +1579,34 @@ fi
AC_ARG_ENABLE([can],
[AC_HELP_STRING([--enable-can],[enable CAN support @<:@default=yes, if support available@:>@])],
[],
[enable_can=yes])
[enable_can=ifsupportavailable])
if test "x$enable_can" != "xno" ; then
dnl check for CAN sniffing support
case "$host_os" in
linux*)
AC_CHECK_HEADER(linux/can.h,
[ AC_DEFINE(PCAP_SUPPORT_CAN, 1, [target host supports CAN sniffing])
CAN_SRC=pcap-can-linux.c
AC_MSG_NOTICE(CAN sniffing is supported)],
AC_MSG_NOTICE(CAN sniffing is not supported),
[
AC_DEFINE(PCAP_SUPPORT_CAN, 1, [target host supports CAN sniffing])
CAN_SRC=pcap-can-linux.c
AC_MSG_NOTICE(CAN sniffing is supported)
],
[
if test "x$enable_can" = "xyes" ; then
AC_MSG_ERROR(CAN sniffing is not supported)
else
AC_MSG_NOTICE(CAN sniffing is not supported)
fi
],
[#include <sys/socket.h>]
)
;;
*)
AC_MSG_NOTICE(no CAN sniffing support implemented for $host_os)
if test "x$enable_can" = "xyes" ; then
AC_MSG_ERROR(no CAN sniffing support implemented for $host_os)
else
AC_MSG_NOTICE(no CAN sniffing support implemented for $host_os)
fi
;;
esac
AC_SUBST(PCAP_SUPPORT_CAN)
......@@ -1557,46 +1619,69 @@ AC_ARG_ENABLE([dbus],
[enable_dbus=ifavailable])
if test "x$enable_dbus" != "xno"; then
AC_CHECK_PROG([PKGCONFIG], [pkg-config], [pkg-config], [no])
if test "x$PKGCONFIG" != "xno"; then
AC_MSG_CHECKING([for D-Bus])
if "$PKGCONFIG" dbus-1; then
AC_MSG_RESULT([yes])
DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $DBUS_CFLAGS"
LIBS="$LIBS $DBUS_LIBS"
AC_MSG_CHECKING(whether the D-Bus library defines dbus_connection_read_write)
AC_TRY_LINK(
[#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <dbus/dbus.h>],
[return dbus_connection_read_write(NULL, 0);],
[
AC_MSG_RESULT([yes])
AC_DEFINE(PCAP_SUPPORT_DBUS, 1, [support D-Bus sniffing])
DBUS_SRC=pcap-dbus.c
V_INCLS="$V_INCLS $DBUS_CFLAGS"
],
[
AC_MSG_RESULT([no])
if test "x$enable_dbus" = "xyes"; then
AC_MSG_ERROR([--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()])
if test "x$enable_dbus" = "xyes"; then
case "$host_os" in
darwin*)
#
# https://bugs.freedesktop.org/show_bug.cgi?id=74029
#
AC_MSG_ERROR([Due to freedesktop.org bug 74029, D-Bus capture support is not available on OS X])
;;
esac
else
case "$host_os" in
darwin*)
#
# https://bugs.freedesktop.org/show_bug.cgi?id=74029
#