systemconfiguration-rs 0.5.3

Safe Rust bindings for Apple's SystemConfiguration framework via a Swift bridge on macOS
Documentation
1
2
3
4
5
6
7
8
9
10
use systemconfiguration::NetworkConfiguration;

#[test]
fn network_configuration_overview_exposes_type_maps() -> Result<(), Box<dyn std::error::Error>> {
    let overview = NetworkConfiguration::overview()?;
    assert!(overview.interface_types.contains_key("Ethernet"));
    assert!(overview.protocol_types.contains_key("IPv4"));
    assert!(overview.interface_count > 0);
    Ok(())
}