Re: the mapping of eth devices to modules
Following up on whether it's possible to work out the mapping between
modules and the network devices they are driving.
For the PCI bus the information is in the sysfs file system:
$ ls -l /sys/class/net/eth0
total 0
drwxr-xr-x 3 root root 0 Mar 3 14:31 .
drwxr-xr-x 5 root root 0 Mar 3 14:37 ..
-r--r--r-- 1 root root 4096 Mar 3 14:31 addr_len
-r--r--r-- 1 root root 4096 Mar 3 14:31 address
-r--r--r-- 1 root root 4096 Mar 3 14:31 broadcast
lrwxrwxrwx 1 root root 0 Mar 3 14:31 device -> ../../../devices/pci0000:00/0000:00:0a.0
lrwxrwxrwx 1 root root 0 Mar 3 14:31 driver -> ../../../bus/pci/drivers/3c59x
-r--r--r-- 1 root root 4096 Mar 3 14:31 features
-rw-r--r-- 1 root root 4096 Mar 3 14:31 flags
-r--r--r-- 1 root root 4096 Mar 3 14:31 ifindex
-r--r--r-- 1 root root 4096 Mar 3 14:31 iflink
-rw-r--r-- 1 root root 4096 Mar 3 14:31 mtu
drwxr-xr-x 2 root root 0 Mar 3 14:31 statistics
-rw-r--r-- 1 root root 4096 Mar 3 14:31 tx_queue_len
-r--r--r-- 1 root root 4096 Mar 3 14:31 type
Unfortunately the same information doesn't seem to be present for
cards sat on the PCMCIA bus. I don't know about the USB bus.
But it's something.
Nic Ferrier
http://www.tapsellferrier.co.uk
Reply to: