summaryrefslogtreecommitdiff
path: root/monitor/msft.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2021-03-19 18:43:02 +0100
committerMarcel Holtmann <marcel@holtmann.org>2021-03-19 18:44:12 +0100
commit8e2d46d8b1cfa8169aa70eb50c9807add934e555 (patch)
treecfc0162e42efe96e2f3799000688d8db3d61da76 /monitor/msft.c
parente8cae81974bd48357e002ad4c2ed4eb297278848 (diff)
downloadbluez-8e2d46d8b1cfa8169aa70eb50c9807add934e555.tar.gz
monitor: Add skeleton for Microsoft HCI extension
Diffstat (limited to 'monitor/msft.c')
-rw-r--r--monitor/msft.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/monitor/msft.c b/monitor/msft.c
new file mode 100644
index 000000000..e9a15d265
--- /dev/null
+++ b/monitor/msft.c
@@ -0,0 +1,69 @@
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2011-2014 Intel Corporation
+ * Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; 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
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <inttypes.h>
+
+#include "display.h"
+#include "packet.h"
+#include "vendor.h"
+#include "msft.h"
+
+static void msft_cmd(const void *data, uint8_t size)
+{
+ packet_hexdump(data, size);
+}
+
+static void msft_rsp(const void *data, uint8_t size)
+{
+ packet_hexdump(data, size);
+}
+
+static const struct vendor_ocf vendor_ocf_entry = {
+ 0x000, "Extension", msft_cmd, 1, false, msft_rsp, 1, false
+};
+
+const struct vendor_ocf *msft_vendor_ocf(void)
+{
+ return &vendor_ocf_entry;
+}
+
+static void msft_evt(const void *data, uint8_t size)
+{
+ packet_hexdump(data, size);
+}
+
+static const struct vendor_evt vendor_evt_entry = {
+ 0x00, "Extension", msft_evt, 1, false
+};
+
+const struct vendor_evt *msft_vendor_evt(void)
+{
+ return &vendor_evt_entry;
+}