netaddr

package
v1.76.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: BSD-3-Clause Imports: 2 Imported by: 62

Documentation

Overview

Package netaddr is a transitional package while we finish migrating from inet.af/netaddr to Go 1.18's net/netip.

TODO(bradfitz): delete this package eventually. Tracking bug is https://github.com/tailscale/tailscale/issues/5162

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromStdIPNet

func FromStdIPNet(std *net.IPNet) (prefix netip.Prefix, ok bool)

FromStdIPNet returns an IPPrefix from the standard library's IPNet type. If std is invalid, ok is false.

func IPv4

func IPv4(a, b, c, d uint8) netip.Addr

IPv4 returns the IP of the IPv4 address a.b.c.d.

func Unmap

func Unmap(ap netip.AddrPort) netip.AddrPort

Unmap returns the provided AddrPort with its Addr IP component Unmap'ed.

See https://github.com/golang/go/issues/53607#issuecomment-1203466984

Types

This section is empty.

Jump to

Keyboard shortcuts

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