netlink-tc

Crates.ionetlink-tc
lib.rsnetlink-tc
version0.0.4
sourcesrc
created_at2023-10-23 20:52:34.544916
updated_at2023-10-30 20:09:25.896137
descriptionA Rust library for interacting with the Linux Traffic Control (tc) subsystem using Netlink
homepage
repositoryhttps://github.com/mmynk/rust-tc
max_upload_size
id1011745
size91,764
Mohit Mayank (mmynk)

documentation

README

rust-tc

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.

Usage

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();
}

TODO

  • Add support for all qdiscs and classes.
  • Add support for write, update and delete.

License

Licensed under either of

at your option.

Contribution

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.

Commit count: 30

cargo fmt