util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIPv6LLMatch

func IsIPv6LLMatch(expected net.IP, actual *net.IPNet, local bool) bool

IsIPv6LLMatch checks if a given expected IPv6 address matches an actual address + mask, checking if the mask is of the expected form. The mask is expected to be /128 if local is false, or /64 if it is true

func NormalizeIP

func NormalizeIP(ip net.IP) net.IP

NormalizeIP returns a version of the given ip normalized to its underlying family, instead of the "always in IPv6 container" format that is often used, so IPv4 values will have a length of 4 and IPv6 ones a length of 16

Types

This section is empty.

Jump to

Keyboard shortcuts

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