Subject: Re: Implementing per protosw pfil hooks.
To: Darren Reed <darrenr@reed.wattle.id.au>
From: None <itojun@iijlab.net>
List: tech-net
Date: 12/11/1999 11:45:05
>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.
>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.
I'm still not sure what will be the relationship with "additional
per-protocol data" and filtering engine/filter command parser.
Could you please let me know more?
>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.
>4. An extern for inetsw was added to <sys/protosw.h> and removed from where
> it was present in .c files.
please notice that sys/netinet6 uses sys/netinet6/ip6protosw.h.
itojun