On 2006-10-20,
(E-Mail Removed) <(E-Mail Removed)> wrote:
> Stickers don't help me very much in a script that is ment to detect
> NIC's and display them along side with which driver it uses and on
> which network interface it can be reached.
An example sysfs view on a Debian sarge host with 2.6.8 kernel:
$ cat /sys/class/net/eth0/address
00:10:a7:09:48:c7
$ ls -l /sys/class/net/eth0/device
lrwxrwxrwx 1 root root 0 Oct 3 15:08 /sys/class/net/eth0/device ->
.../../../devices/pci0000:00/0000:00:09.0
$ ls -l /sys/class/net/eth0/driver
lrwxrwxrwx 1 root root 0 Oct 3 15:08 /sys/class/net/eth0/driver ->
.../../../bus/pci/drivers/8139too
On an etch host with 2.6.17 the driver seems to be
[ifname]/device/driver.
So, at least you can easily find out 'which interface uses which NIC and
driver'.
-Mikko