LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 04-12-2011, 01:31 PM   #1
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Rep: Reputation: 0
/sys/class/net/ Is this is the correct place for eth info


Hi,

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.

Cheers

Prashant
 
Old 04-14-2011, 03:58 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,630

Rep: Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586Reputation: 586
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] <sys/time.h> gettimeofday conflict with Eth socket sendto legendbb Programming 10 06-15-2012 04:30 AM
New to forums. Hello! (Hope this is correct place) larryewilliamson LinuxQuestions.org Member Intro 2 02-25-2011 11:10 AM
/sys/class/hwmon Question Aztral Linux - General 1 08-11-2009 03:00 PM
Giving user access to files in /sys/class/ subdirectory and /dev/video0 DiBosco Programming 1 12-01-2008 04:11 AM
eth card need help and info isalt Linux - Hardware 2 01-30-2003 08:27 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration