head	1.15;
access;
symbols
	netbsd-11-0-RC3:1.15
	netbsd-11-0-RC2:1.15
	netbsd-11-0-RC1:1.15
	perseant-exfatfs-base-20250801:1.15
	netbsd-11:1.15.0.2
	netbsd-11-base:1.15
	netbsd-10-1-RELEASE:1.14
	perseant-exfatfs-base-20240630:1.14
	perseant-exfatfs:1.14.0.4
	perseant-exfatfs-base:1.14
	netbsd-8-3-RELEASE:1.10
	netbsd-9-4-RELEASE:1.12
	netbsd-10-0-RELEASE:1.14
	netbsd-10-0-RC6:1.14
	netbsd-10-0-RC5:1.14
	netbsd-10-0-RC4:1.14
	netbsd-10-0-RC3:1.14
	netbsd-10-0-RC2:1.14
	netbsd-10-0-RC1:1.14
	netbsd-10:1.14.0.2
	netbsd-10-base:1.14
	netbsd-9-3-RELEASE:1.12
	cjep_sun2x-base1:1.13
	cjep_sun2x:1.13.0.4
	cjep_sun2x-base:1.13
	cjep_staticlib_x-base1:1.13
	netbsd-9-2-RELEASE:1.12
	cjep_staticlib_x:1.13.0.2
	cjep_staticlib_x-base:1.13
	netbsd-9-1-RELEASE:1.12
	phil-wifi-20200421:1.12
	phil-wifi-20200411:1.12
	is-mlppp:1.12.0.4
	is-mlppp-base:1.12
	phil-wifi-20200406:1.12
	netbsd-8-2-RELEASE:1.10
	netbsd-9-0-RELEASE:1.12
	netbsd-9-0-RC2:1.12
	netbsd-9-0-RC1:1.12
	phil-wifi-20191119:1.12
	netbsd-9:1.12.0.2
	netbsd-9-base:1.12
	phil-wifi-20190609:1.12
	netbsd-8-1-RELEASE:1.10
	netbsd-8-1-RC1:1.10
	pgoyette-compat-merge-20190127:1.10.12.1
	pgoyette-compat-20190127:1.11
	pgoyette-compat-20190118:1.11
	pgoyette-compat-1226:1.11
	pgoyette-compat-1126:1.11
	pgoyette-compat-1020:1.11
	pgoyette-compat-0930:1.11
	pgoyette-compat-0906:1.10
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.10
	netbsd-8-0-RELEASE:1.10
	phil-wifi:1.10.0.14
	phil-wifi-base:1.10
	pgoyette-compat-0625:1.10
	netbsd-8-0-RC2:1.10
	pgoyette-compat-0521:1.10
	pgoyette-compat-0502:1.10
	pgoyette-compat-0422:1.10
	netbsd-8-0-RC1:1.10
	pgoyette-compat-0415:1.10
	pgoyette-compat-0407:1.10
	pgoyette-compat-0330:1.10
	pgoyette-compat-0322:1.10
	pgoyette-compat-0315:1.10
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.10.0.12
	pgoyette-compat-base:1.10
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.10.0.10
	matt-nb8-mediatek-base:1.10
	perseant-stdc-iso10646:1.10.0.8
	perseant-stdc-iso10646-base:1.10
	netbsd-8:1.10.0.6
	netbsd-8-base:1.10
	prg-localcount2-base3:1.10
	prg-localcount2-base2:1.10
	prg-localcount2-base1:1.10
	prg-localcount2:1.10.0.4
	prg-localcount2-base:1.10
	pgoyette-localcount-20170426:1.10
	bouyer-socketcan-base1:1.10
	pgoyette-localcount-20170320:1.10
	netbsd-7-1:1.7.0.10
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.10.0.2
	bouyer-socketcan-base:1.10
	pgoyette-localcount-20170107:1.10
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.10
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.10
	netbsd-7-nhusb:1.7.0.8
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.9
	pgoyette-localcount-20160726:1.9
	pgoyette-localcount:1.9.0.2
	pgoyette-localcount-base:1.9
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.6
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-6-0-6-RELEASE:1.2.2.2
	netbsd-6-1-5-RELEASE:1.2.2.4
	netbsd-7:1.7.0.4
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.1.2.3
	netbsd-6-1-4-RELEASE:1.2.2.4
	netbsd-6-0-5-RELEASE:1.2.2.2
	tls-earlyentropy:1.7.0.2
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.7
	riastradh-drm2-base3:1.7
	netbsd-6-1-3-RELEASE:1.2.2.4
	netbsd-6-0-4-RELEASE:1.2.2.2
	netbsd-6-1-2-RELEASE:1.2.2.4
	netbsd-6-0-3-RELEASE:1.2.2.2
	netbsd-6-1-1-RELEASE:1.2.2.4
	riastradh-drm2-base2:1.4
	riastradh-drm2-base1:1.4
	riastradh-drm2:1.4.0.2
	riastradh-drm2-base:1.4
	netbsd-6-1:1.2.2.4.0.2
	netbsd-6-0-2-RELEASE:1.2.2.2
	netbsd-6-1-RELEASE:1.2.2.4
	netbsd-6-1-RC4:1.2.2.4
	netbsd-6-1-RC3:1.2.2.4
	agc-symver:1.4.0.4
	agc-symver-base:1.4
	netbsd-6-1-RC2:1.2.2.4
	netbsd-6-1-RC1:1.2.2.4
	yamt-pagecache-base8:1.3
	netbsd-6-0-1-RELEASE:1.2.2.2
	yamt-pagecache-base7:1.3
	matt-nb6-plus-nbase:1.2.2.2
	yamt-pagecache-base6:1.3
	netbsd-6-0:1.2.2.2.0.4
	netbsd-6-0-RELEASE:1.2.2.2
	netbsd-6-0-RC2:1.2.2.2
	tls-maxphys:1.3.0.2
	tls-maxphys-base:1.7
	matt-nb6-plus:1.2.2.2.0.2
	matt-nb6-plus-base:1.2.2.2
	netbsd-6-0-RC1:1.2.2.2
	netbsd-6:1.2.0.2
	yamt-pagecache-base5:1.1
	yamt-pagecache:1.1.0.2
	yamt-pagecache-base4:1.1;
locks; strict;
comment	@# @;


1.15
date	2025.06.01.00.48.41;	author joe;	state Exp;
branches;
next	1.14;
commitid	2qRh9tcRRtgpG7XF;

1.14
date	2021.07.07.11.51.46;	author martin;	state Exp;
branches
	1.14.4.1;
next	1.13;
commitid	uaomVgnLuOgm930D;

1.13
date	2020.05.16.12.42.11;	author christos;	state Exp;
branches;
next	1.12;
commitid	sze0bQ4R5tr4Qs8C;

1.12
date	2019.05.13.17.55.09;	author bad;	state Exp;
branches;
next	1.11;
commitid	qhcRKCD9dFQdq4nB;

1.11
date	2018.09.29.14.41.36;	author rmind;	state Exp;
branches;
next	1.10;
commitid	1PaZzhI9AYpgB0UA;

1.10
date	2016.08.08.16.31.53;	author kre;	state Exp;
branches
	1.10.12.1
	1.10.14.1;
next	1.9;
commitid	WME1hgogZvr4nwhz;

1.9
date	2016.05.29.02.28.07;	author christos;	state Exp;
branches;
next	1.8;
commitid	bNA8QPxtL0JZYj8z;

1.8
date	2016.04.25.02.01.32;	author knakahara;	state Exp;
branches;
next	1.7;
commitid	ARfYnmrIik6HVW3z;

1.7
date	2013.11.16.17.12.35;	author rmind;	state Exp;
branches;
next	1.6;
commitid	TGLZKEhed2gUBwdx;

1.6
date	2013.11.16.15.58.30;	author alnsn;	state Exp;
branches;
next	1.5;
commitid	R8As1S7W79lBcwdx;

1.5
date	2013.11.16.01.41.43;	author rmind;	state Exp;
branches;
next	1.4;
commitid	hu3oqHgTK0wAsrdx;

1.4
date	2013.02.09.03.35.33;	author rmind;	state Exp;
branches;
next	1.3;

1.3
date	2012.08.14.22.31.44;	author rmind;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2012.05.30.21.38.04;	author rmind;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2012.04.14.21.57.29;	author rmind;	state Exp;
branches
	1.1.2.1;
next	;

1.14.4.1
date	2025.08.02.05.58.52;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.10.12.1
date	2018.09.30.01.46.01;	author pgoyette;	state Exp;
branches;
next	;
commitid	SQ44grEPCeKPh4UA;

1.10.14.1
date	2019.06.10.22.10.35;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.3.2.1
date	2013.02.25.00.30.46;	author tls;	state Exp;
branches;
next	1.3.2.2;

1.3.2.2
date	2014.08.20.00.05.11;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.2.2.1
date	2012.05.30.21.38.04;	author riz;	state dead;
branches;
next	1.2.2.2;

1.2.2.2
date	2012.06.26.00.07.17;	author riz;	state Exp;
branches;
next	1.2.2.3;

1.2.2.3
date	2012.11.18.21.45.08;	author riz;	state Exp;
branches;
next	1.2.2.4;

1.2.2.4
date	2013.02.11.21.49.49;	author riz;	state Exp;
branches;
next	;

1.1.2.1
date	2012.04.14.21.57.29;	author yamt;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2012.04.17.00.09.50;	author yamt;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2012.10.30.19.00.45;	author yamt;	state Exp;
branches;
next	1.1.2.4;

1.1.2.4
date	2014.05.22.11.43.07;	author yamt;	state Exp;
branches;
next	;
commitid	wmvImESqVQCgMwBx;


desc
@@


1.15
log
@testing for NPF user/group filtering: reviewed by christos@@
@
text
@# $NetBSD: Makefile,v 1.14 2021/07/07 11:51:46 martin Exp $
#
# Public Domain
#

PROG=		npftest
NOMAN=		# no man page
PAXCTL_FLAGS.npftest += +m

WARNS=		5
NOLINT=		# disabled (note: deliberately)

SRCS=		npftest.c npfstream.c
CPPFLAGS+=	-I${.CURDIR}

LIBNPFTEST!=	cd ${.CURDIR}/libnpftest && ${MAKE} -V .OBJDIR
DPADD+=		${LIBNPFTEST}/libnpftest.a
LDADD+=		-L${LIBNPFTEST} -lnpftest

LDADD+=		-lrump -lrumpvfs_nofifofs -lrumpvfs -lrumpuser
LDADD+=		-lrumpnet -lrumpnet_net	-lrumpdev_bpf -lrumpnet_netinet

.if ${RUMP_SANITIZE:Uno} != "no"
LDADD+=	-fsanitize=${RUMP_SANITIZE}
.endif

.include <bsd.own.mk>

.if ${MKSLJIT} != "no"
LDADD+=		-lrumpkern_sljit -lrumpnet_bpfjit
.endif

LDADD+=		-lrumpkern_nv -lrumpnet_npf
LDADD+=		-lpcap -lpthread

PROGDPLIBS+=	nv ${NETBSDSRCDIR}/external/bsd/libnv/lib
CPPFLAGS+=	-I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist

SUBDIR+=	libnpftest

${LIBNPFTEST}/libnpftest.a: all-libnpftest

.include <bsd.subdir.mk>
.include <bsd.prog.mk>
@


1.14
log
@Allow to set sanitizer flags for the rump build from the
build.sh command line, like: -V RUMP_SANITIZE=address
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2020/05/16 12:42:11 christos Exp $
d21 1
a21 1
LDADD+=		-lrumpnet -lrumpnet_net	-lrumpdev_bpf
@


1.14.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2025/06/01 00:48:41 joe Exp $
d21 1
a21 1
LDADD+=		-lrumpnet -lrumpnet_net	-lrumpdev_bpf -lrumpnet_netinet
@


1.13
log
@more nofifofs lossage
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2019/05/13 17:55:09 bad Exp $
d23 4
@


1.12
log
@Get rid of all the -lrumpdev and -lrumpvfs that are no longer needed
after moving rump's mainbus from rumpdev to rumpkern.

Produces the same atf-run results as before.
@
text
@d1 1
a1 1
# $NetBSD$
d20 2
a21 2
LDADD+=		-lrump -lrumpvfs -lrumpuser -lrumpnet -lrumpnet_net
LDADD+=		-lrumpdev_bpf
@


1.11
log
@NPF: Major rework -- migrate NPF to the libnv library.
- This conversion significantly simplifies the code and moves NPF to
  a binary serialisation format (replacing the XML-like format).
- Fix some memory/reference leaks and possibly use-after-free bugs.
- Bump NPF_VERSION as this change makes libnpf incompatible with the
  previous versions.  Also, different serialisation format means NPF
  connection/config saving and loading is not compatible with the
  previous versions either.

Thanks to christos@@ for extra testing.
@
text
@a21 1
LDADD+=		-lrumpdev
@


1.10
log
@
Yet another -lrumpdev
@
text
@d30 2
a31 1
LDADD+=		-lrumpnet_npf
d33 2
a34 1
LDADD+=		-lpcap -lprop -lpthread
@


1.10.14.1
log
@Sync with HEAD
@
text
@d22 1
d30 1
a30 2
LDADD+=		-lrumpkern_nv -lrumpnet_npf
LDADD+=		-lpcap -lpthread
d32 1
a32 2
PROGDPLIBS+=	nv ${NETBSDSRCDIR}/external/bsd/libnv/lib
CPPFLAGS+=	-I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
@


1.10.12.1
log
@Ssync with HEAD
@
text
@d30 1
a30 2
LDADD+=		-lrumpkern_nv -lrumpnet_npf
LDADD+=		-lpcap -lpthread
d32 1
a32 2
PROGDPLIBS+=	nv ${NETBSDSRCDIR}/external/bsd/libnv/lib
CPPFLAGS+=	-I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist
@


1.9
log
@npftest needs to disable mprotect because it uses bpfjit
@
text
@d22 1
@


1.8
log
@fix ATF net/npf/t_npf failure
@
text
@d8 1
@


1.7
log
@Add bsd.own.mk for MKSLJIT, reorder some vars.
@
text
@d19 1
a19 1
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net
@


1.6
log
@Link to -lrumpnet_bpfjit and -lrumpkern_sljit iff MKSLJIT != "no".
@
text
@d7 4
d22 2
a31 4
WARNS=		5
NOMAN=		# no man page
NOLINT=		# disabled (note: deliberately)

@


1.5
log
@Enable bpfjit for npftest.
@
text
@d16 6
a21 1
LDADD+=		-lrumpdev_bpf -lrumpkern_sljit -lrumpnet_bpfjit
@


1.4
log
@NPF:
- Implement dynamic NPF rules.  Controlled through npf(3) library of via
  npfctl rule command.  A rule can be removed using a unique identifier,
  returned on addition, or using a key which is SHA1 hash of the rule.
  Adjust npftest and add a regression test.
- Improvements to rule inspection mechanism.
- Initial BPF support as an alternative to n-code.
- Minor fixes; bump the version.
@
text
@d15 3
a17 2
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpnet_npf
LDADD+=		-lrumpdev_bpf
d21 1
a21 1
WARNS=		4
@


1.3
log
@Move and rename librumpdev_npf to librumpnet_npf.
@
text
@d16 1
@


1.3.2.1
log
@resync with head
@
text
@a15 1
LDADD+=		-lrumpdev_bpf
@


1.3.2.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a6 4
NOMAN=		# no man page

WARNS=		5
NOLINT=		# disabled (note: deliberately)
d15 1
a15 1
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net
d18 1
a18 1
.include <bsd.own.mk>
d20 3
a22 7
.if ${MKSLJIT} != "no"
LDADD+=		-lrumpkern_sljit -lrumpnet_bpfjit
.endif

LDADD+=		-lrumpnet_npf

LDADD+=		-lpcap -lprop -lpthread
@


1.2
log
@npftest: add a stream processor, which prints out the TCP state information.
A tool for debugging connection tracking from tcpdump -w captured data.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2012/04/14 21:57:29 rmind Exp $
d15 1
a15 1
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpdev_npf
@


1.2.2.1
log
@file Makefile was added on branch netbsd-6 on 2012-06-26 00:07:17 +0000
@
text
@d1 28
@


1.2.2.2
log
@Pull up following revision(s) (requested by rmind in ticket #354):
	sys/net/npf/npf_state_tcp.c: revision 1.4
	sys/net/npf/npf_state_tcp.c: revision 1.5
	sys/net/npf/npf_state_tcp.c: revision 1.6
	usr.sbin/npf/npftest/npftest.c: revision 1.1
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.1
	usr.sbin/npf/npftest/npftest.c: revision 1.2
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.2
	usr.sbin/npf/npfctl/npf_data.c: revision 1.11
	usr.sbin/npf/npftest/npftest.c: revision 1.3
	usr.sbin/npf/npfctl/npf_data.c: revision 1.12
	usr.sbin/npf/npftest/npftest.h: revision 1.1
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.5
	usr.sbin/npf/npfctl/npf_data.c: revision 1.13
	sys/net/npf/npf.h: revision 1.16
	usr.sbin/npf/npftest/npftest.h: revision 1.2
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.6
	usr.sbin/npf/npftest/npftest.h: revision 1.3
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.7
	usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.10
	usr.sbin/npf/npfctl/npf_build.c: revision 1.6
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.8
	usr.sbin/npf/npfctl/npf_build.c: revision 1.7
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.1
	usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_build.c: revision 1.8
	usr.sbin/npf/npftest/libnpftest/npf_table_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_build.c: revision 1.9
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.10
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.11
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.12
	sys/net/npf/npf_state.c: revision 1.7
	usr.sbin/npf/npfctl/npfctl.c: revision 1.11
	usr.sbin/npf/npfctl/npfctl.c: revision 1.12
	usr.sbin/npf/npfctl/Makefile: revision 1.7
	sys/rump/net/lib/libnet/Makefile: revision 1.14
	sys/net/npf/npf_mbuf.c: revision 1.7
	usr.sbin/npf/npftest/Makefile: revision 1.1
	usr.sbin/npf/npftest/Makefile: revision 1.2
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.1
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.2
	usr.sbin/npf/npftest/npfstream.c: revision 1.1
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.2
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.3
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.3
	usr.sbin/npf/npfctl/npfctl.h: revision 1.12
	sys/rump/dev/lib/libnpf/Makefile: revision 1.2
	usr.sbin/npf/npfctl/npfctl.h: revision 1.14
	sys/rump/dev/lib/libnpf/Makefile: revision 1.3
	usr.sbin/npf/npfctl/npfctl.h: revision 1.15
	usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.9
	sys/net/npf/npf_ctl.c: revision 1.15
	usr.sbin/npf/npfctl/npf_var.c: revision 1.4
	usr.sbin/npf/npfctl/npf_var.h: revision 1.2
	usr.sbin/npf/npfctl/npf_var.c: revision 1.5
	sys/net/npf/npf_impl.h: revision 1.13
	sys/net/npf/npf_sendpkt.c: revision 1.10
	sys/net/npf/npf_impl.h: revision 1.14
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.4
	sys/net/npf/npf_impl.h: revision 1.15
	sys/net/npf/npf_handler.c: revision 1.16
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.1
	usr.sbin/npf/npftest/libnpftest/npf_processor_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.5
	sys/net/npf/npf_handler.c: revision 1.17
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.2
	sys/net/npf/npf_ncode.h: revision 1.7
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.1
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.3
	sys/net/npf/npf_ncode.h: revision 1.8
npf_tcp_inwindow: in a case of negative skew, bump the maximum seen value of
SEQ+LEN in the receiver's side correctly (using ACK from the sender's side).
PR/46265 from Changli Gao.
rumpnet_net: add pfil.c
Update rumpdev_npf; use WARNS=4.
Add initial NPF regression tests integrated with RUMP framework (running the
kernel part of NPF in userland).  Other tests will be added once converted to
RUMP framework.  All tests are in the public domain.
Some Makefile fixes from christos@@.
- Fix double-free case on ICMP return case.
- npf_pfil_register: handle kernels without INET6 option correctly.
- Reduce some #ifdefs.
npfctl(8): add show-config command.  Also, update syntax.
npftest: add a stream processor, which prints out the TCP state information.
A tool for debugging connection tracking from tcpdump -w captured data.
npftest: add a module for TCP state tracking and add few test cases.
npf_state_tcp: add an assert; fix some comments while here.
- Rework NPF NAT syntax to be more structured and support future additions
  of different types and configurations of NAT.
- npfctl: improve disassemble and show-config command functionality.
- Fix custom ICMP code and type filtering.
make this compile again.
remove error(1) output
Remove superfluous Pp
- make each element of a variable hold a type
- change get_type to take an index, so we can get the individual types of
  each element (since primitive elements can be in lists)
- make port_range primitive
- add a routine to convert a variable of primitives to a variable containing
- only port ranges.
remove extra rule that got merged...
@
text
@a0 28
# $NetBSD: Makefile,v 1.1 2012/04/14 21:57:29 rmind Exp $
#
# Public Domain
#

PROG=		npftest

SRCS=		npftest.c npfstream.c
CPPFLAGS+=	-I${.CURDIR}

LIBNPFTEST!=	cd ${.CURDIR}/libnpftest && ${MAKE} -V .OBJDIR
DPADD+=		${LIBNPFTEST}/libnpftest.a
LDADD+=		-L${LIBNPFTEST} -lnpftest

LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpdev_npf

LDADD+=		-lpcap -lprop -lpthread

WARNS=		4
NOMAN=		# no man page
NOLINT=		# disabled (note: deliberately)

SUBDIR+=	libnpftest

${LIBNPFTEST}/libnpftest.a: all-libnpftest

.include <bsd.subdir.mk>
.include <bsd.prog.mk>
@


1.2.2.3
log
@Pull up following revision(s) (requested by rmind in ticket #678):
	sys/rump/librump/rumpkern/rump.c: revision 1.243
	sys/rump/librump/rumpkern/rump.c: revision 1.244
	sys/rump/librump/rumpkern/rump.c: revision 1.245
	sys/rump/librump/rumpkern/rump.c: revision 1.246
	usr.sbin/npf/npftest/npftest.c: revision 1.5
	usr.sbin/npf/npftest/README: revision 1.2
	usr.sbin/npf/npftest/npftest.h: revision 1.5
	sys/rump/net/Makefile.rumpnetcomp: revision 1.5
	sys/rump/net/lib/libnpf/shlib_version: revision 1.1
	sys/net/npf/npf_impl.h: revision 1.22
	sys/rump/dev/lib/libnpf/Makefile: file removal
	usr.sbin/npf/npftest/Makefile: revision 1.3
	sys/rump/dev/lib/libnpf/component.c: file removal
	sys/rump/dev/lib/libnpf/shlib_version: file removal
	sys/net/npf/npf_state.c: revision 1.12
	sys/rump/net/lib/libnpf/component.c: revision 1.1
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.4
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.6
	sys/rump/net/lib/libnpf/Makefile: revision 1.1
Move and rename librumpdev_npf to librumpnet_npf.
Enable the build of librumpnet_npf.
Add npf_state_setsampler() for _NPF_TESTING case.  This also fixes the build.
Call pserialize_init() during rump start-up, since librump/net/npf
uses it.
It helps to include the declaration of the routine being called.
We also need kcpuset_init() now.
Use correct routine name - kcpuset_sysinit() vs kcpuset_init()
@
text
@d1 1
a1 1
# $NetBSD$
d15 1
a15 1
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpnet_npf
@


1.2.2.4
log
@Pull up following revision(s) (requested by rmind in ticket #817):
	usr.sbin/npf/npfctl/npfctl.8: revision 1.12
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.27
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.18
	usr.sbin/npf/npfctl/npf_build.c: revision 1.20
	usr.sbin/npf/npfctl/npfctl.c: revision 1.28
	lib/libnpf/npf.c: revision 1.16
	usr.sbin/npf/npfctl/npfctl.c: revision 1.29
	lib/libnpf/npf.c: revision 1.17
	sys/modules/npf/Makefile: revision 1.12
	sys/net/npf/npf_rproc.c: revision 1.6
	usr.sbin/npf/npftest/README: revision 1.4
	sys/net/npf/npf_tableset.c: revision 1.17
	sys/net/npf/npf_ctl.c: revision 1.21
	sys/net/npf/npf_ctl.c: revision 1.22
	usr.sbin/npf/npfctl/npfctl.h: revision 1.25
	lib/libnpf/npf.h: revision 1.13
	usr.sbin/npf/npftest/npftest.conf: revision 1.2
	usr.sbin/npf/npfctl/npfctl.h: revision 1.26
	sys/net/npf/npf_ruleset.c: revision 1.17
	lib/libnpf/npf.h: revision 1.14
	sys/net/npf/npf_ruleset.c: revision 1.18
	sys/net/npf/npf_conf.c: revision 1.1
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.10
	sys/net/npf/npf_conf.c: revision 1.2
	sys/net/npf/npf_instr.c: revision 1.16
	sys/net/npf/npf_handler.c: revision 1.26
	sys/net/npf/npf_impl.h: revision 1.26
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.14
	sys/net/npf/npf_processor.c: revision 1.15
	sys/net/npf/npf_impl.h: revision 1.27
	sys/net/npf/npf_alg_icmp.c: revision 1.15
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.15
	usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.16
	sys/net/npf/npf_ncode.h: revision 1.11
	sys/net/npf/files.npf: revision 1.10
	usr.sbin/npf/npftest/Makefile: revision 1.4
	usr.sbin/npf/npfctl/npfctl.c: revision 1.30
	lib/libnpf/npf.3: revision 1.8
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.4
	sys/net/npf/npf_session.c: revision 1.21
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.5
	usr.sbin/npf/npfctl/npf_build.c: revision 1.18
	usr.sbin/npf/npfctl/npf_build.c: revision 1.19
	sys/net/npf/npf_alg.c: revision 1.7
	usr.sbin/npf/npfctl/Makefile: revision 1.10
	sys/net/npf/npf_inet.c: revision 1.21
	sys/net/npf/npf.h: revision 1.26
	sys/net/npf/npf.h: revision 1.27
	usr.sbin/pf/ftp-proxy/Makefile: revision 1.8
	sys/net/npf/npf_nat.c: revision 1.19
	sys/net/npf/npf.c: revision 1.15
	sys/net/npf/npf_state.c: revision 1.14
	sys/net/npf/npf_sendpkt.c: revision 1.14
	sys/rump/net/lib/libnpf/Makefile: revision 1.4
IPv6 linklocal address printing cosmetics
NPF:
- Implement dynamic NPF rules.  Controlled through npf(3) library of via
  npfctl rule command.  A rule can be removed using a unique identifier,
  returned on addition, or using a key which is SHA1 hash of the rule.
  Adjust npftest and add a regression test.
- Improvements to rule inspection mechanism.
- Initial BPF support as an alternative to n-code.
- Minor fixes; bump the version.
Disable -DWITH_NPF for now; will be converted to BPF mechanism.
- Fix NPF config reload with dynamic rules present.
- Implement list and flush commands on a dynamic ruleset.
Allow filtering on IP addresses even if the L4 protocol is unknown.
Patch from spz@@.
npftest: adjust for recent change.
@
text
@a15 1
LDADD+=		-lrumpdev_bpf
@


1.1
log
@Add initial NPF regression tests integrated with RUMP framework (running the
kernel part of NPF in userland).  Other tests will be added once converted to
RUMP framework.  All tests are in the public domain.

Some Makefile fixes from christos@@.
@
text
@d1 1
a1 1
# $NetBSD$
d8 1
a8 1
SRCS=		npftest.c
d15 3
a17 2
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrump -lrumpnet_net
LDADD+=		-lrumpnet_virtif -lrumpdev_npf -lpthread
@


1.1.2.1
log
@file Makefile was added on branch yamt-pagecache on 2012-04-17 00:09:50 +0000
@
text
@d1 27
@


1.1.2.2
log
@sync with head
@
text
@a0 27
# $NetBSD$
#
# Public Domain
#

PROG=		npftest

SRCS=		npftest.c
CPPFLAGS+=	-I${.CURDIR}

LIBNPFTEST!=	cd ${.CURDIR}/libnpftest && ${MAKE} -V .OBJDIR
DPADD+=		${LIBNPFTEST}/libnpftest.a
LDADD+=		-L${LIBNPFTEST} -lnpftest

LDADD+=		-lrump -lrumpvfs -lrumpnet -lrump -lrumpnet_net
LDADD+=		-lrumpnet_virtif -lrumpdev_npf -lpthread

WARNS=		4
NOMAN=		# no man page
NOLINT=		# disabled (note: deliberately)

SUBDIR+=	libnpftest

${LIBNPFTEST}/libnpftest.a: all-libnpftest

.include <bsd.subdir.mk>
.include <bsd.prog.mk>
@


1.1.2.3
log
@sync with head
@
text
@d8 1
a8 1
SRCS=		npftest.c npfstream.c
d15 2
a16 3
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpnet_npf

LDADD+=		-lpcap -lprop -lpthread
@


1.1.2.4
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@a6 4
NOMAN=		# no man page

WARNS=		5
NOLINT=		# disabled (note: deliberately)
d15 1
a15 2
LDADD+=		-lrump -lrumpvfs -lrumpnet -lrumpnet_net
LDADD+=		-lrumpdev_bpf
d17 1
a17 1
.include <bsd.own.mk>
d19 3
a21 7
.if ${MKSLJIT} != "no"
LDADD+=		-lrumpkern_sljit -lrumpnet_bpfjit
.endif

LDADD+=		-lrumpnet_npf

LDADD+=		-lpcap -lprop -lpthread
@


