ble_l2cap_rx() function
Processes an incoming L2CAP fragment.
Arguments
conn
The connection the L2CAP fragment was sent over.
hci_hdr
The ACL data header that was at the start of the L2CAP fragment. This header has been stripped from the mbuf parameter.
om
An mbuf containing the L2CAP data. If this is the first fragment, the L2CAP header is at the start of the mbuf. For subsequent fragments, the mbuf starts with L2CAP payload data.
out_rx_cb
If a full L2CAP packet has been received, a pointer to the appropriate handler gets written here. The caller should pass the receive buffer to this callback.
out_reject_cid
Indicates whether an L2CAP Command Reject command should be sent. If this equals -1, no reject should get sent. Otherwise, the value indicates the CID that the outgoing reject should specify.
Return value
0 if a complete L2CAP packet has been received. BLE_HS_EAGAIN if a partial L2CAP packet has been received; more fragments are expected. Other value on error.