(E-Mail Removed) schrieb:
> Hi,
>
> Need to find all the possible speed a given interface card (in eth0)
> may support. The mii-tool didn't give me the correct speeds. Anyone can
> shine some code how this can be done in C?
>
> Thanks.
>
> Eric.
>
You can use the ethtool for this:
root@lopsch-server:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes