Hello.
I is specific network interface you want to know whether or wired is wireless.
For example, eth0 is I want to know whether or wired is wireless.
I I'd want to do this to udev. So I saw the eth0 and eth1 to udevadm.
Quote:
root@test:~# udevadm info -a -p /sys/class/net/eth0
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/virtual/net/eth0':
KERNEL=="eth0"
SUBSYSTEM=="net"
DRIVER==""
ATTR{mtu}=="1500"
ATTR{type}=="1"
ATTR{netdev_group}=="0"
ATTR{flags}=="0x1003"
ATTR{dormant}=="0"
ATTR{addr_assign_type}=="0"
ATTR{dev_id}=="0x0"
ATTR{iflink}=="2"
ATTR{addr_len}=="6"
ATTR{address}=="00:15:1d:00:00:00"
ATTR{operstate}=="up"
ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
ATTR{tx_queue_len}=="1000"
ATTR{ifalias}==""
ATTR{ifindex}=="2"
ATTR{link_mode}=="0"
ATTR{carrier}=="1"
root@test:~#
|
Quote:
root@test:~# udevadm info -a -p /sys/class/net/eth1
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/platform/exynos4-sdhci.3/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/eth1':
KERNEL=="eth1"
SUBSYSTEM=="net"
DRIVER==""
ATTR{mtu}=="1500"
ATTR{type}=="1"
ATTR{netdev_group}=="0"
ATTR{flags}=="0x1002"
ATTR{addr_assign_type}=="0"
ATTR{dev_id}=="0x0"
ATTR{iflink}=="3"
ATTR{addr_len}=="6"
ATTR{address}=="c4:23:7a:00:6e:93"
ATTR{operstate}=="down"
ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
ATTR{tx_queue_len}=="1000"
ATTR{ifalias}==""
ATTR{ifindex}=="3"
ATTR{link_mode}=="0"
looking at parent device '/devices/platform/exynos4-sdhci.3/mmc_host/mmc1/mmc1:0001/mmc1:0001:1':
KERNELS=="mmc1:0001:1"
SUBSYSTEMS=="sdio"
DRIVERS=="unifi"
ATTRS{class}=="0x00"
ATTRS{device}=="0x0007"
ATTRS{vendor}=="0x032a"
looking at parent device '/devices/platform/exynos4-sdhci.3/mmc_host/mmc1/mmc1:0001':
KERNELS=="mmc1:0001"
SUBSYSTEMS=="mmc"
DRIVERS==""
ATTRS{type}=="SDIO"
looking at parent device '/devices/platform/exynos4-sdhci.3/mmc_host/mmc1':
KERNELS=="mmc1"
SUBSYSTEMS=="mmc_host"
DRIVERS==""
looking at parent device '/devices/platform/exynos4-sdhci.3':
KERNELS=="exynos4-sdhci.3"
SUBSYSTEMS=="platform"
DRIVERS=="s3c-sdhci"
looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""
root@test:~#
|
In my opinion, I think that it can be determined to have the ATTR {flags}.
ATTR {flags} is in the wireless if 0x1002, if it is 0x1003, you have a guess and wired.
My thinking is that correct?
Is the information for the flags can be found where?
how corresponding interface without knowing to have you need to determine whether a wireless or a wired the flags?