Versions in this module Expand all Collapse all v0 v0.23.2 Feb 12, 2024 Changes in this version + const IPv4len + const IPv4mappedIPv6prefix + const IPv4mask + const IPv4max + const IPv4size + const IPv6len + const IPv6size + func ParseINet(s string, dest *IPAddr) error + type Addr uint128.Uint128 + func (ip Addr) Add(o uint64) Addr + func (ip Addr) Compare(o Addr) int + func (ip Addr) Equal(o Addr) bool + func (ip Addr) String() string + func (ip Addr) Sub(o uint64) Addr + func (ip Addr) WriteIPv4Bytes(writer io.Writer) error + func (ip Addr) WriteIPv6Bytes(writer io.Writer) error + type IP []byte + func ParseIP(s string) IP + type IPAddr struct + Addr Addr + Family IPFamily + Mask byte + func RandIPAddr(rng *rand.Rand) IPAddr + func (ipAddr *IPAddr) Add(o int64) (IPAddr, error) + func (ipAddr *IPAddr) And(other *IPAddr) (IPAddr, error) + func (ipAddr *IPAddr) Broadcast() IPAddr + func (ipAddr *IPAddr) Complement() IPAddr + func (ipAddr *IPAddr) Equal(other *IPAddr) bool + func (ipAddr *IPAddr) FromBuffer(data []byte) ([]byte, error) + func (ipAddr *IPAddr) Hostmask() IPAddr + func (ipAddr *IPAddr) Netmask() IPAddr + func (ipAddr *IPAddr) Or(other *IPAddr) (IPAddr, error) + func (ipAddr *IPAddr) Sub(o int64) (IPAddr, error) + func (ipAddr *IPAddr) SubIPAddr(other *IPAddr) (int64, error) + func (ipAddr *IPAddr) ToBuffer(appendTo []byte) []byte + func (ipAddr IPAddr) Compare(other *IPAddr) int + func (ipAddr IPAddr) ContainedBy(other *IPAddr) bool + func (ipAddr IPAddr) ContainedByOrEquals(other *IPAddr) bool + func (ipAddr IPAddr) Contains(other *IPAddr) bool + func (ipAddr IPAddr) ContainsOrContainedBy(other *IPAddr) bool + func (ipAddr IPAddr) ContainsOrEquals(other *IPAddr) bool + func (ipAddr IPAddr) String() string + type IPFamily byte + const IPv4family + const IPv6family