diff options
author | plunky <plunky> | 2011-06-19 13:02:35 +0000 |
---|---|---|
committer | plunky <plunky> | 2011-06-19 13:02:35 +0000 |
commit | 573a3ed106f40bc34e7f4c84475ca2052de93758 (patch) | |
tree | 2d7f6cd8c7ab212507ea715699a67751539cd9c1 /sysutils | |
parent | a43636fd65071739e1987e0351a398e6e101cf95 (diff) | |
download | pkgsrc-573a3ed106f40bc34e7f4c84475ca2052de93758.tar.gz |
update to bluez-hcidump-2.1
from the ChangeLog:
Add support for decoding OBEX Action command.
Add support for decoding SMP commands.
Add support for decoding ATT commands.
Add support for missing LE decoding.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/netbt-hcidump/Makefile | 14 | ||||
-rw-r--r-- | sysutils/netbt-hcidump/distinfo | 24 | ||||
-rw-r--r-- | sysutils/netbt-hcidump/patches/patch-ab | 16 | ||||
-rw-r--r-- | sysutils/netbt-hcidump/patches/patch-ak | 8 | ||||
-rw-r--r-- | sysutils/netbt-hcidump/patches/patch-al | 20 | ||||
-rw-r--r-- | sysutils/netbt-hcidump/patches/patch-am | 20 | ||||
-rw-r--r-- | sysutils/netbt-hcidump/patches/patch-ao | 38 |
7 files changed, 65 insertions, 75 deletions
diff --git a/sysutils/netbt-hcidump/Makefile b/sysutils/netbt-hcidump/Makefile index 2f144f03d14..633a0d62763 100644 --- a/sysutils/netbt-hcidump/Makefile +++ b/sysutils/netbt-hcidump/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.3 2011/03/21 11:38:49 plunky Exp $ +# $NetBSD: Makefile,v 1.4 2011/06/19 13:02:35 plunky Exp $ -DISTNAME= netbt-hcidump-2.0 +DISTNAME= netbt-hcidump-2.1 PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.kernel.org/pub/linux/bluetooth/ -DISTFILES= bluez-hcidump-2.0.tar.gz \ - bluez-4.87.tar.gz +DISTFILES= bluez-hcidump-2.1.tar.gz \ + bluez-4.94.tar.gz MAINTAINER= plunky@rya-online.net HOMEPAGE= http://www.bluez.org/ @@ -17,12 +17,12 @@ CONFLICTS+= hcidump-[0-9]* bluez-hcidump-[0-9]* INSTALLATION_DIRS= sbin ${PKGMANDIR}/cat8 ${PKGMANDIR}/man8 -WRKSRC= ${WRKDIR}/bluez-hcidump-2.0 -LIBSRC= ${WRKDIR}/bluez-4.87 +WRKSRC= ${WRKDIR}/bluez-hcidump-2.1 +LIBSRC= ${WRKDIR}/bluez-4.94 PKG_DESTDIR_SUPPORT= user-destdir -CPPFLAGS+= -DVERSION=\""2.0-netbt"\" +CPPFLAGS+= -DVERSION=\""2.1-netbt"\" USE_BSD_MAKEFILE= yes diff --git a/sysutils/netbt-hcidump/distinfo b/sysutils/netbt-hcidump/distinfo index d714227221e..b5522593260 100644 --- a/sysutils/netbt-hcidump/distinfo +++ b/sysutils/netbt-hcidump/distinfo @@ -1,13 +1,13 @@ -$NetBSD: distinfo,v 1.4 2011/06/19 12:25:42 plunky Exp $ +$NetBSD: distinfo,v 1.5 2011/06/19 13:02:35 plunky Exp $ -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 (bluez-4.94.tar.gz) = 5a6ac6dfe6074e002a517f6e841623f0ded66e41 +RMD160 (bluez-4.94.tar.gz) = 20010e0db361fce9e08c0342d092f8397e478551 +Size (bluez-4.94.tar.gz) = 1152526 bytes +SHA1 (bluez-hcidump-2.1.tar.gz) = d797000ac0f840803abecdae5e44db88c5e5dbe8 +RMD160 (bluez-hcidump-2.1.tar.gz) = cf26c5ea4f68abc6dee1135a0a9b35cac45ebb7f +Size (bluez-hcidump-2.1.tar.gz) = 154630 bytes SHA1 (patch-aa) = 6e30f3bd8e06e152bd2b65b32e173de039320787 -SHA1 (patch-ab) = fc31a15eee6531faca3ce3df1286762f0e1d1433 +SHA1 (patch-ab) = e313255f11be98686f40af27c6a18550656759ea SHA1 (patch-ac) = adbc1e33996e61ccc5c016154bee3c4af72d784d SHA1 (patch-ad) = b7007a6c55011ac6a1da2fd1883f953532d75ea5 SHA1 (patch-ae) = e59424e971879f368c09adae894088952612f1be @@ -15,8 +15,8 @@ SHA1 (patch-af) = 7748d6d83ce118eff90b9d8158badd0664faa308 SHA1 (patch-ah) = b5a190251ccb9e55d2ac8460a436df3026d6be3d SHA1 (patch-ai) = 46239a7931f8fecee9216b13f98227711c69c54d SHA1 (patch-aj) = 3ef708a26e82ea209ef66c556889ba0cb9c9dd86 -SHA1 (patch-ak) = 0d7d144bb67cd5ebf8e3c74fbb0fbdcce87bc4ac -SHA1 (patch-al) = cdef6a512fc1fa4e64c59ae43ce07506103061d4 -SHA1 (patch-am) = 0f3d33c1f06edabed5fef4500109a83eff599219 +SHA1 (patch-ak) = bbdb271ca8ff39b57082659ceceb9435273ab5ac +SHA1 (patch-al) = 0a7330fbc9b38c13797aae1a46ecc07b2eca8643 +SHA1 (patch-am) = 7de396188d6c519e4d7b95eb5134cb1464dfb865 SHA1 (patch-an) = 35d9fd1b0d82addf0688e2997fdf589fbc89d921 -SHA1 (patch-ao) = f726655e31fef49fd3826853442957e770545413 +SHA1 (patch-ao) = 9572764ecba59a92f69996f5601fe14d4ebe3b23 diff --git a/sysutils/netbt-hcidump/patches/patch-ab b/sysutils/netbt-hcidump/patches/patch-ab index 66710c7240f..d7c4d006a8a 100644 --- a/sysutils/netbt-hcidump/patches/patch-ab +++ b/sysutils/netbt-hcidump/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ +$NetBSD: patch-ab,v 1.3 2011/06/19 13:02:35 plunky Exp $ ---- bluetooth/bluetooth.h.orig 2009-11-30 19:29:17.000000000 +0000 +--- bluetooth/bluetooth.h.orig 2011-06-19 12:38:18.000000000 +0000 +++ bluetooth/bluetooth.h @@ -30,6 +30,7 @@ extern "C" { @@ -10,7 +10,7 @@ $NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ #include <stdio.h> #include <stdint.h> #include <string.h> -@@ -97,6 +98,17 @@ enum { +@@ -103,6 +104,17 @@ enum { #else #error "Unknown byte order" #endif @@ -28,7 +28,7 @@ $NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ /* Bluetooth unaligned access */ #define bt_get_unaligned(ptr) \ -@@ -115,6 +127,7 @@ do { \ +@@ -121,6 +133,7 @@ do { \ __p->__v = (val); \ } while(0) @@ -36,7 +36,7 @@ $NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ /* BD Address */ typedef struct { uint8_t b[6]; -@@ -123,6 +136,7 @@ typedef struct { +@@ -129,6 +142,7 @@ typedef struct { #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) #define BDADDR_ALL (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}) #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) @@ -44,7 +44,7 @@ $NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ /* Copy, swap, convert BD Address */ static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2) -@@ -135,9 +149,12 @@ static inline void bacpy(bdaddr_t *dst, +@@ -141,9 +155,12 @@ static inline void bacpy(bdaddr_t *dst, } void baswap(bdaddr_t *dst, const bdaddr_t *src); @@ -57,7 +57,7 @@ $NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ int str2ba(const char *str, bdaddr_t *ba); int ba2oui(const bdaddr_t *ba, char *oui); int bachk(const char *str); -@@ -146,11 +163,14 @@ int baprintf(const char *format, ...); +@@ -152,11 +169,14 @@ int baprintf(const char *format, ...); int bafprintf(FILE *stream, const char *format, ...); int basprintf(char *str, const char *format, ...); int basnprintf(char *str, size_t size, const char *format, ...); @@ -71,4 +71,4 @@ $NetBSD: patch-ab,v 1.2 2011/06/19 12:25:42 plunky Exp $ +#endif char *bt_compidtostr(int id); - #ifdef __cplusplus + typedef struct { diff --git a/sysutils/netbt-hcidump/patches/patch-ak b/sysutils/netbt-hcidump/patches/patch-ak index b06b3a0c0ba..b6cd5bbf5e4 100644 --- a/sysutils/netbt-hcidump/patches/patch-ak +++ b/sysutils/netbt-hcidump/patches/patch-ak @@ -1,6 +1,6 @@ -$NetBSD: patch-ak,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ +$NetBSD: patch-ak,v 1.2 2011/06/19 13:02:35 plunky Exp $ ---- src/Makefile.orig 2009-11-30 19:29:18.000000000 +0000 +--- src/Makefile.orig 2011-06-19 12:48:50.000000000 +0000 +++ src/Makefile @@ -0,0 +1,16 @@ +.PATH: ../parser @@ -11,9 +11,9 @@ $NetBSD: patch-ak,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ +BINDIR= ${PREFIX}/sbin + +SRCS= hcidump.c bt_lib.c hci_lib.c \ -+ avctp.c avdtp.c bnep.c bpa.c capi.c cmtp.c csr.c \ ++ att.c avctp.c avdtp.c bnep.c bpa.c capi.c cmtp.c csr.c \ + ericsson.c hci.c hcrp.c hidp.c l2cap.c lmp.c obex.c \ -+ parser.c ppp.c rfcomm.c sdp.c tcpip.c ++ parser.c ppp.c rfcomm.c sdp.c smp.c tcpip.c + +CPPFLAGS+= -I.. +LDADD+= -lbluetooth diff --git a/sysutils/netbt-hcidump/patches/patch-al b/sysutils/netbt-hcidump/patches/patch-al index 52579edeb46..3f7839cde4d 100644 --- a/sysutils/netbt-hcidump/patches/patch-al +++ b/sysutils/netbt-hcidump/patches/patch-al @@ -1,6 +1,6 @@ -$NetBSD: patch-al,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ +$NetBSD: patch-al,v 1.2 2011/06/19 13:02:35 plunky Exp $ ---- src/bt_lib.c.orig 2010-01-05 12:27:30.000000000 +0000 +--- src/bt_lib.c.orig 2011-06-19 12:38:18.000000000 +0000 +++ src/bt_lib.c @@ -35,8 +35,8 @@ #include <string.h> @@ -21,23 +21,23 @@ $NetBSD: patch-al,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ char *batostr(const bdaddr_t *ba) { char *str = bt_malloc(18); -@@ -79,6 +80,7 @@ bdaddr_t *strtoba(const char *str) +@@ -73,6 +74,7 @@ bdaddr_t *strtoba(const char *str) - return (bdaddr_t *) ba; + return ba; } +#endif int ba2str(const bdaddr_t *ba, char *str) { -@@ -89,6 +91,7 @@ int ba2str(const bdaddr_t *ba, char *str - b[0], b[1], b[2], b[3], b[4], b[5]); +@@ -80,6 +82,7 @@ int ba2str(const bdaddr_t *ba, char *str + ba->b[5], ba->b[4], ba->b[3], ba->b[2], ba->b[1], ba->b[0]); } +#if 0 int str2ba(const char *str, bdaddr_t *ba) { - uint8_t b[6]; -@@ -197,6 +200,7 @@ int basnprintf(char *str, size_t size, c + bdaddr_t b; +@@ -175,6 +178,7 @@ int basnprintf(char *str, size_t size, c return len; } @@ -45,7 +45,7 @@ $NetBSD: patch-al,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ void *bt_malloc(size_t size) { -@@ -208,6 +212,7 @@ void bt_free(void *ptr) +@@ -186,6 +190,7 @@ void bt_free(void *ptr) free(ptr); } @@ -53,7 +53,7 @@ $NetBSD: patch-al,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ /* Bluetooth error codes to Unix errno mapping */ int bt_error(uint16_t code) { -@@ -282,6 +287,7 @@ int bt_error(uint16_t code) +@@ -260,6 +265,7 @@ int bt_error(uint16_t code) return ENOSYS; } } diff --git a/sysutils/netbt-hcidump/patches/patch-am b/sysutils/netbt-hcidump/patches/patch-am index 5902d55d162..aea9af6c3b8 100644 --- a/sysutils/netbt-hcidump/patches/patch-am +++ b/sysutils/netbt-hcidump/patches/patch-am @@ -1,6 +1,6 @@ -$NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ +$NetBSD: patch-am,v 1.2 2011/06/19 13:02:35 plunky Exp $ ---- src/hci_lib.c.orig 2010-09-30 09:12:22.000000000 +0000 +--- src/hci_lib.c.orig 2011-06-19 12:48:50.000000000 +0000 +++ src/hci_lib.c @@ -41,9 +41,9 @@ #include <sys/ioctl.h> @@ -39,7 +39,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ static int hci_str2uint(hci_map *map, char *str, unsigned int *val) { char *t, *ptr; -@@ -212,6 +215,7 @@ char *hci_dflagstostr(uint32_t flags) +@@ -213,6 +216,7 @@ char *hci_dflagstostr(uint32_t flags) } return str; } @@ -47,7 +47,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ /* HCI packet type mapping */ static hci_map pkt_type_map[] = { -@@ -233,6 +237,7 @@ static hci_map pkt_type_map[] = { +@@ -234,6 +238,7 @@ static hci_map pkt_type_map[] = { { NULL } }; @@ -55,7 +55,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ static hci_map sco_ptype_map[] = { { "HV1", 0x0001 }, { "HV2", 0x0002 }, -@@ -246,12 +251,15 @@ static hci_map sco_ptype_map[] = { +@@ -247,12 +252,15 @@ static hci_map sco_ptype_map[] = { { "3-EV5", HCI_3EV5 }, { NULL } }; @@ -71,7 +71,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ int hci_strtoptype(char *str, unsigned int *val) { return hci_str2bit(pkt_type_map, str, val); -@@ -266,6 +274,7 @@ int hci_strtoscoptype(char *str, unsigne +@@ -267,6 +275,7 @@ int hci_strtoscoptype(char *str, unsigne { return hci_str2bit(sco_ptype_map, str, val); } @@ -79,7 +79,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ /* Link policy mapping */ static hci_map link_policy_map[] = { -@@ -282,6 +291,7 @@ char *hci_lptostr(unsigned int lp) +@@ -283,6 +292,7 @@ char *hci_lptostr(unsigned int lp) return hci_bit2str(link_policy_map, lp); } @@ -87,7 +87,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ int hci_strtolp(char *str, unsigned int *val) { return hci_str2bit(link_policy_map, str, val); -@@ -638,6 +648,7 @@ char *hci_commandstostr(uint8_t *command +@@ -639,6 +649,7 @@ char *hci_commandstostr(uint8_t *command return str; } @@ -95,7 +95,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ /* Version mapping */ static hci_map ver_map[] = { -@@ -656,16 +667,19 @@ char *hci_vertostr(unsigned int ver) +@@ -657,16 +668,19 @@ char *hci_vertostr(unsigned int ver) return hci_uint2str(ver_map, ver); } @@ -115,7 +115,7 @@ $NetBSD: patch-am,v 1.1.1.1 2010/12/19 20:20:43 plunky Exp $ int lmp_strtover(char *str, unsigned int *ver) { return hci_str2uint(ver_map, str, ver); -@@ -2744,3 +2758,4 @@ int hci_le_create_conn(int dd, uint16_t +@@ -2911,3 +2925,4 @@ int hci_le_conn_update(int dd, uint16_t return 0; } diff --git a/sysutils/netbt-hcidump/patches/patch-ao b/sysutils/netbt-hcidump/patches/patch-ao index 444feb1dd10..7f95b03b3e4 100644 --- a/sysutils/netbt-hcidump/patches/patch-ao +++ b/sysutils/netbt-hcidump/patches/patch-ao @@ -1,6 +1,6 @@ -$NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ +$NetBSD: patch-ao,v 1.4 2011/06/19 13:02:35 plunky Exp $ ---- src/hcidump.c.orig 2011-01-27 04:11:41.000000000 +0000 +--- src/hcidump.c.orig 2011-06-13 01:54:33.000000000 +0000 +++ src/hcidump.c @@ -50,6 +50,10 @@ #include "parser/parser.h" @@ -10,10 +10,10 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ +#define AI_ADDRCONFIG 0 +#endif + - #if __BYTE_ORDER == __LITTLE_ENDIAN - static inline uint64_t ntoh64(uint64_t n) - { -@@ -162,7 +166,7 @@ static inline int write_n(int fd, char * + #define SNAP_LEN HCI_MAX_FRAME_SIZE + #define DEFAULT_PORT "10839"; + +@@ -146,7 +150,7 @@ static inline int write_n(int fd, char * return t; } @@ -22,7 +22,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ { struct cmsghdr *cmsg; struct msghdr msg; -@@ -204,7 +208,7 @@ static int process_frames(int dev, int s +@@ -188,7 +192,7 @@ static int process_frames(int dev, int s if (dev == HCI_DEV_NONE) printf("system: "); else @@ -31,17 +31,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ printf("snap_len: %d filter: 0x%lx\n", snap_len, parser.filter); -@@ -299,7 +303,8 @@ static int process_frames(int dev, int s - while (cmsg) { - switch (cmsg->cmsg_type) { - case HCI_CMSG_DIR: -- memcpy(&frm.in, CMSG_DATA(cmsg), sizeof(int)); -+ memcpy(&i, CMSG_DATA(cmsg), sizeof(int)); -+ frm.in = (uint8_t)i; - break; - case HCI_CMSG_TSTAMP: - memcpy(&frm.ts, CMSG_DATA(cmsg), -@@ -544,10 +549,13 @@ static int open_file(char *file, int mod +@@ -530,10 +534,13 @@ static int open_file(char *file, int mod return fd; } @@ -57,7 +47,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ struct hci_dev_info di; int sk, dd, opt; -@@ -573,6 +581,7 @@ static int open_socket(int dev, unsigned +@@ -559,6 +566,7 @@ static int open_socket(int dev, unsigned hci_close_dev(dd); } @@ -65,7 +55,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ /* Create HCI socket */ sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); -@@ -588,12 +597,13 @@ static int open_socket(int dev, unsigned +@@ -574,12 +582,13 @@ static int open_socket(int dev, unsigned } opt = 1; @@ -80,7 +70,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ hci_filter_clear(&flt); hci_filter_all_ptypes(&flt); hci_filter_all_events(&flt); -@@ -601,13 +611,34 @@ static int open_socket(int dev, unsigned +@@ -587,13 +596,34 @@ static int open_socket(int dev, unsigned perror("Can't set filter"); return -1; } @@ -116,7 +106,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ dev, strerror(errno), errno); return -1; } -@@ -784,7 +815,7 @@ static int wait_connection(char *addr, c +@@ -770,7 +800,7 @@ static int wait_connection(char *addr, c return -1; } @@ -125,7 +115,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ { while (1) { int dd, sk; -@@ -914,7 +945,7 @@ int main(int argc, char *argv[]) +@@ -902,7 +932,7 @@ int main(int argc, char *argv[]) { unsigned long flags = 0; unsigned long filter = 0; @@ -134,7 +124,7 @@ $NetBSD: patch-ao,v 1.3 2011/03/20 19:56:48 plunky Exp $ int defpsm = 0; int defcompid = DEFAULT_COMPID; int opt, pppdump_fd = -1, audio_fd = -1; -@@ -923,7 +954,7 @@ int main(int argc, char *argv[]) +@@ -911,7 +941,7 @@ int main(int argc, char *argv[]) switch(opt) { case 'i': if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system")) |