Re: query "interface max. bandwith" from userspace

From: Andi Kleen (ak@muc.de)
Date: Wed Feb 02 2000 - 20:09:12 EST


aivanov@eu.level3.net (Anton Ivanov) writes:

> On 02-Feb-2000 Guus Sliepen wrote:
> > On Wed, 2 Feb 2000, Jeffrey E. Hundstad wrote:
> >
> >> What is the proper way to determine the max. bandwidth (interface type)
> >> of a network interface from userspace?
> >
> > An ioctl() that reads the speed from the driver?
>
> That is the BSD way. Though there there are some devices that misbehave
> (mostly third party drivers).
>
> Last time I checked Linux it did not have it. A lot of drivers keep track of it
> (ISDn, Red Creek VPN, some ethernet drivers) but I could not find a generic
> interface. From what I remember when trying to modify gated sources this
> functionality is indeed not present.
>
> Pls correct me if I am wrong.

SIOCGIFMAP returns a ifr_map.if_port member, that gives you the Ethernet
bandwidth with some mapping. It would be possible to extend that to other
port types.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:08 EST