Re: Getting the list of Ethernet network interfaces using udevadm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 21, 2012 at 18:47, Dipu Joseph <dipu.joseph@xxxxxxxxx> wrote:
> I am finding it difficult to find the exact options required for
> "udevadm info" command, in order to get the list of Ethernet network
> interfaces on an LSB-compliant Linux system.
>
> I am looking for something which can give output similar to the one of
> the following command:
>
> lshal | grep "net.interface"
>
>
> Sorry about asking a basic question. I am new to udev and somehow I
> could not make out the usage from the output of "udevadm info --help".
>
> Any help is greatly appreciated.

Udev has intentionally no idea about device classes or specific
subsystems; hence there is no command to ask for anything like that.

Udev does not try to play any abstraction games like HAL did, and
there is absolutely no plan to do that, or to tell udev what Ethernet
or any other specialized device type is. There are just devices, and
devices have a subsystem a name, and a few properties, not much more.

Udev is a mostly generic key/value device database and an interface to
query kernel devices. It's the building block for stuff like udisks,
PulseAudio, NetworkManager, systemd, ... You need to talk to these
individual services to get the subsystem/domain-specific information.

'udevadm info' is based on libudev, you need to write your own tool
using libudev if you have special requirements:
  http://kernel.org/pub/linux/utils/kernel/hotplug/libudev/
and when:
  grep . /sys/class/net/*/type
is not enough for what you look for.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux