diff options
author | Ville Tervo <ville.tervo@nokia.com> | 2011-02-10 20:38:54 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-16 14:33:19 -0500 |
commit | aff2cae3546df9f47f9fe24f3e85a7a84e825de8 (patch) | |
tree | 54947c9642079111e49ffd49a76960799bf4acce /include/net | |
parent | bae1f5d9464d231148301fcbf4e425a096a5b96d (diff) |
Bluetooth: Add SMP command structures
Add command structures for security manager protocol.
Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/smp.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h new file mode 100644 index 000000000000..8f2edbf979dc --- /dev/null +++ b/include/net/bluetooth/smp.h | |||
@@ -0,0 +1,76 @@ | |||
1 | #ifndef __SMP_H | ||
2 | #define __SMP_H | ||
3 | |||
4 | struct smp_command_hdr { | ||
5 | __u8 code; | ||
6 | } __packed; | ||
7 | |||
8 | #define SMP_CMD_PAIRING_REQ 0x01 | ||
9 | #define SMP_CMD_PAIRING_RSP 0x02 | ||
10 | struct smp_cmd_pairing { | ||
11 | __u8 io_capability; | ||
12 | __u8 oob_flag; | ||
13 | __u8 auth_req; | ||
14 | __u8 max_key_size; | ||
15 | __u8 init_key_dist; | ||
16 | __u8 resp_key_dist; | ||
17 | } __packed; | ||
18 | |||
19 | #define SMP_CMD_PAIRING_CONFIRM 0x03 | ||
20 | struct smp_cmd_pairing_confirm { | ||
21 | __u8 confirm_val[16]; | ||
22 | } __packed; | ||
23 | |||
24 | #define SMP_CMD_PAIRING_RANDOM 0x04 | ||
25 | struct smp_cmd_pairing_random { | ||
26 | __u8 rand_val[16]; | ||
27 | } __packed; | ||
28 | |||
29 | #define SMP_CMD_PAIRING_FAIL 0x05 | ||
30 | struct smp_cmd_pairing_fail { | ||
31 | __u8 reason; | ||
32 | } __packed; | ||
33 | |||
34 | #define SMP_CMD_ENCRYPT_INFO 0x06 | ||
35 | struct smp_cmd_encrypt_info { | ||
36 | __u8 ltk[16]; | ||
37 | } __packed; | ||
38 | |||
39 | #define SMP_CMD_MASTER_IDENT 0x07 | ||
40 | struct smp_cmd_master_ident { | ||
41 | __u16 ediv; | ||
42 | __u8 rand[8]; | ||
43 | } __packed; | ||
44 | |||
45 | #define SMP_CMD_IDENT_INFO 0x08 | ||
46 | struct smp_cmd_ident_info { | ||
47 | __u8 irk[16]; | ||
48 | } __packed; | ||
49 | |||
50 | #define SMP_CMD_IDENT_ADDR_INFO 0x09 | ||
51 | struct smp_cmd_ident_addr_info { | ||
52 | __u8 addr_type; | ||
53 | bdaddr_t bdaddr; | ||
54 | } __packed; | ||
55 | |||
56 | #define SMP_CMD_SIGN_INFO 0x0a | ||
57 | struct smp_cmd_sign_info { | ||
58 | __u8 csrk[16]; | ||
59 | } __packed; | ||
60 | |||
61 | #define SMP_CMD_SECURITY_REQ 0x0b | ||
62 | struct smp_cmd_security_req { | ||
63 | __u8 auth_req; | ||
64 | } __packed; | ||
65 | |||
66 | #define SMP_PASSKEY_ENTRY_FAILED 0x01 | ||
67 | #define SMP_OOB_NOT_AVAIL 0x02 | ||
68 | #define SMP_AUTH_REQUIREMENTS 0x03 | ||
69 | #define SMP_CONFIRM_FAILED 0x04 | ||
70 | #define SMP_PAIRING_NOTSUPP 0x05 | ||
71 | #define SMP_ENC_KEY_SIZE 0x06 | ||
72 | #define SMP_CMD_NOTSUPP 0x07 | ||
73 | #define SMP_UNSPECIFIED 0x08 | ||
74 | #define SMP_REPEATED_ATTEMPTS 0x09 | ||
75 | |||
76 | #endif /* __SMP_H */ | ||