pub struct DLCI(_);
Expand description
Identifier for a direct link connection (DLC) between devices.
Use the provided u8::try_from
implementation to construct a valid DLCI.
The DLCI is 6 bits wide and is split into a direction bit and a 5-bit Server Channel number. DLCIs 1 and 62-63 are reserved and never used in RFCOMM. See RFCOMM 5.4.
Implementations§
source§impl DLCI
impl DLCI
sourcepub const MUX_CONTROL_DLCI: DLCI = _
pub const MUX_CONTROL_DLCI: DLCI = _
The control channel for the RFCOMM Multiplexer.
pub fn is_mux_control(&self) -> bool
pub fn is_user(&self) -> bool
sourcepub fn validate(&self, role: Role) -> Result<(), RfcommError>
pub fn validate(&self, role: Role) -> Result<(), RfcommError>
Returns Ok(()) if the DLCI belongs to the side of the session with the
given role
- this is only applicable to User DLCIs.
The DLCI space is divided into two equal parts. RFCOMM 5.2 states: “…this partitions the DLCI value space such that server applications on the non- initiating device are reachable on DLCIs 2,4,6,…,60, and server applications on the initiating device are reachable on DLCIs 3,5,7,…,61.”