src/usr/local/bin/parser_readme.md
The parser content consists of:
, found in /etc/inc/
, found in /usr/local/bin/
Call:
<pre>php -f parser_ipv6_tester.php</pre>, there should always be 0 fails. Amount of passes depends on the test content.
'php -f' is optional on a pfSense system.
, found in /etc/inc/
, which is used by the /usr/local/www/status_dhcpv6_leases.php file
to present the Status of DHCPv6 leases.
, found in /usr/local/bin/ , that when started from the command line initiates parser_dhcpv6_leases.inc
and prints out lease and debug information.
Main focus in this read me file will be on the leases tester.
The lease tester is good to have since it shows what the dhcpv6 leases file contains before it is consumed by the status dhcpv6 leases page.
Especially for debugging this comes in handy as you some times might see some leases that do not contain all the content you expect. Whether it be a defect in ISC DHCP or something else it is nice to have some command line tool to provide an overview of the content of the otherwise not so readable lease file. Basically an overview that gets a little closer to what we know from the DHCPv6 Status Leases page of pfSense.
Original intention was to provide a fix for the status_dhcpv6_leases.php file to better handle lease content. But as can be seen a little extra got into it.
To parse an ISC DHCPv6 lease file (as used by pfSense) call e.g.:
<pre>php -f parser_dhcpv6_leases_tester.php <file></pre>When not provided the default lease file will be used
( /var/dhcpd/var/db/dhcpd6.leases )
If you really want to test the parser try modify the content of the lease file or the arrangement of the curly braces {}.
Experimental as mentioned in the Failover section below.
Failover handling is currently experimental as no live configured system has been tested. Only source code and other sources of information has been used and the information gathered here has been tested/injected into a dhcpv6 leases file:
<pre><code>failover peer "Failover-Pair-Name" state { my state recover-wait at 1 2017/03/03 20:20:12; partner state communications-interrupted at 1 2017/03/03 20:20:12; mclt 123; } failover peer "Failover-2GETHER" state { my state recover-done at 1 2017/12/03 21:24:12; partner state unknown-state at 1 2017/03/03 21:44:12; mclt 456; }</code></pre>https://github.com/al-right/pfSense-dhcpv6-gui-leases-patch
, but if in doubt first try https://forum.netgate.com/