Documentation ¶
Overview ¶
Package arping is a native go library to ping a host per arp datagram, or query a host mac address
The currently supported platforms are: Linux and BSD.
The library requires raw socket access. So it must run as root, or with appropriate capabilities under linux: `sudo setcap cap_net_raw+ep <BIN>`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTimeout error ErrTimeout = errors.New("timeout") )
Functions ¶
func GratuitousArp ¶
GratuitousArp sends an gratuitous arp from 'srcIP'
func GratuitousArpOverIface ¶
GratuitousArpOverIface sends an gratuitous arp over interface 'iface' from 'srcIP'
func GratuitousArpOverIfaceByName ¶
GratuitousArpOverIfaceByName sends an gratuitous arp over interface name 'ifaceName' from 'srcIP'
Types ¶
type LinuxSocket ¶
type LinuxSocket struct {
// contains filtered or unexported fields
}
type Result ¶
type Result struct { HwAddr net.HardwareAddr Duration time.Duration }
func PingOverIface ¶
PingOverIface sends an arp ping over interface 'iface' to 'dstIP'
Click to show internal directories.
Click to hide internal directories.