⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module l2cap

Module l2cap 

Source
Expand description

Bluetooth L2CAP (Logical Link Control and Adaptation Protocol)

Implements the L2CAP layer for Bluetooth, providing connection-oriented and connectionless data transport between upper-layer protocols and the HCI/baseband layer. Supports segmentation and reassembly (SAR), MTU negotiation, and signaling command processing.

Reference: Bluetooth Core Specification v5.4, Volume 3, Part A (L2CAP)

Structs§

L2capChannel
An L2CAP logical channel
L2capManager
L2CAP connection and channel manager
L2capPdu
L2CAP Protocol Data Unit
SarFragment
A single SAR fragment
SignalingCommand
L2CAP signaling command (within the signaling channel)

Enums§

ChannelState
L2CAP channel state
ConfigResult
L2CAP Configuration Response result codes
ConnectionResult
L2CAP Connection Response result codes
SignalingCode
L2CAP signaling command codes

Constants§

CID_ATT
L2CAP ATT fixed channel (CID 0x0004)
CID_CONNECTIONLESS
L2CAP Connectionless channel (CID 0x0002)
CID_DYNAMIC_END
Last dynamically allocated CID
CID_DYNAMIC_START
First dynamically allocated CID
CID_LE_SIGNALING
L2CAP LE Signaling channel (CID 0x0005)
CID_SIGNALING
L2CAP Signaling channel (CID 0x0001)
CID_SMP
L2CAP SMP channel (CID 0x0006)
L2CAP_DEFAULT_MTU
Default L2CAP MTU
L2CAP_HEADER_SIZE
L2CAP header size (length + CID)
L2CAP_MAX_PAYLOAD
Maximum L2CAP payload size (before segmentation)
L2CAP_MIN_MTU
Minimum L2CAP MTU
PSM_AVCTP
AVCTP PSM (Audio/Video Control Transport Protocol)
PSM_AVDTP
AVDTP PSM (Audio/Video Distribution Transport Protocol)
PSM_BNEP
BNEP (Bluetooth Network Encapsulation Protocol) PSM
PSM_HID_CONTROL
HID Control PSM
PSM_HID_INTERRUPT
HID Interrupt PSM
PSM_RFCOMM
RFCOMM PSM
PSM_SDP
SDP PSM

Functions§

reassemble_fragments
Reassemble fragments into a complete L2CAP payload
segment_data
Segment data into MTU-sized L2CAP PDU fragments