Documentation
¶
Overview ¶
Package arping contains utility functions to wrap around the arping program.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config)
Option is a function to configure arping command.
type Result ¶
type Result struct { Sent int Received int Loss float64 AvgLatency time.Duration ResponderIPs []string ResponderMACs []string Latencies []time.Duration }
Result contains the sorted out output of arping command.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is the object contains arping utilities.
func (*Runner) Arping ¶
func (r *Runner) Arping(ctx context.Context, targetIP, iface string, ops ...Option) (*Result, error)
Arping performs an arping from the specified interface to the target IP with the options. By default 10 packets will be sent and the timeout will be the same as the count in seconds. It sends only broadcast ARPs.
Click to show internal directories.
Click to hide internal directories.