Documentation
¶
Overview ¶
Package ipnet contains utility functions for IPv4 and IPv6 networks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DescribePrefixOrIP ¶ added in v1.14.0
DescribePrefixOrIP is similar to netip.Prefix.String but prints out the IP directly if the input range only contains one IP.
Types ¶
type Type ¶
type Type int
Type is the type of IP networks.
func (Type) NormalizeDetectedIP ¶ added in v1.8.0
NormalizeDetectedIP normalizes an IP into an IPv4 or IPv6 address.
func (Type) RecordType ¶
RecordType prints out the type of DNS records for the IP network. For IPv4, it is A; for IPv6, it is AAAA.
func (Type) UDPNetwork ¶
UDPNetwork gives the network name for net.Dial.
Click to show internal directories.
Click to hide internal directories.