···11+## pflightbar
22+A little utility for OpenBSD on the Chromebook Pixel to flash the lightbar red when
33+pf blocks a packet.
44+([Demo](https://twitter.com/jcs/status/784821967258017794))
55+66+### Usage
77+Make sure the `pflog0` device exists (usually created by `/etc/rc.d/pflogd`) and that blocked
88+traffic is sent to it via a `pf` rule:
99+1010+ block return log
1111+1212+Then just run `pflightbar &` as root.
1313+It will initialize the `pcap` device, open `/dev/chromeec`, `chroot` to `/var/empty`
1414+and then drop privileges to `nobody`.
1515+1616+`pflightbar` will load some "lightbyte" byte code into the lightbar's `program` sequence
1717+to flash red through a full ramp up and back down.
1818+This is used to minimize communication with the EC when flashing, rather than having to
1919+send the full RGB and dim sequences every time.
2020+2121+When a blocked packet is sent to `pflog0`, `pflightbar` will see it and tell the lightbar
2222+to run the `program` sequence to flash red, and then return to its normal (`S0`) sequence.