# netdissect-stdinc.h first.
#
set(CMAKE_EXTRA_INCLUDE_FILES netdissect-stdinc.h)
-check_include_file(pcap/bluetooth.h HAVE_PCAP_BLUETOOTH_H)
check_include_file(pcap/nflog.h HAVE_PCAP_NFLOG_H)
cmake_pop_check_state()
/* if there's an os_proto.h for this platform, to use additional prototypes */
#undef HAVE_OS_PROTO_H
-/* Define to 1 if you have the <pcap/bluetooth.h> header file. */
-#undef HAVE_PCAP_BLUETOOTH_H
-
/* Define to 1 if you have the `pcap_breakloop' function. */
#undef HAVE_PCAP_BREAKLOOP
#
savedcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $V_INCLS"
-for ac_header in pcap/bluetooth.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"netdissect-stdinc.h\"
-"
-if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_PCAP_BLUETOOTH_H 1
-_ACEOF
-
-fi
-
-done
-
for ac_header in pcap/nflog.h
do :
ac_fn_c_check_header_compile "$LINENO" "pcap/nflog.h" "ac_cv_header_pcap_nflog_h" "#include \"netdissect-stdinc.h\"
#
savedcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $V_INCLS"
-AC_CHECK_HEADERS(pcap/bluetooth.h,,,[#include "netdissect-stdinc.h"])
AC_CHECK_HEADERS(pcap/nflog.h,,,[#include "netdissect-stdinc.h"])
CPPFLAGS="$savedcppflags"
#include "netdissect.h"
#include "extract.h"
-#if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
-#include <pcap/bluetooth.h>
+#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
+/*
+ * Header prepended by libpcap to each bluetooth h4 frame;
+ * the direction field is in network byte order.
+ */
+typedef struct _bluetooth_h4_header {
+ nd_uint32_t direction; /* if first bit is set direction is incoming */
+} bluetooth_h4_header;
+
+#define BT_HDRLEN sizeof(bluetooth_h4_header)
-#define BT_HDRLEN sizeof(pcap_bluetooth_h4_header)
/*
* This is the top level routine of the printer. 'p' points
* to the bluetooth header of the packet, 'h->ts' is the timestamp,
{
u_int length = h->len;
u_int caplen = h->caplen;
- const pcap_bluetooth_h4_header* hdr = (const pcap_bluetooth_h4_header*)p;
+ const bluetooth_h4_header* hdr = (const bluetooth_h4_header*)p;
ndo->ndo_protocol = "bt_if";
if (caplen < BT_HDRLEN || length < BT_HDRLEN)
ND_TCHECK_4(&hdr->direction);
if (ndo->ndo_eflag)
ND_PRINT("hci length %u, direction %s, ", length,
- (EXTRACT_BE_U_4(&hdr->direction)&0x1) ? "in" : "out");
+ (EXTRACT_BE_U_4(hdr->direction)&0x1) ? "in" : "out");
if (!ndo->ndo_suppress_default_print)
ND_DEFAULTPRINT(p, caplen);