linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Cc: Johan Hedberg <johan.hedberg@nokia.com>
Subject: [PATCH 2/3] Add initial definitions for Bluetooth Management API
Date: Mon, 20 Sep 2010 14:07:45 +0300	[thread overview]
Message-ID: <1284980866-3974-3-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1284980866-3974-1-git-send-email-johan.hedberg@gmail.com>

From: Johan Hedberg <johan.hedberg@nokia.com>

---
 lib/hci.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/lib/hci.h b/lib/hci.h
index 512dab9..1ac153f 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -2232,6 +2232,24 @@ typedef struct {
 
 #endif /* _NO_HCI_DEFS */
 
+struct hci_mgmt_hdr {
+	uint16_t opcode;
+	uint16_t len;
+} __packed;
+#define HCI_MGMT_HDR_SIZE	4
+
+#define HCI_MGMT_OP_READ_VERSION	0x0001
+#define HCI_MGMT_OP_READ_FEATURES	0x0002
+#define HCI_MGMT_OP_READ_INDEX_LIST	0x0003
+#define HCI_MGMT_OP_READ_INFO		0x0004
+#define HCI_MGMT_OP_READ_STATISTICS	0x0005
+#define HCI_MGMT_OP_READ_MODE		0x0006
+#define HCI_MGMT_OP_WRITE_MODE		0x0007
+
+#define HCI_MGMT_EV_CMD_COMPLETE	0x0001
+#define HCI_MGMT_EV_CMD_STATUS		0x0002
+#define HCI_MGMT_EV_CONTROLLER_ERROR	0x0003
+
 /* HCI Socket options */
 #define HCI_DATA_DIR	1
 #define HCI_FILTER	2
@@ -2244,9 +2262,12 @@ typedef struct {
 struct sockaddr_hci {
 	sa_family_t	hci_family;
 	unsigned short	hci_dev;
+	unsigned short  hci_channel;
 };
 #define HCI_DEV_NONE	0xffff
 
+#define HCI_CHANNEL_CONTROL 1
+
 struct hci_filter {
 	uint32_t type_mask;
 	uint32_t event_mask[2];
-- 
1.7.0.4


  parent reply	other threads:[~2010-09-20 11:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-20 11:07 [RFC] Bluetooth Management Interface johan.hedberg
2010-09-20 11:07 ` [PATCH 1/3] Add initial Bluetooth Management API doc johan.hedberg
2010-09-20 11:07 ` johan.hedberg [this message]
2010-09-20 11:07 ` [PATCH 3/3] Add hcimgmt command line test tool johan.hedberg
2010-09-20 13:13   ` Anderson Lizardo
2010-09-20 13:28     ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284980866-3974-3-git-send-email-johan.hedberg@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=johan.hedberg@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).