iputil

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIP

func CheckIP(ipStr string) (string, error)

func ContainsIP

func ContainsIP(cidr, ipStr string) error

func GetCidrHostNum

func GetCidrHostNum(netMask string) (int, error)

func GetIPByDevName

func GetIPByDevName(name string) (string, error)

func IpBetween

func IpBetween(from, to, test string) bool

func LongNetMaskToShort

func LongNetMaskToShort(netMask string) (int, error)

Types

type NetworkInfo

type NetworkInfo struct {
	Cidr    string
	NetMask string
	HostNum int
	IpRange []string
}

func ParseCIDR

func ParseCIDR(cidr string) (*NetworkInfo, error)

Jump to

Keyboard shortcuts

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