netaddr

package
v1.106.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: BSD-3-Clause Imports: 2 Imported by: 9 modules, 64 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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