host

package
v0.0.0-...-722fbe6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CanIcmp bool
View Source
var TcpPingPorts = []uint16{80, 22, 445, 23, 443, 81, 161, 3389, 8080, 8081}

Functions

func IcmpOK

func IcmpOK(host string) bool

IcmpOK 直接发ICMP包

func IsLive

func IsLive(ip string, tcpPing bool, tcpTimeout time.Duration) (ok bool)

IsLive 判断ip是否存活

func PingOk

func PingOk(host string) bool

PingOk Ping命令模式

func TcpPing

func TcpPing(host string, ports []uint16, timeout time.Duration) (ok bool)

TcpPing 指定默认常见端口进行存活探测

Types

This section is empty.

Jump to

Keyboard shortcuts

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