+ """A caching layer around the kernel's network mapping between IPs and
+ MACs. This class restores persisted state that expires
+ periodically (see --arper_cache_max_staleness) at program startup
+ time. If it's unable to use the file's contents, it queries the
+ kernel (via arp) and uses an auxillary utility called arp-scan to
+ query the network. If it has to do this there's a latency hit but
+ it persists the collected data in the cache file. Either way, the
+ class behaves as a global singleton hosting this data thereafter.
+
+ """
+
+ def __init__(
+ self,
+ cached_local_state: Optional[BiDict] = None,
+ cached_supplimental_state: Optional[BiDict] = None,
+ ) -> None:
+ """For most purposes, ignore the arguments. Because this is a
+ Persistent subclass the decorator will handle invoking our load
+ and save methods to read/write persistent state transparently.
+
+ Args:
+ cached_local_state: local state to initialize mapping
+ cached_supplimental_state: remote state to initialize mapping
+ """
+