Documentation ¶
Overview ¶
Package arpdb implements the Network Neighborhood Database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Empty ¶
type Empty struct{}
Empty is the Interface implementation that does nothing.
type Interface ¶
type Interface interface { // Refresh updates the stored data. It must be safe for concurrent use. Refresh() (err error) // Neighbors returnes the last set of data reported by ARP. Both the method // and it's result must be safe for concurrent use. Neighbors() (ns []Neighbor) }
Interface stores and refreshes the network neighborhood reported by ARP (Address Resolution Protocol).
type Neighbor ¶
type Neighbor struct { // Name is the hostname of the neighbor. Empty name is valid since not each // implementation of ARP is able to retrieve that. Name string // IP contains either IPv4 or IPv6. IP netip.Addr // MAC contains the hardware address. MAC net.HardwareAddr }
Neighbor is the pair of IP address and MAC address reported by ARP.
Click to show internal directories.
Click to hide internal directories.