summaryrefslogtreecommitdiff
path: root/sysutils/netbt-hcidump/patches
diff options
context:
space:
mode:
authorplunky <plunky@pkgsrc.org>2011-06-19 13:02:35 +0000
committerplunky <plunky@pkgsrc.org>2011-06-19 13:02:35 +0000
commit1e9494cd9f6f875ccfdc7b875384eb89bdc149b3 (patch)
tree2d7f6cd8c7ab212507ea715699a67751539cd9c1 /sysutils/netbt-hcidump/patches
parent31fcb4322747aaeeddc6b68a2eb77a49978d09e1 (diff)
downloadpkgsrc-1e9494cd9f6f875ccfdc7b875384eb89bdc149b3.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/netbt-hcidump/patches')
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ab16
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ak8
-rw-r--r--sysutils/netbt-hcidump/patches/patch-al20
-rw-r--r--sysutils/netbt-hcidump/patches/patch-am20
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ao38
5 files changed, 46 insertions, 56 deletions
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"))