[Toybox] Entering the home stretch on ifconfig...

Rob Landley rob at landley.net
Sat Jun 8 12:40:04 PDT 2013


On 06/07/2013 01:11:50 AM, Bastian Bittorf wrote:
> * Rob Landley <rob at landley.net> [07.06.2013 07:57]:
> > It looks like show_iface() enumerates /proc/net/dev and then calls
> > readconf() to do ioctl() based enumeration. The /proc one gives us  
> RX
> > bytes and such, the ioctl gives us a "virtual interface" (ala lo:0 I
> 
> dont use the deprecated one, but /sys/class/net/
> or even "better" via netlink.

I didn't write this code, I'm just cleaning it up. Patches welcome.

Where is it deprecated? Documentation/filesystems/proc.txt currently  
says (line 1029):

  dev           network devices with statistics

Line 1056 then provides an example. No warnings about using it.

Rob


More information about the Toybox mailing list