Crates.io | netlink-tc |
lib.rs | netlink-tc |
version | 0.0.4 |
source | src |
created_at | 2023-10-23 20:52:34.544916 |
updated_at | 2023-10-30 20:09:25.896137 |
description | A Rust library for interacting with the Linux Traffic Control (tc) subsystem using Netlink |
homepage | |
repository | https://github.com/mmynk/rust-tc |
max_upload_size | |
id | 1011745 |
size | 91,764 |
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_tc as tc;
fn main() {
// Get list of qdiscs
let qdiscs = tc::qdiscs::<tc::Netlink>().unwrap();
// Get list of classes
let classes = tc::classes::<tc::Netlink>().unwrap();
// Get class for given interface
let class = tc::class::<tc::Netlink>("eth0").unwrap();
}
Licensed under either of
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.