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;
// 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();
Re-exports
pub use types::*;
Modules
Structs
- Defined in
include/uapi/linux/sch_fq_codel.c
. - Defined in
include/uapi/linux/pkt_sched.h
asstruct tc_fq_codel_xstats
. - Defined in
include/uapi/linux/pkt_sched.h
. - Defined in
include/uapi/linux/pkt_sched.h
asstruct tc_htb_glob
. - Defined in
include/uapi/linux/pkt_sched.h
asstruct tc_htb_opt
. - Defined in
include/uapi/linux/pkt_sched.h
asstruct 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
tc
classes for a given interface. - Get list of all
tc
classes for a given interface index. - Get list of all
tc
classes. - Get list of all
tc
qdiscs. - Get list of all
tc
qdiscs and classes.