Giter Site home page Giter Site logo

rust-ifaces's Introduction

Rust bindings to retrieve network interface information

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

Example usage

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

extern crate ifaces;

fn main () {
    for iface in
        ifaces::Interface::get_all().unwrap()
            .into_iter() {
                println!("{}\t{:?}\t{:?}", iface.name, iface.kind, iface.addr);
            }
}

On my machine, this prints out:

$ cargo run --example ifaces
lo0	Ipv6	Some(V6([::1]:0))
lo0	Ipv4	Some(V4(127.0.0.1:0))
lo0	Ipv6	Some(V6([fe80::1]:0))
en5	Ipv4	Some(V4(192.168.168.133:0))

rust-ifaces's People

Contributors

dlevy47 avatar icorderi avatar misuzu avatar steveklabnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rust-ifaces's Issues

Pushed to Crates.io

I took the liberty to push this crate to crates.io given that the owner (@dlevy47) doesn't seem to be around.
If the owner comes back I'll be happy to pass ownership of the crate to him.

I'm cc'ing everyone with a fork on the original project or that contributed to the forks.
cc: @andrew-d, @misuzu, @steveklabnik

Details on the current state of the project

The initial state of the publish is a fork from @misuzu that has the project working on the latest nightly.

@andrew-d, let me know if you want to rebase your changes on the current master or if you want me to do it. You change to make it build on stable is a very good contribution.

To the community:
I'm honestly not sure what is the "right" way to take over a project that's been somewhat abandoned. So I apologize in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.