BBB WiFi Monitor
The monitoring process consists of the following three files:
- 'ipwatchd', the daemon that watches for network address changes
- 'ifdisplay', the script which 'ipwatchd' executes to displays the new configuration
- '/etc/init.d/ipwatchd', the script that handles managing the 'ipwatchd' daemon
The daemon uses netlink and rtnetlink interface to watch for address changes on any of the network interfaces. When a change is detected, it executes the 'ifdisplay' script, which writes the new configuration to the printer. The daemon is small, and because it uses the 'netlink' and 'rtnetlink' interface, has virtually no system load. 'ipwatchd' blocks on the netlink socket, so unlike a polled solution, it only wakes up when the kernel sends it a message that meets the criteria it's registered itself for.