Programmatically get ethernet interface speed?

From: Will (will@loopfree.net)
Date: Wed Jul 11 2001 - 17:16:18 EST


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.

Any advice? I'm afraid someone is going to suggest looking at net_device.priv on a
driver-by-driver basis.

-- 
-Will  :: AD6XL :: http://tyranny.egregious.net/~will/
 Orton :: finger will@tyranny.egregious.net for GPG public key
-
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