linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
To: linux-bluetooth@vger.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Subject: [PATCH BlueZ 02/11] Add messages to the mgmt interface to handle SMP key storage
Date: Wed, 18 Jan 2012 14:12:31 -0300	[thread overview]
Message-ID: <1326906751-15470-1-git-send-email-vinicius.gomes@openbossa.org> (raw)
In-Reply-To: <1326842930-31623-1-git-send-email-vinicius.gomes@openbossa.org>

The SMP keys are to be communicated to/from userspace using these
messages.
---
Johan,

Just a note that I need to update my kernel patches after you remove
the Remote Name event.

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

diff --git a/lib/mgmt.h b/lib/mgmt.h
index 5414ea6..af63889 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -275,6 +275,22 @@ struct mgmt_cp_unblock_device {
 	bdaddr_t bdaddr;
 } __packed;
 
+struct mgmt_ltk_info {
+	struct mgmt_addr_info addr;
+	uint8_t authenticated;
+	uint8_t master;
+	uint8_t enc_size;
+	uint16_t ediv;
+	uint8_t rand[8];
+	uint8_t val[16];
+} __packed;
+
+#define MGMT_OP_LOAD_LONG_TERM_KEYS	0x0026
+struct mgmt_cp_load_long_term_keys {
+	uint16_t key_count;
+	struct mgmt_ltk_info keys[0];
+} __packed;
+
 #define MGMT_EV_CMD_COMPLETE		0x0001
 struct mgmt_ev_cmd_complete {
 	uint16_t opcode;
@@ -374,3 +390,9 @@ struct mgmt_ev_device_blocked {
 struct mgmt_ev_device_unblocked {
 	bdaddr_t bdaddr;
 } __packed;
+
+#define MGMT_EV_NEW_LONG_TERM_KEY	0x0015
+struct mgmt_ev_new_long_term_key {
+	uint8_t store_hint;
+	struct mgmt_ltk_info key;
+} __packed;
-- 
1.7.8.1


      parent reply	other threads:[~2012-01-18 17:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 23:28 [PATCH BlueZ 01/11] mgmt-api: Update the commands for exchanging LTK's Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 02/11] Add messages to the mgmt interface to handle SMP key storage Vinicius Costa Gomes
2012-01-18 11:57   ` Johan Hedberg
2012-01-18 14:26     ` Vinicius Costa Gomes
2012-01-18 14:37       ` Johan Hedberg
2012-01-17 23:28 ` [PATCH BlueZ 03/11] Add storage functions to handle SMP keys Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 04/11] Add macros for the possible link key types Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 05/11] Fix using "magic" values for the " Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 06/11] Add support for storing a LTK when it enters bluetoothd Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 07/11] Add support for handing the New LTK mgmt event Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 08/11] Add support for sending the Load Long Term Keys commands Vinicius Costa Gomes
2012-01-18 22:34   ` Johan Hedberg
2012-01-17 23:28 ` [PATCH BlueZ 09/11] Add support for creating devices from the stored LTK's Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 10/11] Fix memory leak when loading keys Vinicius Costa Gomes
2012-01-17 23:28 ` [PATCH BlueZ 11/11] Remove the SMP Long Term Key when the device is removed Vinicius Costa Gomes
2012-01-18  7:17 ` [PATCH BlueZ 01/11] mgmt-api: Update the commands for exchanging LTK's Ganir, Chen
2012-01-18 10:40   ` Anderson Lizardo
2012-01-18 14:41     ` Ganir, Chen
2012-01-18 14:51       ` Anderson Lizardo
2012-01-18 17:12 ` Vinicius Costa Gomes [this message]

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=1326906751-15470-1-git-send-email-vinicius.gomes@openbossa.org \
    --to=vinicius.gomes@openbossa.org \
    --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).