ip

package
v0.0.15 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSum added in v0.0.6

func CheckSum(data []byte) uint16

func FormatBlockIps added in v0.0.5

func FormatBlockIps(source []string) ([]string, error)

IP可以为单个IP,或者以”/”掩码格式IP段,或者以”-”连接符的IP段

func GetHostIp

func GetHostIp() string

func GetHostIpFilter

func GetHostIpFilter(ipPrefix string) string

func GetHostIpFromUDP

func GetHostIpFromUDP() string

func IpFlat added in v0.0.15

func IpFlat(ips string) string

* 10.124.61.200-223 10.124.61.224-226 10.124.61.175-179 将这种格式的IP展开

func Isping added in v0.0.6

func Isping(ip string) bool

func ValidateIp added in v0.0.5

func ValidateIp(ipv4 string) (bool, int)

Types

type ICMP added in v0.0.6

type ICMP struct {
	Type        uint8
	Code        uint8
	Checksum    uint16
	Identifier  uint16
	SequenceNum uint16
}

Jump to

Keyboard shortcuts

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