1e17e15eeSflorian#! /bin/sh 2e17e15eeSflorian 3e17e15eeSflorianecho '#### up' 4fb9e2eb7Sflorianifconfig pflow0 up; ifconfig pflow0 | grep -v '^[[:space:]]index' 5e17e15eeSflorianecho '#### flowdst syntax error' 6*9985cd32Sflorianifconfig pflow0 flowdst; ifconfig pflow0 | grep -v '^[[:space:]]index' 7e17e15eeSflorianecho '#### invalid flowdst port' 8fb9e2eb7Sflorianifconfig pflow0 flowdst 127.0.0.1:0; ifconfig pflow0 | grep -v \ 9fb9e2eb7Sflorian '^[[:space:]]index' 10e17e15eeSflorianecho '#### flowdst set, invalid flowsrc' 11fb9e2eb7Sflorianifconfig pflow0 flowdst 127.0.0.1:9996; ifconfig pflow0 | grep -v \ 12fb9e2eb7Sflorian '^[[:space:]]index' 13e17e15eeSflorianecho '#### flowsrc and flowdst set' 14fb9e2eb7Sflorianifconfig pflow0 flowsrc 127.0.0.1; ifconfig pflow0 | grep -v '^[[:space:]]index' 15e17e15eeSflorianecho '#### unset flowdst' 16fb9e2eb7Sflorianifconfig pflow0 -flowdst; ifconfig pflow0 | grep -v '^[[:space:]]index' 17e17e15eeSflorianecho '#### unset flowsrc' 18fb9e2eb7Sflorianifconfig pflow0 -flowsrc; ifconfig pflow0 | grep -v '^[[:space:]]index' 19e17e15eeSflorianecho '#### flowsrc and flowdst set one command' 20fb9e2eb7Sflorianifconfig pflow0 flowsrc 127.0.0.1 flowdst 127.0.0.1:9996; ifconfig pflow0 | \ 21fb9e2eb7Sflorian grep -v '^[[:space:]]index' 22e17e15eeSflorianecho '#### proto 9' 23fb9e2eb7Sflorianifconfig pflow0 pflowproto 9; ifconfig pflow0 | grep -v '^[[:space:]]index' 24e17e15eeSflorianecho '#### proto 10' 25fb9e2eb7Sflorianifconfig pflow0 pflowproto 10; ifconfig pflow0 | grep -v '^[[:space:]]index' 26e17e15eeSflorianecho '#### proto 5' 27fb9e2eb7Sflorianifconfig pflow0 pflowproto 5; ifconfig pflow0 | grep -v '^[[:space:]]index' 28e17e15eeSflorianecho '#### syntax error proto' 29fb9e2eb7Sflorianifconfig pflow0 pflowproto 23; ifconfig pflow0 | grep -v '^[[:space:]]index' 30e17e15eeSflorianecho '#### flowdst 0.0.0.0:0; INVALID:INVALID' 31fb9e2eb7Sflorianifconfig pflow0 flowdst 0.0.0.0:0; ifconfig pflow0 | grep -v '^[[:space:]]index' 32e17e15eeSflorianecho '#### flowdst 0.0.0.0:1234; INVALID:1234' 33fb9e2eb7Sflorianifconfig pflow0 flowdst 0.0.0.0:1234; ifconfig pflow0 | grep -v \ 34fb9e2eb7Sflorian '^[[:space:]]index' 35e17e15eeSflorianecho '#### flowsrc 0.0.0.0; INVALID' 36fb9e2eb7Sflorianifconfig pflow0 flowsrc 0.0.0.0; ifconfig pflow0 | grep -v '^[[:space:]]index' 37e17e15eeSflorianecho '#### destroy' 38fb9e2eb7Sflorianifconfig pflow0 destroy; ifconfig pflow0 | grep -v '^[[:space:]]index' 39