![]()
![]()
#define L2CAP_H
![]()
![]()
#include "hci.h"
![]()
![]()
#include "l2cap_signaling.h"
![]()
![]()
#include "btstack_util.h"
![]()
![]()
#include "bluetooth.h"
![]()
![]()
#define L2CAP_LE_AUTOMATIC_CREDITS
![]()
![]()
L2CAP_STATE
![]()
![]()
L2CAP_STATE_CLOSED
![]()
![]()
L2CAP_STATE_WILL_SEND_CREATE_CONNECTION
![]()
![]()
L2CAP_STATE_WAIT_CONNECTION_COMPLETE
![]()
![]()
L2CAP_STATE_WAIT_REMOTE_SUPPORTED_FEATURES
![]()
![]()
L2CAP_STATE_WAIT_INCOMING_SECURITY_LEVEL_UPDATE
![]()
![]()
L2CAP_STATE_WAIT_OUTGOING_SECURITY_LEVEL_UPDATE
![]()
![]()
L2CAP_STATE_WAIT_INCOMING_EXTENDED_FEATURES
![]()
![]()
L2CAP_STATE_WAIT_OUTGOING_EXTENDED_FEATURES
![]()
![]()
L2CAP_STATE_WAIT_CLIENT_ACCEPT_OR_REJECT
![]()
![]()
L2CAP_STATE_WAIT_CONNECT_RSP
![]()
![]()
L2CAP_STATE_CONFIG
![]()
![]()
L2CAP_STATE_OPEN
![]()
![]()
L2CAP_STATE_WAIT_DISCONNECT
![]()
![]()
L2CAP_STATE_WILL_SEND_CONNECTION_REQUEST
![]()
![]()
L2CAP_STATE_WILL_SEND_CONNECTION_RESPONSE_INSUFFICIENT_SECURITY
![]()
![]()
L2CAP_STATE_WILL_SEND_CONNECTION_RESPONSE_DECLINE
![]()
![]()
L2CAP_STATE_WILL_SEND_CONNECTION_RESPONSE_ACCEPT
![]()
![]()
L2CAP_STATE_WILL_SEND_DISCONNECT_REQUEST
![]()
![]()
L2CAP_STATE_WILL_SEND_DISCONNECT_RESPONSE
![]()
![]()
L2CAP_STATE_WILL_SEND_LE_CONNECTION_REQUEST
![]()
![]()
L2CAP_STATE_WILL_SEND_LE_CONNECTION_RESPONSE_DECLINE
![]()
![]()
L2CAP_STATE_WILL_SEND_LE_CONNECTION_RESPONSE_ACCEPT
![]()
![]()
L2CAP_STATE_WAIT_LE_CONNECTION_RESPONSE
![]()
![]()
L2CAP_STATE_EMIT_OPEN_FAILED_AND_DISCARD
![]()
![]()
L2CAP_STATE_WILL_SEND_ENHANCED_CONNECTION_REQUEST
![]()
![]()
L2CAP_STATE_WAIT_ENHANCED_CONNECTION_RESPONSE
![]()
![]()
L2CAP_STATE_WILL_SEND_ENHANCED_CONNECTION_RESPONSE
![]()
![]()
L2CAP_STATE_WILL_SEND_EHNANCED_RENEGOTIATION_REQUEST
![]()
![]()
L2CAP_STATE_WAIT_ENHANCED_RENEGOTIATION_RESPONSE
![]()
![]()
L2CAP_STATE_INVALID
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_NONE
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_RCVD_CONF_REQ
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_RCVD_CONF_RSP
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_REQ
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SENT_CONF_REQ
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SENT_CONF_RSP
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_MTU
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_ERTM
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_CONT
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_INVALID
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_REJECTED
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_BASIC_FALLBACK_TRIED
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SEND_CONN_RESP_PEND
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_SENT_CONN_RESP_PEND
![]()
![]()
#define L2CAP_CHANNEL_STATE_VAR_INCOMING
![]()
![]()
l2cap_channel_type_t
![]()
![]()
L2CAP_CHANNEL_TYPE_CLASSIC
![]()
![]()
L2CAP_CHANNEL_TYPE_CONNECTIONLESS
![]()
![]()
L2CAP_CHANNEL_TYPE_CHANNEL_CBM
![]()
![]()
L2CAP_CHANNEL_TYPE_FIXED_LE
![]()
![]()
L2CAP_CHANNEL_TYPE_FIXED_CLASSIC
![]()
![]()
L2CAP_CHANNEL_TYPE_CHANNEL_ECBM
![]()
![]()
l2cap_segmentation_and_reassembly_t
![]()
![]()
L2CAP_SEGMENTATION_AND_REASSEMBLY_UNSEGMENTED_L2CAP_SDU
![]()
![]()
L2CAP_SEGMENTATION_AND_REASSEMBLY_START_OF_L2CAP_SDU
![]()
![]()
L2CAP_SEGMENTATION_AND_REASSEMBLY_END_OF_L2CAP_SDU
![]()
![]()
L2CAP_SEGMENTATION_AND_REASSEMBLY_CONTINUATION_OF_L2CAP_SDU
![]()
![]()
l2cap_ertm_rx_packet_state_t
![]()
![]()
sar
![]()
![]()
len
![]()
![]()
valid
![]()
![]()
l2cap_ertm_tx_packet_state_t
![]()
![]()
sar
![]()
![]()
len
![]()
![]()
tx_seq
![]()
![]()
retry_count
![]()
![]()
retransmission_requested
![]()
![]()
l2cap_ertm_config_t
![]()
![]()
ertm_mandatory
![]()
![]()
max_transmit
![]()
![]()
retransmission_timeout_ms
![]()
![]()
monitor_timeout_ms
![]()
![]()
local_mtu
![]()
![]()
num_tx_buffers
![]()
![]()
num_rx_buffers
![]()
![]()
fcs_option
![]()
![]()
l2cap_fixed_channel
![]()
![]()
item
![]()
![]()
channel_type
![]()
![]()
local_cid
![]()
![]()
packet_handler
![]()
![]()
waiting_for_can_send_now
![]()
![]()
l2cap_channel_t
![]()
![]()
item
![]()
![]()
channel_type
![]()
![]()
local_cid
![]()
![]()
packet_handler
![]()
![]()
waiting_for_can_send_now
![]()
![]()
rtx
![]()
![]()
state
![]()
![]()
state_var
![]()
![]()
con_handle
![]()
![]()
address
![]()
![]()
address_type
![]()
![]()
remote_sig_id
![]()
![]()
local_sig_id
![]()
![]()
remote_cid
![]()
![]()
local_mtu
![]()
![]()
remote_mtu
![]()
![]()
flush_timeout
![]()
![]()
psm
![]()
![]()
required_security_level
![]()
![]()
reason
![]()
![]()
unknown_option
![]()
![]()
receive_sdu_buffer
![]()
![]()
receive_sdu_len
![]()
![]()
receive_sdu_pos
![]()
![]()
send_sdu_buffer
![]()
![]()
send_sdu_len
![]()
![]()
send_sdu_pos
![]()
![]()
local_mps
![]()
![]()
remote_mps
![]()
![]()
credits_outgoing
![]()
![]()
new_credits_incoming
![]()
![]()
credits_incoming
![]()
![]()
automatic_credits
![]()
![]()
l2cap_service_t
![]()
![]()
item
![]()
![]()
psm
![]()
![]()
mtu
![]()
![]()
packet_handler
![]()
![]()
required_security_level
![]()
![]()
requires_authorization
![]()
![]()
l2cap_signaling_response
![]()
![]()
handle
![]()
![]()
sig_id
![]()
![]()
code
![]()
![]()
cid
![]()
![]()
data
![]()
![]()
l2cap_register_fixed_channel(btstack_packet_handler_t, uint16_t);
![]()
![]()
l2cap_can_send_fixed_channel_packet_now(hci_con_handle_t, uint16_t);
![]()
![]()
l2cap_request_can_send_fix_channel_now_event(hci_con_handle_t, uint16_t);
![]()
![]()
l2cap_send_connectionless(hci_con_handle_t, uint16_t, uint8_t *, uint16_t);
![]()
![]()
l2cap_send_prepared_connectionless(hci_con_handle_t, uint16_t, uint16_t);
![]()
![]()
l2cap_send_echo_request(hci_con_handle_t, uint8_t *, uint16_t);
![]()
![]()
l2cap_require_security_level_2_for_outgoing_sdp();
![]()
![]()
l2cap_can_send_prepared_packet_now(uint16_t);
![]()
![]()
#define PSM_SDP
![]()
![]()
#define PSM_RFCOMM
![]()
![]()
#define PSM_BNEP
![]()
![]()
#define PSM_HID_CONTROL
![]()
![]()
#define PSM_HID_INTERRUPT
![]()
![]()
#define PSM_ATT
![]()
![]()
#define PSM_IPSP
![]()
![]()
l2cap_init();
![]()
![]()
l2cap_add_event_handler(btstack_packet_callback_registration_t *);
![]()
![]()
l2cap_remove_event_handler(btstack_packet_callback_registration_t *);
![]()
![]()
l2cap_max_mtu();
![]()
![]()
l2cap_max_le_mtu();
![]()
![]()
l2cap_set_max_le_mtu(uint16_t);
![]()
![]()
l2cap_create_channel(btstack_packet_handler_t, uint8_t *, uint16_t, uint16_t, uint16_t *);
![]()
![]()
l2cap_disconnect(uint16_t);
![]()
![]()
l2cap_get_remote_mtu_for_local_cid(uint16_t);
![]()
![]()
l2cap_send(uint16_t, const uint8_t *, uint16_t);
![]()
![]()
l2cap_register_service(btstack_packet_handler_t, uint16_t, uint16_t, gap_security_level_t);
![]()
![]()
l2cap_unregister_service(uint16_t);
![]()
![]()
l2cap_accept_connection(uint16_t);
![]()
![]()
l2cap_decline_connection(uint16_t);
![]()
![]()
l2cap_can_send_packet_now(uint16_t);
![]()
![]()
l2cap_request_can_send_now_event(uint16_t);
![]()
![]()
l2cap_reserve_packet_buffer();
![]()
![]()
l2cap_get_outgoing_buffer();
![]()
![]()
l2cap_send_prepared(uint16_t, uint16_t);
![]()
![]()
l2cap_release_packet_buffer();
![]()
![]()
l2cap_ertm_create_channel(btstack_packet_handler_t, uint8_t *, uint16_t, l2cap_ertm_config_t *, uint8_t *, uint32_t, uint16_t *);
![]()
![]()
l2cap_ertm_accept_connection(uint16_t, l2cap_ertm_config_t *, uint8_t *, uint32_t);
![]()
![]()
l2cap_ertm_decline_connection(uint16_t);
![]()
![]()
l2cap_ertm_set_busy(uint16_t);
![]()
![]()
l2cap_ertm_set_ready(uint16_t);
![]()
![]()
l2cap_cbm_register_service(btstack_packet_handler_t, uint16_t, gap_security_level_t);
![]()
![]()
l2cap_cbm_unregister_service(uint16_t);
![]()
![]()
l2cap_cbm_accept_connection(uint16_t, uint8_t *, uint16_t, uint16_t);
![]()
![]()
l2cap_cbm_decline_connection(uint16_t, uint16_t);
![]()
![]()
l2cap_cbm_create_channel(btstack_packet_handler_t, hci_con_handle_t, uint16_t, uint8_t *, uint16_t, uint16_t, gap_security_level_t, uint16_t *);
![]()
![]()
l2cap_cbm_provide_credits(uint16_t, uint16_t);
![]()
![]()
l2cap_ecbm_register_service(btstack_packet_handler_t, uint16_t, uint16_t, gap_security_level_t, bool);
![]()
![]()
l2cap_ecbm_unregister_service(uint16_t);
![]()
![]()
l2cap_ecbm_mps_set_min(uint16_t);
![]()
![]()
l2cap_ecbm_mps_set_max(uint16_t);
![]()
![]()
l2cap_ecbm_create_channels(btstack_packet_handler_t, hci_con_handle_t, gap_security_level_t, uint16_t, uint8_t, uint16_t, uint16_t, uint8_t **, uint16_t *);
![]()
![]()
l2cap_ecbm_accept_channels(uint16_t, uint8_t, uint16_t, uint16_t, uint8_t **, uint16_t *);
![]()
![]()
l2cap_ecbm_decline_channels(uint16_t, uint16_t);
![]()
![]()
l2cap_ecbm_provide_credits(uint16_t, uint16_t);
![]()
![]()
l2cap_ecbm_request_can_send_now_event(uint16_t);
![]()
![]()
l2cap_ecbm_reconfigure_channels(uint8_t, uint16_t *, int16_t, uint8_t **);
![]()
![]()
l2cap_ecbm_trigger_pending_connection_responses(hci_con_handle_t);
![]()
![]()
l2cap_deinit();
![]()
![]()
l2cap_create_ertm_channel(btstack_packet_handler_t, uint8_t *, uint16_t, l2cap_ertm_config_t *, uint8_t *, uint32_t, uint16_t *);
![]()
![]()
l2cap_accept_ertm_connection(uint16_t, l2cap_ertm_config_t *, uint8_t *, uint32_t);
![]()
![]()
l2cap_le_register_service(btstack_packet_handler_t, uint16_t, gap_security_level_t);
![]()
![]()
l2cap_le_unregister_service(uint16_t);
![]()
![]()
l2cap_le_accept_connection(uint16_t, uint8_t *, uint16_t, uint16_t);
![]()
![]()
l2cap_le_decline_connection(uint16_t);
![]()
![]()
l2cap_le_create_channel(btstack_packet_handler_t, hci_con_handle_t, uint16_t, uint8_t *, uint16_t, uint16_t, gap_security_level_t, uint16_t *);
![]()
![]()
l2cap_le_provide_credits(uint16_t, uint16_t);
![]()
![]()
l2cap_le_can_send_now(uint16_t);
![]()
![]()
l2cap_le_request_can_send_now_event(uint16_t);
![]()
![]()
l2cap_le_send_data(uint16_t, const uint8_t *, uint16_t);
![]()
![]()
l2cap_le_disconnect(uint16_t);