Diff between 74bb289de146d28b0680fff2f8f25dc01f26c1f5 and e9d67091bd978149ad795ffc55acbb584b88c35f

Changed Files

File Additions Deletions Status
Makefile.tools +1 -0 modified
monitor/packet.c +8 -2 modified
monitor/vendor.c +35 -0 added
monitor/vendor.h +27 -0 added

Full Patch

diff --git a/Makefile.tools b/Makefile.tools
index 4bcb18e..f7fbc40 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -20,6 +20,7 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
 					monitor/btsnoop.h monitor/btsnoop.c \
 					monitor/control.h monitor/control.c \
 					monitor/packet.h monitor/packet.c \
+					monitor/vendor.h monitor/vendor.c \
 					monitor/l2cap.h monitor/l2cap.c \
 					monitor/uuid.h monitor/uuid.c \
 					monitor/sdp.h monitor/sdp.c
diff --git a/monitor/packet.c b/monitor/packet.c
index 1330638..cda7e52 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -46,6 +46,7 @@
 #include "uuid.h"
 #include "l2cap.h"
 #include "control.h"
+#include "vendor.h"
 #include "packet.h"
 
 #define COLOR_INDEX_LABEL		COLOR_WHITE
@@ -5204,6 +5205,11 @@ static void le_meta_event_evt(const void *data, uint8_t size)
 	subevent_data->func(data + 1, size - 1);
 }
 
+static void vendor_evt(const void *data, uint8_t size)
+{
+	vendor_event(0xffff, data, size);
+}
+
 struct event_data {
 	uint8_t event;
 	const char *str;
@@ -5346,8 +5352,8 @@ static const struct event_data event_table[] = {
 				short_range_mode_change_evt, 3, true },
 	{ 0x4d, "AMP Status Change",
 				amp_status_change_evt, 2, true },
-	{ 0xfe, "Testing"				},
-	{ 0xff, "Vendor"				},
+	{ 0xfe, "Testing" },
+	{ 0xff, "Vendor", vendor_evt, 0, false },
 	{ }
 };
 
diff --git a/monitor/vendor.c b/monitor/vendor.c
new file mode 100644
index 0000000..31d48ee
--- /dev/null
+++ b/monitor/vendor.c
@@ -0,0 +1,35 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2011-2012  Intel Corporation
+ *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "packet.h"
+#include "vendor.h"
+
+void vendor_event(uint16_t manufacturer, const void *data, uint8_t size)
+{
+	packet_hexdump(data, size);
+}
diff --git a/monitor/vendor.h b/monitor/vendor.h
new file mode 100644
index 0000000..7dbd284
--- /dev/null
+++ b/monitor/vendor.h
@@ -0,0 +1,27 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2011-2012  Intel Corporation
+ *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#include <stdint.h>
+
+void vendor_event(uint16_t manufacturer, const void *data, uint8_t size);