Crate netlink_tc
source ·Expand description
netlink-tc
netlink-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.
Example
use netlink_tc as tc;
fn main() {
// Get list of qdiscs
let qdiscs = tc::qdiscs().unwrap();
// Get list of classes
let classes = tc::classes().unwrap();
// Get class for given interface
let class = tc::class("eth0").unwrap();
}Re-exports
pub use types::*;
Modules
Structs
- Defined in
include/uapi/linux/sch_fq_codel.c. - Defined in
include/uapi/linux/pkt_sched.hasstruct tc_fq_codel_xstats. - Defined in
include/uapi/linux/pkt_sched.h. - Defined in
include/uapi/linux/pkt_sched.hasstruct tc_htb_glob. - Defined in
include/uapi/linux/pkt_sched.hasstruct tc_htb_opt. - Defined in
include/uapi/linux/pkt_sched.hasstruct tc_htb_xstats. - A struct for communicating with the kernel via netlink.
Enums
Traits
- A trait for a netlink connection.
Functions
- Get list of all
tcclasses for a given interface. - Get list of all
tcclasses for a given interface index. - Get list of all
tcclasses. - Get list of all
tcqdiscs. - Get list of all
tcqdiscs and classes.