diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-08-31 00:57:30 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-08-31 00:57:30 -0700 |
commit | 78631c5f66f0580695ff3aac4dc8831e3795b735 (patch) | |
tree | 276521654e880433889110387b1372f5b56bb6fc | |
parent | 9ffb2963ffd5ff97cc9f8e12c555241d62ebb53f (diff) | |
download | bluez-hcidump-78631c5f66f0580695ff3aac4dc8831e3795b735.tar.gz |
Change includes to use local copy of Bluetooth library
-rw-r--r-- | Makefile.am | 14 | ||||
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | parser/att.c | 5 | ||||
-rw-r--r-- | parser/avctp.c | 7 | ||||
-rw-r--r-- | parser/avdtp.c | 5 | ||||
-rw-r--r-- | parser/avrcp.c | 5 | ||||
-rw-r--r-- | parser/bnep.c | 3 | ||||
-rw-r--r-- | parser/bpa.c | 8 | ||||
-rw-r--r-- | parser/capi.c | 7 | ||||
-rw-r--r-- | parser/cmtp.c | 5 | ||||
-rw-r--r-- | parser/csr.c | 5 | ||||
-rw-r--r-- | parser/ericsson.c | 2 | ||||
-rw-r--r-- | parser/hci.c | 12 | ||||
-rw-r--r-- | parser/hcrp.c | 5 | ||||
-rw-r--r-- | parser/hidp.c | 5 | ||||
-rw-r--r-- | parser/l2cap.c | 14 | ||||
-rw-r--r-- | parser/lmp.c | 8 | ||||
-rw-r--r-- | parser/obex.c | 5 | ||||
-rw-r--r-- | parser/parser.c | 7 | ||||
-rw-r--r-- | parser/parser.h | 5 | ||||
-rw-r--r-- | parser/ppp.c | 3 | ||||
-rw-r--r-- | parser/rfcomm.c | 12 | ||||
-rw-r--r-- | parser/sdp.c | 7 | ||||
-rw-r--r-- | parser/smp.c | 5 | ||||
-rw-r--r-- | parser/tcpip.c | 3 | ||||
-rw-r--r-- | src/bpasniff.c | 8 | ||||
-rw-r--r-- | src/csrsniff.c | 6 | ||||
-rw-r--r-- | src/hcidump.c | 12 |
28 files changed, 53 insertions, 135 deletions
diff --git a/Makefile.am b/Makefile.am index 3d86705..c0e362b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,9 @@ AM_MAKEFLAGS = --no-print-directory +library_sources = lib/bluetooth.h lib/bluetooth.c \ + lib/hci_lib.h lib/hci.h lib/hci.c lib/l2cap.h + parser_sources = parser/parser.h parser/parser.c \ parser/lmp.c \ parser/hci.c \ @@ -27,20 +30,15 @@ parser_sources = parser/parser.h parser/parser.c \ sbin_PROGRAMS = src/hcidump -src_hcidump_SOURCES = src/hcidump.c $(parser_sources) -src_hcidump_LDADD = @BLUEZ_LIBS@ +src_hcidump_SOURCES = src/hcidump.c $(library_sources) $(parser_sources) noinst_PROGRAMS = src/bpasniff src/csrsniff -src_bpasniff_SOURCES = src/bpasniff.c $(parser_sources) -src_bpasniff_LDADD = @BLUEZ_LIBS@ - -src_csrsniff_SOURCES = src/csrsniff.c $(parser_sources) -src_csrsniff_LDADD = @BLUEZ_LIBS@ +src_bpasniff_SOURCES = src/bpasniff.c $(library_sources) $(parser_sources) +src_csrsniff_SOURCES = src/csrsniff.c $(library_sources) $(parser_sources) -AM_CFLAGS = @BLUEZ_CFLAGS@ dist_man_MANS = src/hcidump.8 diff --git a/configure.in b/configure.in index 7ca3f5c..d6a9923 100644 --- a/configure.in +++ b/configure.in @@ -18,11 +18,6 @@ AC_PROG_CC AC_PROG_CC_PIE AC_PROG_INSTALL -PKG_CHECK_MODULES(BLUEZ, bluez, dummy=yes, - AC_MSG_ERROR(libbluetooth is required)) -AC_SUBST(BLUEZ_CFLAGS) -AC_SUBST(BLUEZ_LIBS) - AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], [disable code optimization through compiler]), [ if (test "${enableval}" = "no"); then diff --git a/parser/att.c b/parser/att.c index d9cb335..735c3b4 100644 --- a/parser/att.c +++ b/parser/att.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" #define GATT_PRIM_SVC_UUID 0x2800 #define GATT_SND_SVC_UUID 0x2801 diff --git a/parser/avctp.c b/parser/avctp.c index fc6f796..cf015d4 100644 --- a/parser/avctp.c +++ b/parser/avctp.c @@ -31,11 +31,8 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" -#include "sdp.h" +#include "parser/parser.h" +#include "parser/sdp.h" static char *pt2str(uint8_t hdr) { diff --git a/parser/avdtp.c b/parser/avdtp.c index 6836058..c92abc4 100644 --- a/parser/avdtp.c +++ b/parser/avdtp.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" static char *si2str(uint8_t si) { diff --git a/parser/avrcp.c b/parser/avrcp.c index f8e4443..a3044f0 100644 --- a/parser/avrcp.c +++ b/parser/avrcp.c @@ -32,10 +32,7 @@ #include <string.h> #include <ctype.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" /* ctype entries */ #define AVC_CTYPE_CONTROL 0x0 diff --git a/parser/bnep.c b/parser/bnep.c index d9048a9..294eaa1 100644 --- a/parser/bnep.c +++ b/parser/bnep.c @@ -31,11 +31,10 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <net/ethernet.h> -#include "parser.h" +#include "parser/parser.h" /* BNEP Type */ #define BNEP_GENERAL_ETHERNET 0x00 diff --git a/parser/bpa.c b/parser/bpa.c index 016f1bd..a9d1136 100644 --- a/parser/bpa.c +++ b/parser/bpa.c @@ -31,13 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> - -#include "parser.h" +#include "parser/parser.h" #define BPA_U8(frm) (get_u8(frm)) #define BPA_U16(frm) (btohs(htons(get_u16(frm)))) diff --git a/parser/capi.c b/parser/capi.c index f8cba3e..d761295 100644 --- a/parser/capi.c +++ b/parser/capi.c @@ -32,12 +32,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include <bluetooth/bluetooth.h> - -#include "parser.h" +#include "parser/parser.h" #define CAPI_U8(frm) (get_u8(frm)) #define CAPI_U16(frm) (btohs(htons(get_u16(frm)))) diff --git a/parser/cmtp.c b/parser/cmtp.c index 7c4eb08..cdbfccc 100644 --- a/parser/cmtp.c +++ b/parser/cmtp.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" #define TABLE_SIZE 10 diff --git a/parser/csr.c b/parser/csr.c index 47954e2..66f14cf 100644 --- a/parser/csr.c +++ b/parser/csr.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" #define CSR_U8(frm) (get_u8(frm)) #define CSR_U16(frm) (btohs(htons(get_u16(frm)))) diff --git a/parser/ericsson.c b/parser/ericsson.c index a401959..11d4958 100644 --- a/parser/ericsson.c +++ b/parser/ericsson.c @@ -28,7 +28,7 @@ #include <stdio.h> #include <errno.h> -#include "parser.h" +#include "parser/parser.h" void ericsson_dump(int level, struct frame *frm) { diff --git a/parser/hci.c b/parser/hci.c index f41eec2..711c3cc 100644 --- a/parser/hci.c +++ b/parser/hci.c @@ -33,15 +33,9 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> - -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/hci_lib.h> - -#include "parser.h" +#include "parser/parser.h" +#include "lib/hci.h" +#include "lib/hci_lib.h" static uint16_t manufacturer = DEFAULT_COMPID; diff --git a/parser/hcrp.c b/parser/hcrp.c index 45afc25..7827e03 100644 --- a/parser/hcrp.c +++ b/parser/hcrp.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" static char *pid2str(uint16_t pid) { diff --git a/parser/hidp.c b/parser/hidp.c index 0d72f3e..a0bedf3 100644 --- a/parser/hidp.c +++ b/parser/hidp.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" static char *type2str(uint8_t head) { diff --git a/parser/l2cap.c b/parser/l2cap.c index 65a9979..72dff50 100644 --- a/parser/l2cap.c +++ b/parser/l2cap.c @@ -32,16 +32,10 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> - -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/l2cap.h> - -#include "parser.h" -#include "sdp.h" +#include "parser/parser.h" +#include "parser/sdp.h" +#include "lib/hci.h" +#include "lib/l2cap.h" typedef struct { uint16_t handle; diff --git a/parser/lmp.c b/parser/lmp.c index ed2ff5c..a086a17 100644 --- a/parser/lmp.c +++ b/parser/lmp.c @@ -30,11 +30,9 @@ #include <ctype.h> #include <sys/socket.h> -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/hci_lib.h> - -#include "parser.h" +#include "parser/parser.h" +#include "lib/hci.h" +#include "lib/hci_lib.h" #define LMP_U8(frm) (get_u8(frm)) #define LMP_U16(frm) (btohs(htons(get_u16(frm)))) diff --git a/parser/obex.c b/parser/obex.c index 9cc0828..1b20aea 100644 --- a/parser/obex.c +++ b/parser/obex.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" static char *opcode2str(uint8_t opcode) { diff --git a/parser/parser.c b/parser/parser.c index f91b63b..0f36ee7 100644 --- a/parser/parser.c +++ b/parser/parser.c @@ -33,11 +33,8 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" -#include "rfcomm.h" +#include "parser/parser.h" +#include "parser/rfcomm.h" struct parser_t parser; diff --git a/parser/parser.h b/parser/parser.h index cf40034..e975808 100644 --- a/parser/parser.h +++ b/parser/parser.h @@ -27,9 +27,10 @@ #include <time.h> #include <sys/time.h> -#include <bluetooth/bluetooth.h> #include <netinet/in.h> +#include "lib/bluetooth.h" + struct frame { void *data; uint32_t data_len; @@ -107,7 +108,7 @@ struct parser_t { extern struct parser_t parser; -void init_parser(unsigned long flags, unsigned long filter, +void init_parser(unsigned long flags, unsigned long filter, unsigned short defpsm, unsigned short defcompid, int pppdump_fd, int audio_fd); diff --git a/parser/ppp.c b/parser/ppp.c index 99165c4..c3d2050 100644 --- a/parser/ppp.c +++ b/parser/ppp.c @@ -30,9 +30,8 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include "parser.h" +#include "parser/parser.h" #define PPP_U8(frm) (get_u8(frm)) #define PPP_U16(frm) (btohs(htons(get_u16(frm)))) diff --git a/parser/rfcomm.c b/parser/rfcomm.c index 25e7ae1..258fb8b 100644 --- a/parser/rfcomm.c +++ b/parser/rfcomm.c @@ -32,15 +32,9 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> - -#include <bluetooth/bluetooth.h> - -#include "parser.h" -#include "rfcomm.h" -#include "sdp.h" +#include "parser/parser.h" +#include "parser/rfcomm.h" +#include "parser/sdp.h" static char *cr_str[] = { "RSP", diff --git a/parser/sdp.c b/parser/sdp.c index e3a65e3..f564b48 100644 --- a/parser/sdp.c +++ b/parser/sdp.c @@ -33,11 +33,8 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" -#include "sdp.h" +#include "parser/parser.h" +#include "parser/sdp.h" #define SDP_ERROR_RSP 0x01 #define SDP_SERVICE_SEARCH_REQ 0x02 diff --git a/parser/smp.c b/parser/smp.c index 4fa8dd1..e212eea 100644 --- a/parser/smp.c +++ b/parser/smp.c @@ -31,10 +31,7 @@ #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <netinet/in.h> - -#include "parser.h" +#include "parser/parser.h" /* SMP command codes */ #define SMP_CMD_PAIRING_REQ 0x01 diff --git a/parser/tcpip.c b/parser/tcpip.c index 9062008..ea78177 100644 --- a/parser/tcpip.c +++ b/parser/tcpip.c @@ -30,7 +30,6 @@ #include <unistd.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <net/ethernet.h> #include <netinet/in.h> @@ -40,7 +39,7 @@ #include <arpa/inet.h> #include <netdb.h> -#include "parser.h" +#include "parser/parser.h" void arp_dump(int level, struct frame *frm) { diff --git a/src/bpasniff.c b/src/bpasniff.c index 64805e0..8d65833 100644 --- a/src/bpasniff.c +++ b/src/bpasniff.c @@ -36,13 +36,9 @@ #include <sys/ioctl.h> #include <sys/socket.h> -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/hci_lib.h> - -#include <netinet/in.h> - #include "parser/parser.h" +#include "lib/hci.h" +#include "lib/hci_lib.h" static volatile sig_atomic_t __io_canceled = 0; diff --git a/src/csrsniff.c b/src/csrsniff.c index 7542861..bae6b0d 100644 --- a/src/csrsniff.c +++ b/src/csrsniff.c @@ -34,9 +34,9 @@ #include <sys/ioctl.h> #include <sys/socket.h> -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/hci_lib.h> +#include "parser/parser.h" +#include "lib/hci.h" +#include "lib/hci_lib.h" static volatile sig_atomic_t __io_canceled = 0; diff --git a/src/hcidump.c b/src/hcidump.c index 2436960..0c13360 100644 --- a/src/hcidump.c +++ b/src/hcidump.c @@ -39,19 +39,17 @@ #include <sys/ioctl.h> #include <sys/socket.h> -#include <bluetooth/bluetooth.h> -#include <bluetooth/hci.h> -#include <bluetooth/hci_lib.h> - #include <arpa/inet.h> -#include <netinet/in.h> #include <netdb.h> #include "parser/parser.h" #include "parser/sdp.h" -#define SNAP_LEN HCI_MAX_FRAME_SIZE -#define DEFAULT_PORT "10839"; +#include "lib/hci.h" +#include "lib/hci_lib.h" + +#define SNAP_LEN HCI_MAX_FRAME_SIZE +#define DEFAULT_PORT "10839" /* Modes */ enum { |