cidr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MPL-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHostNumberOutOfRange is returned when the host number is out of range.
	ErrHostNumberOutOfRange = errors.New("host number out of range")
)

Functions

func Generate

func Generate() (netip.Prefix, error)

Generate a new Unique Local Address (ULA) IPv6 prefix.

func Host

func Host(prefix netip.Prefix, num int) (netip.Addr, error)

Host returns the n-th host address in the given prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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