Flash the Chrome EC lightbar when pf blocks a packet
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add README

authored by

joshua stein and committed by
GitHub
9a90542c 355c3c78

+22
+22
README.md
··· 1 + ## pflightbar 2 + A little utility for OpenBSD on the Chromebook Pixel to flash the lightbar red when 3 + pf blocks a packet. 4 + ([Demo](https://twitter.com/jcs/status/784821967258017794)) 5 + 6 + ### Usage 7 + Make sure the `pflog0` device exists (usually created by `/etc/rc.d/pflogd`) and that blocked 8 + traffic is sent to it via a `pf` rule: 9 + 10 + block return log 11 + 12 + Then just run `pflightbar &` as root. 13 + It will initialize the `pcap` device, open `/dev/chromeec`, `chroot` to `/var/empty` 14 + and then drop privileges to `nobody`. 15 + 16 + `pflightbar` will load some "lightbyte" byte code into the lightbar's `program` sequence 17 + to flash red through a full ramp up and back down. 18 + This is used to minimize communication with the EC when flashing, rather than having to 19 + send the full RGB and dim sequences every time. 20 + 21 + When a blocked packet is sent to `pflog0`, `pflightbar` will see it and tell the lightbar 22 + to run the `program` sequence to flash red, and then return to its normal (`S0`) sequence.