Sun Jun 4 09:06:16 2023 UTC ()
update to hcidump from BlueZ-5.66
changes to the parser, with newer profiles catered for
(plunky)
diff -r1.12 -r1.13 pkgsrc/sysutils/netbt-hcidump/Makefile
diff -r1.18 -r1.19 pkgsrc/sysutils/netbt-hcidump/distinfo
diff -r1.1 -r1.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_bluetooth.h
diff -r1.1 -r1.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_hci.h
diff -r1.1 -r1.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-src_shared_util.h
diff -r1.1 -r1.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_hcidump.1
diff -r1.1 -r1.2 pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_hcidump.c
diff -r1.2 -r1.3 pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_parser_parser.h
--- pkgsrc/sysutils/netbt-hcidump/Makefile 2022/12/31 21:49:13 1.12
+++ pkgsrc/sysutils/netbt-hcidump/Makefile 2023/06/04 09:06:16 1.13
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.12 2022/12/31 21:49:13 plunky Exp $
+# $NetBSD: Makefile,v 1.13 2023/06/04 09:06:16 plunky Exp $
-DISTNAME= bluez-5.27
+DISTNAME= bluez-5.66
PKGNAME= netbt-hcidump-${BLUEZ_VERSION}
-PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.kernel.org/pub/linux/bluetooth/
EXTRACT_SUFX= .tar.xz
--- pkgsrc/sysutils/netbt-hcidump/distinfo 2021/10/26 11:19:54 1.18
+++ pkgsrc/sysutils/netbt-hcidump/distinfo 2023/06/04 09:06:16 1.19
@@ -1,23 +1,23 @@
-$NetBSD: distinfo,v 1.18 2021/10/26 11:19:54 nia Exp $
+$NetBSD: distinfo,v 1.19 2023/06/04 09:06:16 plunky Exp $
-BLAKE2s (bluez-5.27.tar.xz) = ab8a97adae31921171c6239cd93a4c4ee7ec49548eb6f59d39080128a9a34622
-SHA512 (bluez-5.27.tar.xz) = 5e5e3ec17b4552027559083effb076e9c7d45528765fb27ca1aa1f3d8bb6a4a79c9fda91392f7b5b6da7aabf2b2b6e5bb16b0546323901501a93c53f79a66324
-Size (bluez-5.27.tar.xz) = 1542348 bytes
+BLAKE2s (bluez-5.66.tar.xz) = 680796ff604f7d485cbe7cce6f13ad64d7bf6a30771a6fec4accef33b5cf7512
+SHA512 (bluez-5.66.tar.xz) = ed0994932687eacf27207867366671b323671f5d5199daf36ea5eff8f254f2bc99ef989ef7df9883b35c06f2af60452be8bad0a06109428a4717cf2b247b4865
+Size (bluez-5.66.tar.xz) = 2257288 bytes
SHA1 (patch-Makefile) = 24c3f132b0c454c7f06915ca368b67e463c4e4f0
SHA1 (patch-lib_Makefile) = d881586878b8ee58f642f993bfad6a614148fb7b
SHA1 (patch-lib_bluetooth.c) = 997da8b1f00bf0093ca45cdd5c416d6155c591ea
-SHA1 (patch-lib_bluetooth.h) = cd200dfefdabe7a517928c62848faceb41fb302a
+SHA1 (patch-lib_bluetooth.h) = 23a982bfb85e74dc876c42bdd8c0041461963c20
SHA1 (patch-lib_hci.c) = 825b01082e2be2336c429e27ec78348fe4c39985
-SHA1 (patch-lib_hci.h) = e032192fba2b96cf44888a7ae383685e11ae16b7
+SHA1 (patch-lib_hci.h) = 258596cbbbaf1c1827bdd59fa1bbdd7582244277
SHA1 (patch-lib_hci__lib.h) = aa2768c85c1a775cbc65d4274e1a9cb47f16a7da
SHA1 (patch-lib_l2cap.h) = 744d600f5b25eaf8f7fca6646d5dbdd73f709753
-SHA1 (patch-src_shared_util.h) = 349f8869b54746d5799af5beadd390dffd5f260b
+SHA1 (patch-src_shared_util.h) = 3509ed85b0758add9f7704f070f41a3f6aa93ab9
SHA1 (patch-tools_Makefile) = 4c63cb92ce4fc8446fcb6b16a60f17d68b25078f
-SHA1 (patch-tools_hcidump.1) = 3981ca329e9837ea9719fea59277357a435cc265
-SHA1 (patch-tools_hcidump.c) = ca6871ca562bc218ce445edf8b364f528d260d4e
+SHA1 (patch-tools_hcidump.1) = 7bd27aa48435d8b1ea8f292b27c63eb36c78f820
+SHA1 (patch-tools_hcidump.c) = 2dddf54f9c648a34597f036b281baabadb8689eb
SHA1 (patch-tools_parser_Makefile) = 4d4410493393d521c89ba429b39b0a3bbbba135b
SHA1 (patch-tools_parser_bnep.c) = efbbe5f4cd47dcb0bf72c16bd67d9d93ba7cd43a
SHA1 (patch-tools_parser_lmp.c) = f410be55cf07f6d7f7d3b1466b7fbe708b1a6de5
-SHA1 (patch-tools_parser_parser.h) = 19ff1cdd8d7af71d9ae86497d3e1f49ae9db9a2a
+SHA1 (patch-tools_parser_parser.h) = e8e1c7b9c9ee958e7b0dd8b7e971557375ac33b9
SHA1 (patch-tools_parser_rfcomm.h) = 917dd10203c62de7679909fc014a69ccd2a5185d
SHA1 (patch-tools_parser_tcpip.c) = e06881372e8edf23f22c1a0a61c9bc346381a0e3
--- pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_bluetooth.h 2014/12/30 08:39:13 1.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_bluetooth.h 2023/06/04 09:06:16 1.2
@@ -1,8 +1,8 @@
-$NetBSD: patch-lib_bluetooth.h,v 1.1 2014/12/30 08:39:13 plunky Exp $
+$NetBSD: patch-lib_bluetooth.h,v 1.2 2023/06/04 09:06:16 plunky Exp $
Not much of the original library is needed.
---- lib/bluetooth.h.orig 2014-12-12 13:38:33.000000000 +0000
+--- lib/bluetooth.h.orig 2020-03-15 06:38:34.000000000 +0000
+++ lib/bluetooth.h
@@ -30,6 +30,7 @@
extern "C" {
@@ -12,7 +12,7 @@
#include <stdio.h>
#include <stdint.h>
#include <string.h>
-@@ -153,6 +154,20 @@ enum {
+@@ -172,6 +173,20 @@ enum {
#else
#error "Unknown byte order"
#endif
@@ -33,7 +33,7 @@
/* Bluetooth unaligned access */
#define bt_get_unaligned(ptr) \
-@@ -296,6 +311,7 @@ static inline void bt_put_be16(uint16_t
+@@ -315,6 +330,7 @@ static inline void bt_put_be16(uint16_t
#error "Unknown byte order"
#endif
@@ -41,7 +41,7 @@
/* BD Address */
typedef struct {
uint8_t b[6];
-@@ -309,6 +325,7 @@ typedef struct {
+@@ -328,6 +344,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}})
@@ -49,7 +49,7 @@
/* Copy, swap, convert BD Address */
static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
-@@ -321,9 +338,12 @@ static inline void bacpy(bdaddr_t *dst,
+@@ -340,9 +357,12 @@ static inline void bacpy(bdaddr_t *dst,
}
void baswap(bdaddr_t *dst, const bdaddr_t *src);
@@ -59,10 +59,10 @@
+#endif
int ba2str(const bdaddr_t *ba, char *str);
+#if 0
+ int ba2strlc(const bdaddr_t *ba, char *str);
int str2ba(const char *str, bdaddr_t *ba);
int ba2oui(const bdaddr_t *ba, char *oui);
- int bachk(const char *str);
-@@ -337,6 +357,7 @@ void *bt_malloc(size_t size);
+@@ -357,6 +377,7 @@ void *bt_malloc(size_t size);
void bt_free(void *ptr);
int bt_error(uint16_t code);
--- pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_hci.h 2014/12/30 08:39:13 1.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/patch-lib_hci.h 2023/06/04 09:06:16 1.2
@@ -1,32 +1,33 @@
-$NetBSD: patch-lib_hci.h,v 1.1 2014/12/30 08:39:13 plunky Exp $
+$NetBSD: patch-lib_hci.h,v 1.2 2023/06/04 09:06:16 plunky Exp $
Not much of the original library is needed.
---- lib/hci.h.orig 2014-12-26 17:54:42.000000000 +0000
+--- lib/hci.h.orig 2021-10-13 18:38:34.000000000 +0000
+++ lib/hci.h
-@@ -39,6 +39,7 @@ extern "C" {
+@@ -27,6 +27,7 @@ extern "C" {
#define HCI_MAX_EVENT_SIZE 260
- #define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
+ #define HCI_MAX_FRAME_SIZE (HCI_MAX_AMP_SIZE + 4)
+#if 0
/* HCI dev events */
#define HCI_DEV_REG 1
#define HCI_DEV_UNREG 2
-@@ -55,11 +56,13 @@ extern "C" {
- #define HCI_RS232 4
- #define HCI_PCI 5
- #define HCI_SDIO 6
+@@ -47,12 +48,14 @@ extern "C" {
+ #define HCI_I2C 8
+ #define HCI_SMD 9
+ #define HCI_VIRTIO 10
+#endif
/* HCI controller types */
- #define HCI_BREDR 0x00
+ #define HCI_PRIMARY 0x00
#define HCI_AMP 0x01
+ #define HCI_BREDR HCI_PRIMARY
+#if 0
/* HCI device flags */
enum {
HCI_UP,
-@@ -107,6 +110,7 @@ enum {
+@@ -100,6 +103,7 @@ enum {
#define HCIUNBLOCKADDR _IOW('H', 231, int)
#define HCIINQUIRY _IOR('H', 240, int)
@@ -34,7 +35,7 @@
#ifndef __NO_HCI_DEFS
-@@ -2328,6 +2332,7 @@ typedef struct {
+@@ -2322,6 +2326,7 @@ typedef struct {
#endif /* _NO_HCI_DEFS */
@@ -42,7 +43,7 @@
/* HCI Socket options */
#define HCI_DATA_DIR 1
#define HCI_FILTER 2
-@@ -2441,6 +2446,12 @@ struct hci_inquiry_req {
+@@ -2436,6 +2441,12 @@ struct hci_inquiry_req {
uint8_t num_rsp;
};
#define IREQ_CACHE_FLUSH 0x0001
--- pkgsrc/sysutils/netbt-hcidump/patches/patch-src_shared_util.h 2014/12/30 08:39:13 1.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/patch-src_shared_util.h 2023/06/04 09:06:16 1.2
@@ -1,16 +1,16 @@
-$NetBSD: patch-src_shared_util.h,v 1.1 2014/12/30 08:39:13 plunky Exp $
+$NetBSD: patch-src_shared_util.h,v 1.2 2023/06/04 09:06:16 plunky Exp $
Linux vs BSD incompatibilities
---- src/shared/util.h.orig 2014-12-12 13:38:33.000000000 +0000
+--- src/shared/util.h.orig 2022-03-16 15:06:20.000000000 +0000
+++ src/shared/util.h
-@@ -23,8 +23,7 @@
-
+@@ -11,8 +11,7 @@
#include <stdint.h>
#include <stdlib.h>
+ #include <stdarg.h>
-#include <alloca.h>
-#include <byteswap.h>
-+#include <machine/bswap.h>
++#include <endian.h>
+ #include <string.h>
+ #include <sys/types.h>
- #if __BYTE_ORDER == __LITTLE_ENDIAN
- #define le16_to_cpu(val) (val)
--- pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_hcidump.1 2014/12/30 08:39:13 1.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_hcidump.1 2023/06/04 09:06:16 1.2
--- pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_hcidump.c 2014/12/30 08:39:13 1.1
+++ pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_hcidump.c 2023/06/04 09:06:16 1.2
@@ -1,4 +1,4 @@
-$NetBSD: patch-tools_hcidump.c,v 1.1 2014/12/30 08:39:13 plunky Exp $
+$NetBSD: patch-tools_hcidump.c,v 1.2 2023/06/04 09:06:16 plunky Exp $
changes here, are that netbt stack
- uses a string for the device address
@@ -7,7 +7,7 @@
Also, the BSDs provide a socket level TIMESTAMP option
---- tools/hcidump.c.orig 2014-10-05 19:31:20.000000000 +0000
+--- tools/hcidump.c.orig 2015-09-04 01:19:36.000000000 +0000
+++ tools/hcidump.c
@@ -135,7 +135,7 @@ static inline int write_n(int fd, char *
return t;
@@ -18,7 +18,7 @@
{
struct cmsghdr *cmsg;
struct msghdr msg;
-@@ -177,7 +177,7 @@ static int process_frames(int dev, int s
+@@ -171,7 +171,7 @@ static int process_frames(int dev, int s
if (dev == HCI_DEV_NONE)
printf("system: ");
else
@@ -27,7 +27,7 @@
printf("snap_len: %d filter: 0x%lx\n", snap_len, parser.filter);
-@@ -522,9 +522,9 @@ static int open_file(char *file, int mod
+@@ -516,9 +516,9 @@ static int open_file(char *file, int mod
return fd;
}
@@ -39,14 +39,14 @@
struct hci_filter flt;
int sk, opt;
-@@ -542,12 +542,13 @@ static int open_socket(int dev, unsigned
+@@ -536,12 +536,13 @@ static int open_socket(int dev, unsigned
}
opt = 1;
- if (setsockopt(sk, SOL_HCI, HCI_TIME_STAMP, &opt, sizeof(opt)) < 0) {
+ if (setsockopt(sk, SOL_SOCKET, SO_TIMESTAMP, &opt, sizeof(opt)) < 0) {
perror("Can't enable time stamp");
- return -1;
+ goto fail;
}
/* Setup filter */
@@ -54,9 +54,9 @@
hci_filter_clear(&flt);
hci_filter_all_ptypes(&flt);
hci_filter_all_events(&flt);
-@@ -555,13 +556,34 @@ static int open_socket(int dev, unsigned
+@@ -549,13 +550,34 @@ static int open_socket(int dev, unsigned
perror("Can't set filter");
- return -1;
+ goto fail;
}
+#else
+ memset(&flt, 0xff, sizeof(flt));
@@ -88,9 +88,9 @@
- printf("Can't attach to device hci%d. %s(%d)\n",
+ printf("Can't attach to device %s. %s(%d)\n",
dev, strerror(errno), errno);
- return -1;
+ goto fail;
}
-@@ -672,7 +694,7 @@ int main(int argc, char *argv[])
+@@ -670,7 +692,7 @@ int main(int argc, char *argv[])
{
unsigned long flags = 0;
unsigned long filter = 0;
@@ -99,7 +99,7 @@
int defpsm = 0;
int defcompid = DEFAULT_COMPID;
int opt, pppdump_fd = -1, audio_fd = -1;
-@@ -684,7 +706,7 @@ int main(int argc, char *argv[])
+@@ -682,7 +704,7 @@ int main(int argc, char *argv[])
switch(opt) {
case 'i':
if (strcasecmp(optarg, "none") && strcasecmp(optarg, "system"))
--- pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_parser_parser.h 2015/03/19 19:16:31 1.2
+++ pkgsrc/sysutils/netbt-hcidump/patches/patch-tools_parser_parser.h 2023/06/04 09:06:16 1.3