Hello Jo
imho these types are not that useful in practice (e.g. tap devices etc.
are
all reported as "ethernet". Maybe expose /sys/class/net/$devname/uevent
DEVTYP= instead.
I have now taken a look at your suggestion.
Unfortunately, I found that not all network interfaces have set the
DEVTYPE
attribute set in their uevent file. I have not yet found any information
who sets this value. Does this do the driver or the subsystem?
I need to do some more research
The following devices does have this DEVTYPE attribute set on my targets
root@st-dev-07 /sys/class/net # cat docker0/uevent
DEVTYPE=bridge
INTERFACE=docker0
IFINDEX=16
root@st-dev-07 /sys/class/net # cat wlan0/uevent
DEVTYPE=wlan
INTERFACE=wlan0
IFINDEX=14
root@st-dev-07 /sys/class/net # cat wwan0/uevent
DEVTYPE=wwan
INTERFACE=wwan0
IFINDEX=5
root@VR2-120770 ~ # cat /sys/class/net/pppoe-xdsl/uevent
DEVTYPE=ppp
INTERFACE=pppoe-xdsl
IFINDEX=2285
root@VR2-120770 ~ #
The following devices does *not* have this DEVTYPE attribute set on my
targets:
root@st-dev-07 /sys/class/net # cat eth0/uevent
INTERFACE=eth0
IFINDEX=2
root@st-dev-07 /sys/class/net # cat sit0/uevent
INTERFACE=sit0
IFINDEX=7
root@st-dev-07 /sys/class/net # cat ip6_vti0/uevent
INTERFACE=ip6_vti0
IFINDEX=9
The question now if this DEVTYPE is not set what should we do?
Set now `dev_type` value in the ubus output til we update this in the
Kernel?
Regards
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel