Skip to main content

mtu

Function mtu 

Source
pub fn mtu(_iface: &Iface) -> Mtu
Expand description

Read the MTU configured for the provided interface.

Linux reads /sys/class/net/<iface>/mtu, Windows GetIfEntry2, macOS the link-layer entry’s if_data.ifi_mtu from getifaddrs(3). Anything else, or a failed lookup, is Mtu::Assumed at ASSUMED_MTU.