Diff between 7cac24c496587d0560ac0e6789918c6916677484 and d25c3a159c1a762c07a93b07c2622ec8cea0722f

Changed Files

File Additions Deletions Status
src/shared/att-types.h +12 -0 modified

Full Patch

diff --git a/src/shared/att-types.h b/src/shared/att-types.h
index b57a5f3..a6b23e4 100644
--- a/src/shared/att-types.h
+++ b/src/shared/att-types.h
@@ -74,6 +74,18 @@
 #define BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE		0x10
 #define BT_ATT_ERROR_INSUFFICIENT_RESOURCES		0x11
 
+/*
+ * ATT attribute permission bitfield values. Permissions are grouped as
+ * "Access", "Encryption", "Authentication", and "Authorization". A bitmask of
+ * permissions is a byte that encodes a combination of these.
+ */
+#define BT_ATT_PERM_READ	0x01
+#define BT_ATT_PERM_WRITE	0x02
+#define BT_ATT_PERM_ENCRYPT	0x04
+#define BT_ATT_PERM_AUTHEN	0x08
+#define BT_ATT_PERM_AUTHOR	0x10
+#define BT_ATT_PERM_NONE	0x20
+
 /* GATT Characteristic Properties Bitfield values */
 #define BT_GATT_CHRC_PROP_BROADCAST			0x01
 #define BT_GATT_CHRC_PROP_READ				0x02