Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_goep_transport_l2cap_server Struct Reference

GOEP Server structure for GOEP v2.0 and later. More...

#include <zephyr/bluetooth/classic/goep.h>

Data Fields

struct bt_l2cap_server l2cap
 L2CAP PSM for GOEP v2.0 and later.
int(* accept )(struct bt_conn *conn, struct bt_goep_transport_l2cap_server *server, struct bt_goep **goep)
 Server accept callback.
sys_snode_t node

Detailed Description

GOEP Server structure for GOEP v2.0 and later.

Field Documentation

◆ accept

int(* bt_goep_transport_l2cap_server::accept) (struct bt_conn *conn, struct bt_goep_transport_l2cap_server *server, struct bt_goep **goep)

Server accept callback.

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

Before returning the callback, bt_goep::transport_ops should be initialized with valid address of type bt_goep_transport_ops object. The value of the field mtu of bt_obex::rx will be ignored. Instead, it will be assigned the value that be calculated based on CONFIG_BT_GOEP_L2CAP_MTU.

Warning
It is the responsibility of the caller to zero out the parent of the GOEP object.
Note
The accept callback must initialize the returned GOEP instance as follows:
Parameters
connThe connection that is requesting authorization.
serverPointer to the server structure this callback relates to.
goepPointer to received the allocated GOEP object.
Returns
0 in case of success or negative value in case of error.
-ENOMEM if no available space for new object.
-EACCES if application did not authorize the connection.
-EPERM if encryption key size is too short.

◆ l2cap

struct bt_l2cap_server bt_goep_transport_l2cap_server::l2cap

L2CAP PSM for GOEP v2.0 and later.

The bt_goep_transport_l2cap_server::l2cap is used to register a l2cap server.

The bt_l2cap_server::psm needs to be passed with a pre-set psm (not recommended however), Or give a value 0 to make the psm be auto-allocated when bt_goep_transport_l2cap_server_register is called. The bt_l2cap_server::sec_level is used to require minimum security level for l2cap server. The bt_l2cap_server::accept should be not used by GOEP application, and instead the bt_goep_transport_l2cap_server::accept will be used.

◆ node

sys_snode_t bt_goep_transport_l2cap_server::node

The documentation for this struct was generated from the following file:
  • zephyr/bluetooth/classic/goep.h