Documentation ¶
Index ¶
- Constants
- type Ping
- func (p *Ping) Run() (chan Response, error)
- func (p *Ping) RunWithContext(ctx context.Context) (chan Response, error)
- func (p *Ping) SetCount(c int)
- func (p *Ping) SetForceV4()
- func (p *Ping) SetForceV6()
- func (p *Ping) SetInterval(i string) error
- func (p *Ping) SetPacketSize(s int)
- func (p *Ping) SetPrivilegedICMP(i bool)
- func (p *Ping) SetSrcIPAddr(addr string)
- func (p *Ping) SetTOS(t int) error
- func (p *Ping) SetTTL(t int)
- func (p *Ping) SetTimeout(i string) error
- type Response
Constants ¶
View Source
const ( // ProtocolIPv4ICMP is IANA ICMP IPv4 ProtocolIPv4ICMP = 1 // ProtocolIPv6ICMP is IANA ICMP IPv6 ProtocolIPv6ICMP = 58 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ping ¶
type Ping struct {
// contains filtered or unexported fields
}
Ping represents ping
func (*Ping) RunWithContext ¶
RunWithContext sends the ICMP message to destination / target with context
func (*Ping) SetInterval ¶
SetInterval sets wait interval between sending each packet
func (*Ping) SetPacketSize ¶
SetPacketSize sets the ICMP packet size
func (*Ping) SetPrivilegedICMP ¶
SetPrivilegedICMP sets privileged raw ICMP or non-privileged datagram-oriented ICMP
func (*Ping) SetSrcIPAddr ¶
SetSrcIPAddr sets the source ip address
func (*Ping) SetTimeout ¶
SetTimeout sets wait time for a reply for each packet sent
Click to show internal directories.
Click to hide internal directories.