Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
bt_l2cap_server Struct Reference

L2CAP Server structure. More...

#include <l2cap.h>

Data Fields

uint16_t psm
 Server PSM. More...
 
bt_security_t sec_level
 
int(* accept )(struct bt_conn *conn, struct bt_l2cap_chan **chan)
 Server accept callback. More...
 
sys_snode_t node
 

Detailed Description

L2CAP Server structure.

Field Documentation

◆ accept

int(* bt_l2cap_server::accept) (struct bt_conn *conn, struct bt_l2cap_chan **chan)

Server accept callback.

This callback is called whenever a new incoming connection requires authorization.

Parameters
connThe connection that is requesting authorization
chanPointer to received the allocated channel
Returns
0 in case of success or negative value in case of error.
-ENOMEM if no available space for new channel.
-EACCES if application did not authorize the connection.
-EPERM if encryption key size is too short.

◆ node

sys_snode_t bt_l2cap_server::node

◆ psm

uint16_t bt_l2cap_server::psm

Server PSM.

Possible values: 0 A dynamic value will be auto-allocated when bt_l2cap_server_register() is called.

0x0001-0x007f Standard, Bluetooth SIG-assigned fixed values.

0x0080-0x00ff Dynamically allocated. May be pre-set by the application before server registration (not recommended however), or auto-allocated by the stack if the app gave 0 as the value.

◆ sec_level

bt_security_t bt_l2cap_server::sec_level

Required minimum security level


The documentation for this struct was generated from the following file: