9#ifndef ZEPHYR_INCLUDE_BLUETOOTH_GOEP_H_
10#define ZEPHYR_INCLUDE_BLUETOOTH_GOEP_H_
183#define BT_GOEP_INIT_V1(_goep, _v1) \
185 BUILD_ASSERT(SAME_TYPE(*(_goep), struct bt_goep) && \
186 SAME_TYPE(*(_v1), struct bt_goep_transport_v1), \
187 "pointer type mismatch in BT_GOEP_INIT_V1"); \
188 (_v1)->goep = (_goep); \
189 (_goep)->v1 = (_v1); \
190 (_goep)->v2 = NULL; \
208#define BT_GOEP_INIT_V2(_goep, _v2) \
210 BUILD_ASSERT(SAME_TYPE(*(_goep), struct bt_goep) && \
211 SAME_TYPE(*(_v2), struct bt_goep_transport_v2), \
212 "pointer type mismatch in BT_GOEP_INIT_V2"); \
213 (_v2)->goep = (_goep); \
214 (_goep)->v2 = (_v2); \
215 (_goep)->v1 = NULL; \
Bluetooth subsystem core APIs.
Bluetooth connection handling.
long atomic_t
Atomic integer variable.
Definition atomic_types.h:31
int bt_goep_transport_l2cap_connect(struct bt_conn *conn, struct bt_goep *goep, uint16_t psm)
Connect GOEP transport over L2CAP.
int bt_goep_transport_l2cap_disconnect(struct bt_goep *goep)
Disconnect GOEP transport from L2CAP channel.
int bt_goep_transport_l2cap_server_register(struct bt_goep_transport_l2cap_server *server)
Register GOEP L2CAP server.
int bt_goep_transport_rfcomm_disconnect(struct bt_goep *goep)
Disconnect GOEP transport from RFCOMM.
int bt_goep_transport_rfcomm_server_register(struct bt_goep_transport_rfcomm_server *server)
Register GOEP RFCOMM server.
int bt_goep_transport_rfcomm_connect(struct bt_conn *conn, struct bt_goep *goep, uint8_t channel)
Connect GOEP transport over RFCOMM.
bt_goep_transport_state
Life-span states of GOEP transport.
Definition goep.h:114
struct net_buf * bt_goep_create_pdu(struct bt_goep *goep, struct net_buf_pool *pool)
Allocate the buffer from given pool after reserving head room for GOEP.
@ BT_GOEP_TRANSPORT_CONNECTING
GOEP in connecting state.
Definition goep.h:118
@ BT_GOEP_TRANSPORT_DISCONNECTING
GOEP in disconnecting state.
Definition goep.h:122
@ BT_GOEP_TRANSPORT_DISCONNECTED
GOEP disconnected.
Definition goep.h:116
@ BT_GOEP_TRANSPORT_CONNECTED
GOEP ready for upper layer traffic on it.
Definition goep.h:120
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:42
Bluetooth L2CAP handling.
Bluetooth RFCOMM handling.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Opaque type representing a connection to a remote device.
GOEP Server structure for GOEP v2.0 and later.
Definition goep.h:345
struct bt_l2cap_server l2cap
L2CAP PSM for GOEP v2.0 and later.
Definition goep.h:358
int(* accept)(struct bt_conn *conn, struct bt_goep_transport_l2cap_server *server, struct bt_goep **goep)
Server accept callback.
Definition goep.h:392
sys_snode_t node
Definition goep.h:395
GOEP transport operations structure.
Definition goep.h:40
void(* connected)(struct bt_conn *conn, struct bt_goep *goep)
GOEP transport connected callback.
Definition goep.h:49
void(* disconnected)(struct bt_goep *goep)
GOEP transport disconnected callback.
Definition goep.h:58
GOEP Server structure GOEP v1.1.
Definition goep.h:225
sys_snode_t node
Definition goep.h:273
int(* accept)(struct bt_conn *conn, struct bt_goep_transport_rfcomm_server *server, struct bt_goep **goep)
Server accept callback.
Definition goep.h:270
struct bt_rfcomm_server rfcomm
RFCOMM server for GOEP v1.1.
Definition goep.h:236
GOEP v1.1 structure.
Definition goep.h:62
struct bt_rfcomm_dlc dlc
RFCOMM DLC used for transport.
Definition goep.h:64
struct bt_goep * goep
Back-pointer to parent GOEP object.
Definition goep.h:73
GOEP v2 structure.
Definition goep.h:77
struct bt_goep * goep
Back-pointer to parent GOEP object.
Definition goep.h:88
struct bt_l2cap_br_chan chan
L2CAP BR/EDR channel used for transport.
Definition goep.h:79
GOEP transport unified structure.
Definition goep.h:92
struct bt_goep_transport_v2 v2
GOEP v2 transport.
Definition goep.h:96
struct bt_goep_transport_v1 v1
GOEP v1.1 transport.
Definition goep.h:94
GOEP structure.
Definition goep.h:138
struct bt_goep_transport_v2 * v2
To be used for transport v2.
Definition goep.h:149
struct bt_obex obex
OBEX object.
Definition goep.h:165
struct bt_goep_transport_v1 * v1
To be used for transport v1.
Definition goep.h:143
const struct bt_goep_transport_ops * transport_ops
GOEP transport operations.
Definition goep.h:162
BREDR L2CAP Channel structure.
Definition l2cap.h:512
L2CAP Server structure.
Definition l2cap.h:799
OBEX structure.
Definition obex.h:585
RFCOMM DLC structure.
Definition rfcomm.h:112
Network buffer pool representation.
Definition net_buf.h:1151
Network buffer representation.
Definition net_buf.h:1015