Skip to content

icorderi/rust-ifaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rust bindings to retrieve network interface information

This library contains functionality to retrieve network interface information on Linux machines.

Example usage

See src/bin/ifaces.rs for an example of printing out network interfaces on a machine:

extern crate "rust-ifaces" as ifaces;

fn main () {
    for iface in
        ifaces::Interface::get_all().unwrap()
            .into_iter()
            .filter(|x| x.kind == ifaces::Kind::Packet) {
                println!("{}", iface.name);
            }
}

On my machine, this prints out:

$ target/ifaces
lo
eth0
wlan0
docker0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%