netz

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	_, LoopbackAddress, _        = net.ParseCIDR("127.0.0.0/8")
	_, LinkLocalAddress, _       = net.ParseCIDR("169.254.0.0/16")
	_, PrivateIPAddressClassA, _ = net.ParseCIDR("10.0.0.0/8")
	_, PrivateIPAddressClassB, _ = net.ParseCIDR("172.16.0.0/12")
	_, PrivateIPAddressClassC, _ = net.ParseCIDR("192.168.0.0/16")
)
View Source
var ErrCIDRsIsEmpty = errors.New("cidrs is empty")

Functions

func MustParseCIDRs

func MustParseCIDRs(cidrs ...string) []*net.IPNet

func ParseCIDR

func ParseCIDR(cidr string) (*net.IPNet, error)

func ParseCIDRs

func ParseCIDRs(cidrs ...string) ([]*net.IPNet, error)

Types

type IPNetSet

type IPNetSet []*net.IPNet

func (IPNetSet) Contains

func (ipNetSet IPNetSet) Contains(ip net.IP) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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