diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2011-03-29 11:29:00 -0700 |
---|---|---|
committer | Jaikumar Ganesh <jaikumar@google.com> | 2011-05-25 13:29:42 -0700 |
commit | fe82e6abc754233f64e4c49eb2fdb69d45123ac6 (patch) | |
tree | 75c429adf36d30d085af9cb8b107ea59668c6431 | |
parent | 4d72d341a6e88fbbaedfa66d4f786f8304d46bbd (diff) | |
download | hcidump-fe82e6abc754233f64e4c49eb2fdb69d45123ac6.tar.gz |
Make Android specific chnages to hcidump.
1. Add Android.mk file.
2. Stub out ipv6 features and some header file changes.
Change-Id: Icc7d33dabade9c3072dc2f2d75f50985c68f1b81
-rwxr-xr-x | Android.mk | 45 | ||||
-rw-r--r-- | parser/bnep.c | 2 | ||||
-rw-r--r-- | parser/tcpip.c | 12 |
3 files changed, 56 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk new file mode 100755 index 0000000..661ebba --- /dev/null +++ b/Android.mk @@ -0,0 +1,45 @@ +ifneq ($(TARGET_SIMULATOR),true) +ifeq ($(BOARD_HAVE_BLUETOOTH),true) + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_C_INCLUDES:= \ + $(call include-path-for,bluez)/lib/ \ + +LOCAL_CFLAGS:= \ + -DVERSION=\"2.0\" + +LOCAL_SRC_FILES:= \ + parser/att.c \ + parser/avctp.c \ + parser/avdtp.c \ + parser/bnep.c \ + parser/bpa.c \ + parser/capi.c \ + parser/cmtp.c \ + parser/csr.c \ + parser/ericsson.c \ + parser/hci.c \ + parser/hcrp.c \ + parser/hidp.c \ + parser/l2cap.c \ + parser/lmp.c \ + parser/obex.c \ + parser/parser.c \ + parser/ppp.c \ + parser/rfcomm.c \ + parser/sdp.c \ + parser/tcpip.c \ + src/hcidump.c + +LOCAL_SHARED_LIBRARIES := \ + libbluetooth \ + +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) +LOCAL_MODULE_TAGS := debug +LOCAL_MODULE:=hcidump + +include $(BUILD_EXECUTABLE) +endif +endif diff --git a/parser/bnep.c b/parser/bnep.c index d9048a9..d368abe 100644 --- a/parser/bnep.c +++ b/parser/bnep.c @@ -33,7 +33,7 @@ #include <string.h> #include <sys/types.h> -#include <net/ethernet.h> +#include <net/ethertypes.h> #include "parser.h" diff --git a/parser/tcpip.c b/parser/tcpip.c index 9062008..22b68f9 100644 --- a/parser/tcpip.c +++ b/parser/tcpip.c @@ -32,10 +32,14 @@ #include <string.h> #include <sys/types.h> -#include <net/ethernet.h> +#include <net/ethertypes.h> #include <netinet/in.h> #include <netinet/ip.h> + +#ifdef HAS_INET6 #include <netinet/ip6.h> +#endif + #include <netinet/if_ether.h> #include <arpa/inet.h> #include <netdb.h> @@ -44,6 +48,7 @@ void arp_dump(int level, struct frame *frm) { +#if 0 int i; char buf[20]; struct sockaddr_in sai; @@ -68,11 +73,14 @@ void arp_dump(int level, struct frame *frm) printf("(%s)\n", buf); frm->ptr += sizeof(struct ether_arp); frm->len -= sizeof(struct ether_arp); +#endif raw_dump(level, frm); // not needed. + } void ip_dump(int level, struct frame *frm) { +#if 0 char src[50], dst[50]; struct ip *ip = (struct ip *) (frm->ptr); uint8_t proto; @@ -136,6 +144,6 @@ void ip_dump(int level, struct frame *frm) printf("Unknown Protocol: 0x%02x\n", ip->ip_p); break; } - +#endif raw_dump(level, frm); } |