pub fn mux_path(physical: &str, dlci: u8) -> String {
format!("{physical}#dlci={dlci}")
}
pub fn is_data_dlci(dlci: u8) -> bool {
(1..=63).contains(&dlci)
}
pub fn parse_mux_path(path: &str) -> Option<(&str, u8)> {
let (base, dlci_str) = path.rsplit_once("#dlci=")?;
dlci_str
.parse()
.ok()
.filter(|&d| is_data_dlci(d))
.map(|dlci| (base, dlci))
}