1 /** @file
2  *  @brief Attribute Protocol handling.
3  */
4 
5 /*
6  * Copyright (c) 2016 Intel Corporation
7  *
8  * SPDX-License-Identifier: Apache-2.0
9  */
10 #ifndef ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
11 #define ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_
12 
13 #include <misc/slist.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /* Error codes for Error response PDU */
20 #define BT_ATT_ERR_INVALID_HANDLE		0x01
21 #define BT_ATT_ERR_READ_NOT_PERMITTED		0x02
22 #define BT_ATT_ERR_WRITE_NOT_PERMITTED		0x03
23 #define BT_ATT_ERR_INVALID_PDU			0x04
24 #define BT_ATT_ERR_AUTHENTICATION		0x05
25 #define BT_ATT_ERR_NOT_SUPPORTED		0x06
26 #define BT_ATT_ERR_INVALID_OFFSET		0x07
27 #define BT_ATT_ERR_AUTHORIZATION		0x08
28 #define BT_ATT_ERR_PREPARE_QUEUE_FULL		0x09
29 #define BT_ATT_ERR_ATTRIBUTE_NOT_FOUND		0x0a
30 #define BT_ATT_ERR_ATTRIBUTE_NOT_LONG		0x0b
31 #define BT_ATT_ERR_ENCRYPTION_KEY_SIZE		0x0c
32 #define BT_ATT_ERR_INVALID_ATTRIBUTE_LEN	0x0d
33 #define BT_ATT_ERR_UNLIKELY			0x0e
34 #define BT_ATT_ERR_INSUFFICIENT_ENCRYPTION	0x0f
35 #define BT_ATT_ERR_UNSUPPORTED_GROUP_TYPE	0x10
36 #define BT_ATT_ERR_INSUFFICIENT_RESOURCES	0x11
37 #define BT_ATT_ERR_DB_OUT_OF_SYNC		0x12
38 #define BT_ATT_ERR_VALUE_NOT_ALLOWED		0x13
39 
40 /* Common Profile Error Codes (from CSS) */
41 #define BT_ATT_ERR_WRITE_REQ_REJECTED		0xfc
42 #define BT_ATT_ERR_CCC_IMPROPER_CONF		0xfd
43 #define BT_ATT_ERR_PROCEDURE_IN_PROGRESS	0xfe
44 #define BT_ATT_ERR_OUT_OF_RANGE			0xff
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif /* ZEPHYR_INCLUDE_BLUETOOTH_ATT_H_ */
51