Versions in this module Expand all Collapse all v1 v1.0.0 Sep 19, 2025 Changes in this version + const V1_ACK + const V1_CMD + const V1_DATA + const V1_DNSSOURCE_HASH + const V1_DNSSOURCE_MARK + const V1_DNSSOURCE_SOURCE + const V1_DNSSOURCE_XMARK + const V1_GET_EA + const V1_GET_REF + const V1_HDR_LEN + const V1_HOST_DATA_BATCHID + const V1_HOST_DATA_COUNT + const V1_HOST_DATA_HASH + const V1_HOST_DATA_SOURCE + const V1_MARK + const V1_MARK_LEN + const V1_MC_GET_EA + const V1_MC_HOST_DATA + const V1_MC_HOST_DATA_HASH + const V1_NACK + const V1_NOOP + const V1_OID + const V1_PKTID + const V1_PKTLEN + const V1_RECOVER_EA + const V1_RECOVER_REF + const V1_REQ + const V1_SAVE_DNSSOURCE + const V1_SAVE_OID + const V1_SAVE_TIME_BASE + const V1_SET_AREC + const V1_SET_MARK + const V1_SIG + const V1_TYPE_STRING + const V1_VER + var UINT128_0 = Uint128FromUint64(0) + var UINT128_1 = Uint128FromUint64(1) + var UINT128_2_127 = UINT128_1.Lsh(127) + var UINT128_MAX = UINT128_0.Sub(UINT128_1) + func IPLenToVer(l int) int + func IPPrefixesContain(prefixes []IPPrefix, ip IP) bool + func IPVerToLen(ver int) int + func RefPrefixesContain(prefixes []RefPrefix, ref Ref) bool + type AddrRec struct + EA IP + GW IP + IP IP + Ref Ref + type IP netip.Addr + func IPBits(l, n int) IP + func IPFromSlice(ip []byte) IP + func IPFromUint128(ip Uint128) IP + func IPFromUint32(ip uint32) IP + func IPFromUnixSockaddr(addr unix.Sockaddr) IP + func IPNum(l int, n uint32) IP + func IPZero(l int) IP + func MustParseIP(s string) IP + func ParseIP(s string) (IP, error) + func (a IP) Add(b IP) IP + func (a IP) And(b IP) IP + func (a IP) Compare(b IP) int + func (a IP) Not() IP + func (a IP) Or(b IP) IP + func (a IP) XOr(b IP) IP + func (ip IP) As4In6() IP + func (ip IP) AsSlice() []byte + func (ip IP) AsSlice4() []byte + func (ip IP) AsSlice6() []byte + func (ip IP) AsUint128() Uint128 + func (ip IP) AsUint128Cast() Uint128 + func (ip IP) AsUint32() uint32 + func (ip IP) AsUnixSockaddr() unix.Sockaddr + func (ip IP) ByteFromEnd(i int) byte + func (ip IP) Is4() bool + func (ip IP) Is4In6() bool + func (ip IP) Is6() bool + func (ip IP) IsGlobalUnicast() bool + func (ip IP) IsLinkLocal() bool + func (ip IP) IsZero() bool + func (ip IP) IsZeroAddr() bool + func (ip IP) Len() int + func (ip IP) String() string + func (ip IP) Un4In6() IP + func (ip IP) Ver() int + type IPPrefix netip.Prefix + func IPPrefixAllVer(ipver int) IPPrefix + func IPPrefixComplete(ipver int) IPPrefix + func IPPrefixFrom(ip IP, bits int) IPPrefix + func IPPrefixSingle(ip IP) IPPrefix + func MustParseIPPrefix(s string) IPPrefix + func ParseIPPrefix(s string) (IPPrefix, error) + func (a IPPrefix) Subnets(l int) []IPPrefix + func (p IPPrefix) Addr() IP + func (p IPPrefix) Bits() int + func (p IPPrefix) Contains(ip IP) bool + func (p IPPrefix) SizeBits() int + func (p IPPrefix) String() string + type IpRef struct + IP IP + Ref Ref + func MustParseIpRef(str string) IpRef + func ParseIpRef(str string) (ipref IpRef, err error) + func (ipref IpRef) String() string + type Ref Uint128 + func MustParseRef(str string) Ref + func ParseRef(str string) (Ref, error) + func ParseRefInPrefix(str string) (Ref, error) + func RefFromBytesBE(src []byte) Ref + func (ref Ref) AsSliceBE() []byte + func (ref Ref) IsZero() bool + func (ref Ref) String() string + func (ref Ref) StringInPrefix() string + type RefPrefix struct + func MustParseRefPrefix(s string) RefPrefix + func ParseRefPrefix(s string) (RefPrefix, error) + func RefPrefixComplete() RefPrefix + func RefPrefixFrom(ref Ref, bits int) RefPrefix + func RefPrefixSingle(ref Ref) RefPrefix + func (p RefPrefix) Bits() int + func (p RefPrefix) Contains(ref Ref) bool + func (p RefPrefix) Ref() Ref + func (p RefPrefix) RefUint128() Uint128 + func (p RefPrefix) SizeBits() int + func (p RefPrefix) String() string + type Uint128 struct + H uint64 + L uint64 + func MustParseUint128(s string, base int) Uint128 + func ParseUint128(s string, base int) (Uint128, bool) + func Uint128FromBig(i *big.Int) (Uint128, bool) + func Uint128FromBytesBE(src []byte) Uint128 + func Uint128FromBytesLE(src []byte) Uint128 + func Uint128FromUint16(x uint16) Uint128 + func Uint128FromUint32(x uint32) Uint128 + func Uint128FromUint64(x uint64) Uint128 + func Uint128FromUint8(x uint8) Uint128 + func (x Uint128) Add(y Uint128) (z Uint128) + func (x Uint128) AddCarry(y Uint128, cin uint64) (z Uint128, cout uint64) + func (x Uint128) And(y Uint128) Uint128 + func (x Uint128) AndNot(y Uint128) Uint128 + func (x Uint128) AsBytesBE() (dst [16]byte) + func (x Uint128) AsBytesLE() (dst [16]byte) + func (x Uint128) AsSliceBE() []byte + func (x Uint128) AsSliceLE() []byte + func (x Uint128) Big() *big.Int + func (x Uint128) Bit(n int) uint + func (x Uint128) BitLen() int + func (x Uint128) Cmp(y Uint128) int + func (x Uint128) Compl() Uint128 + func (x Uint128) Format(base int) string + func (x Uint128) FormatHex() string + func (x Uint128) Int() int + func (x Uint128) IntCheck() (int, bool) + func (x Uint128) IsZero() bool + func (x Uint128) LeadingZeros() int + func (x Uint128) Lsh(n uint) Uint128 + func (x Uint128) Mul(y Uint128) (z Uint128) + func (x Uint128) Or(y Uint128) Uint128 + func (x Uint128) PutBytesBE(dst []byte) + func (x Uint128) PutBytesLE(dst []byte) + func (x Uint128) Rsh(n uint) Uint128 + func (x Uint128) String() string + func (x Uint128) Sub(y Uint128) (z Uint128) + func (x Uint128) SubBorrow(y Uint128, bin uint64) (z Uint128, bout uint64) + func (x Uint128) TrailingZeros() int + func (x Uint128) Uint16() uint16 + func (x Uint128) Uint16Check() (uint16, bool) + func (x Uint128) Uint32() uint32 + func (x Uint128) Uint32Check() (uint32, bool) + func (x Uint128) Uint64() uint64 + func (x Uint128) Uint64Check() (uint64, bool) + func (x Uint128) Uint8() uint8 + func (x Uint128) Uint8Check() (uint8, bool) + func (x Uint128) Xor(y Uint128) Uint128