Subject: Re: Implementing per protosw pfil hooks.
To: Darren Reed <darrenr@reed.wattle.id.au>
From: Matt Thomas <matt@3am-software.com>
List: tech-net
Date: 12/10/1999 18:46:17
At 06:38 PM 12/10/99 , Darren Reed wrote:
>Some comments on an exercise this afternoon to do this:
>
>1. Adding pfil struct reference to protosw. It seems best to do this
> without it being conditional on PFIL_HOOKS so that user programs pick
> don't need to screw with this option. A side effect of this is that
> adding a "#include <net/pfil.h>" to the top of <sys/protosw.h> was the
> quick way to avoid touching many files where <sys/protosw.h> is used
> already.
Just add a
struct pfil;
(or whatever) to protosw.h. don't include net/pfil.h
I assume this is struct pfil *, right?
>2. New struct created in pfil.h which contains two tailq heads and an
> init variable - pfil_init_done has been removed: an init must be done
> per pfil struct for each protosw. Considering this, I'd like to be
> able to do some sort of pfil_init() in ip_init() when inetsw and
> ip_protox[] are initialized.
Why can't this be done in dom_init? (struct domain)
>
>3. ip_protox[] was moved from ip_input.c to in_proto.c and an extern for it
> added to <sys/protosw.h> and removed from where it was present in .c
> files.
No. That is not appropriate.
>4. An extern for inetsw was added to <sys/protosw.h> and removed from where
> it was present in .c files.
Ditto. protosw should not have any family/protocol specific definitions.
>I'm tempted to proceed with (3) and (4) regardless due to them being more
>of a general nature of fix-up.
>
>Comments ?
See above.
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message