NetBSD/usr.sbin/npf/npftest
2016-04-25 02:01:32 +00:00
..
libnpftest - Add npf_ruleset_export(), npf_rule_export() and npf_nat_policyexport(). 2014-08-10 19:09:43 +00:00
Makefile fix ATF net/npf/t_npf failure 2016-04-25 02:01:32 +00:00
npfstream.c
npftest.c include proplib.h if you're going to useuseitit 2016-01-25 12:24:41 +00:00
npftest.conf
npftest.h
README

$NetBSD: README,v 1.6 2014/06/25 00:21:42 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.plist
npftest -c /tmp/npf.plist -t

Stream:

tcpdump -w stream.pcap -i $interface "host $host and tcp"
npfctl debug npftest.conf /tmp/npf.plist
npftest -c /tmp/npf.plist -s stream.pcap > stream_npf_data.txt

Preferably, use MALLOC_OPTIONS="AJ" and/or other facilities.

Benchmark:

npftest -b rule -c /tmp/npf.plist -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