ble_gatt_client
|
att protocol implementation More...
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include "io.h"
#include "queue.h"
#include "util.h"
#include "timeout.h"
#include "bluetooth.h"
#include "uuid.h"
#include "att.h"
#include "crypto.h"
Go to the source code of this file.
Data Structures | |
struct | bt_att |
struct | sign_info |
struct | att_send_op |
struct | att_notify |
struct | att_disconn |
struct | timeout_data |
struct | notify_data |
Macros | |
#define | ATT_MIN_PDU_LEN 1 /* At least 1 byte for the opcode. */ |
#define | ATT_OP_CMD_MASK 0x40 |
#define | ATT_OP_SIGNED_MASK 0x80 |
#define | ATT_TIMEOUT_INTERVAL 30000 /* 30000 ms */ |
#define | BT_ATT_SIGNATURE_LEN 12 |
Enumerations | |
enum | att_op_type { ATT_OP_TYPE_REQ, ATT_OP_TYPE_RSP, ATT_OP_TYPE_CMD, ATT_OP_TYPE_IND, ATT_OP_TYPE_NOT, ATT_OP_TYPE_CONF, ATT_OP_TYPE_UNKNOWN } |
Functions | |
static enum att_op_type | get_op_type (uint8_t opcode) |
static uint8_t | get_req_opcode (uint8_t rsp_opcode) |
static void | destroy_att_send_op (void *data) |
destroy att send operation calls the destroy callback with user_data as an argument free pdu data More... | |
static void | cancel_att_send_op (struct att_send_op *op) |
static void | destroy_att_notify (void *data) |
static bool | match_notify_id (const void *a, const void *b) |
static void | destroy_att_disconn (void *data) |
static bool | match_disconn_id (const void *a, const void *b) |
static bool | encode_pdu (struct bt_att *att, struct att_send_op *op, const void *pdu, uint16_t length) |
static struct att_send_op * | create_att_send_op (struct bt_att *att, uint8_t opcode, const void *pdu, uint16_t length, bt_att_response_func_t callback, void *user_data, bt_att_destroy_func_t destroy) |
static struct att_send_op * | pick_next_send_op (struct bt_att *att) |
static bool | timeout_cb (void *user_data) |
static void | write_watch_destroy (void *user_data) |
static bool | can_write_data (struct io *io, void *user_data) |
static void | wakeup_writer (struct bt_att *att) |
static void | disconn_handler (void *data, void *user_data) |
static bool | disconnect_cb (struct io *io, void *user_data) |
static bool | change_security (struct bt_att *att, uint8_t ecode) |
static bool | handle_error_rsp (struct bt_att *att, uint8_t *pdu, ssize_t pdu_len, uint8_t *opcode) |
static void | handle_rsp (struct bt_att *att, uint8_t opcode, uint8_t *pdu, ssize_t pdu_len) |
static void | handle_conf (struct bt_att *att, uint8_t *pdu, ssize_t pdu_len) |
static bool | opcode_match (uint8_t opcode, uint8_t test_opcode) |
static void | respond_not_supported (struct bt_att *att, uint8_t opcode) |
static bool | handle_signed (struct bt_att *att, uint8_t opcode, uint8_t *pdu, ssize_t pdu_len) |
static void | handle_notify (struct bt_att *att, uint8_t opcode, uint8_t *pdu, ssize_t pdu_len) |
static bool | can_read_data (struct io *io, void *user_data) |
static bool | is_io_l2cap_based (int fd) |
static void | bt_att_free (struct bt_att *att) |
struct bt_att * | bt_att_new (int fd, bool ext_signed) |
struct bt_att * | bt_att_ref (struct bt_att *att) |
void | bt_att_unref (struct bt_att *att) |
bool | bt_att_set_close_on_unref (struct bt_att *att, bool do_close) |
int | bt_att_get_fd (struct bt_att *att) |
bool | bt_att_set_debug (struct bt_att *att, bt_att_debug_func_t callback, void *user_data, bt_att_destroy_func_t destroy) |
uint16_t | bt_att_get_mtu (struct bt_att *att) |
bool | bt_att_set_mtu (struct bt_att *att, uint16_t mtu) |
bool | bt_att_set_timeout_cb (struct bt_att *att, bt_att_timeout_func_t callback, void *user_data, bt_att_destroy_func_t destroy) |
unsigned int | bt_att_register_disconnect (struct bt_att *att, bt_att_disconnect_func_t callback, void *user_data, bt_att_destroy_func_t destroy) |
bool | bt_att_unregister_disconnect (struct bt_att *att, unsigned int id) |
unsigned int | bt_att_send (struct bt_att *att, uint8_t opcode, const void *pdu, uint16_t length, bt_att_response_func_t callback, void *user_data, bt_att_destroy_func_t destroy) |
static bool | match_op_id (const void *a, const void *b) |
bool | bt_att_cancel (struct bt_att *att, unsigned int id) |
bool | bt_att_cancel_all (struct bt_att *att) |
static uint8_t | att_ecode_from_error (int err) |
unsigned int | bt_att_send_error_rsp (struct bt_att *att, uint8_t opcode, uint16_t handle, int error) |
unsigned int | bt_att_register (struct bt_att *att, uint8_t opcode, bt_att_notify_func_t callback, void *user_data, bt_att_destroy_func_t destroy) |
bool | bt_att_unregister (struct bt_att *att, unsigned int id) |
bool | bt_att_unregister_all (struct bt_att *att) |
int | bt_att_get_security (struct bt_att *att) |
bool | bt_att_set_security (struct bt_att *att, int level) |
static bool | sign_set_key (struct sign_info **sign, uint8_t key[16], bt_att_counter_func_t func, void *user_data) |
bool | bt_att_set_local_key (struct bt_att *att, uint8_t sign_key[16], bt_att_counter_func_t func, void *user_data) |
bool | bt_att_set_remote_key (struct bt_att *att, uint8_t sign_key[16], bt_att_counter_func_t func, void *user_data) |
bool | bt_att_has_crypto (struct bt_att *att) |
Variables | |
struct { | |
uint8_t opcode | |
enum att_op_type type | |
} | att_opcode_type_table [] |
struct { | |
uint8_t req_opcode | |
uint8_t rsp_opcode | |
} | att_req_rsp_mapping_table [] |
att protocol implementation
Definition in file att.c.
#define ATT_MIN_PDU_LEN 1 /* At least 1 byte for the opcode. */ |
Definition at line 51 of file att.c.
Referenced by can_read_data().
#define ATT_OP_SIGNED_MASK 0x80 |
Definition at line 53 of file att.c.
Referenced by encode_pdu(), and handle_notify().
#define ATT_TIMEOUT_INTERVAL 30000 /* 30000 ms */ |
Definition at line 54 of file att.c.
Referenced by can_write_data().
#define BT_ATT_SIGNATURE_LEN 12 |
Definition at line 57 of file att.c.
Referenced by encode_pdu(), handle_notify(), and handle_signed().
enum att_op_type |
|
static |
Definition at line 1340 of file att.c.
References BT_ATT_ERROR_INSUFFICIENT_RESOURCES, BT_ATT_ERROR_INVALID_HANDLE, BT_ATT_ERROR_UNLIKELY, BT_ERROR_ALREADY_IN_PROGRESS, and BT_ERROR_OUT_OF_RANGE.
Referenced by bt_att_send_error_rsp().
bool bt_att_cancel | ( | struct bt_att * | att, |
unsigned int | id | ||
) |
Definition at line 1278 of file att.c.
References cancel_att_send_op(), destroy_att_send_op(), att_send_op::id, bt_att::ind_queue, match_op_id(), bt_att::pending_ind, bt_att::pending_req, queue_remove_if(), bt_att::req_queue, UINT_TO_PTR, wakeup_writer(), and bt_att::write_queue.
Referenced by bt_gatt_client_cancel_all(), bt_gatt_request_cancel(), cancel_request(), complete_unregister_notify(), and notify_data_cleanup().
bool bt_att_cancel_all | ( | struct bt_att * | att | ) |
Definition at line 1320 of file att.c.
References cancel_att_send_op(), destroy_att_send_op(), bt_att::ind_queue, bt_att::pending_ind, bt_att::pending_req, queue_remove_all(), bt_att::req_queue, and bt_att::write_queue.
Referenced by bt_att_unref(), and disconnect_cb().
|
static |
Definition at line 960 of file att.c.
References bt_crypto_unref(), bt_att::buf, bt_att::crypto, bt_att::debug_data, bt_att::debug_destroy, destroy_att_send_op(), bt_att::disconn_list, bt_att::ind_queue, bt_att::io, io_destroy(), bt_att::local_sign, bt_att::notify_list, bt_att::pending_ind, bt_att::pending_req, queue_destroy(), bt_att::remote_sign, bt_att::req_queue, bt_att::timeout_data, bt_att::timeout_destroy, and bt_att::write_queue.
Referenced by bt_att_new(), and bt_att_unref().
int bt_att_get_fd | ( | struct bt_att * | att | ) |
Definition at line 1087 of file att.c.
References bt_att::fd.
uint16_t bt_att_get_mtu | ( | struct bt_att * | att | ) |
Definition at line 1111 of file att.c.
References bt_att::mtu.
Referenced by bt_gatt_client_get_mtu(), bt_gatt_client_read_multiple(), bt_gatt_client_write_long_value(), exchange_mtu_cb(), prepare_write_cb(), and read_long_cb().
int bt_att_get_security | ( | struct bt_att * | att | ) |
Definition at line 1448 of file att.c.
References BT_SECURITY, bt_att::fd, bt_att::io_on_l2cap, bt_att::io_sec_level, bt_security::level, and SOL_BLUETOOTH.
Referenced by bt_gatt_client_get_security(), bt_gatt_client_write_without_response(), and change_security().
bool bt_att_has_crypto | ( | struct bt_att * | att | ) |
Definition at line 1524 of file att.c.
References bt_att::crypto.
struct bt_att* bt_att_new | ( | int | fd, |
bool | ext_signed | ||
) |
Definition at line 991 of file att.c.
References BT_ATT_DEFAULT_LE_MTU, bt_att_free(), bt_att_ref(), bt_crypto_new(), BT_SECURITY_LOW, bt_att::buf, can_read_data(), bt_att::crypto, bt_att::disconn_list, disconnect_cb(), bt_att::ext_signed, bt_att::fd, bt_att::ind_queue, bt_att::io, io_new(), bt_att::io_on_l2cap, bt_att::io_sec_level, io_set_disconnect_handler(), io_set_read_handler(), is_io_l2cap_based(), bt_att::mtu, new0, bt_att::notify_list, queue_new(), bt_att::req_queue, and bt_att::write_queue.
Referenced by client_create().
Definition at line 1055 of file att.c.
References bt_att::ref_count.
Referenced by bt_att_new(), bt_gatt_client_new(), can_read_data(), disconnect_cb(), and handle_notify().
unsigned int bt_att_register | ( | struct bt_att * | att, |
uint8_t | opcode, | ||
bt_att_notify_func_t | callback, | ||
void * | user_data, | ||
bt_att_destroy_func_t | destroy | ||
) |
Definition at line 1389 of file att.c.
References att_notify::callback, att_notify::destroy, att_notify::id, bt_att::io, new0, bt_att::next_reg_id, bt_att::notify_list, opcode, att_notify::opcode, queue_push_tail(), and att_notify::user_data.
Referenced by bt_gatt_client_new().
unsigned int bt_att_register_disconnect | ( | struct bt_att * | att, |
bt_att_disconnect_func_t | callback, | ||
void * | user_data, | ||
bt_att_destroy_func_t | destroy | ||
) |
Definition at line 1158 of file att.c.
References att_disconn::callback, att_disconn::destroy, bt_att::disconn_list, att_disconn::id, bt_att::io, new0, bt_att::next_reg_id, queue_push_tail(), and att_disconn::user_data.
Referenced by bt_gatt_client_new(), and client_create().
unsigned int bt_att_send | ( | struct bt_att * | att, |
uint8_t | opcode, | ||
const void * | pdu, | ||
uint16_t | length, | ||
bt_att_response_func_t | callback, | ||
void * | user_data, | ||
bt_att_destroy_func_t | destroy | ||
) |
encode & send an att message If (op-code type == ATT_OP_TYPE_REQ) process the response with callback function see att_opcode_type_table (att.c) for opcode type definition
att | structure of the communication channel |
opcode | att message op-code |
pdu | protocol data unit buffer |
length | size of pdu |
callback | callback function depending on opcode to process response |
user_data | request data when relevant |
destroy | function to manage user_data |
Definition at line 1220 of file att.c.
References ATT_OP_TYPE_CMD, ATT_OP_TYPE_CONF, ATT_OP_TYPE_IND, ATT_OP_TYPE_NOT, ATT_OP_TYPE_REQ, ATT_OP_TYPE_RSP, ATT_OP_TYPE_UNKNOWN, create_att_send_op(), att_send_op::id, bt_att::ind_queue, bt_att::io, bt_att::next_send_id, att_send_op::pdu, queue_push_tail(), bt_att::req_queue, att_send_op::type, wakeup_writer(), and bt_att::write_queue.
Referenced by bt_att_send_error_rsp(), bt_gatt_client_prepare_write(), bt_gatt_client_read_long_value(), bt_gatt_client_read_multiple(), bt_gatt_client_read_value(), bt_gatt_client_write_execute(), bt_gatt_client_write_long_value(), bt_gatt_client_write_value(), bt_gatt_client_write_without_response(), bt_gatt_discover_characteristics(), bt_gatt_discover_descriptors(), bt_gatt_discover_included_services(), bt_gatt_exchange_mtu(), bt_gatt_read_by_type(), cancel_long_write_req(), cancel_prep_write_session(), complete_write_long_op(), discover_chrcs_cb(), discover_descs_cb(), discover_included_cb(), discover_services(), find_by_type_val_cb(), handle_next_prep_write(), notify_cb(), notify_data_write_ccc(), read_by_grp_type_cb(), read_by_type_cb(), read_included(), read_included_cb(), read_long_cb(), and respond_not_supported().
unsigned int bt_att_send_error_rsp | ( | struct bt_att * | att, |
uint8_t | opcode, | ||
uint16_t | handle, | ||
int | error | ||
) |
Definition at line 1368 of file att.c.
References att_ecode_from_error(), BT_ATT_OP_ERROR_RSP, bt_att_send(), bt_att_pdu_error_rsp::ecode, bt_att_pdu_error_rsp::handle, bt_att_pdu_error_rsp::opcode, opcode, and put_le16().
bool bt_att_set_close_on_unref | ( | struct bt_att * | att, |
bool | do_close | ||
) |
Definition at line 1079 of file att.c.
References bt_att::io, and io_set_close_on_destroy().
Referenced by client_create().
bool bt_att_set_debug | ( | struct bt_att * | att, |
bt_att_debug_func_t | callback, | ||
void * | user_data, | ||
bt_att_destroy_func_t | destroy | ||
) |
Definition at line 1095 of file att.c.
References bt_att::debug_callback, bt_att::debug_data, and bt_att::debug_destroy.
Referenced by client_create().
bool bt_att_set_local_key | ( | struct bt_att * | att, |
uint8_t | sign_key[16], | ||
bt_att_counter_func_t | func, | ||
void * | user_data | ||
) |
Definition at line 1506 of file att.c.
References bt_att::local_sign, and sign_set_key().
Referenced by cmd_set_sign_key().
bool bt_att_set_mtu | ( | struct bt_att * | att, |
uint16_t | mtu | ||
) |
Definition at line 1119 of file att.c.
References BT_ATT_DEFAULT_LE_MTU, bt_att::buf, and bt_att::mtu.
Referenced by mtu_cb().
bool bt_att_set_remote_key | ( | struct bt_att * | att, |
uint8_t | sign_key[16], | ||
bt_att_counter_func_t | func, | ||
void * | user_data | ||
) |
Definition at line 1515 of file att.c.
References bt_att::remote_sign, and sign_set_key().
bool bt_att_set_security | ( | struct bt_att * | att, |
int | level | ||
) |
Definition at line 1467 of file att.c.
References BT_ATT_SECURITY_AUTO, BT_ATT_SECURITY_HIGH, BT_SECURITY, bt_att::fd, bt_att::io_on_l2cap, bt_att::io_sec_level, bt_security::level, and SOL_BLUETOOTH.
Referenced by bt_gatt_client_set_security(), and change_security().
bool bt_att_set_timeout_cb | ( | struct bt_att * | att, |
bt_att_timeout_func_t | callback, | ||
void * | user_data, | ||
bt_att_destroy_func_t | destroy | ||
) |
Definition at line 1141 of file att.c.
References bt_att::timeout_callback, bt_att::timeout_data, and bt_att::timeout_destroy.
void bt_att_unref | ( | struct bt_att * | att | ) |
Definition at line 1065 of file att.c.
References bt_att_cancel_all(), bt_att_free(), bt_att_unregister_all(), and bt_att::ref_count.
Referenced by att_disconnect_cb(), bt_gatt_client_free(), can_read_data(), client_create(), client_destroy(), disconnect_cb(), and handle_notify().
bool bt_att_unregister | ( | struct bt_att * | att, |
unsigned int | id | ||
) |
Definition at line 1421 of file att.c.
References destroy_att_notify(), match_notify_id(), bt_att::notify_list, queue_remove_if(), and UINT_TO_PTR.
Referenced by bt_gatt_client_free().
bool bt_att_unregister_all | ( | struct bt_att * | att | ) |
Definition at line 1437 of file att.c.
References destroy_att_disconn(), destroy_att_notify(), bt_att::disconn_list, bt_att::notify_list, and queue_remove_all().
Referenced by bt_att_unref(), and disconnect_cb().
bool bt_att_unregister_disconnect | ( | struct bt_att * | att, |
unsigned int | id | ||
) |
Definition at line 1189 of file att.c.
References destroy_att_disconn(), bt_att::disconn_list, match_disconn_id(), queue_remove_if(), and UINT_TO_PTR.
Referenced by bt_gatt_client_free().
|
static |
Definition at line 863 of file att.c.
References ATT_MIN_PDU_LEN, ATT_OP_TYPE_CMD, ATT_OP_TYPE_CONF, ATT_OP_TYPE_IND, ATT_OP_TYPE_NOT, ATT_OP_TYPE_REQ, ATT_OP_TYPE_RSP, ATT_OP_TYPE_UNKNOWN, bt_att_ref(), bt_att_unref(), bt_att::buf, bt_att::debug_callback, bt_att::debug_data, bt_att::fd, get_op_type(), handle_conf(), handle_notify(), handle_rsp(), bt_att::in_req, bt_att::io, io_shutdown(), bt_att::mtu, opcode, util_debug(), and util_hexdump().
Referenced by bt_att_new().
|
static |
Definition at line 481 of file att.c.
References timeout_data::att, ATT_OP_TYPE_CMD, ATT_OP_TYPE_CONF, ATT_OP_TYPE_IND, ATT_OP_TYPE_NOT, ATT_OP_TYPE_REQ, ATT_OP_TYPE_RSP, ATT_OP_TYPE_UNKNOWN, ATT_TIMEOUT_INTERVAL, BT_ATT_OP_ERROR_RSP, bt_att::debug_callback, bt_att::debug_data, destroy_att_send_op(), timeout_data::id, bt_att::in_req, io_send(), new0, bt_att::pending_ind, bt_att::pending_req, pick_next_send_op(), timeout_add(), timeout_cb(), util_debug(), and util_hexdump().
Referenced by wakeup_writer().
|
static |
Definition at line 249 of file att.c.
References att_send_op::callback, att_send_op::destroy, and att_send_op::user_data.
Referenced by bt_att_cancel(), and bt_att_cancel_all().
|
static |
Definition at line 617 of file att.c.
References BT_ATT_ERROR_AUTHENTICATION, BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION, bt_att_get_security(), BT_ATT_SECURITY_AUTO, BT_ATT_SECURITY_HIGH, BT_ATT_SECURITY_MEDIUM, and bt_att_set_security().
Referenced by handle_error_rsp().
|
static |
Definition at line 354 of file att.c.
References ATT_OP_TYPE_IND, ATT_OP_TYPE_REQ, ATT_OP_TYPE_UNKNOWN, att_send_op::callback, att_send_op::destroy, encode_pdu(), get_op_type(), new0, opcode, att_send_op::opcode, att_send_op::type, and att_send_op::user_data.
Referenced by bt_att_send().
|
static |
Definition at line 293 of file att.c.
References att_disconn::destroy, and att_disconn::user_data.
Referenced by bt_att_unregister_all(), and bt_att_unregister_disconnect().
|
static |
Definition at line 267 of file att.c.
References att_notify::destroy, and att_notify::user_data.
Referenced by bt_att_unregister(), and bt_att_unregister_all().
|
static |
destroy att send operation calls the destroy callback with user_data as an argument free pdu data
data | att_send_op pointer |
Definition at line 235 of file att.c.
References att_send_op::destroy, att_send_op::pdu, att_send_op::timeout_id, timeout_remove(), and att_send_op::user_data.
Referenced by bt_att_cancel(), bt_att_cancel_all(), bt_att_free(), can_write_data(), handle_conf(), handle_rsp(), and timeout_cb().
|
static |
Definition at line 571 of file att.c.
References att_disconn::callback, PTR_TO_INT, att_disconn::removed, and att_disconn::user_data.
Referenced by disconnect_cb().
|
static |
Definition at line 583 of file att.c.
References bt_att_cancel_all(), bt_att_ref(), bt_att_unref(), bt_att_unregister_all(), bt_att::debug_callback, bt_att::debug_data, disconn_handler(), bt_att::disconn_list, bt_att::fd, INT_TO_PTR, bt_att::io, io_destroy(), queue_foreach(), and util_debug().
Referenced by bt_att_new().
|
static |
Definition at line 311 of file att.c.
References ATT_OP_SIGNED_MASK, BT_ATT_SIGNATURE_LEN, bt_crypto_sign_att(), sign_info::counter, bt_att::crypto, bt_att::debug_callback, bt_att::debug_data, sign_info::key, att_send_op::len, bt_att::local_sign, bt_att::mtu, att_send_op::opcode, att_send_op::pdu, sign_info::user_data, and util_debug().
Referenced by create_att_send_op().
|
static |
Definition at line 174 of file att.c.
References ATT_OP_TYPE_UNKNOWN, and att_opcode_type_table.
Referenced by can_read_data(), create_att_send_op(), handle_notify(), and opcode_match().
|
static |
Definition at line 204 of file att.c.
References att_req_rsp_mapping_table.
Referenced by handle_rsp().
|
static |
Definition at line 726 of file att.c.
References BT_ATT_OP_HANDLE_VAL_CONF, att_send_op::callback, bt_att::debug_callback, bt_att::debug_data, destroy_att_send_op(), bt_att::io, io_shutdown(), bt_att::pending_ind, att_send_op::user_data, util_debug(), and wakeup_writer().
Referenced by can_read_data().
|
static |
Definition at line 637 of file att.c.
References change_security(), bt_att::debug_callback, bt_att::debug_data, bt_att_pdu_error_rsp::ecode, bt_att_pdu_error_rsp::opcode, bt_att::pending_req, queue_push_head(), bt_att::req_queue, and util_debug().
Referenced by handle_rsp().
|
static |
Definition at line 817 of file att.c.
References ATT_OP_SIGNED_MASK, ATT_OP_TYPE_REQ, bt_att_ref(), BT_ATT_SIGNATURE_LEN, bt_att_unref(), att_notify::callback, queue_entry::data, bt_att::ext_signed, get_op_type(), handle_signed(), queue_entry::next, bt_att::notify_list, att_notify::opcode, opcode_match(), queue_get_entries(), queue_isempty(), respond_not_supported(), and att_notify::user_data.
Referenced by can_read_data().
|
static |
Definition at line 665 of file att.c.
References BT_ATT_OP_ERROR_RSP, att_send_op::callback, bt_att::debug_callback, bt_att::debug_data, destroy_att_send_op(), get_req_opcode(), handle_error_rsp(), bt_att::io, io_shutdown(), opcode, att_send_op::opcode, att_send_op::pdu, bt_att::pending_req, req_opcode, rsp_opcode, att_send_op::user_data, util_debug(), and wakeup_writer().
Referenced by can_read_data().
|
static |
Definition at line 780 of file att.c.
References BT_ATT_SIGNATURE_LEN, bt_crypto_sign_att(), sign_info::counter, bt_att::crypto, bt_att::debug_callback, bt_att::debug_data, get_le32(), sign_info::key, bt_att::remote_sign, sign_info::user_data, and util_debug().
Referenced by handle_notify().
|
static |
Definition at line 935 of file att.c.
References AF_BLUETOOTH, and BTPROTO_L2CAP.
Referenced by bt_att_new().
|
static |
Definition at line 303 of file att.c.
References att_disconn::id, and PTR_TO_UINT.
Referenced by bt_att_unregister_disconnect().
|
static |
Definition at line 277 of file att.c.
References att_notify::id, and PTR_TO_UINT.
Referenced by bt_att_unregister().
|
static |
Definition at line 1270 of file att.c.
References att_send_op::id, and PTR_TO_UINT.
Referenced by bt_att_cancel().
|
static |
Definition at line 757 of file att.c.
References ATT_OP_TYPE_CMD, ATT_OP_TYPE_REQ, BT_ATT_ALL_REQUESTS, and get_op_type().
Referenced by handle_notify().
|
static |
Definition at line 403 of file att.c.
References bt_att::ind_queue, bt_att::pending_ind, bt_att::pending_req, queue_pop_head(), bt_att::req_queue, and bt_att::write_queue.
Referenced by can_write_data().
|
static |
Definition at line 768 of file att.c.
References BT_ATT_ERROR_REQUEST_NOT_SUPPORTED, BT_ATT_OP_ERROR_RSP, bt_att_send(), bt_att_pdu_error_rsp::ecode, bt_att_pdu_error_rsp::handle, bt_att_pdu_error_rsp::opcode, and opcode.
Referenced by handle_notify().
|
static |
Definition at line 1490 of file att.c.
Referenced by bt_att_set_local_key(), and bt_att_set_remote_key().
|
static |
Definition at line 438 of file att.c.
References timeout_data::att, bt_att::debug_callback, bt_att::debug_data, destroy_att_send_op(), att_send_op::id, timeout_data::id, bt_att::io, io_shutdown(), att_send_op::opcode, bt_att::pending_ind, bt_att::pending_req, bt_att::timeout_callback, bt_att::timeout_data, att_send_op::timeout_id, timeout_data::user_data, and util_debug().
Referenced by can_write_data().
|
static |
Definition at line 550 of file att.c.
References can_write_data(), bt_att::ind_queue, bt_att::io, io_set_write_handler(), bt_att::pending_ind, bt_att::pending_req, queue_isempty(), bt_att::req_queue, bt_att::write_queue, write_watch_destroy(), and bt_att::writer_active.
Referenced by bt_att_cancel(), bt_att_send(), handle_conf(), and handle_rsp().
|
static |
Definition at line 474 of file att.c.
References bt_att::writer_active.
Referenced by wakeup_writer().
const { ... } att_opcode_type_table[] |
Referenced by get_op_type().
const { ... } att_req_rsp_mapping_table[] |
Referenced by get_req_opcode().
uint8_t opcode |
Definition at line 140 of file att.c.
Referenced by bt_att_register(), bt_att_send_error_rsp(), can_read_data(), create_att_send_op(), handle_rsp(), hci_filter_set_opcode(), hci_send_req(), respond_not_supported(), and result_create().
uint8_t req_opcode |
Definition at line 187 of file att.c.
Referenced by handle_rsp().
uint8_t rsp_opcode |
Definition at line 188 of file att.c.
Referenced by handle_rsp().
enum att_op_type type |
Definition at line 141 of file att.c.
Referenced by gatt_db_find_by_type(), gatt_db_find_by_type_value(), gatt_db_insert_service(), gatt_db_read_by_type(), gatt_db_service_create(), hci_le_add_resolving_list(), hci_le_add_white_list(), hci_le_rm_resolving_list(), hci_le_rm_white_list(), hci_le_set_scan_parameters(), hci_read_transmit_power_level(), hci_send_cmd(), hci_write_inquiry_scan_type(), and new_attribute().