Crate netlink_tc

Source
Expand description

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§

clsact
errors
fq_codel
htb
link
tc
types

Structs§

Clsact
FqCodel
Defined in include/uapi/linux/sch_fq_codel.c.
FqCodelXStats
Defined in include/uapi/linux/pkt_sched.h as struct tc_fq_codel_xstats.
Htb
Defined in include/uapi/linux/pkt_sched.h.
HtbGlob
Defined in include/uapi/linux/pkt_sched.h as struct tc_htb_glob.
HtbOpt
Defined in include/uapi/linux/pkt_sched.h as struct tc_htb_opt.
HtbXstats
Defined in include/uapi/linux/pkt_sched.h as struct tc_htb_xstats.
Netlink
A struct for communicating with the kernel via netlink.

Enums§

TcaFqCodel
TcaHtb

Traits§

NetlinkConnection
A trait for a netlink connection.

Functions§

class
Get list of all tc classes for a given interface.
class_for_index
Get list of all tc classes for a given interface index.
classes
Get list of all tc classes.
qdiscs
Get list of all tc qdiscs.
tc_stats
Get list of all tc qdiscs and classes.