Skip to content

This is a simple example of setting rate of the host by using bindgen to call libnl3.

Notifications You must be signed in to change notification settings

yue2388253/rust_call_libnl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust_call_libnl

This repository is a simple example of setting rate of the host by using bindgen to call C lib libnl3.

Prerequisite

sudo apt install libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libnfnetlink-dev

How to use this repo

  1. make : compile the static lib (lib_setrate.a) and run cargo build. This command will generate a executable file named rust_call_libnl in directory(target/build).
  2. sudo ./target/build/rust_call_libnl: require the user to set a rate and a bucket size, and then set it.
  3. tc qdisc show: you will see the qdisc you set just now.

make clean : clean all the stuff that the commands above generate.

About

This is a simple example of setting rate of the host by using bindgen to call libnl3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published