net

package
v1.63.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ErrIPv6OnlyUnsupported  = "IPv6-only network family not supported yet"
	ErrUnknownNetworkFamily = "unknown IP family %q, only IPv4,IPv6,IPv4+IPv6 are valid values"
)

Variables

This section is empty.

Functions

func IsLinkLocal

func IsLinkLocal(ipAddr string) bool

IsLinkLocal checks if given ip address is link local..

Types

type IPFamily

type IPFamily string

IPFamily IPv4 | IPv6 | IPv4+IPv6.

const (
	IPFamilyUnspecified IPFamily = ""          // interpreted as IPv4
	IPFamilyIPv4        IPFamily = "IPv4"      // IPv4 only
	IPFamilyIPv6        IPFamily = "IPv6"      // IPv6 only
	IPFamilyIPv4IPv6    IPFamily = "IPv4+IPv6" // dualstack with IPv4 as primary
	IPFamilyIPv6IPv4    IPFamily = "IPv6+IPv4" // dualstack with IPv6 as primary
)

func (IPFamily) HasIPv4

func (f IPFamily) HasIPv4() bool

func (IPFamily) HasIPv6

func (f IPFamily) HasIPv6() bool

func (IPFamily) IsDualstack

func (f IPFamily) IsDualstack() bool

Jump to

Keyboard shortcuts

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