Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 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

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages