xref: /openbsd/regress/sys/net/pflow/Makefile (revision 5af055cd)
1# $OpenBSD: Makefile,v 1.4 2014/03/29 11:49:41 florian Exp $
2#
3#  template_v10
4#  ----------------
5#  * create pflow0 sending from 127.0.0.1 to 127.0.0.1:9996
6#  * wait for first template and compare it to known good template
7#  * destroy pflow0
8#
9#  flow_10_{4,6}
10#  -----------------
11#  * create pflow0 sending from 127.0.0.1 to 127.0.0.1:9996
12#  * add 10.11.12.13 and 2001:db8::13 to lo0
13#  * load pf ruleset which skips on all interfaces except lo0 to not lose
14#    existing ssh sessions, e.g.:
15#	set skip on {em0 cas0 cas1 enc0}
16#	pass on lo0 no state
17#	pass on lo0 proto tcp from port 12345 to port 12346 keep state (pflow)
18#  * enable pf
19#  * generate IPv4 or IPv6 traffic
20#  * wait for flow and compare it with known good flow
21#  * destroy pflow0
22#  * delete 10.11.12.13 and 2001:db8::13 from lo0
23#
24# ifconfig
25# --------
26# Take up pflow0 and test various combinations of flowdst, flowsrc and proto.
27# Destroy it in the end.
28
29REGRESS_TARGETS=template_v10 flow_10_4 flow_10_6 ifconfig
30
31PROG=   gen_traffic
32LDADD=  -levent
33
34template_v10:
35	perl -I ${.CURDIR} ${.CURDIR}/template.pl 10 \
36	    | cmp -s ${.CURDIR}/template.v10 /dev/stdin
37
38flow_10_4: gen_traffic
39	perl -I ${.CURDIR} ${.CURDIR}/flow.pl 10 4 \
40	    | cmp -s ${.CURDIR}/flow.10_4 /dev/stdin
41flow_10_6: gen_traffic
42	perl -I ${.CURDIR} ${.CURDIR}/flow.pl 10 6 \
43	    | cmp -s ${.CURDIR}/flow.10_6 /dev/stdin
44
45ifconfig:
46	sh ${.CURDIR}/ifconfig.sh 2>&1 \
47	    | cmp -s ${.CURDIR}/ifconfig.ok /dev/stdin
48
49.PHONY: ${REGRESS_TARGETS}
50
51.include <bsd.regress.mk>
52