7 unstable releases (3 breaking)

0.3.0 Jun 7, 2020
0.2.0 Nov 4, 2019
0.1.0 Nov 3, 2019
0.0.3 Jul 11, 2018
0.0.0 Mar 13, 2018

#11 in #msg

25 downloads per month

GPL-3.0 license

80KB
2.5K SLoC

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/.

Dependencies

~230KB