Re: ipfilter and sun3

Martin Husemann <[email protected]>
Newsgroups gmane.os.netbsd.current,gmane.os.netbsd.ports.sun3
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.