Date: Mon, 20 Oct 1997 23:51:43 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: darrenr@cyber.com.au (Darren Reed) Cc: tlambert@primenet.com, hackers@FreeBSD.ORG Subject: Re: Freebsd 3.0 current fails ipfilter 3.2b8 build (fwd) Message-ID: <199710202351.QAA27105@usr05.primenet.com> In-Reply-To: <199710190548.PAA19493@plum.cyber.com.au> from "Darren Reed" at Oct 19, 97 03:48:32 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > > well, ifconfig, netstat, etc. all need it. They reference kernel internal structures as an API. > > > if you're writing your own LKM for a network driver, you need it. LKM code is kernel code. Kernel code can have any requirements that the kernel environment chooses to place on it (one of which is what include files are necessary). > > > if you're writing firewalling packet filtering code, you need it. Again, kernel code. > > > "struct ifnet" is used in _lots_ of places. Not lots of places outside kernel code. > > > if you want to simulate kernel code, then you also need it. [ ... ] > What if I mention this: > > I was using "struct ifnet" _WITHOUT_ wanting to look at kernel memory. > > > Why would you want to do that, you ask. > > So you can more easily build userland code which interfaces with the > code used in the kernel and test it that way. In other words, unit testing. I'd claim that your test framework must include whatever the kernel includes, in order to properly simulate a kernel. Further, the code you are unit testing in this fashion is -- kernel code. I don't see this as being inconvenient except for users of "promiscuous" interfaces (like your examples: ifconfig, netstat, etc.). I personally *like* the idea of a "speed-bump" to slow down people going hell bent for leather down the wrong road to an interface... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710202351.QAA27105>