I have been trying to add qdiscs and filters on an interface, and I can successfully do so by calling the tc command on the terminal. I can also achieve what I want by calling system(tc...) in my cpp program.
However, calling the system() command is obviously bad practice, so I have been trying to programmatically add qdiscs and filters to an interface. I have looked at the iproute2 source code, and tc_qdisc_modify() seems to be the best match for what I want to do. However, I can't understand how to include the package to my project. I had been advised to use the rtnetlink package to do this, but I tried reading the manual and wasn't able to wrap my head around that either.
Any help about this would be much appreciated, thanks!