-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using neli to retrieve qdisc
information
#225
Comments
Looks like I was using the wrong protocol to connect:
|
Does neli have decoding support similar to pyroute2:decoder.py? |
What information are you looking to get out of the message? Are you looking to parse the route attributes? |
Thanks for the reply. That’s exactly what I’m trying to do, yes. |
Please see the examples directory for an example of how to use the API for route netlink. |
Those examples use // for stats64
let mut bytes = [0u8; 200];
buf.read_exact(&mut bytes);
// TODO: ??? Do I need to define the entire data structure of Stats for parsing this? |
Yes, you would need to define the data structure, implementing |
Is this a question about neli specifically? If so, please describe.
I'm trying to use
neli
to retrieveqdisc
information similar to thetc
binary, basically receive something similar to the output of this command:I used
strace
to debug thenetlink
commands and was trying to implement the same usingneli
. However, I couldn't really get it to work.Output: https://gist.github.com/mmynk/ca4327d659956405bf1a0302ab7fd182#file-tc-strace-log
Here's what I have so far: https://gist.github.com/mmynk/ca4327d659956405bf1a0302ab7fd182#file-tc_neli-rs
However, it runs into an error:
The text was updated successfully, but these errors were encountered: