nell

Crates.ionell
lib.rsnell
version0.3.0
sourcesrc
created_at2018-03-13 18:47:02.745715
updated_at2020-06-07 04:21:39.740103
descriptionLinux netlink interface
homepage
repository
max_upload_size
id55402
size126,067
Will Glozer (wg)

documentation

README

nell - Linux netlink interface

nell provides a Rust interface to the Linux netlink subsystem including both low level messaging and a higher level API for accessing link, address, and routing information, socket diag info, etc.

Example

let mut sock = Socket::new(Family::ROUTE)?;

let mut msg = Message::<rtgenmsg>::new(RTM_GETLINK);
msg.set_flags(NLM_F_REQUEST | NLM_F_DUMP);
msg.rtgen_family = AF_UNSPEC;
sock.send(&msg)?;

while let Msg(msg) = sock.recv::<ifinfomsg>()? {
    let link = link(&msg)?;
    println!("{:?}", link);
}

License

Copyright (C) 2017 - Will Glozer

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Commit count: 0

cargo fmt