Skip to main content

make_interface_name

Function make_interface_name 

Source
pub fn make_interface_name(parts: &[&str], suffix: &str) -> String
Expand description

Generate a Linux-safe interface name guaranteed to be <= 15 chars.

Joins the parts with - after a "zl-" prefix and appends -{suffix} if non-empty. When the result exceeds 15 characters, a deterministic hash of all parts is used instead to keep the name unique and within the kernel limit.