Documentation
¶
Index ¶
Constants ¶
View Source
const ( ICMPv4 = 1 ICMPv6 = 58 )
proto
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ICMP ¶
type ICMP struct {
ID int
// contains filtered or unexported fields
}
ICMP icmp config
type Options ¶
type Options struct {
Log func(string, ...interface{})
// Timeout (-W) 参数用于设置单个ICMP回显请求等待回应的超时时间,单位通常也是秒。
// 如果在指定的时间内没有收到回应,该ICMP请求就会被认为是丢失的。
// 例如:ping -W 2 192.168.1.1
// 这个命令将对192.168.1.1进行ping操作,每次发送请求后,如果2秒内没有收到回应,则该请求超时。
Timeout time.Duration // send packet timeout
// contains filtered or unexported fields
}
Options options
Click to show internal directories.
Click to hide internal directories.