Skip to main content

list_interfaces

Function list_interfaces 

Source
pub fn list_interfaces() -> Result<HashMap<u32, Interface>, Error>
Expand description

Retrieve information about all enabled network interfaces and their IP addresses.

This is a once-off operation. If you want to detect changes over time, see watch_interfaces_with_callback, watch_interfaces_blocking, or watch_interfaces_async.