ipkit

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Between

func Between(ip string, from string, to string) bool

func BytesToIPv4

func BytesToIPv4(b []byte) (net.IP, error)

func BytesToIPv4String

func BytesToIPv4String(b []byte) (string, error)

func BytesToIPv6

func BytesToIPv6(b []byte) (net.IP, error)

func BytesToIPv6String

func BytesToIPv6String(b []byte) (string, error)

func GetHostIp

func GetHostIp() (net.IP, error)

func GetIPv4Gateway

func GetIPv4Gateway(ip string) (string, error)

func IPv4ToInt

func IPv4ToInt(ip string) uint32

func InSegment

func InSegment(ip string, segment string) bool

func IntToIPv4

func IntToIPv4(v uint32) string

2130706433=127.0.0.1

func IsIPV4

func IsIPV4(ip string) bool

func IsPort

func IsPort(port string) bool

func ResolveIP

func ResolveIP(ip string) (net.IP, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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