Zyoma
Zyoma

Reputation: 1578

The meaning of the /sys/class/net/<interface>/type value

For each network interface linux contains a directory in /sys/class/net There is a file with name "type". Its value is: 1 - for wlan0/eth0. 772 - for lo. 512 - for rmnet0/rmnet1/...

So what is the meaning of these values? Where can I find any descriptions?

Upvotes: 10

Views: 10648

Answers (1)

Evgen Druzhynin
Evgen Druzhynin

Reputation: 318

This header will show you the way to the world of work with interfaces:

https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/if_arp.h#L30

There are many, but the most common:

#define ARPHRD_ETHER    1       /* Ethernet 10Mbps      */
#define ARPHRD_LOOPBACK 772     /* Loopback device      */

Upvotes: 10

Related Questions