Skip to content

Commit aff2cae

Browse files
Ville TervoGustavo F. Padovan
authored andcommitted
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>
1 parent bae1f5d commit aff2cae

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

  • include/net/bluetooth

‎include/net/bluetooth/smp.h‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 */

0 commit comments

Comments
 (0)