-   Linux - Newbie (
-   -   /sys/class/net/ Is this is the correct place for eth info (

tank junior 04-12-2011 12:31 PM

/sys/class/net/ Is this is the correct place for eth info

Using a python script, I am gathering various info about all the ethernet adapters installed. For this I am parsing all the directories(each directory represent a ethernet adapter) inside
"/sys/class/net/" directory.
Is this is the correct place and de-facto standard for listing ethernet adapters?
I am concerned about modern distros as well as a bit older ones for the presence of this directory.



business_kid 04-14-2011 02:58 AM

If you go back far enough, /sys didn't exist. In this box /sys/class/net has symlinks to lo & eth0, and eth0 is /sys/class/devices/pci/numbers/eth0.

This stuff is device and driver relevant; In terms of configuration, the job is imposing.

All times are GMT -5. The time now is 07:25 PM.