Title: Proximity Monitor
Author: Perette Barella
Date: 2017-02-21

Proximity Monitor
=================
The proximity monitor will use ARP caching to monitor the presence of users via their devices, such as a mobile phone or laptop.  Presence of a device implies presence of a user.

To avoid producing network congestion, the monitor will examine the ARP cache.  If the device is identified in it, it's considered present.  This means this implementation is IPv4-specific, as IPv6 does not use ARP.

To further locate devices that may have changed addresses, the monitor should gradually ping the network's available IP range for which assignees are unknown.

## Open issues/Research to do
Are there going to be permissions troubles opening the ARP cache with libdnet?

IPv6 uses Neighborhood Discovery Protocol.  For IPv6, devices are supposed to have fixed addresses.  It may make more sense to ping devices directly, storing the protocol address—that said, there is some question of whether fixed addresses is truly the case with IPv6.

Should the proximity monitor run as a separate thread, or as a periodic() item?  Whatever the case, having a run loop that invokes it would be sane.  Then we can insert it in either the existing main run loop, or create its own run loop in a separate thread.

## Dependencies

- [libdnet]: libdnet provides a simplified, portable interface to several low-level networking routines, including...kernel arp(4) cache.  libdnet uses BSD 3-clause license, which is workable.  Manual pages are dnet(3) and dnet(1).

[libdnet]: https://github.com/dugsong/libdnet

## User data
Users will each have a data item consisting of a list of items that identify their presence.  These will contain:

- Hardware address (authoritative)
- Last known IPv4 protocol address (to ping the device and prime the arp cache)

## Configurable Parameters

- Duration between checking ARP cache
- Duration after disappearance from ARP cache before deciding user has left
- Frequency to ping non-present users
- Frequency to ping disappearing users
- Interval at which to scan-ping across the network range

## Commands

