/* 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
$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
BT_SRC=pcap-bt-linux.c
- BT_MONITOR_SRC=pcap-bt-monitor-linux.c
{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
$as_echo "#define SOCKADDR_HCI_HAS_HCI_CHANNEL /**/" >>confdefs.h
+
+ #
+ # OK, is HCI_CHANNEL_MONITOR defined?
+ #
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
+$as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
+ if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <bluetooth/bluetooth.h>
+#include <bluetooth/hci.h>
+
+int
+main ()
+{
+u_int i = HCI_CHANNEL_MONITOR
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_lbl_hci_channel_monitor_is_defined=yes
+else
+ ac_cv_lbl_hci_channel_monitor_is_defined=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_hci_channel_monitor_is_defined" >&5
+$as_echo "$ac_cv_lbl_hci_channel_monitor_is_defined" >&6; }
+ if test $ac_cv_lbl_hci_channel_monitor_is_defined = yes ; then
+
+$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
+
+ BT_MONITOR_SRC=pcap-bt-monitor-linux.c
+ fi
fi
else
[
AC_DEFINE(PCAP_SUPPORT_BT, 1, [target host supports Bluetooth sniffing])
BT_SRC=pcap-bt-linux.c
- BT_MONITOR_SRC=pcap-bt-monitor-linux.c
AC_MSG_NOTICE(Bluetooth sniffing is supported)
#
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_MSG_NOTICE(Bluetooth sniffing is not supported; install bluez-lib devel to enable it)
#include "config.h"
#endif
-#ifdef SOCKADDR_HCI_HAS_HCI_CHANNEL
-
#include <errno.h>
#include <stdlib.h>
#include <string.h>
return p;
}
-#endif /* SOCKADDR_HCI_HAS_HCI_CHANNEL */
\ No newline at end of file
#ifdef PCAP_SUPPORT_BT
#include "pcap-bt-linux.h"
+#endif
-#ifdef SOCKADDR_HCI_HAS_HCI_CHANNEL
+#ifdef PCAP_SUPPORT_BT_MONITOR
#include "pcap-bt-monitor-linux.h"
#endif
-#endif /* PCAP_SUPPORT_BT */
-
#ifdef PCAP_SUPPORT_CAN
#include "pcap-can-linux.h"
#endif
#endif
#ifdef PCAP_SUPPORT_BT
{ bt_findalldevs, bt_create },
-#ifdef SOCKADDR_HCI_HAS_HCI_CHANNEL
+#endif
+#ifdef PCAP_SUPPORT_BT_MONITOR
{ bt_monitor_findalldevs, bt_monitor_create },
#endif
-#endif /* PCAP_SUPPORT_BT */
#if PCAP_SUPPORT_CANUSB
{ canusb_findalldevs, canusb_create },
#endif