Subject: Implementing per protosw pfil hooks.
To: None <tech-net@netbsd.org>
From: Darren Reed <darrenr@reed.wattle.id.au>
List: tech-net
Date: 12/11/1999 13:38:56
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.
   
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.

I'm tempted to proceed with (3) and (4) regardless due to them being more
of a general nature of fix-up.

Comments ?

Darren