This repository is a simple example of setting rate of the host by using bindgen to call C lib libnl3.
sudo apt install libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libnfnetlink-dev
make
: compile the static lib (lib_setrate.a) and runcargo build
. This command will generate a executable file named rust_call_libnl in directory(target/build).sudo ./target/build/rust_call_libnl
: require the user to set a rate and a bucket size, and then set it.tc qdisc show
: you will see the qdisc you set just now.
make clean
: clean all the stuff that the commands above generate.