rust-tc
provides a pure Rust API for interacting with the netlink based Linux Traffic Control (tc
) subsystem of rtnetlink
.
This library is very much in progress. It only supports a small subset of classless
and classful
qdiscs. Also, the library only supports read at the moment.
use netlink_packet_core::NetlinkMessage;
use netlink_packet_route::RtnlMessage;
use netlink_tc as tc;
fn main() {
// Retrieve netlink messages using `netlink-packet-route`.
// See `examples` for more details.
let messages: Vec<NetlinkMessage<RtnlMessage>> = vec![]; // init with netlink messages
// Get list of tc qdiscs or classes
let qdiscs = OpenOptions::new()
.fail_on_unknown_attribute(false)
.fail_on_unknown_option(false)
.tc(messages)
.unwrap();
}
- Add support for all qdiscs and classes.
- Add support for write, update and delete.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.