Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 1997 12:00:24 +1000 (EST)
From:      Darren Reed <darrenr@cyber.com.au>
To:        julian@whistle.com (Julian Elischer)
Cc:        hackers@freebsd.org
Subject:   Re: Freebsd 3.0 current fails ipfilter 3.2b8 build (fwd)
Message-ID:  <199710170200.MAA27628@plum.cyber.com.au>
In-Reply-To: <3446B81E.4DAA423A@whistle.com> from "Julian Elischer" at Oct 16, 97 05:58:06 pm

next in thread | previous in thread | raw e-mail | index | archive | help
In some mail I received from Julian Elischer, sie wrote
> 
> > okay, this is the second time you're referred to the API.
> > 
> > Where can it be found ? Who is responsible for it ?
> 
> 
> It's a slow thing. Just a general consencus that lookingin the kernel vm
> for information is notthe way to go in general.

Granted.

> Netstat still does, but that is hoped to go away as we make
> more API methods to allow this to be changed.

I can see creaping featurisms here...I'd like to see the API designed
first, with it reviewed before people start making ad-hoc changes which
are "generally in line with our goals".  

> the aim is to stop anything from needing to do 'kread()' calls
> to get status.

Hmmm...see below.

> I enclose a little program that dumps out all the 
> interface addresses and flags without reading the kernel.
> 
> I find it very hard to believe you don't know about this.. as I 
> know you are very knowledgeable on the networking, and I guess we
> are somehow talking on cross purposes (porpoises?).
[...]

I've seen that ioctl used before...it's not one of my favourites,
that's for sure!  If I have 256 interfaces, the program you posted
breaks.  Maybe there should be a sysctl which returns the number
of interfaces available, so you can correctly size the ioctl ?
(of course this means a variable which has this stored).  Of course,
to correctly size the ioctl, you could walk the kernel list first ;)
This is sort of what I'm getting at with API design.  There's an
interface present, but using it isn't 100% safe to use.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710170200.MAA27628>