NetBSD/usr.sbin/npf/npftest
rmind 0e21825481 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.
2013-02-09 03:35:31 +00:00
..
libnpftest NPF: 2013-02-09 03:35:31 +00:00
Makefile NPF: 2013-02-09 03:35:31 +00:00
npfstream.c Fix printf format 2012-09-12 16:26:02 +00:00
npftest.c More __dead 2012-09-14 15:37:03 +00:00
npftest.conf NPF: 2013-02-09 03:35:31 +00:00
npftest.h Add npf_state_setsampler() for _NPF_TESTING case. This also fixes the build. 2012-08-15 19:47:38 +00:00
README NPF: 2013-02-09 03:35:31 +00:00

$NetBSD: README,v 1.4 2013/02/09 03:35:33 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 -c /tmp/npf.plist -s stream.pcap -o stream_npf_data.txt

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

---

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