package netaddr
import "tailscale.com/net/netaddr"
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 ¶
- func FromStdIPNet(std *net.IPNet) (prefix netip.Prefix, ok bool)
- func IPv4(a, b, c, d uint8) netip.Addr
- func Unmap(ap netip.AddrPort) netip.AddrPort
Functions ¶
func FromStdIPNet ¶
FromStdIPNet returns an IPPrefix from the standard library's IPNet type. If std is invalid, ok is false.
func IPv4 ¶
IPv4 returns the IP of the IPv4 address a.b.c.d.
func Unmap ¶
Unmap returns the provided AddrPort with its Addr IP component Unmap'ed.
See https://github.com/golang/go/issues/53607#issuecomment-1203466984
Source Files ¶
netaddr.go
- Version
- v1.84.0 (latest)
- Published
- May 21, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 1 day ago –
Tools for package owners.