protocol

package
v0.0.0-...-d2d3788 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping(ip string, num int) (float64, error)

Ping 执行 ping 命令,并实时打印网络状态

func PingWithoutPrint

func PingWithoutPrint(ip string, num int) (float64, error)

Ping 执行 ping 命令,不打印网络状态

Types

type ICMP

type ICMP struct {
	Type        uint8  // 类型
	Code        uint8  // 代码
	Checksum    uint16 // 校验和
	Identifier  uint16 // 标识符
	SequenceNum uint16 // 序列号
}

ICMP 定义 ICMP 协议包头

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL