Re: Programmatically get ethernet interface speed?

From: Donald Becker (becker@scyld.com)
Date: Wed Jul 11 2001 - 20:38:23 EST


On Wed, 11 Jul 2001, Will wrote:

> Is there a (reasonable) way to programmatically get the speed of an
> ethernet interface? So far all I've been able to do is look at
> net_device.if_port from the kernel and try to deduce the speed (10 vs
> 100Mbit) from the tranciever setting. This works fine with 3c59x, but
> not with eepro100, and I suspect it doesn't work with lots of other
> drivers as well.

Most drivers support 'mii-diag'
   http://www.scyld.com/diag/index.html

A related program is 'mii-tool'.

Donald Becker becker@scyld.com
Scyld Computing Corporation http://www.scyld.com
410 Severn Ave. Suite 210 Second Generation Beowulf Clusters
Annapolis MD 21403 410-990-9993

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Sun Jul 15 2001 - 21:00:25 EST