diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-09-09 14:29:26 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-09-16 08:59:01 +0200 |
commit | 8650ab69889218ec857475da3dfd99624f714585 (patch) | |
tree | 4fae8ce1f7933b0394c13061d4b7c75fd8e54b38 /src/bluetooth/bluez | |
parent | 07f1b4c19880f79c6ee15c400ee830383529e59a (diff) |
Add ability to set the security level of the l2cp connection
Later this will be needed to read/write authorized and encrypted
characteristic/descriptor values.
Change-Id: Ibc70b65b51723d6e0668ee177f5dbd1df2ba047f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/bluetooth/bluez')
-rw-r--r-- | src/bluetooth/bluez/bluez_data_p.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bluetooth/bluez/bluez_data_p.h b/src/bluetooth/bluez/bluez_data_p.h index 743f09dc..3e5b0245 100644 --- a/src/bluetooth/bluez/bluez_data_p.h +++ b/src/bluetooth/bluez/bluez_data_p.h @@ -54,6 +54,9 @@ #define SOL_L2CAP 6 #define SOL_RFCOMM 18 +#ifndef SOL_BLUETOOTH +#define SOL_BLUETOOTH 274 +#endif #define RFCOMM_LM 0x03 @@ -68,6 +71,16 @@ #define L2CAP_LM_TRUSTED 0x0008 #define L2CAP_LM_SECURE 0x0020 +#define BT_SECURITY 4 +struct bt_security { + uint8_t level; + uint8_t key_size; +}; +#define BT_SECURITY_SDP 0 +#define BT_SECURITY_LOW 1 +#define BT_SECURITY_MEDIUM 2 +#define BT_SECURITY_HIGH 3 + #define BDADDR_LE_PUBLIC 0x01 #define BDADDR_LE_RANDOM 0x02 |