diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 13 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | print-bt.c | 17 |
5 files changed, 12 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 704e48c1..ab359f44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,7 +546,6 @@ check_include_file(pcap/pcap-inttypes.h HAVE_PCAP_PCAP_INTTYPES_H) # 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() diff --git a/config.h.in b/config.h.in index db43da34..fafdae2b 100644 --- a/config.h.in +++ b/config.h.in @@ -96,9 +96,6 @@ /* 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 @@ -6523,19 +6523,6 @@ fi # 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\" diff --git a/configure.ac b/configure.ac index bc74568a..d6546ff3 100644 --- a/configure.ac +++ b/configure.ac @@ -897,7 +897,6 @@ AC_CHECK_TYPE([u_int64_t], , # 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" @@ -28,11 +28,18 @@ #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, @@ -44,7 +51,7 @@ bt_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char * { 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) @@ -55,7 +62,7 @@ bt_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char * 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); |