Documentation ¶
Index ¶
- Variables
- func ClearRetryIp()
- func ClearRetryMap()
- func ClearSuccessIp()
- func GetRetryIp() []string
- func GetRetryMap(ip string, n int) int
- func GetSuccessIp() []string
- func IcmpType(rt uint8, rc uint8) string
- func InitIcmpBytes()
- func StartHttpServer()
- func StartPing(distIp string, timeout int) (int, float64)
- func StartTask()
- type ICMP
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TestModel bool
)
Functions ¶
func ClearRetryIp ¶
func ClearRetryIp()
func ClearRetryMap ¶
func ClearRetryMap()
func ClearSuccessIp ¶
func ClearSuccessIp()
func GetRetryIp ¶
func GetRetryIp() []string
func GetRetryMap ¶
func GetSuccessIp ¶
func GetSuccessIp() []string
func InitIcmpBytes ¶
func InitIcmpBytes()
func StartHttpServer ¶
func StartHttpServer()
Types ¶
type ICMP ¶
type ICMP struct { Type uint8 // 类型,8是请求,0是应答 Code uint8 // 代码,它与类型字段一起共同标识了ICMP报文的详细类型,比如说类型为3表示不可达,此时代码为0表示网络不可达,为1表示满意主机不可达等 Checksum uint16 // 校验和,对包括ICMP报文数据部分在内的整个ICMP数据报的校验和,以检验报文在传输过程中是否出现了差错,和IP报头中校验和计算方法一样 Identifier uint16 // 标识,用于标识本ICMP进程,但仅适用于回显请求和应答ICMP报文,对于目标不可达和超时,该字段为0 SequenceNum uint16 // 序列号 }
icmp报头,8byte
Click to show internal directories.
Click to hide internal directories.