cxnetip

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PrivateRanges = []IpRange{
	IpRange{
		// contains filtered or unexported fields
	},
	IpRange{
		// contains filtered or unexported fields
	},
	IpRange{
		// contains filtered or unexported fields
	},
}

Functions

func AppendSortedNetIPPrefixSlices added in v0.0.43

func AppendSortedNetIPPrefixSlices(sorted *[]netip.Prefix, ip netip.Prefix)

func IPv4or6IPRange added in v0.0.51

func IPv4or6IPRange(ipRange string) uint8

func InRange added in v0.0.20

func InRange(r IpRange, ip netip.Addr) uint8

func Is4String

func Is4String(ipv4 string) uint8

ValidateIPv4Address validates the given IPv4 address in string format

func Is6String

func Is6String(ipv6 string) uint8

ValidateIPv6Address validates the given IPv6 address in string format

func IsIP

func IsIP(ip netip.Addr) (uint8, uint8)

IsValidIP checks if an IP address is valid, returns the IP version

func IsPrivateSubnet added in v0.0.20

func IsPrivateSubnet(ipAddress netip.Addr) uint8

func ListContainsIP added in v0.0.20

func ListContainsIP(ipList []netip.Prefix, ip netip.Addr) uint8

func Listv4or6ContainsIP added in v0.0.20

func Listv4or6ContainsIP(ipListv4 []netip.Prefix, ipListv6 []netip.Prefix, ip netip.Addr) uint8

Types

type IpRange added in v0.0.20

type IpRange struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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