Index of /pub/NetBSD/NetBSD-release-10/src/usr.sbin/npf/npftest
Name Last modified Size Description
Parent Directory -
npftest.h 2020-05-30 23:16 1.6K
npftest.conf 2020-05-30 23:16 1.4K
npftest.c 2020-05-30 23:16 7.0K
npfstream.c 2019-07-23 09:52 2.9K
libnpftest/ 2022-12-18 05:36 -
README 2018-09-29 23:41 825
Makefile 2021-07-07 20:51 953
CVS/ 2022-12-18 05:36 -
$NetBSD: README,v 1.7 2018/09/29 14:41:36 rmind Exp $
npftest - a tool for regression testing and debugging NPF.
It uses RUMP framework to run NPF kernel module in the userspace.
---
Test:
npfctl debug npftest.conf /tmp/npf.nvlist
npftest -c /tmp/npf.nvlist -t
Stream:
tcpdump -w stream.pcap -i $interface "host $host and tcp"
npfctl debug npftest.conf /tmp/npf.nvlist
npftest -c /tmp/npf.nvlist -s stream.pcap > stream_npf_data.txt
Preferably, use MALLOC_OPTIONS="AJ" and/or other facilities.
Benchmark:
npftest -b rule -c /tmp/npf.nvlist -p $ncpu
---
Update RUMP libraries once the kernel side has been changed. Hint:
cd src/sys/net/npf
sudo make includes
cd src/sys/rump/net/lib/libnpf
make distclean
MKDEBUG=yes MKDEBUGLIB=yes DBG="-g -O2" make -j8
sudo MKDEBUG=yes MKDEBUGLIB=yes DBG="-g -O2" make install