LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2011, 04:24 PM   #1
joeldavis
LQ Newbie
 
Registered: Mar 2011
Posts: 28

Rep: Reputation: 1
reference for object types for /sys/class/net objects?


Basically my system has two interfaces which show at:

/sys/class/net/eth0

and

/sys/class/net/lo

/sys/class/net/eth0/type shows "1" whereas /sys/class/net/lo/type shows 772

my question is two fold: Is there a general reference for what these map to? Basically I'm trying to do is programmatically filter out non-loopback non-virtual network interfaces on the system.

So giving me a general reference, or telling me what the type numbers for all physical interfaces, or telling me what the type numbers are for all virtual interfaces would tell me what I need to know. I've just looked for an answer to any of the above three and couldn't find anything.

- Joel
 
Old 11-06-2011, 11:45 AM   #2
joeldavis
LQ Newbie
 
Registered: Mar 2011
Posts: 28

Original Poster
Rep: Reputation: 1
for the curious: it looks like the /sys/class/net/*/type values correspond with the macros defined in the kernel source at /include/linux/if_arp.h

- Joel
 
  


Reply



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
sys/class/net/ethx/type What is it? tank junior Linux - Newbie 1 05-03-2011 08:23 PM
/sys/class/net/ Is this is the correct place for eth info tank junior Linux - Newbie 1 04-14-2011 02:58 AM
[SOLVED] Conflicting type declarations between sys/types.h and linux/types.h Da Shi Cao Programming 3 09-13-2010 11:55 PM
sys/types.h & linux/types.h conflict while compiling johnnyhal Linux - Software 1 12-28-2008 06:39 PM
tough (to me) c++ questions about pointer to class object reference and more parv Programming 6 01-11-2008 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:35 AM.

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
Open Source Consulting | Domain Registration