Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // sufficient privileges. ErrICMPServiceUnavailable = errors.New("ICMP service unavailable") )
Functions ¶
Types ¶
type ICMPPayload ¶
ICMPPayload is capable of generating a signed ICMP payload.
func NewICMPPayload ¶
func NewICMPPayload() *ICMPPayload
NewICMPPayload returns a new ICMPPayload set to current time.
func (*ICMPPayload) Read ¶
func (p *ICMPPayload) Read(payload []byte) error
type ICMPService ¶
type ICMPService struct {
// contains filtered or unexported fields
}
ICMPService is a service capable of pinging remotes and listening for answers.
func NewICMPService ¶
func NewICMPService() *ICMPService
NewICMPService instantiates a new ICMPService.
func (*ICMPService) Ping ¶
func (i *ICMPService) Ping(target string, count int, timeout time.Duration) (*ICMPSummary, error)
Ping will ping the target using ICMP echo/reply.
type ICMPSummary ¶
type ICMPSummary struct { Sent int Replies int Min time.Duration Max time.Duration Average time.Duration }
ICMPSummary will be returned from Ping() to give a quick summary.
Click to show internal directories.
Click to hide internal directories.