Subject: Re: ipfilter and sun3
To: None <rmk@rmkhome.com>
From: Martin Husemann <martin@duskware.de>
List: current-users
Date: 05/10/2003 18:21:07
On Sat, May 10, 2003 at 08:46:47AM -0600, Rick Kelly wrote:

> I added it to my config file:
> 
> pseudo-device   ipfilter                # ip filter
> options         IPFILTER_LOG
> 
> I also added from MAKEDEV for a recent -current:
> 
> crw-------  1 root  wheel  37, 3 May  9 19:22 /dev/ipauth
> crw-------  1 root  wheel  37, 0 May  9 19:22 /dev/ipl
> crw-------  1 root  wheel  37, 1 May  9 19:22 /dev/ipnat
> crw-------  1 root  wheel  37, 2 May  9 19:22 /dev/ipstate

From sys/arch/sun3/sun3/conf.c:

        cdev_bpftun_init(NBPFILTER,bpf),/* 36: Berkeley packet filter */
        cdev_notdef(),                  /* 37 */
        cdev_notdef(),                  /* 38 */
        cdev_fb_init(NCGFOUR,cg4),      /* 39: cgfour */

Adding the devices to MAKEDEV is not enough, you have to glue the majors to
the device routines too.

You need to add

  #include "ipfilter.h"

and

  cdev_ipf_init(NIPFILTER,ipl),

at the right places. Look at (for example) sys/arch/i386/i386/conf.c how
it is done there.

Martin