eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
358 stars 105 forks source link

feat: add initial implementation for parsing /proc/net/netstat #304

Open etolbakov opened 5 months ago

etolbakov commented 5 months ago

Description

added parsing for /proc/net/netstat

How was this PR tested?

added a unit test

Related issues

https://github.com/eminence/procfs/issues/295

etolbakov commented 5 months ago

@eminence Could you please take a look at the change when you have time? Looking forward getting feedback.

1) I've noticed the comment in net.rs so maybe the code should be moved there. I decided to come up with a dedicated file to make a review process simpler. 2) some of the comments still have TODO, I haven't found any meaningful description for them.

etolbakov commented 5 months ago

Hi Andrew @eminence Thanks for taking a look at the PR! I'll address the suggestions shortly

etolbakov commented 4 months ago

Hello Andrew @eminence ! Could you please let me know if anything else needed in the scope of this PR?

eminence commented 4 months ago

We still have to fix the issue about fields that are only in newer kernels. These should become Option fields in Netstat struct

etolbakov commented 4 months ago

Thanks understood, will adjust! I wonder if you had time to get outputs from older kernels for tests?