head	1.14;
access;
symbols
	netbsd-11-0-RC3:1.14
	netbsd-11-0-RC2:1.14
	netbsd-11-0-RC1:1.14
	perseant-exfatfs-base-20250801:1.14
	netbsd-11:1.14.0.2
	netbsd-11-base:1.14
	netbsd-10-1-RELEASE:1.11
	perseant-exfatfs-base-20240630:1.11
	perseant-exfatfs:1.11.0.8
	perseant-exfatfs-base:1.11
	netbsd-8-3-RELEASE:1.8
	netbsd-9-4-RELEASE:1.10.2.1
	netbsd-10-0-RELEASE:1.11
	netbsd-10-0-RC6:1.11
	netbsd-10-0-RC5:1.11
	netbsd-10-0-RC4:1.11
	netbsd-10-0-RC3:1.11
	netbsd-10-0-RC2:1.11
	netbsd-10-0-RC1:1.11
	netbsd-10:1.11.0.6
	netbsd-10-base:1.11
	netbsd-9-3-RELEASE:1.10.2.1
	cjep_sun2x-base1:1.11
	cjep_sun2x:1.11.0.4
	cjep_sun2x-base:1.11
	cjep_staticlib_x-base1:1.11
	netbsd-9-2-RELEASE:1.10.2.1
	cjep_staticlib_x:1.11.0.2
	cjep_staticlib_x-base:1.11
	netbsd-9-1-RELEASE:1.10.2.1
	phil-wifi-20200421:1.10
	phil-wifi-20200411:1.10
	is-mlppp:1.10.0.4
	is-mlppp-base:1.10
	phil-wifi-20200406:1.10
	netbsd-8-2-RELEASE:1.8
	netbsd-9-0-RELEASE:1.10
	netbsd-9-0-RC2:1.10
	netbsd-9-0-RC1:1.10
	phil-wifi-20191119:1.10
	netbsd-9:1.10.0.2
	netbsd-9-base:1.10
	phil-wifi-20190609:1.10
	netbsd-8-1-RELEASE:1.8
	netbsd-8-1-RC1:1.8
	pgoyette-compat-merge-20190127:1.8.24.2
	pgoyette-compat-20190127:1.10
	pgoyette-compat-20190118:1.9
	pgoyette-compat-1226:1.9
	pgoyette-compat-1126:1.9
	pgoyette-compat-1020:1.9
	pgoyette-compat-0930:1.9
	pgoyette-compat-0906:1.8
	netbsd-7-2-RELEASE:1.8
	pgoyette-compat-0728:1.8
	netbsd-8-0-RELEASE:1.8
	phil-wifi:1.8.0.26
	phil-wifi-base:1.8
	pgoyette-compat-0625:1.8
	netbsd-8-0-RC2:1.8
	pgoyette-compat-0521:1.8
	pgoyette-compat-0502:1.8
	pgoyette-compat-0422:1.8
	netbsd-8-0-RC1:1.8
	pgoyette-compat-0415:1.8
	pgoyette-compat-0407:1.8
	pgoyette-compat-0330:1.8
	pgoyette-compat-0322:1.8
	pgoyette-compat-0315:1.8
	netbsd-7-1-2-RELEASE:1.8
	pgoyette-compat:1.8.0.24
	pgoyette-compat-base:1.8
	netbsd-7-1-1-RELEASE:1.8
	matt-nb8-mediatek:1.8.0.22
	matt-nb8-mediatek-base:1.8
	perseant-stdc-iso10646:1.8.0.20
	perseant-stdc-iso10646-base:1.8
	netbsd-8:1.8.0.18
	netbsd-8-base:1.8
	prg-localcount2-base3:1.8
	prg-localcount2-base2:1.8
	prg-localcount2-base1:1.8
	prg-localcount2:1.8.0.16
	prg-localcount2-base:1.8
	pgoyette-localcount-20170426:1.8
	bouyer-socketcan-base1:1.8
	pgoyette-localcount-20170320:1.8
	netbsd-7-1:1.8.0.14
	netbsd-7-1-RELEASE:1.8
	netbsd-7-1-RC2:1.8
	netbsd-7-nhusb-base-20170116:1.8
	bouyer-socketcan:1.8.0.12
	bouyer-socketcan-base:1.8
	pgoyette-localcount-20170107:1.8
	netbsd-7-1-RC1:1.8
	pgoyette-localcount-20161104:1.8
	netbsd-7-0-2-RELEASE:1.8
	localcount-20160914:1.8
	netbsd-7-nhusb:1.8.0.10
	netbsd-7-nhusb-base:1.8
	pgoyette-localcount-20160806:1.8
	pgoyette-localcount-20160726:1.8
	pgoyette-localcount:1.8.0.8
	pgoyette-localcount-base:1.8
	netbsd-7-0-1-RELEASE:1.8
	netbsd-7-0:1.8.0.6
	netbsd-7-0-RELEASE:1.8
	netbsd-7-0-RC3:1.8
	netbsd-7-0-RC2:1.8
	netbsd-7-0-RC1:1.8
	netbsd-6-0-6-RELEASE:1.3.2.3
	netbsd-6-1-5-RELEASE:1.3.2.3
	netbsd-7:1.8.0.4
	netbsd-7-base:1.8
	yamt-pagecache-base9:1.8
	yamt-pagecache-tag8:1.1.2.3
	netbsd-6-1-4-RELEASE:1.3.2.3
	netbsd-6-0-5-RELEASE:1.3.2.3
	tls-earlyentropy:1.8.0.2
	tls-earlyentropy-base:1.8
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.8
	riastradh-drm2-base3:1.8
	netbsd-6-1-3-RELEASE:1.3.2.3
	netbsd-6-0-4-RELEASE:1.3.2.3
	netbsd-6-1-2-RELEASE:1.3.2.3
	netbsd-6-0-3-RELEASE:1.3.2.3
	netbsd-6-1-1-RELEASE:1.3.2.3
	riastradh-drm2-base2:1.4
	riastradh-drm2-base1:1.4
	riastradh-drm2:1.4.0.4
	riastradh-drm2-base:1.4
	netbsd-6-1:1.3.2.3.0.6
	netbsd-6-0-2-RELEASE:1.3.2.3
	netbsd-6-1-RELEASE:1.3.2.3
	netbsd-6-1-RC4:1.3.2.3
	netbsd-6-1-RC3:1.3.2.3
	agc-symver:1.4.0.6
	agc-symver-base:1.4
	netbsd-6-1-RC2:1.3.2.3
	netbsd-6-1-RC1:1.3.2.3
	yamt-pagecache-base8:1.4
	netbsd-6-0-1-RELEASE:1.3.2.3
	yamt-pagecache-base7:1.4
	matt-nb6-plus-nbase:1.3.2.3
	yamt-pagecache-base6:1.4
	netbsd-6-0:1.3.2.3.0.4
	netbsd-6-0-RELEASE:1.3.2.3
	netbsd-6-0-RC2:1.3.2.3
	tls-maxphys:1.4.0.2
	tls-maxphys-base:1.8
	matt-nb6-plus:1.3.2.3.0.2
	matt-nb6-plus-base:1.3.2.3
	netbsd-6-0-RC1:1.3.2.3
	netbsd-6:1.3.0.2
	yamt-pagecache-base5:1.1
	yamt-pagecache:1.1.0.2
	yamt-pagecache-base4:1.1;
locks; strict;
comment	@# @;


1.14
date	2025.07.20.12.25.54;	author joe;	state Exp;
branches;
next	1.13;
commitid	msEx3GtvKcr0Xt3G;

1.13
date	2025.07.01.20.19.30;	author joe;	state Exp;
branches;
next	1.12;
commitid	LnLTqk9cpwr1c51G;

1.12
date	2025.06.01.00.48.41;	author joe;	state Exp;
branches;
next	1.11;
commitid	2qRh9tcRRtgpG7XF;

1.11
date	2020.05.30.14.16.57;	author rmind;	state Exp;
branches
	1.11.8.1;
next	1.10;
commitid	fZlE4LRokUrgTgaC;

1.10
date	2019.01.19.21.19.32;	author rmind;	state Exp;
branches
	1.10.2.1;
next	1.9;
commitid	zfYSEXSEdJmsdr8B;

1.9
date	2018.09.29.14.41.36;	author rmind;	state Exp;
branches;
next	1.8;
commitid	1PaZzhI9AYpgB0UA;

1.8
date	2013.11.16.01.41.43;	author rmind;	state Exp;
branches
	1.8.24.1
	1.8.26.1;
next	1.7;
commitid	hu3oqHgTK0wAsrdx;

1.7
date	2013.09.24.02.04.21;	author rmind;	state Exp;
branches;
next	1.6;
commitid	JDUtmS1j66IUhD6x;

1.6
date	2013.09.19.01.49.07;	author rmind;	state Exp;
branches;
next	1.5;
commitid	VSNgsNtP8JYImZ5x;

1.5
date	2013.09.19.01.04.45;	author rmind;	state Exp;
branches;
next	1.4;
commitid	p3Zzinm4v6Ct7Z5x;

1.4
date	2012.08.12.03.35.14;	author rmind;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2012.06.04.00.28.34;	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;
next	1.1;

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

1.11.8.1
date	2025.08.02.05.58.53;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.10.2.1
date	2020.06.20.15.46.48;	author martin;	state Exp;
branches;
next	;
commitid	1R3KrEVYbMGFJYcC;

1.8.24.1
date	2018.09.30.01.46.01;	author pgoyette;	state Exp;
branches;
next	1.8.24.2;
commitid	SQ44grEPCeKPh4UA;

1.8.24.2
date	2019.01.26.22.00.39;	author pgoyette;	state Exp;
branches;
next	;
commitid	JKpcmvSjdT25dl9B;

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

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

1.3.2.1
date	2012.06.04.00.28.34;	author riz;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2012.06.26.00.07.18;	author riz;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2012.08.13.17.49.53;	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.51;	author yamt;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2012.10.30.19.00.47;	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.14
log
@
l2 only tests

for this test suite, we test to ensure that all frames
are passed by default when no layer 2 rules are set in the config

reviewed by christos@@
@
text
@# $NetBSD: Makefile,v 1.13 2025/07/01 20:19:30 joe Exp $
#
# Public Domain
#

RUMPTOP=	${.CURDIR}/../../../../sys/rump

LIB=		npftest
LIBISPRIVATE=	yes

SRCS+=		npf_test_subr.c
SRCS+=		npf_mbuf_subr.c

SRCS+=		npf_nbuf_test.c
SRCS+=		npf_bpf_test.c
SRCS+=		npf_table_test.c
SRCS+=		npf_gc_test.c
SRCS+=		npf_state_test.c
SRCS+=		npf_rule_test.c
SRCS+=		npf_nat_test.c
SRCS+=		npf_rid_test.c
SRCS+=		npf_l2rule_test.c
SRCS+=		npfl2onlytest.c

SRCS+=		npf_perf_test.c

CPPFLAGS+=	-D_NPF_TESTING
CPPFLAGS+=	-I${.CURDIR}/../../../../sys/net/npf
CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern

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

WARNS=		5

.include "${RUMPTOP}/Makefile.rump"
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
@


1.13
log
@Rump testing for layer 2 filtering in NPF

reviewed by christos@@
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2025/06/01 00:48:41 joe Exp $
d23 1
@


1.12
log
@testing for NPF user/group filtering: reviewed by christos@@
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2020/05/30 14:16:57 rmind Exp $
d22 1
@


1.11
log
@Major NPF improvements (merge from upstream):

- Switch to the C11-style atomic primitives using atomic_loadstore(9).

- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.

- npfkern: rewrite the G/C worker logic and make it self-tuning.

- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.

- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.

- Amend and improve the manual pages.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2019/01/19 21:19:32 rmind Exp $
d21 1
@


1.11.8.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2025/07/20 12:25:54 joe Exp $
a20 3
SRCS+=		npf_rid_test.c
SRCS+=		npf_l2rule_test.c
SRCS+=		npfl2onlytest.c
@


1.10
log
@Major NPF improvements:
- Convert NPF connection table to thmap.  State lookup is now lock-free.
- Improve connection state G/C: it is now incremental and tunable.
- Add support for dynamic NAT address.  Translation addresses can now be
  selected from a pool of addresses.  There are two selection algorithms,
  "ip-hash" and "round-robin" (see the man page).
- Translation address can be specified as e.g. ifaddrs(wm0) in npf.conf
  to dynamically choose an IP from the interface address(es).
- Add support for the NETMAP algorithm with static NAT for net-to-net
  translation (it is equivalent to iptables NETMAP logic).
- Convert 'ipset' tables to use thmap; the table lookup is now lock-free.
- Misc improvements, bug fixes and more unit tests.
- Bump NPF_VERSION (will also bump libnpf).
@
text
@d1 1
a1 1
# $NetBSD$
d17 1
a17 1
SRCS+=		npf_conn_test.c
@


1.10.2.1
log
@Pull up following revision(s) (requested by rmind in ticket #956):

	usr.sbin/npf/npf-params.7: revision 1.4
	sys/net/npf/npf_worker.c: revision 1.9
	usr.sbin/npf/npftest/npftest.h: revision 1.17
	usr.sbin/npf/npfctl/npf_bpf_comp.c: revision 1.16
	usr.sbin/npf/npf-params.7: revision 1.5
	sys/net/npf/npf_state_tcp.c: revision 1.21
	usr.sbin/npf/npfctl/npf_build.c: revision 1.55
	usr.sbin/npf/npf-params.7: revision 1.6
	sys/net/npf/npfkern.h: revision 1.5
	lib/libnpf/npf.c: revision 1.49
	usr.sbin/npf/npf-params.7: revision 1.7
	sys/net/npf/npf_impl.h: revision 1.81
	sys/net/npf/npf_ext_log.c: revision 1.17
	usr.sbin/npf/npfctl/npfctl.h: revision 1.53
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.11
	sys/net/npf/npf_nat.c: revision 1.50
	sys/net/npf/npf_mbuf.c: revision 1.24
	sys/net/npf/npf_alg.c: revision 1.22
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.14
	usr.sbin/npf/npftest/libnpftest/npf_conn_test.c: file removal
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.10
	sys/net/npf/npf.h: revision 1.63
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.21
	usr.sbin/npf/npfctl/npf_var.c: revision 1.13
	sys/net/npf/files.npf: revision 1.23
	usr.sbin/npf/npfctl/npf_show.c: revision 1.32
	usr.sbin/npf/npfctl/npf.conf.5: revision 1.91
	sys/net/npf/npf_os.c: revision 1.18
	sys/net/npf/npf_connkey.c: revision 1.2
	sys/net/npf/npf_conf.c: revision 1.17
	lib/libnpf/libnpf.3: revision 1.12
	usr.sbin/npf/npftest/npftest.c: revision 1.25
	usr.sbin/npf/npftest/libnpftest/npf_gc_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.51
	sys/net/npf/npf_tableset.c: revision 1.35
	usr.sbin/npf/npftest/npftest.conf: revision 1.9
	sys/net/npf/npf_sendpkt.c: revision 1.22
	usr.sbin/npf/npfctl/npf_var.h: revision 1.10
	sys/net/npf/npf_state.c: revision 1.23
	sys/net/npf/npf_conn.h: revision 1.20
	usr.sbin/npf/npfctl/npfctl.c: revision 1.64
	usr.sbin/npf/npfctl/npf_cmd.c: revision 1.1
	sys/net/npf/npf_portmap.c: revision 1.5
	sys/net/npf/npf_params.c: revision 1.3
	usr.sbin/npf/npfctl/npf_scan.l: revision 1.32
	tests/net/npf/t_npf.sh: revision 1.4
	sys/net/npf/npf_ext_rndblock.c: revision 1.9
	lib/libnpf/npf.h: revision 1.39
	sys/net/npf/npf_ruleset.c: revision 1.51
	sys/net/npf/npf_alg_icmp.c: revision 1.33
	sys/net/npf/npf.c: revision 1.43
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.17
	usr.sbin/npf/npfctl/npfctl.8: revision 1.25
	sys/net/npf/npf_ctl.c: revision 1.60
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.18
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.11
	sys/net/npf/npf_handler.c: revision 1.49
	sys/net/npf/npf_inet.c: revision 1.57
	sys/net/npf/npf_ifaddr.c: revision 1.7
	sys/net/npf/npf_conndb.c: revision 1.9
	sys/net/npf/npf_if.c: revision 1.13
	usr.sbin/npf/npfctl/Makefile: revision 1.15
	sys/net/npf/npf_conn.c: revision 1.32
	sys/net/npf/npf_ext_normalize.c: revision 1.10
	sys/net/npf/npf_rproc.c: revision 1.20
	sys/net/npf/npf_worker.c: revision 1.8

Major NPF improvements (merge from upstream):
- Switch to the C11-style atomic primitives using atomic_loadstore(9).
- npfkern: introduce the 'state.key.interface' and 'state.key.direction'
  settings.  Users can now choose whether the connection state should be
  strictly per-interface or global at the configuration level.  Keep NAT
  logic to be always per-interface, though.
- npfkern: rewrite the G/C worker logic and make it self-tuning.
- npfkern and libnpf: multiple bug fixes; add param exporting; introduce
  more parameters.  Remove npf_nvlist_{copyin,copyout}() functions and
  refactor npfctl_load_nvlist() with others; add npfctl_run_op() to have
  a single entry point for operations.  Introduce npf_flow_t and clean up
  some code.
- npfctl: lots of fixes for the 'npfctl show' logic; make 'npfctl list'
  more informative; misc usability improvements and more user-friendly
  error messages.
- Amend and improve the manual pages.

npf_worker_sys{init,fini}: initialize/destroy the exit_cv condvar.

npftest -- npf_test_init(): add a workaround for NetBSD.

npf-params(7): fix the state.key defaults.

npf-params.7: s/filer/filter/

Adjust to "npfctl debug" command line changes, from rmind@@.

Use more markup.
@
text
@d17 1
a17 1
SRCS+=		npf_gc_test.c
@


1.9
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
@d17 1
@


1.8
log
@Enable bpfjit for npftest.
@
text
@d27 2
@


1.8.26.1
log
@Sync with HEAD
@
text
@a16 1
SRCS+=		npf_conn_test.c
a26 2
CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist

@


1.8.24.1
log
@Ssync with HEAD
@
text
@a26 2
CPPFLAGS+=	-I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist

@


1.8.24.2
log
@Sync with HEAD
@
text
@a16 1
SRCS+=		npf_conn_test.c
@


1.7
log
@npftest: add some concurrency testing code.
@
text
@d27 1
a27 1
WARNS=		4
@


1.6
log
@NPF: G/C n-code in favour of BPF byte-code.  Delete lots of code, mmm!
@
text
@d21 2
@


1.5
log
@- Convert NPF to use BPF byte-code by default.  Compile BPF byte-code in
  npfctl(8) and generate separate marks to describe the filter criteria.
- Rewrite 'npfctl show' functionality and fix some of the bugs.
- npftest: add a test for BPF COP.
- Bump NPF_VERSION.
@
text
@a14 1
SRCS+=		npf_processor_test.c
@


1.4
log
@- Extend npftest: add ruleset inspection testing from the config generated
  by npfctl debug functionality.  Auto-create npftest interfaces for this.
- NPF sessions: combine protocol and interface into a separate substructure,
  share between the entries and thus fix the handling of them.  Constify.
- npftest: add regression tests for NAT policies.
- npf_build_nat: simplify and fix bi-NAT regression.
- Bump yacc stack size for npfctl.
@
text
@d16 1
@


1.4.2.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d15 1
a15 1
SRCS+=		npf_bpf_test.c
a20 2
SRCS+=		npf_perf_test.c

d25 1
a25 1
WARNS=		5
@


1.3
log
@npftest: add a module for TCP state tracking and add few test cases.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2012/05/30 21:38:04 rmind Exp $
d18 2
@


1.3.2.1
log
@file Makefile was added on branch netbsd-6 on 2012-06-26 00:07:18 +0000
@
text
@d1 27
@


1.3.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 27
# $NetBSD: Makefile,v 1.1 2012/04/14 21:57:29 rmind Exp $
#
# Public Domain
#

RUMPTOP=	${.CURDIR}/../../../../sys/rump

LIB=		npftest
LIBISPRIVATE=	yes

SRCS+=		npf_test_subr.c
SRCS+=		npf_mbuf_subr.c

SRCS+=		npf_nbuf_test.c
SRCS+=		npf_processor_test.c
SRCS+=		npf_table_test.c
SRCS+=		npf_state_test.c

CPPFLAGS+=	-D_NPF_TESTING
CPPFLAGS+=	-I${.CURDIR}/../../../../sys/net/npf
CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern

WARNS=		4

.include "${RUMPTOP}/Makefile.rump"
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
@


1.3.2.3
log
@Pull up following revision(s) (requested by rmind in ticket #485):
	lib/libnpf/npf.c: revision 1.11
	sys/net/npf/npf_session.c: revision 1.17
	sys/modules/npf/Makefile: revision 1.10
	usr.sbin/npf/npftest/npftest.c: revision 1.4
	usr.sbin/npf/npftest/README: revision 1.1
	sys/net/npf/npf_tableset.c: revision 1.14
	usr.sbin/npf/npftest/npftest.h: revision 1.4
	lib/libnpf/npf.h: revision 1.10
	sys/net/npf/npf_ruleset.c: revision 1.14
	usr.sbin/npf/npfctl/npf_data.c: revision 1.18
	usr.sbin/npf/npftest/npftest.conf: revision 1.1
	sys/net/npf/npf_handler.c: revision 1.21
	sys/net/npf/npf_impl.h: revision 1.21
	usr.sbin/npf/npfctl/npfctl.c: revision 1.18
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.1
	usr.sbin/npf/npfctl/npf_build.c: revision 1.13
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.1
	usr.sbin/npf/npftest/npfstream.c: revision 1.3
	usr.sbin/npf/npftest/libnpftest/Makefile: revision 1.4
	usr.sbin/npf/npfctl/npfctl.h: revision 1.19
	sys/net/npf/npf_nat.c: revision 1.16
	sys/net/npf/npf_state.c: revision 1.11
	usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.3
	usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.5
	usr.sbin/npf/npfctl/npf_parse.y: revision 1.12
- Extend npftest: add ruleset inspection testing from the config generated
  by npfctl debug functionality.  Auto-create npftest interfaces for this.
- NPF sessions: combine protocol and interface into a separate substructure,
  share between the entries and thus fix the handling of them.  Constify.
- npftest: add regression tests for NAT policies.
- npf_build_nat: simplify and fix bi-NAT regression.
- Bump yacc stack size for npfctl.
@
text
@d1 1
a1 1
# $NetBSD$
a17 2
SRCS+=		npf_rule_test.c
SRCS+=		npf_nat_test.c
@


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 $
d17 1
@


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$
d11 1
d18 1
@


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


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

RUMPTOP=	${.CURDIR}/../../../../sys/rump

LIB=		npftest
LIBISPRIVATE=	yes

SRCS+=		npf_mbuf_subr.c

SRCS+=		npf_nbuf_test.c
SRCS+=		npf_processor_test.c
SRCS+=		npf_table_test.c

CPPFLAGS+=	-I${.CURDIR}/../../../../sys/net/npf
CPPFLAGS+=	-I${RUMPTOP}/librump/rumpkern

WARNS=		4

.include "${RUMPTOP}/Makefile.rump"
.include <bsd.lib.mk>
.include <bsd.klinks.mk>
@


1.1.2.3
log
@sync with head
@
text
@a10 1
SRCS+=		npf_test_subr.c
a15 3
SRCS+=		npf_state_test.c
SRCS+=		npf_rule_test.c
SRCS+=		npf_nat_test.c
a16 1
CPPFLAGS+=	-D_NPF_TESTING
@


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
@d15 1
a15 1
SRCS+=		npf_bpf_test.c
a20 2
SRCS+=		npf_perf_test.c

d25 1
a25 1
WARNS=		5
@


