Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-05-2011, 05:24 PM   #1
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/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, 12:45 PM   #2
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


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

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

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