Wed Feb 15 09:26:54 2012 UTC ()
revert previous (sorry, was supposed to be on HEAD)


(plunky)
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/DESCR
diff -r1.4.6.1 -r1.4.6.2 pkgsrc/sysutils/netbt-hcidump/Makefile
diff -r1.5.6.1 -r1.5.6.2 pkgsrc/sysutils/netbt-hcidump/distinfo
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-aa
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ac
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ad
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ae
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-af
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ah
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ai
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-aj
diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-an
diff -r1.3.6.1 -r1.3.6.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ab
diff -r1.2.6.1 -r1.2.6.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ak
diff -r1.2.6.1 -r1.2.6.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-al
diff -r1.2.6.1 -r1.2.6.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-am
diff -r1.4.6.1 -r1.4.6.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-ao
diff -r1.1.2.1 -r0 pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_Makefile

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/DESCR (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/DESCR 2012/02/15 09:17:16 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/DESCR 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1HCIdump reads raw HCI data coming from and going to a Bluetooth device and 1HCIdump reads raw HCI data coming from and going to a Bluetooth device and
2prints to screen commands, events and data in a human-readable form. 2prints to screen commands, events and data in a human-readable form.
3Optionally, the dump can be written to a file rather than parsed, and the dump 3Optionally, the dump can be written to a file rather than parsed, and the dump
4file can be parsed in a subsequent moment. 4file can be parsed in a subsequent moment.
5 5
6This is a patched version, suitable for use with the "netbt" Bluetooth 6This is a patched standalone version not requiring bluez-libs, suitable
7stack [originating] in NetBSD. 7for use with the netbt Bluetooth stack [originating] in NetBSD.

cvs diff -r1.4.6.1 -r1.4.6.2 pkgsrc/sysutils/netbt-hcidump/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/Makefile 2012/02/15 09:17:16 1.4.6.1
+++ pkgsrc/sysutils/netbt-hcidump/Makefile 2012/02/15 09:26:54 1.4.6.2
@@ -1,26 +1,38 @@ @@ -1,26 +1,38 @@
1# $NetBSD: Makefile,v 1.4.6.1 2012/02/15 09:17:16 plunky Exp $ 1# $NetBSD: Makefile,v 1.4.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3DISTNAME= netbt-hcidump-2.2 3DISTNAME= netbt-hcidump-2.1
 4PKGREVISION= 1
4CATEGORIES= sysutils 5CATEGORIES= sysutils
5MASTER_SITES= http://www.kernel.org/pub/linux/bluetooth/ 6MASTER_SITES= http://www.kernel.org/pub/linux/bluetooth/
6DISTFILES= bluez-hcidump-2.2.tar.gz 7DISTFILES= bluez-hcidump-2.1.tar.gz \
 8 bluez-4.94.tar.gz
7 9
8MAINTAINER= plunky@rya-online.net 10MAINTAINER= plunky@rya-online.net
9HOMEPAGE= http://www.bluez.org/ 11HOMEPAGE= http://www.bluez.org/
10COMMENT= Bluetooth packet analyzer (netbt version) 12COMMENT= Bluetooth packet analyzer (netbt version)
11LICENSE= gnu-gpl-v2 13LICENSE= gnu-gpl-v2
12 14
13ONLY_FOR_PLATFORM= NetBSD-[4-9].*-* 15ONLY_FOR_PLATFORM= NetBSD-[4-9].*-*
14CONFLICTS+= hcidump-[0-9]* bluez-hcidump-[0-9]* 16CONFLICTS+= hcidump-[0-9]* bluez-hcidump-[0-9]*
15 17
16INSTALLATION_DIRS= sbin ${PKGMANDIR}/cat8 ${PKGMANDIR}/man8 18INSTALLATION_DIRS= sbin ${PKGMANDIR}/cat8 ${PKGMANDIR}/man8
17 19
18WRKSRC= ${WRKDIR}/bluez-hcidump-2.2 20WRKSRC= ${WRKDIR}/bluez-hcidump-2.1
 21LIBSRC= ${WRKDIR}/bluez-4.94
19 22
20PKG_DESTDIR_SUPPORT= user-destdir 23PKG_DESTDIR_SUPPORT= user-destdir
21 24
22CPPFLAGS+= -DVERSION=\""2.2-netbt"\" 25CPPFLAGS+= -DVERSION=\""2.1-netbt"\"
23 26
24USE_BSD_MAKEFILE= yes 27USE_BSD_MAKEFILE= yes
25 28
 29post-extract:
 30 mkdir ${WRKSRC}/bluetooth
 31 cp ${LIBSRC}/lib/bluetooth.h ${WRKSRC}/bluetooth
 32 cp ${LIBSRC}/lib/hci.h ${WRKSRC}/bluetooth
 33 cp ${LIBSRC}/lib/hci_lib.h ${WRKSRC}/bluetooth
 34 cp ${LIBSRC}/lib/l2cap.h ${WRKSRC}/bluetooth
 35 cp ${LIBSRC}/lib/bluetooth.c ${WRKSRC}/src/bt_lib.c
 36 cp ${LIBSRC}/lib/hci.c ${WRKSRC}/src/hci_lib.c
 37
26.include "../../mk/bsd.pkg.mk" 38.include "../../mk/bsd.pkg.mk"

cvs diff -r1.5.6.1 -r1.5.6.2 pkgsrc/sysutils/netbt-hcidump/distinfo (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/distinfo 2012/02/15 09:17:16 1.5.6.1
+++ pkgsrc/sysutils/netbt-hcidump/distinfo 2012/02/15 09:26:54 1.5.6.2
@@ -1,20 +1,22 @@ @@ -1,20 +1,22 @@
1$NetBSD: distinfo,v 1.5.6.1 2012/02/15 09:17:16 plunky Exp $ 1$NetBSD: distinfo,v 1.5.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3SHA1 (bluez-hcidump-2.2.tar.gz) = 4d36b9265e23bfdbc824f00f6f6a1c3fd794559a 3SHA1 (bluez-4.94.tar.gz) = 5a6ac6dfe6074e002a517f6e841623f0ded66e41
4RMD160 (bluez-hcidump-2.2.tar.gz) = 5ec584f7b3c0818452ba1e874d8b17bb01efe621 4RMD160 (bluez-4.94.tar.gz) = 20010e0db361fce9e08c0342d092f8397e478551
5Size (bluez-hcidump-2.2.tar.gz) = 190096 bytes 5Size (bluez-4.94.tar.gz) = 1152526 bytes
6SHA1 (patch-aa) = 3a856deba9518923321b3ddffe863d7817a021e1 6SHA1 (bluez-hcidump-2.1.tar.gz) = d797000ac0f840803abecdae5e44db88c5e5dbe8
7SHA1 (patch-ab) = ad50cee12679bd302475f7a62391a3833343f51b 7RMD160 (bluez-hcidump-2.1.tar.gz) = cf26c5ea4f68abc6dee1135a0a9b35cac45ebb7f
8SHA1 (patch-ac) = 42a0bfc63a64243db201973c1973b914bee92192 8Size (bluez-hcidump-2.1.tar.gz) = 154630 bytes
9SHA1 (patch-ad) = 65f5e76b20489907838d2eff47c6fdaea251a7e0 9SHA1 (patch-aa) = 6e30f3bd8e06e152bd2b65b32e173de039320787
10SHA1 (patch-ae) = a5ce4c703d491472421138bbe7ebb0133832992c 10SHA1 (patch-ab) = e313255f11be98686f40af27c6a18550656759ea
11SHA1 (patch-af) = d32b7ac6add15c95fce071d1f64ad7e1f655c99f 11SHA1 (patch-ac) = adbc1e33996e61ccc5c016154bee3c4af72d784d
12SHA1 (patch-ah) = 911e4c7d76b18681413a021df6cbf264cb13555e 12SHA1 (patch-ad) = b7007a6c55011ac6a1da2fd1883f953532d75ea5
13SHA1 (patch-ai) = 44800df5e4b4b729cd73478eda0c330024235e81 13SHA1 (patch-ae) = e59424e971879f368c09adae894088952612f1be
14SHA1 (patch-aj) = 27b2298a968ca4306072950f5d49bb5c5204777a 14SHA1 (patch-af) = 7748d6d83ce118eff90b9d8158badd0664faa308
15SHA1 (patch-ak) = a9528e81fe86c4b7cac0e82f883e3490d0c092ce 15SHA1 (patch-ah) = b5a190251ccb9e55d2ac8460a436df3026d6be3d
16SHA1 (patch-al) = 2d62a0a4203c1ecce7b71fd16fe909f0f4356d2c 16SHA1 (patch-ai) = 46239a7931f8fecee9216b13f98227711c69c54d
17SHA1 (patch-am) = d1e1fd830bf3d064dccabbbe2ddd5e302b2e28aa 17SHA1 (patch-aj) = 3ef708a26e82ea209ef66c556889ba0cb9c9dd86
18SHA1 (patch-an) = f9889b24e5ec399ef6fb40055c5df5a560d20f92 18SHA1 (patch-ak) = bbdb271ca8ff39b57082659ceceb9435273ab5ac
19SHA1 (patch-ao) = 070fc923cfb303ba9e3f9fd843b3ccd253db0698 19SHA1 (patch-al) = 0a7330fbc9b38c13797aae1a46ecc07b2eca8643
20SHA1 (patch-lib_Makefile) = 027fc649ecb277b9402062a605d75122404ab595 20SHA1 (patch-am) = 7de396188d6c519e4d7b95eb5134cb1464dfb865
 21SHA1 (patch-an) = 35d9fd1b0d82addf0688e2997fdf589fbc89d921
 22SHA1 (patch-ao) = 9572764ecba59a92f69996f5601fe14d4ebe3b23

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-aa 2012/02/15 09:17:16 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-aa 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: patch-aa,v 1.1.1.1.10.1 2012/02/15 09:17:16 plunky Exp $ 1$NetBSD: patch-aa,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- Makefile.orig 2012-02-15 08:56:20.000000000 +0000 3--- Makefile.orig 2009-11-30 19:29:18.000000000 +0000
4+++ Makefile 4+++ Makefile
5@@ -0,0 +1,4 @@ 5@@ -0,0 +1,4 @@
6+ 6+
7+SUBDIR= lib .WAIT src 7+SUBDIR+= src
8+ 8+
9+.include <bsd.subdir.mk> 9+.include <bsd.subdir.mk>

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ac (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ac 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ac 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,41 +1,41 @@ @@ -1,41 +1,41 @@
1$NetBSD: patch-ac,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ac,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- lib/hci.h.orig 2011-12-22 00:18:58.000000000 +0000 3--- bluetooth/hci.h.orig 2010-09-30 08:53:08.000000000 +0000
4+++ lib/hci.h 4+++ bluetooth/hci.h
5@@ -39,6 +39,7 @@ extern "C" { 5@@ -39,6 +39,7 @@ extern "C" {
6 #define HCI_MAX_EVENT_SIZE 260 6 #define HCI_MAX_EVENT_SIZE 260
7 #define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4) 7 #define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
8  8
9+#if 0 9+#if 0
10 /* HCI dev events */ 10 /* HCI dev events */
11 #define HCI_DEV_REG 1 11 #define HCI_DEV_REG 1
12 #define HCI_DEV_UNREG 2 12 #define HCI_DEV_UNREG 2
13@@ -107,6 +108,7 @@ enum { 13@@ -101,6 +102,7 @@ enum {
14 #define HCIUNBLOCKADDR _IOW('H', 231, int) 14 #define HCIUNBLOCKADDR _IOW('H', 231, int)
15  15
16 #define HCIINQUIRY _IOR('H', 240, int) 16 #define HCIINQUIRY _IOR('H', 240, int)
17+#endif 17+#endif
18  18
19 #ifndef __NO_HCI_DEFS 19 #ifndef __NO_HCI_DEFS
20  20
21@@ -2252,6 +2254,7 @@ typedef struct { 21@@ -2232,6 +2234,7 @@ typedef struct {
22  22
23 #endif /* _NO_HCI_DEFS */ 23 #endif /* _NO_HCI_DEFS */
24  24
25+#if 0 25+#if 0
26 /* HCI Socket options */ 26 /* HCI Socket options */
27 #define HCI_DATA_DIR 1 27 #define HCI_DATA_DIR 1
28 #define HCI_FILTER 2 28 #define HCI_FILTER 2
29@@ -2363,6 +2366,12 @@ struct hci_inquiry_req { 29@@ -2339,6 +2342,12 @@ struct hci_inquiry_req {
30 uint8_t num_rsp; 30 uint8_t num_rsp;
31 }; 31 };
32 #define IREQ_CACHE_FLUSH 0x0001 32 #define IREQ_CACHE_FLUSH 0x0001
33+#else 33+#else
34+#define HCI_CMSG_DIR SCM_HCI_DIRECTION 34+#define HCI_CMSG_DIR SCM_HCI_DIRECTION
35+#define HCI_CMSG_TSTAMP SCM_TIMESTAMP 35+#define HCI_CMSG_TSTAMP SCM_TIMESTAMP
36+#define HCI_DEV_NONE NULL 36+#define HCI_DEV_NONE NULL
37+#define HCI_DATA_DIR SO_HCI_DIRECTION 37+#define HCI_DATA_DIR SO_HCI_DIRECTION
38+#endif 38+#endif
39  39
40 #ifdef __cplusplus 40 #ifdef __cplusplus
41 } 41 }

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ad (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ad 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ad 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,50 +1,50 @@ @@ -1,50 +1,50 @@
1$NetBSD: patch-ad,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ad,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- lib/hci_lib.h.orig 2011-12-22 00:18:58.000000000 +0000 3--- bluetooth/hci_lib.h.orig 2010-09-30 08:53:08.000000000 +0000
4+++ lib/hci_lib.h 4+++ bluetooth/hci_lib.h
5@@ -30,6 +30,7 @@ 5@@ -30,6 +30,7 @@
6 extern "C" { 6 extern "C" {
7 #endif 7 #endif
8  8
9+#if 0 9+#if 0
10 struct hci_request { 10 struct hci_request {
11 uint16_t ogf; 11 uint16_t ogf;
12 uint16_t ocf; 12 uint16_t ocf;
13@@ -142,11 +143,15 @@ char *hci_bustostr(int bus); 13@@ -135,11 +136,15 @@ char *hci_bustostr(int bus);
14 char *hci_typetostr(int type); 14 char *hci_typetostr(int type);
15 char *hci_dtypetostr(int type); 15 char *hci_dtypetostr(int type);
16 char *hci_dflagstostr(uint32_t flags); 16 char *hci_dflagstostr(uint32_t flags);
17+#endif 17+#endif
18 char *hci_ptypetostr(unsigned int ptype); 18 char *hci_ptypetostr(unsigned int ptype);
19+#if 0 19+#if 0
20 int hci_strtoptype(char *str, unsigned int *val); 20 int hci_strtoptype(char *str, unsigned int *val);
21 char *hci_scoptypetostr(unsigned int ptype); 21 char *hci_scoptypetostr(unsigned int ptype);
22 int hci_strtoscoptype(char *str, unsigned int *val); 22 int hci_strtoscoptype(char *str, unsigned int *val);
23+#endif 23+#endif
24 char *hci_lptostr(unsigned int ptype); 24 char *hci_lptostr(unsigned int ptype);
25+#if 0 25+#if 0
26 int hci_strtolp(char *str, unsigned int *val); 26 int hci_strtolp(char *str, unsigned int *val);
27 char *hci_lmtostr(unsigned int ptype); 27 char *hci_lmtostr(unsigned int ptype);
28 int hci_strtolm(char *str, unsigned int *val); 28 int hci_strtolm(char *str, unsigned int *val);
29@@ -154,9 +159,13 @@ int hci_strtolm(char *str, unsigned int  29@@ -147,9 +152,13 @@ int hci_strtolm(char *str, unsigned int
30 char *hci_cmdtostr(unsigned int cmd); 30 char *hci_cmdtostr(unsigned int cmd);
31 char *hci_commandstostr(uint8_t *commands, char *pref, int width); 31 char *hci_commandstostr(uint8_t *commands, char *pref, int width);
32  32
33+#endif 33+#endif
34 char *hci_vertostr(unsigned int ver); 34 char *hci_vertostr(unsigned int ver);
35+#if 0 35+#if 0
36 int hci_strtover(char *str, unsigned int *ver); 36 int hci_strtover(char *str, unsigned int *ver);
37+#endif 37+#endif
38 char *lmp_vertostr(unsigned int ver); 38 char *lmp_vertostr(unsigned int ver);
39+#if 0 39+#if 0
40 int lmp_strtover(char *str, unsigned int *ver); 40 int lmp_strtover(char *str, unsigned int *ver);
41  41
42 char *lmp_featurestostr(uint8_t *features, char *pref, int width); 42 char *lmp_featurestostr(uint8_t *features, char *pref, int width);
43@@ -225,6 +234,7 @@ static inline int hci_filter_test_opcode 43@@ -218,6 +227,7 @@ static inline int hci_filter_test_opcode
44 { 44 {
45 return (f->opcode == opcode); 45 return (f->opcode == opcode);
46 } 46 }
47+#endif 47+#endif
48  48
49 #ifdef __cplusplus 49 #ifdef __cplusplus
50 } 50 }

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ae (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ae 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ae 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
1$NetBSD: patch-ae,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ae,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- lib/l2cap.h.orig 2011-12-22 00:18:58.000000000 +0000 3--- bluetooth/l2cap.h.orig 2009-11-30 19:29:17.000000000 +0000
4+++ lib/l2cap.h 4+++ bluetooth/l2cap.h
5@@ -30,6 +30,7 @@ 5@@ -30,6 +30,7 @@
6 extern "C" { 6 extern "C" {
7 #endif 7 #endif
8  8
9+#if 0 9+#if 0
10 #include <sys/socket.h> 10 #include <sys/socket.h>
11  11
12 /* L2CAP defaults */ 12 /* L2CAP defaults */
13@@ -69,6 +70,7 @@ struct l2cap_conninfo { 13@@ -66,6 +67,7 @@ struct l2cap_conninfo {
14 #define L2CAP_LM_TRUSTED 0x0008 14 #define L2CAP_LM_TRUSTED 0x0008
15 #define L2CAP_LM_RELIABLE 0x0010 15 #define L2CAP_LM_RELIABLE 0x0010
16 #define L2CAP_LM_SECURE 0x0020 16 #define L2CAP_LM_SECURE 0x0020
17+#endif 17+#endif
18  18
19 /* L2CAP command codes */ 19 /* L2CAP command codes */
20 #define L2CAP_COMMAND_REJ 0x01 20 #define L2CAP_COMMAND_REJ 0x01

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-af (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-af 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-af 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
1$NetBSD: patch-af,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-af,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- parser/bnep.c.orig 2011-12-22 00:18:58.000000000 +0000 3--- parser/bnep.c.orig 2007-02-18 03:39:02.000000000 +0000
4+++ parser/bnep.c 4+++ parser/bnep.c
5@@ -32,7 +32,7 @@ 5@@ -33,7 +33,7 @@
6 #include <stdlib.h> 
7 #include <string.h> 6 #include <string.h>
 7 #include <sys/types.h>
8  8
9-#include <net/ethernet.h> 9-#include <net/ethernet.h>
10+#include <net/ethertypes.h> 10+#include <net/ethertypes.h>
11  11
12 #include "parser/parser.h" 12 #include "parser.h"
13  13

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ah (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ah 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ah 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
1$NetBSD: patch-ah,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ah,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- parser/parser.h.orig 2011-12-22 00:18:58.000000000 +0000 3--- parser/parser.h.orig 2007-02-18 03:39:02.000000000 +0000
4+++ parser/parser.h 4+++ parser/parser.h
5@@ -36,7 +36,7 @@ struct frame { 5@@ -35,7 +35,7 @@ struct frame {
6 uint32_t data_len; 6 uint32_t data_len;
7 void *ptr; 7 void *ptr;
8 uint32_t len; 8 uint32_t len;
9- uint16_t dev_id; 9- uint16_t dev_id;
10+ char *dev_id; 10+ char *dev_id;
11 uint8_t in; 11 uint8_t in;
12 uint8_t master; 12 uint8_t master;
13 uint16_t handle; 13 uint16_t handle;

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ai (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ai 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ai 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: patch-ai,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ai,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- parser/rfcomm.h.orig 2011-01-27 04:11:41.000000000 +0000 3--- parser/rfcomm.h.orig 2007-02-18 03:39:02.000000000 +0000
4+++ parser/rfcomm.h 4+++ parser/rfcomm.h
5@@ -25,7 +25,9 @@ 5@@ -25,7 +25,9 @@
6 #ifndef __RFCOMM_H 6 #ifndef __RFCOMM_H
7 #define __RFCOMM_H 7 #define __RFCOMM_H
8  8
9+#if 0 9+#if 0
10 #include <endian.h> 10 #include <endian.h>
11+#endif 11+#endif
12  12
13 #define RFCOMM_PSM 3 13 #define RFCOMM_PSM 3
14  14

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-aj (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-aj 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-aj 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1$NetBSD: patch-aj,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-aj,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- parser/tcpip.c.orig 2011-12-22 00:18:58.000000000 +0000 3--- parser/tcpip.c.orig 2007-02-18 03:39:02.000000000 +0000
4+++ parser/tcpip.c 4+++ parser/tcpip.c
5@@ -31,8 +31,9 @@ 5@@ -32,8 +32,9 @@
6 #include <stdlib.h> 
7 #include <string.h> 6 #include <string.h>
 7 #include <sys/types.h>
8  8
9-#include <net/ethernet.h> 9-#include <net/ethernet.h>
10+#include <net/if.h> 10+#include <net/if.h>
11 #include <netinet/in.h> 11 #include <netinet/in.h>
12+#include <netinet/in_systm.h> 12+#include <netinet/in_systm.h>
13 #include <netinet/ip.h> 13 #include <netinet/ip.h>
14 #include <netinet/ip6.h> 14 #include <netinet/ip6.h>
15 #include <netinet/if_ether.h> 15 #include <netinet/if_ether.h>

cvs diff -r1.1.1.1.10.1 -r1.1.1.1.10.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-an (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-an 2012/02/15 09:17:17 1.1.1.1.10.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-an 2012/02/15 09:26:54 1.1.1.1.10.2
@@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
1$NetBSD: patch-an,v 1.1.1.1.10.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-an,v 1.1.1.1.10.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- src/hcidump.8.orig 2011-01-27 03:33:33.000000000 +0000 3--- src/hcidump.8.orig 2007-07-26 08:34:58.000000000 +0100
4+++ src/hcidump.8 4+++ src/hcidump.8
5@@ -28,7 +28,7 @@ which must be the name of an installed B 5@@ -28,7 +28,7 @@ which must be the name of an installed B
6 and if 6 and if
7 .B 7 .B
8 -r 8 -r
9-option is not set, data is read from the first available Bluetooth device. 9-option is not set, data is read from the first available Bluetooth device.
10+option is not set, data is read from all available Bluetooth devices. 10+option is not set, data is read from all available Bluetooth devices.
11 .TP 11 .TP
12 .BI -l " <len>" "\fR,\fP \-\^\-snap-len=" "<len>" 12 .BI -l " <len>" "\fR,\fP \-\^\-snap-len=" "<len>"
13 Sets max length of processed packets to 13 Sets max length of processed packets to

cvs diff -r1.3.6.1 -r1.3.6.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ab (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ab 2012/02/15 09:17:16 1.3.6.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ab 2012/02/15 09:26:54 1.3.6.2
@@ -1,76 +1,73 @@ @@ -1,76 +1,73 @@
1$NetBSD: patch-ab,v 1.3.6.1 2012/02/15 09:17:16 plunky Exp $ 1$NetBSD: patch-ab,v 1.3.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- lib/bluetooth.h.orig 2011-12-22 00:18:58.000000000 +0000 3--- bluetooth/bluetooth.h.orig 2011-06-19 12:38:18.000000000 +0000
4+++ lib/bluetooth.h 4+++ bluetooth/bluetooth.h
5@@ -30,6 +30,7 @@ 5@@ -30,6 +30,7 @@
6 extern "C" { 6 extern "C" {
7 #endif 7 #endif
8  8
9+#if 0 9+#if 0
10 #include <stdio.h> 10 #include <stdio.h>
11 #include <stdint.h> 11 #include <stdint.h>
12 #include <string.h> 12 #include <string.h>
13@@ -107,6 +108,20 @@ enum { 13@@ -103,6 +104,17 @@ enum {
14 #else 14 #else
15 #error "Unknown byte order" 15 #error "Unknown byte order"
16 #endif 16 #endif
17+#else 17+#else
18+#include <bluetooth.h> 18+#include <bluetooth.h>
19+#include <string.h> 19+#include <string.h>
20+ 20+
21+#define SOL_HCI BTPROTO_HCI 21+#define SOL_HCI BTPROTO_HCI
22+ 22+
23+#define htobs(d) htole16(d) 23+#define htobs(d) htole16(d)
24+#define htobl(d) htole32(d) 24+#define htobl(d) htole32(d)
25+#define btohs(d) le16toh(d) 25+#define btohs(d) le16toh(d)
26+#define btohl(d) le32toh(d) 26+#define btohl(d) le32toh(d)
27+#define bswap_64(v) bswap64(v) 
28+#define bswap_32(v) bswap32(v) 
29+#define bswap_16(v) bswap16(v) 
30+#endif 27+#endif
31  28
32 /* Bluetooth unaligned access */ 29 /* Bluetooth unaligned access */
33 #define bt_get_unaligned(ptr) \ 30 #define bt_get_unaligned(ptr) \
34@@ -189,6 +204,7 @@ static inline uint16_t bt_get_be16(void  31@@ -121,6 +133,7 @@ do { \
35 #error "Unknown byte order" 32 __p->__v = (val); \
36 #endif 33 } while(0)
37  34
38+#if 0 35+#if 0
39 /* BD Address */ 36 /* BD Address */
40 typedef struct { 37 typedef struct {
41 uint8_t b[6]; 38 uint8_t b[6];
42@@ -197,6 +213,7 @@ typedef struct { 39@@ -129,6 +142,7 @@ typedef struct {
43 #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) 40 #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
44 #define BDADDR_ALL (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}}) 41 #define BDADDR_ALL (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
45 #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) 42 #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
46+#endif 43+#endif
47  44
48 /* Copy, swap, convert BD Address */ 45 /* Copy, swap, convert BD Address */
49 static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2) 46 static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
50@@ -209,9 +226,12 @@ static inline void bacpy(bdaddr_t *dst,  47@@ -141,9 +155,12 @@ static inline void bacpy(bdaddr_t *dst,
51 } 48 }
52  49
53 void baswap(bdaddr_t *dst, const bdaddr_t *src); 50 void baswap(bdaddr_t *dst, const bdaddr_t *src);
54+#if 0 51+#if 0
55 bdaddr_t *strtoba(const char *str); 52 bdaddr_t *strtoba(const char *str);
56 char *batostr(const bdaddr_t *ba); 53 char *batostr(const bdaddr_t *ba);
57+#endif 54+#endif
58 int ba2str(const bdaddr_t *ba, char *str); 55 int ba2str(const bdaddr_t *ba, char *str);
59+#if 0 56+#if 0
60 int str2ba(const char *str, bdaddr_t *ba); 57 int str2ba(const char *str, bdaddr_t *ba);
61 int ba2oui(const bdaddr_t *ba, char *oui); 58 int ba2oui(const bdaddr_t *ba, char *oui);
62 int bachk(const char *str); 59 int bachk(const char *str);
63@@ -220,11 +240,14 @@ int baprintf(const char *format, ...); 60@@ -152,11 +169,14 @@ int baprintf(const char *format, ...);
64 int bafprintf(FILE *stream, const char *format, ...); 61 int bafprintf(FILE *stream, const char *format, ...);
65 int basprintf(char *str, const char *format, ...); 62 int basprintf(char *str, const char *format, ...);
66 int basnprintf(char *str, size_t size, const char *format, ...); 63 int basnprintf(char *str, size_t size, const char *format, ...);
67+#endif 64+#endif
68  65
69 void *bt_malloc(size_t size); 66 void *bt_malloc(size_t size);
70 void bt_free(void *ptr); 67 void bt_free(void *ptr);
71  68
72+#if 0 69+#if 0
73 int bt_error(uint16_t code); 70 int bt_error(uint16_t code);
74+#endif 71+#endif
75 char *bt_compidtostr(int id); 72 char *bt_compidtostr(int id);
76  73

cvs diff -r1.2.6.1 -r1.2.6.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ak (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ak 2012/02/15 09:17:17 1.2.6.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ak 2012/02/15 09:26:54 1.2.6.2
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1$NetBSD: patch-ak,v 1.2.6.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ak,v 1.2.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- src/Makefile.orig 2012-02-15 08:56:20.000000000 +0000 3--- src/Makefile.orig 2011-06-19 12:48:50.000000000 +0000
4+++ src/Makefile 4+++ src/Makefile
5@@ -0,0 +1,16 @@ 5@@ -0,0 +1,16 @@
6+.PATH: ../parser 6+.PATH: ../parser
7+ 7+
8+PROG= hcidump 8+PROG= hcidump
9+MAN= hcidump.8 9+MAN= hcidump.8
10+ 10+
11+BINDIR= ${PREFIX}/sbin 11+BINDIR= ${PREFIX}/sbin
12+ 12+
13+SRCS= hcidump.c \ 13+SRCS= hcidump.c bt_lib.c hci_lib.c \
14+ att.c avctp.c avdtp.c avrcp.c bnep.c bpa.c capi.c cmtp.c \ 14+ att.c avctp.c avdtp.c bnep.c bpa.c capi.c cmtp.c csr.c \
15+ csr.c ericsson.c hci.c hcrp.c hidp.c l2cap.c lmp.c obex.c \ 15+ ericsson.c hci.c hcrp.c hidp.c l2cap.c lmp.c obex.c \
16+ parser.c ppp.c rfcomm.c sdp.c smp.c tcpip.c 16+ parser.c ppp.c rfcomm.c sdp.c smp.c tcpip.c
17+ 17+
18+CPPFLAGS+= -I.. 18+CPPFLAGS+= -I..
19+LDADD+= ../lib/libbluez.a -lbluetooth 19+LDADD+= -lbluetooth
20+ 20+
21+.include <bsd.prog.mk> 21+.include <bsd.prog.mk>

cvs diff -r1.2.6.1 -r1.2.6.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-al (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-al 2012/02/15 09:17:17 1.2.6.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-al 2012/02/15 09:26:54 1.2.6.2
@@ -1,17 +1,28 @@ @@ -1,17 +1,28 @@
1$NetBSD: patch-al,v 1.2.6.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-al,v 1.2.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- lib/bluetooth.c.orig 2011-12-22 00:18:58.000000000 +0000 3--- src/bt_lib.c.orig 2011-06-19 12:38:18.000000000 +0000
4+++ lib/bluetooth.c 4+++ src/bt_lib.c
 5@@ -35,8 +35,8 @@
 6 #include <string.h>
 7 #include <sys/socket.h>
 8
 9-#include "bluetooth.h"
 10-#include "hci.h"
 11+#include <bluetooth/bluetooth.h>
 12+#include <bluetooth/hci.h>
 13
 14 void baswap(bdaddr_t *dst, const bdaddr_t *src)
 15 {
5@@ -48,6 +48,7 @@ void baswap(bdaddr_t *dst, const bdaddr_ 16@@ -48,6 +48,7 @@ void baswap(bdaddr_t *dst, const bdaddr_
6 d[i] = s[5-i]; 17 d[i] = s[5-i];
7 } 18 }
8  19
9+#if 0 20+#if 0
10 char *batostr(const bdaddr_t *ba) 21 char *batostr(const bdaddr_t *ba)
11 { 22 {
12 char *str = bt_malloc(18); 23 char *str = bt_malloc(18);
13@@ -73,6 +74,7 @@ bdaddr_t *strtoba(const char *str) 24@@ -73,6 +74,7 @@ bdaddr_t *strtoba(const char *str)
14  25
15 return ba; 26 return ba;
16 } 27 }
17+#endif 28+#endif

cvs diff -r1.2.6.1 -r1.2.6.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-am (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-am 2012/02/15 09:17:17 1.2.6.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-am 2012/02/15 09:26:54 1.2.6.2
@@ -1,17 +1,30 @@ @@ -1,17 +1,30 @@
1$NetBSD: patch-am,v 1.2.6.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-am,v 1.2.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- lib/hci.c.orig 2011-12-22 00:18:58.000000000 +0000 3--- src/hci_lib.c.orig 2011-06-19 12:48:50.000000000 +0000
4+++ lib/hci.c 4+++ src/hci_lib.c
 5@@ -41,9 +41,9 @@
 6 #include <sys/ioctl.h>
 7 #include <sys/socket.h>
 8
 9-#include "bluetooth.h"
 10-#include "hci.h"
 11-#include "hci_lib.h"
 12+#include <bluetooth/bluetooth.h>
 13+#include <bluetooth/hci.h>
 14+#include <bluetooth/hci_lib.h>
 15
 16 #ifndef MIN
 17 #define MIN(x, y) ((x) < (y) ? (x) : (y))
5@@ -71,6 +71,7 @@ static char *hci_bit2str(hci_map *m, uns 18@@ -71,6 +71,7 @@ static char *hci_bit2str(hci_map *m, uns
6 return str; 19 return str;
7 } 20 }
8  21
9+#if 0 22+#if 0
10 static int hci_str2bit(hci_map *map, char *str, unsigned int *val) 23 static int hci_str2bit(hci_map *map, char *str, unsigned int *val)
11 { 24 {
12 char *t, *ptr; 25 char *t, *ptr;
13@@ -94,6 +95,7 @@ static int hci_str2bit(hci_map *map, cha 26@@ -94,6 +95,7 @@ static int hci_str2bit(hci_map *map, cha
14  27
15 return set; 28 return set;
16 } 29 }
17+#endif 30+#endif

cvs diff -r1.4.6.1 -r1.4.6.2 pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ao (expand / switch to unified diff)

--- pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ao 2012/02/15 09:17:17 1.4.6.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/Attic/patch-ao 2012/02/15 09:26:54 1.4.6.2
@@ -1,86 +1,86 @@ @@ -1,86 +1,86 @@
1$NetBSD: patch-ao,v 1.4.6.1 2012/02/15 09:17:17 plunky Exp $ 1$NetBSD: patch-ao,v 1.4.6.2 2012/02/15 09:26:54 plunky Exp $
2 2
3--- src/hcidump.c.orig 2011-12-22 00:18:58.000000000 +0000 3--- src/hcidump.c.orig 2011-06-13 01:54:33.000000000 +0000
4+++ src/hcidump.c 4+++ src/hcidump.c
5@@ -48,6 +48,10 @@ 5@@ -50,6 +50,10 @@
6 #include "lib/hci.h" 6 #include "parser/parser.h"
7 #include "lib/hci_lib.h" 7 #include "parser/sdp.h"
8  8
9+#ifndef AI_ADDRCONFIG 9+#ifndef AI_ADDRCONFIG
10+#define AI_ADDRCONFIG 0 10+#define AI_ADDRCONFIG 0
11+#endif 11+#endif
12+ 12+
13 #define SNAP_LEN HCI_MAX_FRAME_SIZE 13 #define SNAP_LEN HCI_MAX_FRAME_SIZE
14 #define DEFAULT_PORT "10839" 14 #define DEFAULT_PORT "10839";
15  15
16@@ -144,7 +148,7 @@ static inline int write_n(int fd, char * 16@@ -146,7 +150,7 @@ static inline int write_n(int fd, char *
17 return t; 17 return t;
18 } 18 }
19  19
20-static int process_frames(int dev, int sock, int fd, unsigned long flags) 20-static int process_frames(int dev, int sock, int fd, unsigned long flags)
21+static int process_frames(char *dev, int sock, int fd, unsigned long flags) 21+static int process_frames(char *dev, int sock, int fd, unsigned long flags)
22 { 22 {
23 struct cmsghdr *cmsg; 23 struct cmsghdr *cmsg;
24 struct msghdr msg; 24 struct msghdr msg;
25@@ -186,7 +190,7 @@ static int process_frames(int dev, int s 25@@ -188,7 +192,7 @@ static int process_frames(int dev, int s
26 if (dev == HCI_DEV_NONE) 26 if (dev == HCI_DEV_NONE)
27 printf("system: "); 27 printf("system: ");
28 else 28 else
29- printf("device: hci%d ", dev); 29- printf("device: hci%d ", dev);
30+ printf("device: %s ", dev); 30+ printf("device: %s ", dev);
31  31
32 printf("snap_len: %d filter: 0x%lx\n", snap_len, parser.filter); 32 printf("snap_len: %d filter: 0x%lx\n", snap_len, parser.filter);
33  33
34@@ -528,10 +532,13 @@ static int open_file(char *file, int mod 34@@ -530,10 +534,13 @@ static int open_file(char *file, int mod
35 return fd; 35 return fd;
36 } 36 }
37  37
38-static int open_socket(int dev, unsigned long flags) 38-static int open_socket(int dev, unsigned long flags)
39+static int open_socket(char *dev, unsigned long flags) 39+static int open_socket(char *dev, unsigned long flags)
40 { 40 {
41- struct sockaddr_hci addr; 41- struct sockaddr_hci addr;
42+ struct sockaddr_bt addr; 42+ struct sockaddr_bt addr;
43 struct hci_filter flt; 43 struct hci_filter flt;
44+#if 1 44+#if 1
45+ int sk, opt; 45+ int sk, opt;
46+#else 46+#else
47 struct hci_dev_info di; 47 struct hci_dev_info di;
48 int sk, dd, opt; 48 int sk, dd, opt;
49  49
50@@ -557,6 +564,7 @@ static int open_socket(int dev, unsigned 50@@ -559,6 +566,7 @@ static int open_socket(int dev, unsigned
51  51
52 hci_close_dev(dd); 52 hci_close_dev(dd);
53 } 53 }
54+#endif 54+#endif
55  55
56 /* Create HCI socket */ 56 /* Create HCI socket */
57 sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); 57 sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
58@@ -572,12 +580,13 @@ static int open_socket(int dev, unsigned 58@@ -574,12 +582,13 @@ static int open_socket(int dev, unsigned
59 } 59 }
60  60
61 opt = 1; 61 opt = 1;
62- if (setsockopt(sk, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) { 62- if (setsockopt(sk, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) {
63+ if (setsockopt(sk, SOL_SOCKET, SO_TIMESTAMP, &opt, sizeof(opt)) < 0) { 63+ if (setsockopt(sk, SOL_SOCKET, SO_TIMESTAMP, &opt, sizeof(opt)) < 0) {
64 perror("Can't enable time stamp"); 64 perror("Can't enable time stamp");
65 return -1; 65 return -1;
66 } 66 }
67  67
68 /* Setup filter */ 68 /* Setup filter */
69+#if 0 69+#if 0
70 hci_filter_clear(&flt); 70 hci_filter_clear(&flt);
71 hci_filter_all_ptypes(&flt); 71 hci_filter_all_ptypes(&flt);
72 hci_filter_all_events(&flt); 72 hci_filter_all_events(&flt);
73@@ -585,13 +594,34 @@ static int open_socket(int dev, unsigned 73@@ -587,13 +596,34 @@ static int open_socket(int dev, unsigned
74 perror("Can't set filter"); 74 perror("Can't set filter");
75 return -1; 75 return -1;
76 } 76 }
77+#else 77+#else
78+ memset(&flt, 0xff, sizeof(flt)); 78+ memset(&flt, 0xff, sizeof(flt));
79+ if (setsockopt(sk, BTPROTO_HCI, SO_HCI_EVT_FILTER, &flt, sizeof(flt)) < 0) { 79+ if (setsockopt(sk, BTPROTO_HCI, SO_HCI_EVT_FILTER, &flt, sizeof(flt)) < 0) {
80+ perror("Can't set event filter"); 80+ perror("Can't set event filter");
81+ exit(1); 81+ exit(1);
82+ } 82+ }
83+ 83+
84+ if (setsockopt(sk, BTPROTO_HCI, SO_HCI_PKT_FILTER, &flt, sizeof(flt)) < 0) { 84+ if (setsockopt(sk, BTPROTO_HCI, SO_HCI_PKT_FILTER, &flt, sizeof(flt)) < 0) {
85+ perror("Can't set packet filter"); 85+ perror("Can't set packet filter");
86+ exit(1); 86+ exit(1);
@@ -96,40 +96,40 @@ $NetBSD: patch-ao,v 1.4.6.1 2012/02/15 0 @@ -96,40 +96,40 @@ $NetBSD: patch-ao,v 1.4.6.1 2012/02/15 0
96+ addr.bt_len = sizeof(addr); 96+ addr.bt_len = sizeof(addr);
97+ addr.bt_family = AF_BLUETOOTH; 97+ addr.bt_family = AF_BLUETOOTH;
98+ if (dev != HCI_DEV_NONE && !bt_devaddr(dev, &addr.bt_bdaddr)) { 98+ if (dev != HCI_DEV_NONE && !bt_devaddr(dev, &addr.bt_bdaddr)) {
99+ perror("device"); 99+ perror("device");
100+ exit(1); 100+ exit(1);
101+ } 101+ }
102+#endif 102+#endif
103 if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) { 103 if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
104- printf("Can't attach to device hci%d. %s(%d)\n",  104- printf("Can't attach to device hci%d. %s(%d)\n",
105+ printf("Can't attach to device %s. %s(%d)\n",  105+ printf("Can't attach to device %s. %s(%d)\n",
106 dev, strerror(errno), errno); 106 dev, strerror(errno), errno);
107 return -1; 107 return -1;
108 } 108 }
109@@ -768,7 +798,7 @@ static int wait_connection(char *addr, c 109@@ -770,7 +800,7 @@ static int wait_connection(char *addr, c
110 return -1; 110 return -1;
111 } 111 }
112  112
113-static int run_server(int dev, char *addr, char *port, unsigned long flags) 113-static int run_server(int dev, char *addr, char *port, unsigned long flags)
114+static int run_server(char *dev, char *addr, char *port, unsigned long flags) 114+static int run_server(char *dev, char *addr, char *port, unsigned long flags)
115 { 115 {
116 while (1) { 116 while (1) {
117 int dd, sk; 117 int dd, sk;
118@@ -900,7 +930,7 @@ int main(int argc, char *argv[]) 118@@ -902,7 +932,7 @@ int main(int argc, char *argv[])
119 { 119 {
120 unsigned long flags = 0; 120 unsigned long flags = 0;
121 unsigned long filter = 0; 121 unsigned long filter = 0;
122- int device = 0; 122- int device = 0;
123+ char *device = HCI_DEV_NONE; 123+ char *device = HCI_DEV_NONE;
124 int defpsm = 0; 124 int defpsm = 0;
125 int defcompid = DEFAULT_COMPID; 125 int defcompid = DEFAULT_COMPID;
126 int opt, pppdump_fd = -1, audio_fd = -1; 126 int opt, pppdump_fd = -1, audio_fd = -1;
127@@ -909,7 +939,7 @@ int main(int argc, char *argv[]) 127@@ -911,7 +941,7 @@ int main(int argc, char *argv[])
128 switch(opt) { 128 switch(opt) {
129 case 'i': 129 case 'i':
130 if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system")) 130 if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system"))
131- device = atoi(optarg + 3); 131- device = atoi(optarg + 3);
132+ device = optarg; 132+ device = optarg;
133 else 133 else
134 device = HCI_DEV_NONE; 134 device = HCI_DEV_NONE;
135 break; 135 break;

File Deleted: pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_Makefile