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

L2capChannel

Struct L2capChannel 

Source
pub struct L2capChannel {
    pub local_cid: u16,
    pub remote_cid: u16,
    pub state: ChannelState,
    pub psm: u16,
    pub mtu: u16,
    pub remote_mtu: u16,
    pub flush_timeout: u16,
    pub local_config_done: bool,
    pub remote_config_done: bool,
    pub hci_handle: u16,
    pub reassembly_buf: Vec<u8>,
    pub reassembly_expected: u16,
}
Expand description

An L2CAP logical channel

Fields§

§local_cid: u16

Local Channel ID

§remote_cid: u16

Remote Channel ID (assigned by peer)

§state: ChannelState

Current channel state

§psm: u16

Protocol/Service Multiplexer (identifies upper layer)

§mtu: u16

Maximum Transmission Unit (negotiated)

§remote_mtu: u16

Remote peer’s MTU

§flush_timeout: u16

Flush timeout in milliseconds (0xFFFF = infinite)

§local_config_done: bool

Whether local configuration is complete

§remote_config_done: bool

Whether remote configuration is complete

§hci_handle: u16

HCI connection handle this channel belongs to

§reassembly_buf: Vec<u8>

Reassembly buffer for incoming fragments

§reassembly_expected: u16

Expected total length for reassembly

Implementations§

Source§

impl L2capChannel

Source

pub fn new(local_cid: u16, psm: u16, hci_handle: u16) -> Self

Create a new L2CAP channel

Source

pub fn is_open(&self) -> bool

Check if the channel is open for data transfer

Source

pub fn is_configured(&self) -> bool

Check if both sides have completed configuration

Trait Implementations§

Source§

impl Clone for L2capChannel

Source§

fn clone(&self) -> L2capChannel

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for L2capChannel

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for L2capChannel

§

impl RefUnwindSafe for L2capChannel

§

impl Send for L2capChannel

§

impl Sync for L2capChannel

§

impl Unpin for L2capChannel

§

impl UnwindSafe for L2capChannel

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.