Documentation
¶
Overview ¶
Package dnscache maps remote IP addresses back to the hostnames the local machine resolved them from. netscope can only see IPs on the wire; by sniffing DNS responses it recovers the human-meaningful domain for each flow.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a bounded, TTL'd IP -> hostname map. Safe for concurrent use.
func New ¶
New returns a Cache. ttl bounds how long a mapping is trusted after it was last observed; max bounds the number of retained entries.
func (*Cache) LoadFrom ¶ added in v0.6.0
LoadFrom merges mappings from a file written by SaveTo, preserving each entry's original "seen" time (so the TTL still applies) and dropping any that have already expired. A missing file is not an error.