Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
|
Fixed L2CAP Channel structure. More...
#include <zephyr/bluetooth/l2cap.h>
Data Fields | |
uint16_t | cid |
Channel Identifier (CID) | |
int(* | accept )(struct bt_conn *conn, struct bt_l2cap_chan **chan) |
Channel accept callback. |
Fixed L2CAP Channel structure.
Should be defined using the BT_L2CAP_FIXED_CHANNEL_DEFINE macro.
int(* bt_l2cap_fixed_chan::accept) (struct bt_conn *conn, struct bt_l2cap_chan **chan) |
Channel accept callback.
This callback needs to be provided by the application, and is invoked when a new connection has been established. If accepting the connection, the user is expected to allocate memory with suitable alignment for the type bt_l2cap_chan for the channel, and update the channel reference chan
to point to the allocated memory. The channel should be initialized by assigning the callbacks to the bt_l2cap_chan_ops field as follows:
The allocated context needs to be valid for the lifetime of the channel, i. e. freeing of the memory can be done in the bt_l2cap_chan_ops::released callback.
conn | The connection that has been established. |
chan | L2CAP channel reference. |
uint16_t bt_l2cap_fixed_chan::cid |
Channel Identifier (CID)