diff --git a/src/shared/att-types.h b/src/shared/att-types.h
index ce531d1..ea4c009 100644
--- a/src/shared/att-types.h
+++ b/src/shared/att-types.h
#define __packed __attribute__((packed))
#endif
+#define BT_ATT_SECURITY_NONE 0
+#define BT_ATT_SECURITY_LOW 1
+#define BT_ATT_SECURITY_MEDIUM 2
+#define BT_ATT_SECURITY_HIGH 3
+
#define BT_ATT_DEFAULT_LE_MTU 23
#define BT_ATT_MAX_LE_MTU 517
#define BT_ATT_MAX_VALUE_LEN 512
diff --git a/src/shared/att.c b/src/shared/att.c
index 3b37cdf..f24da18 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
{
struct bt_security sec;
- if (!att || level < BT_SECURITY_LOW || level > BT_SECURITY_HIGH)
+ if (!att || level < BT_ATT_SECURITY_LOW || level > BT_ATT_SECURITY_HIGH)
return false;
if (!att->io_on_l2cap) {
diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 415680b..caaacbd 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
g_assert(bt_att_set_local_key(context->att, key, local_counter,
context));
- g_assert(bt_att_set_sec_level(context->att, BT_SECURITY_MEDIUM));
+ g_assert(bt_att_set_sec_level(context->att, BT_ATT_SECURITY_MEDIUM));
g_assert(bt_gatt_client_write_without_response(context->client,
step->handle,