summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorplunky <plunky@pkgsrc.org>2011-01-30 20:41:29 +0000
committerplunky <plunky@pkgsrc.org>2011-01-30 20:41:29 +0000
commitae76f8b7ae980adf4d01c4b8f3cfd2da26908520 (patch)
treedf2b6343377e50f444d2fdb3f8505e49c17430a9 /sysutils
parentb6dcf27ab11ff2daf9fbd5f3cd74dbdac10217e5 (diff)
downloadpkgsrc-ae76f8b7ae980adf4d01c4b8f3cfd2da26908520.tar.gz
update to hcidump 2.0
some of our patches are merged with upstream, and I removed the INET6 option since IPv6 specific code seems to be removed ChangeLog from the package: Add support for decoding AMP events. Add support for decoding AMP commands. Add support for decoding LE advertising reports. Add support for L2CAP fixed channel information. Add support for L2CAP ERTM and Streaming Mode. Make BT-Snoop format the default file format. Make verbose parsing the default option.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/netbt-hcidump/Makefile20
-rw-r--r--sysutils/netbt-hcidump/distinfo19
-rw-r--r--sysutils/netbt-hcidump/options.mk11
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ag16
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ao70
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ap111
-rw-r--r--sysutils/netbt-hcidump/patches/patch-aq17
7 files changed, 28 insertions, 236 deletions
diff --git a/sysutils/netbt-hcidump/Makefile b/sysutils/netbt-hcidump/Makefile
index b96db985e6c..c1a6af3ebb4 100644
--- a/sysutils/netbt-hcidump/Makefile
+++ b/sysutils/netbt-hcidump/Makefile
@@ -1,16 +1,14 @@
-# $NetBSD: Makefile,v 1.1.1.1 2010/12/19 20:20:42 plunky Exp $
+# $NetBSD: Makefile,v 1.2 2011/01/30 20:41:29 plunky Exp $
-DISTNAME= netbt-hcidump-1.42
+DISTNAME= netbt-hcidump-2.0
CATEGORIES= sysutils
-MASTER_SITES= http://bluez.sourceforge.net/download/ \
- http://www.kernel.org/pub/linux/bluetooth/
-DISTFILES= bluez-hcidump-1.42.tar.gz \
- bluez-4.81.tar.gz
+MASTER_SITES= http://www.kernel.org/pub/linux/bluetooth/
+DISTFILES= bluez-hcidump-2.0.tar.gz \
+ bluez-4.87.tar.gz
MAINTAINER= plunky@rya-online.net
HOMEPAGE= http://www.bluez.org/
COMMENT= Bluetooth packet analyzer (netbt version)
-
LICENSE= gnu-gpl-v2
ONLY_FOR_PLATFORM= NetBSD-[4-9].*-*
@@ -18,14 +16,12 @@ CONFLICTS+= hcidump-[0-9]* bluez-hcidump-[0-9]*
INSTALLATION_DIRS= sbin ${PKGMANDIR}/cat8 ${PKGMANDIR}/man8
-WRKSRC= ${WRKDIR}/bluez-hcidump-1.42
-LIBSRC= ${WRKDIR}/bluez-4.81
+WRKSRC= ${WRKDIR}/bluez-hcidump-2.0
+LIBSRC= ${WRKDIR}/bluez-4.87
PKG_DESTDIR_SUPPORT= user-destdir
-.include "options.mk"
-
-CPPFLAGS+= -DVERSION=\""1.42-netbt"\"
+CPPFLAGS+= -DVERSION=\""2.0-netbt"\"
USE_BSD_MAKEFILE= yes
diff --git a/sysutils/netbt-hcidump/distinfo b/sysutils/netbt-hcidump/distinfo
index e23434c353c..fb6c6fe9f27 100644
--- a/sysutils/netbt-hcidump/distinfo
+++ b/sysutils/netbt-hcidump/distinfo
@@ -1,18 +1,17 @@
-$NetBSD: distinfo,v 1.1.1.1 2010/12/19 20:20:42 plunky Exp $
+$NetBSD: distinfo,v 1.2 2011/01/30 20:41:29 plunky Exp $
-SHA1 (bluez-4.81.tar.gz) = 852c79e2af55ca7db4e4dd66a2e98f839464093b
-RMD160 (bluez-4.81.tar.gz) = 700c3ac877279bcb4636ed175ea3cdbb04107967
-Size (bluez-4.81.tar.gz) = 1104444 bytes
-SHA1 (bluez-hcidump-1.42.tar.gz) = b18e41cbf92c00cfd0331506312fa248b39a0eee
-RMD160 (bluez-hcidump-1.42.tar.gz) = c80eab49c75b8782d35e64eecfbc5a0e56214d4c
-Size (bluez-hcidump-1.42.tar.gz) = 150060 bytes
+SHA1 (bluez-4.87.tar.gz) = a7b0f04d3005e130a193afd457e4fe5450ea9aa0
+RMD160 (bluez-4.87.tar.gz) = 1caa1068d99dc37f1fe48cfc3c83dd756ff03c14
+Size (bluez-4.87.tar.gz) = 1114526 bytes
+SHA1 (bluez-hcidump-2.0.tar.gz) = e6f2e7d63fb92efc8683be8f5bb6373893a7fd72
+RMD160 (bluez-hcidump-2.0.tar.gz) = 277702f4deb364d44f73ab109f6cb97b9ab35bf3
+Size (bluez-hcidump-2.0.tar.gz) = 149918 bytes
SHA1 (patch-aa) = 6e30f3bd8e06e152bd2b65b32e173de039320787
SHA1 (patch-ab) = b938aa1d4cba4891b58e7d4a2add3e88f86605f7
SHA1 (patch-ac) = adbc1e33996e61ccc5c016154bee3c4af72d784d
SHA1 (patch-ad) = b7007a6c55011ac6a1da2fd1883f953532d75ea5
SHA1 (patch-ae) = e59424e971879f368c09adae894088952612f1be
SHA1 (patch-af) = 7748d6d83ce118eff90b9d8158badd0664faa308
-SHA1 (patch-ag) = 858aa64a1495b81231a0ebd20b1b14576d3fbaab
SHA1 (patch-ah) = b5a190251ccb9e55d2ac8460a436df3026d6be3d
SHA1 (patch-ai) = 46239a7931f8fecee9216b13f98227711c69c54d
SHA1 (patch-aj) = 3ef708a26e82ea209ef66c556889ba0cb9c9dd86
@@ -20,6 +19,4 @@ SHA1 (patch-ak) = 0d7d144bb67cd5ebf8e3c74fbb0fbdcce87bc4ac
SHA1 (patch-al) = cdef6a512fc1fa4e64c59ae43ce07506103061d4
SHA1 (patch-am) = 0f3d33c1f06edabed5fef4500109a83eff599219
SHA1 (patch-an) = 35d9fd1b0d82addf0688e2997fdf589fbc89d921
-SHA1 (patch-ao) = 519b39a8dc2217c06d618c45029df6bd4437117a
-SHA1 (patch-ap) = f957985946117ffadcd10c39bfe74e132e173c86
-SHA1 (patch-aq) = a6a49e3469768971121def3cf329f16be53c2e1e
+SHA1 (patch-ao) = 742edc8200deff8baeee34513e8353ee1ef2d9a1
diff --git a/sysutils/netbt-hcidump/options.mk b/sysutils/netbt-hcidump/options.mk
deleted file mode 100644
index 5414fca6078..00000000000
--- a/sysutils/netbt-hcidump/options.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: options.mk,v 1.1.1.1 2010/12/19 20:20:42 plunky Exp $
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.hcidump
-PKG_SUPPORTED_OPTIONS= inet6
-PKG_SUGGESTED_OPTIONS= inet6
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Minet6)
-CPPFLAGS+= -DINET6
-.endif
diff --git a/sysutils/netbt-hcidump/patches/patch-ag b/sysutils/netbt-hcidump/patches/patch-ag
deleted file mode 100644
index f3f35aeb5f6..00000000000
--- a/sysutils/netbt-hcidump/patches/patch-ag
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ag,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
-
-fix SDP universal attributes, has been reported upstream (30 Nov 2009)
-
---- parser/sdp.c.orig 2009-11-30 19:29:31.000000000 +0000
-+++ parser/sdp.c
-@@ -194,8 +194,8 @@ static sdp_attr_id_nam_lookup_table_t sd
- { SDP_ATTR_ID_BLUETOOTH_PROFILE_DESCRIPTOR_LIST, "BTProfileDescList" },
- { SDP_ATTR_ID_DOCUMENTATION_URL, "DocURL" },
- { SDP_ATTR_ID_CLIENT_EXECUTABLE_URL, "ClientExeURL" },
-- { SDP_ATTR_ID_ICON_10, "Icon10" },
- { SDP_ATTR_ID_ICON_URL, "IconURL" },
-+ { SDP_ATTR_ID_ADDITIONAL_PROTOCOL_DESC_LISTS, "AdditionalProtocolDescLists" },
- { SDP_ATTR_ID_SERVICE_NAME, "SrvName" },
- { SDP_ATTR_ID_SERVICE_DESCRIPTION, "SrvDesc" },
- { SDP_ATTR_ID_PROVIDER_NAME, "ProviderName" },
diff --git a/sysutils/netbt-hcidump/patches/patch-ao b/sysutils/netbt-hcidump/patches/patch-ao
index 62243381697..c0d71db4578 100644
--- a/sysutils/netbt-hcidump/patches/patch-ao
+++ b/sysutils/netbt-hcidump/patches/patch-ao
@@ -1,6 +1,6 @@
-$NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
+$NetBSD: patch-ao,v 1.2 2011/01/30 20:41:30 plunky Exp $
---- src/hcidump.c.orig 2007-07-28 15:41:34.000000000 +0100
+--- src/hcidump.c.orig 2011-01-27 04:11:41.000000000 +0000
+++ src/hcidump.c
@@ -50,6 +50,10 @@
#include "parser/parser.h"
@@ -13,7 +13,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
#if __BYTE_ORDER == __LITTLE_ENDIAN
static inline uint64_t ntoh64(uint64_t n)
{
-@@ -165,7 +169,7 @@ static inline int write_n(int fd, char *
+@@ -162,7 +166,7 @@ static inline int write_n(int fd, char *
return t;
}
@@ -22,7 +22,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
{
struct cmsghdr *cmsg;
struct msghdr msg;
-@@ -210,7 +214,7 @@ static int process_frames(int dev, int s
+@@ -204,7 +208,7 @@ static int process_frames(int dev, int s
if (dev == HCI_DEV_NONE)
printf("system: ");
else
@@ -31,7 +31,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
printf("snap_len: %d filter: 0x%lx\n", snap_len, parser.filter);
-@@ -553,10 +557,13 @@ static int open_file(char *file, int mod
+@@ -544,10 +548,13 @@ static int open_file(char *file, int mod
return fd;
}
@@ -47,7 +47,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
struct hci_dev_info di;
int sk, dd, opt;
-@@ -582,6 +589,7 @@ static int open_socket(int dev, unsigned
+@@ -573,6 +580,7 @@ static int open_socket(int dev, unsigned
hci_close_dev(dd);
}
@@ -55,7 +55,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
/* Create HCI socket */
sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
-@@ -597,12 +605,13 @@ static int open_socket(int dev, unsigned
+@@ -588,12 +596,13 @@ static int open_socket(int dev, unsigned
}
opt = 1;
@@ -70,7 +70,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
hci_filter_clear(&flt);
hci_filter_all_ptypes(&flt);
hci_filter_all_events(&flt);
-@@ -610,12 +619,34 @@ static int open_socket(int dev, unsigned
+@@ -601,13 +610,34 @@ static int open_socket(int dev, unsigned
perror("Can't set filter");
return -1;
}
@@ -88,11 +88,11 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
+#endif
/* Bind socket to the HCI device */
+ memset(&addr, 0, sizeof(addr));
+#if 0
addr.hci_family = AF_BLUETOOTH;
addr.hci_dev = dev;
+#else
-+ memset(&addr, 0, sizeof(addr));
+ addr.bt_len = sizeof(addr);
+ addr.bt_family = AF_BLUETOOTH;
+ if (dev != HCI_DEV_NONE && !bt_devaddr(dev, &addr.bt_bdaddr)) {
@@ -106,21 +106,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
dev, strerror(errno), errno);
return -1;
}
-@@ -660,11 +691,13 @@ static int open_connection(char *addr, c
- ((struct sockaddr_in *) &ss)->sin_addr.s_addr = htonl(INADDR_ANY);
- ((struct sockaddr_in *) &ss)->sin_port = 0;
- break;
-+#ifdef INET6
- case AF_INET6:
- memcpy(&((struct sockaddr_in6 *) &ss)->sin6_addr,
- &in6addr_any, sizeof(in6addr_any));
- ((struct sockaddr_in6 *) &ss)->sin6_port = 0;
- break;
-+#endif
- }
-
- if (bind(sk, (struct sockaddr *) &ss, sizeof(ss)) < 0) {
-@@ -854,7 +887,7 @@ static int wait_connection(char *addr, c
+@@ -784,7 +814,7 @@ static int wait_connection(char *addr, c
return -1;
}
@@ -129,27 +115,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
{
while (1) {
int dd, sk;
-@@ -950,7 +983,9 @@ static void usage(void)
- " -Y, --novendor No vendor commands or events\n"
- " -N, --noappend No appending to existing files\n"
- " -4, --ipv4 Use IPv4 as transport\n"
-+#ifdef INET6
- " -6 --ipv6 Use IPv6 as transport\n"
-+#endif
- " -h, --help Give this help list\n"
- " --usage Give a short usage message\n"
- );
-@@ -983,7 +1018,9 @@ static struct option main_options[] = {
- { "nopermcheck", 0, 0, 'Z' },
- { "noappend", 0, 0, 'N' },
- { "ipv4", 0, 0, '4' },
-+#ifdef INET6
- { "ipv6", 0, 0, '6' },
-+#endif
- { "help", 0, 0, 'h' },
- { 0 }
- };
-@@ -992,7 +1029,7 @@ int main(int argc, char *argv[])
+@@ -914,7 +944,7 @@ int main(int argc, char *argv[])
{
unsigned long flags = 0;
unsigned long filter = 0;
@@ -158,7 +124,7 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
int defpsm = 0;
int defcompid = DEFAULT_COMPID;
int opt, pppdump_fd = -1, audio_fd = -1;
-@@ -1003,7 +1040,7 @@ int main(int argc, char *argv[])
+@@ -923,7 +953,7 @@ int main(int argc, char *argv[])
switch(opt) {
case 'i':
if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system"))
@@ -167,15 +133,3 @@ $NetBSD: patch-ao,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
else
device = HCI_DEV_NONE;
break;
-@@ -1113,9 +1150,11 @@ int main(int argc, char *argv[])
- af = AF_INET;
- break;
-
-+#ifdef INET6
- case '6':
- af = AF_INET6;
- break;
-+#endif
-
- case 'h':
- default:
diff --git a/sysutils/netbt-hcidump/patches/patch-ap b/sysutils/netbt-hcidump/patches/patch-ap
deleted file mode 100644
index 0f57f7091b6..00000000000
--- a/sysutils/netbt-hcidump/patches/patch-ap
+++ /dev/null
@@ -1,111 +0,0 @@
-$NetBSD: patch-ap,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
-
-this is a bugfix, has been reported upstreadm (18 Aug 2009)
-
-plus some additional fixes for overflowing the buffer, also reported (Jan 2010)
-
---- parser/obex.c.orig 2007-02-18 03:39:02.000000000 +0000
-+++ parser/obex.c
-@@ -200,27 +200,55 @@ static void parse_headers(int level, str
- printf("%s (0x%02x)", hi2str(hi), hi);
- switch (hi & 0xc0) {
- case 0x00: /* Unicode */
-+ if (frm->len < 2) {
-+ printf("\n");
-+ return;
-+ }
-+
- len = get_u16(frm) - 3;
- printf(" = Unicode length %d\n", len);
-+
-+ if (frm->len < len)
-+ return;
-+
- raw_ndump(level, frm, len);
- frm->ptr += len;
- frm->len -= len;
- break;
-
- case 0x40: /* Byte sequence */
-+ if (frm->len < 2) {
-+ printf("\n");
-+ return;
-+ }
-+
- len = get_u16(frm) - 3;
- printf(" = Sequence length %d\n", len);
-+
-+ if (frm->len < len)
-+ return;
-+
- raw_ndump(level, frm, len);
- frm->ptr += len;
- frm->len -= len;
- break;
-
- case 0x80: /* One byte */
-+ if (frm->len < 1) {
-+ printf("\n");
-+ return;
-+ }
-+
- hv8 = get_u8(frm);
- printf(" = %d\n", hv8);
- break;
-
- case 0xc0: /* Four bytes */
-+ if (frm->len < 4) {
-+ printf("\n");
-+ return;
-+ }
-+
- hv32 = get_u32(frm);
- printf(" = %u\n", hv32);
- break;
-@@ -236,7 +264,7 @@ void obex_dump(int level, struct frame *
-
- frm = add_frame(frm);
-
-- while (frm->len > 0) {
-+ while (frm->len > 2) {
- opcode = get_u8(frm);
- length = get_u16(frm);
- status = opcode & 0x7f;
-@@ -276,6 +304,11 @@ void obex_dump(int level, struct frame *
-
- switch (opcode & 0x7f) {
- case 0x00: /* Connect */
-+ if (frm->len < 4) {
-+ printf("\n");
-+ return;
-+ }
-+
- version = get_u8(frm);
- flags = get_u8(frm);
- pktlen = get_u16(frm);
-@@ -284,17 +317,19 @@ void obex_dump(int level, struct frame *
- break;
-
- case 0x05: /* SetPath */
-- if (length > 3) {
-- flags = get_u8(frm);
-- constants = get_u8(frm);
-- printf(" flags %d constants %d\n",
-- flags, constants);
-- } else
-+ if (frm->len < 2) {
- printf("\n");
-+ return;
-+ }
-+
-+ flags = get_u8(frm);
-+ constants = get_u8(frm);
-+ printf(" flags %d constants %d\n", flags, constants);
- break;
-
- default:
- printf("\n");
-+ break;
- }
-
- if ((status & 0x70) && (parser.flags & DUMP_VERBOSE)) {
diff --git a/sysutils/netbt-hcidump/patches/patch-aq b/sysutils/netbt-hcidump/patches/patch-aq
deleted file mode 100644
index cf613dc0d30..00000000000
--- a/sysutils/netbt-hcidump/patches/patch-aq
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-aq,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $
-
-fix SDP universal attributes, has been reported upstream (30 Nov 2009)
-
---- parser/sdp.h.orig 2009-11-30 19:29:35.000000000 +0000
-+++ parser/sdp.h
-@@ -129,8 +129,8 @@
- #define SDP_ATTR_ID_BLUETOOTH_PROFILE_DESCRIPTOR_LIST 0x0009
- #define SDP_ATTR_ID_DOCUMENTATION_URL 0x000A
- #define SDP_ATTR_ID_CLIENT_EXECUTABLE_URL 0x000B
--#define SDP_ATTR_ID_ICON_10 0x000C
--#define SDP_ATTR_ID_ICON_URL 0x000D
-+#define SDP_ATTR_ID_ICON_URL 0x000C
-+#define SDP_ATTR_ID_ADDITIONAL_PROTOCOL_DESC_LISTS 0x000D
- #define SDP_ATTR_ID_SERVICE_NAME 0x0100
- #define SDP_ATTR_ID_SERVICE_DESCRIPTION 0x0101
- #define SDP_ATTR_ID_PROVIDER_NAME 0x0102