aya-rs / book

The Aya Book is an introductory book about using the Rust Programming Language and Aya library to build extended Berkley Packet Filter (eBPF) programs.
https://aya-rs.dev/book/
Apache License 2.0
82 stars 60 forks source link

add unloading of classifier on exit / in the Ctrl-C handler #12

Open dmitris opened 3 years ago

dmitris commented 3 years ago

For the tc examples, it would be nice to add code showing how to unload the attached tc classifier - equivalent of sudo tc qdisc del dev eth0 clsact - to make it possible to run the program multiple times in a row without having to resort to the manual tc command.