An Angstrom-based parser for the FreeBSD pf firewall configuration format.
Ticked below are the lines that are (at least partially) implemented.
macro definitions (NB: macro expansion is NOT)optionpf-rulenat-rulebinat-rulerdr-ruleantispoof-rulealtq-rulequeue-ruletrans-anchorsanchor-ruleanchor-closeload-anchortable-ruleincludeFirst, install the dependencies:
opam pin add -n pf .
opam install --deps-only pf
# build test executable, self-test rules from 'man pf.conf':
jbuilder runtestThis will give you the parse_conf.exe utility that you can use to parse firewall configuration files:
./_build/default/test/parse_conf.exe /home/me/my-pf-file.conf
Reading "/home/me/my-pf-file.conf"
Line 0: ext_bridge = "external"
Read 1 lines!