ifconfig.c -- parsing a specific piece of data
Hello all,
So I've been trying to make an tiny linux application that parses the RX bytes and TX bytes of an interface.
So as of right now my small application calls ifconfig every 0.5 seconds and just parses ASCII data, which is slow and costly.
So I decided to look up ifconfig.c's source to see where and how the interfaces are being brought up and how the data is being gathered, however I am having a difficult time doing so or where to look.
In ifconfig, there is a function called void printall(const *ifname) however I'm not seeing where exactly those Send/Receive bytes are being put together from? is it from the structs? if so which one and which variables from the struct?
This one is a toughy guys! Please help, I've been scratching my head with this one.
|