mii-tool: automatically enumerate all interfaces by default (like ifconfig)
Linux networking base tools
Brought to you by:
eckes
When launched without arguments, mii-tool scans for 8 interfaces (from eth0 to eth7).
This does not make much sense in today linux interface naming convention.
It would be much better to list all interfaces of Ethernet type, perhaps excluding common virtual interfaces (those starting with virbr, vmnet, docker) or excluding directly all bridges (as in brctl show).
For example:
ifconfig -a|grep Ethernet|egrep -v 'virbr|vmnet|docker'
I forgot: it should exclude also wireless interfaces, like those listed by "iwconfig".
I am quite sure that somewhere in /sys or /proc there is a way to list all network interfaces with a "true" ethernet type...
mii-tools has changed to require the iface name be specified:
https://sourceforge.net/p/net-tools/code/ci/9dc3a20511a409e1de1a41d715a10028d3bc1b56
i'm not sure we want to bother restoring automatic probing of iface names like ifconfig. but maybe!