Documentation ¶
Overview ¶
IPAddress is a library for handling IP addresses and subnets, both IPv4 and IPv6.
Benefits of this Library ¶
The primary goals are:
- Parse all IPv4 and IPv6 address formats and host name formats in common usage, plus some additional formats.
- Parse and represent subnets, either those specified by network prefix length or those specified with ranges of segment values.
- Allow the separation of address parsing from host parsing.
- Allow control over which formats are allowed when parsing, whether IPv4, IPv6, subnet formats, inet_aton formats, or other.
- Produce all common address strings of different formats for a given IPv4 or IPv6 address and produce collections of such strings.
- Parse all common MAC Address formats in usage and produce all common MAC address strings of different formats.
- Integrate MAC addresses with IPv6 with standard conversions.
- Integrate IPv4 Addresses with IPv6 through common address conversions.
- Polymorphism is a key goal. The library maintains an address framework of interfaces that allow most library functionality to be independent of address type or version, whether IPv4, IPv6 or MAC. This allows for code which supports both IPv4 and IPv6 transparently.
- Provide concurrency-safety, primarily through immutability. The core types (host names, address strings, addresses, address sections, address segments, address ranges) are all immutable. They do not change their underlying value. For sharing amongst goroutines, this is valuable.
- Modify addresses, such as altering prefix lengths, masking, splitting into sections and segments, splitting into network and host sections, reconstituting from sections and segments.
- Provide address operations and subnetting, such as obtaining the prefix block subnet for a prefixed address, iterating through subnets, iterating through prefixes, prefix blocks, or segment blocks of subnets, incrementing and decrementing addresses by integer values, reversing address bits for endianness or DNS lookup, set-subtracting subnets from other subnets, subnetting, intersections of subnets, merging subnets, checking containment of addresses in subnets, listing subnets covering a span of addresses.
- Sorting and comparison of host names, addresses, address strings and subnets. All the address component types are compararable.
- Integrate with the Go language primitive types and the standard library types net.IP, net.IPAddr, net.IPMask, net.IPNet, net.TCPAddr, net.UDPAddr, net/netip.Addr, net/netip.Prefix, net/netip.AddrPort, and math/big.Int.
- Make address manipulations easy, so you do not have to worry about longs/ints/shorts/bytes/bits, signed/unsigned, sign extension, ipv4/v6, masking, iterating, and other implementation details.
Design Overview ¶
The core types are IPAddressString, HostName, and MACAddressString along with the Address base type and its associated types IPAddress, IPv4Address, IPv6Address, and MACAddress, as well as the sequential address type SequentialRange. If you have a textual representation of an IP address, then start with IPAddressString or HostName. If you have a textual representation of a MAC address, then start with MACAddressString. Note that address instances can represent either a single address or a subnet. If you have either an address or host name, or you have something with a port or service name, then use HostName. If you have numeric bytes or integers, then start with IPv4Address, IPv6Address, IPAddress, or MACAddress.
This library allows you to scale down from more specific address types to more generic address types, and then to scale back up again. The polymorphism is useful for IP-version ambiguous code. The most-specific types allow for method sets tailored to the address version or type. You can only scale up to a specific version or address type if the more generic instance was originally derived from an instance of the specific type. So, for instance, an IPv6Address can be converted to an IPAddress using IPv6Address.ToIP, or to an Address using IPv6Address.ToAddressBase, which can then be converted back to IPAddress or an IPv6Address using Address.ToIP or Address.ToIPv6. But that IPv6Address cannot be scaled back to IPv4. If you wish to convert that IPv6Address to IPv4, you would need to use an implementation of IPv4AddressConverter.
This library has some similarities in design to the Java IPAddress library. Notable divergences derive from the differences between the Java and Go languages, such as the differences in error handling and the lack of inheritance in Go, amongst many other differences. Other divergences derive from common Go language idioms and practices which differ from standard Java idioms and practices. Some similarities include the inclusion of an address framework of interfaces, and the data structures in use such as tries, and the segment/section/address architecture of addresses. Both share many of the same operations, such as spanning with prefix blocks, merging into prefix blocks, iterating subnets, and so on.
Code Examples ¶
For common use-cases, you may wish to go straight to the wiki code examples which cover a wide breadth of common use-cases.
Further Documentation ¶
You can read further documentation with more depth.
Index ¶
- Constants
- Variables
- func AddrsMatchOrdered[T, U AddressType](addrs1 []T, addrs2 []U) (result bool)
- func AddrsMatchUnordered[T, U AddressType](addrs1 []T, addrs2 []U) (result bool)
- func AssociativeTreesString[T TrieKeyConstraint[T], V any](withNonAddedKeys bool, tries ...*AssociativeTrie[T, V]) string
- func StdPullIterator[V any](iterator Iterator[V]) (next func() (V, bool), stop func())
- func StdPushIterator[V any](iterator Iterator[V]) func(yield func(V) bool)
- func ToAddressBaseSlice[T interface{ ... }, AddrType any](orig []T) []AddrType
- func ToIPSlice[T interface{ ... }, IPType any](orig []T) []IPType
- func ToIPv4Slice[T interface{ ... }, IPv4Type any](orig []T) []IPv4Type
- func ToIPv6Slice[T interface{ ... }, IPv6Type any](orig []T) []IPv6Type
- func ToMACSlice[T interface{ ... }, MACType any](orig []T) []MACType
- func TreesString[T TrieKeyConstraint[T]](withNonAddedKeys bool, tries ...*Trie[T]) string
- type AddedTree
- type AddedTreeNode
- type Address
- func (addr *Address) AdjustPrefixLen(prefixLen BitCount) *Address
- func (addr *Address) AdjustPrefixLenZeroed(prefixLen BitCount) (*Address, addrerr.IncompatibleAddressError)
- func (addr *Address) AssignMinPrefixForBlock() *Address
- func (addr *Address) AssignPrefixForSingleBlock() *Address
- func (addr *Address) BlockIterator(segmentCount int) Iterator[*Address]
- func (addr *Address) Bytes() []byte
- func (addr *Address) Compare(item AddressItem) int
- func (addr *Address) CompareSize(other AddressItem) int
- func (addr *Address) Contains(other AddressType) bool
- func (addr *Address) ContainsPrefixBlock(prefixLen BitCount) bool
- func (addr *Address) ContainsSinglePrefixBlock(prefixLen BitCount) bool
- func (addr *Address) CopyBytes(bytes []byte) []byte
- func (addr *Address) CopySegments(segs []*AddressSegment) (count int)
- func (addr *Address) CopySubSegments(start, end int, segs []*AddressSegment) (count int)
- func (addr *Address) CopyUpperBytes(bytes []byte) []byte
- func (addr *Address) Enumerate(other AddressType) *big.Int
- func (addr *Address) Equal(other AddressType) bool
- func (addr *Address) ForEachSegment(consumer func(segmentIndex int, segment *AddressSegment) (stop bool)) int
- func (addr Address) Format(state fmt.State, verb rune)
- func (addr *Address) GetBitCount() BitCount
- func (addr *Address) GetBitsPerSegment() BitCount
- func (addr *Address) GetBlockCount(segments int) *big.Int
- func (addr *Address) GetByteCount() int
- func (addr *Address) GetBytesPerSegment() int
- func (addr *Address) GetCount() *big.Int
- func (addr *Address) GetDivisionCount() int
- func (addr *Address) GetGenericDivision(index int) DivisionType
- func (addr *Address) GetGenericSegment(index int) AddressSegmentType
- func (addr *Address) GetLeadingBitCount(ones bool) BitCount
- func (addr *Address) GetLower() *Address
- func (addr *Address) GetMaxSegmentValue() SegInt
- func (addr *Address) GetMinPrefixLenForBlock() BitCount
- func (addr *Address) GetPrefixCount() *big.Int
- func (addr *Address) GetPrefixCountLen(prefixLen BitCount) *big.Int
- func (addr *Address) GetPrefixLen() PrefixLen
- func (addr *Address) GetPrefixLenForSingleBlock() PrefixLen
- func (addr *Address) GetSection() *AddressSection
- func (addr *Address) GetSegment(index int) *AddressSegment
- func (addr *Address) GetSegmentCount() int
- func (addr *Address) GetSegmentStrings() []string
- func (addr *Address) GetSegments() []*AddressSegment
- func (addr *Address) GetSequentialBlockCount() *big.Int
- func (addr *Address) GetSequentialBlockIndex() int
- func (addr *Address) GetSubSection(index, endIndex int) *AddressSection
- func (addr *Address) GetTrailingBitCount(ones bool) BitCount
- func (addr *Address) GetTrailingSection(index int) *AddressSection
- func (addr *Address) GetUpper() *Address
- func (addr *Address) GetUpperValue() *big.Int
- func (addr *Address) GetValue() *big.Int
- func (addr *Address) IncludesMax() bool
- func (addr *Address) IncludesZero() bool
- func (addr *Address) Increment(increment int64) *Address
- func (addr *Address) IncrementBoundary(increment int64) *Address
- func (addr *Address) IsFullRange() bool
- func (addr *Address) IsIP() bool
- func (addr *Address) IsIPv4() bool
- func (addr *Address) IsIPv6() bool
- func (addr *Address) IsLocal() bool
- func (addr *Address) IsMAC() bool
- func (addr *Address) IsMax() bool
- func (addr *Address) IsMulticast() bool
- func (addr *Address) IsMultiple() bool
- func (addr *Address) IsOneBit(bitIndex BitCount) bool
- func (addr *Address) IsPrefixBlock() bool
- func (addr *Address) IsPrefixed() bool
- func (addr *Address) IsSequential() bool
- func (addr *Address) IsSinglePrefixBlock() bool
- func (addr *Address) IsZero() bool
- func (addr *Address) Iterator() Iterator[*Address]
- func (addr *Address) Overlaps(other AddressType) bool
- func (addr *Address) PrefixBlockIterator() Iterator[*Address]
- func (addr *Address) PrefixContains(other AddressType) bool
- func (addr *Address) PrefixEqual(other AddressType) bool
- func (addr *Address) PrefixIterator() Iterator[*Address]
- func (addr *Address) ReverseBits(perByte bool) (*Address, addrerr.IncompatibleAddressError)
- func (addr *Address) ReverseBytes() (*Address, addrerr.IncompatibleAddressError)
- func (addr *Address) ReverseSegments() *Address
- func (addr *Address) SequentialBlockIterator() Iterator[*Address]
- func (addr *Address) SetPrefixLen(prefixLen BitCount) *Address
- func (addr *Address) SetPrefixLenZeroed(prefixLen BitCount) (*Address, addrerr.IncompatibleAddressError)
- func (addr *Address) String() string
- func (addr *Address) TestBit(n BitCount) bool
- func (addr *Address) ToAddressBase() *Address
- func (addr *Address) ToAddressString() HostIdentifierString
- func (addr *Address) ToBinaryString(with0bPrefix bool) (string, addrerr.IncompatibleAddressError)
- func (addr *Address) ToBlock(segmentIndex int, lower, upper SegInt) *Address
- func (addr *Address) ToCanonicalString() string
- func (addr *Address) ToCompressedString() string
- func (addr *Address) ToCustomString(stringOptions addrstr.StringOptions) string
- func (addr *Address) ToGenericKey() Key[*Address]
- func (addr *Address) ToHexString(with0xPrefix bool) (string, addrerr.IncompatibleAddressError)
- func (addr *Address) ToIP() *IPAddress
- func (addr *Address) ToIPv4() *IPv4Address
- func (addr *Address) ToIPv6() *IPv6Address
- func (addr *Address) ToKey() Key[*Address]
- func (addr *Address) ToMAC() *MACAddress
- func (addr *Address) ToNormalizedString() string
- func (addr *Address) ToNormalizedWildcardString() string
- func (addr *Address) ToOctalString(with0Prefix bool) (string, addrerr.IncompatibleAddressError)
- func (addr *Address) ToPrefixBlock() *Address
- func (addr *Address) ToPrefixBlockLen(prefLen BitCount) *Address
- func (addr *Address) ToSinglePrefixBlockOrAddress() *Address
- func (addr *Address) TrieCompare(other *Address) (int, addrerr.IncompatibleAddressError)
- func (addr *Address) TrieDecrement() *Address
- func (addr *Address) TrieIncrement() *Address
- func (addr *Address) UpperBytes() []byte
- func (addr *Address) WithoutPrefixLen() *Address
- func (addr *Address) Wrap() WrappedAddress
- type AddressComparator
- func (comp AddressComparator) Compare(one, two AddressItem) int
- func (comp AddressComparator) CompareAddressSections(one, two AddressSectionType) int
- func (comp AddressComparator) CompareAddresses(one, two AddressType) int
- func (comp AddressComparator) CompareDivisions(one, two DivisionType) int
- func (comp AddressComparator) CompareRanges(one, two IPAddressSeqRangeType) int
- func (comp AddressComparator) CompareSegments(one, two AddressSegmentType) int
- func (comp AddressComparator) CompareSeries(one, two AddressDivisionSeries) int
- type AddressComponent
- type AddressDivision
- func NewDivision(val DivInt, bitCount BitCount) *AddressDivision
- func NewPrefixDivision(val DivInt, prefixLen PrefixLen, bitCount BitCount) *AddressDivision
- func NewRangeDivision(val, upperVal DivInt, bitCount BitCount) *AddressDivision
- func NewRangePrefixDivision(val, upperVal DivInt, prefixLen PrefixLen, bitCount BitCount) *AddressDivision
- func (div *AddressDivision) Bytes() []byte
- func (div *AddressDivision) Compare(item AddressItem) int
- func (div *AddressDivision) CompareSize(other AddressItem) int
- func (div *AddressDivision) ContainsPrefixBlock(prefixLen BitCount) bool
- func (div *AddressDivision) ContainsSinglePrefixBlock(prefixLen BitCount) bool
- func (div *AddressDivision) CopyBytes(bytes []byte) []byte
- func (div *AddressDivision) CopyUpperBytes(bytes []byte) []byte
- func (div AddressDivision) Format(state fmt.State, verb rune)
- func (div *AddressDivision) GetBitCount() BitCount
- func (div *AddressDivision) GetByteCount() int
- func (div *AddressDivision) GetCount() *big.Int
- func (div *AddressDivision) GetDivisionValue() DivInt
- func (div *AddressDivision) GetMaxValue() DivInt
- func (div *AddressDivision) GetMinPrefixLenForBlock() BitCount
- func (div *AddressDivision) GetPrefixCountLen(divisionPrefixLength BitCount) *big.Int
- func (div *AddressDivision) GetPrefixLenForSingleBlock() PrefixLen
- func (div *AddressDivision) GetString() string
- func (div *AddressDivision) GetUpperDivisionValue() DivInt
- func (div *AddressDivision) GetUpperValue() *BigDivInt
- func (div *AddressDivision) GetValue() *BigDivInt
- func (div *AddressDivision) GetWildcardString() string
- func (div *AddressDivision) IncludesMax() bool
- func (div *AddressDivision) IncludesZero() bool
- func (div *AddressDivision) IsFullRange() bool
- func (div *AddressDivision) IsIP() bool
- func (div *AddressDivision) IsIPv4() bool
- func (div *AddressDivision) IsIPv6() bool
- func (div *AddressDivision) IsMAC() bool
- func (div *AddressDivision) IsMax() bool
- func (div *AddressDivision) IsMultiple() bool
- func (div *AddressDivision) IsSegmentBase() bool
- func (div *AddressDivision) IsSinglePrefix(divisionPrefixLength BitCount) bool
- func (div *AddressDivision) IsZero() bool
- func (div *AddressDivision) Matches(value DivInt) bool
- func (div *AddressDivision) MatchesValsWithMask(lowerValue, upperValue, mask DivInt) bool
- func (div *AddressDivision) MatchesWithMask(value, mask DivInt) bool
- func (div *AddressDivision) String() string
- func (div *AddressDivision) ToDiv() *AddressDivision
- func (div *AddressDivision) ToIP() *IPAddressSegment
- func (div *AddressDivision) ToIPv4() *IPv4AddressSegment
- func (div *AddressDivision) ToIPv6() *IPv6AddressSegment
- func (div *AddressDivision) ToMAC() *MACAddressSegment
- func (div *AddressDivision) ToSegmentBase() *AddressSegment
- func (div *AddressDivision) UpperBytes() []byte
- type AddressDivisionGrouping
- func (grouping *AddressDivisionGrouping) Bytes() []byte
- func (grouping *AddressDivisionGrouping) Compare(item AddressItem) int
- func (grouping *AddressDivisionGrouping) CompareSize(other AddressItem) int
- func (grouping *AddressDivisionGrouping) ContainsPrefixBlock(prefixLen BitCount) bool
- func (grouping *AddressDivisionGrouping) ContainsSinglePrefixBlock(prefixLen BitCount) bool
- func (grouping *AddressDivisionGrouping) CopyBytes(bytes []byte) []byte
- func (grouping *AddressDivisionGrouping) CopyDivisions(divs []*AddressDivision) (count int)
- func (grouping *AddressDivisionGrouping) CopySubDivisions(start, end int, divs []*AddressDivision) (count int)
- func (grouping *AddressDivisionGrouping) CopyUpperBytes(bytes []byte) []byte
- func (grouping *AddressDivisionGrouping) ForEachDivision(consumer func(divisionIndex int, division *AddressDivision) (stop bool)) int
- func (grouping AddressDivisionGrouping) Format(state fmt.State, verb rune)
- func (grouping *AddressDivisionGrouping) GetBitCount() BitCount
- func (grouping *AddressDivisionGrouping) GetBlockCount(divisionCount int) *big.Int
- func (grouping *AddressDivisionGrouping) GetByteCount() int
- func (grouping *AddressDivisionGrouping) GetCount() *big.Int
- func (grouping *AddressDivisionGrouping) GetDivision(index int) *AddressDivision
- func (grouping *AddressDivisionGrouping) GetDivisionCount() int
- func (grouping *AddressDivisionGrouping) GetDivisionStrings() []string
- func (grouping *AddressDivisionGrouping) GetGenericDivision(index int) DivisionType
- func (grouping *AddressDivisionGrouping) GetMinPrefixLenForBlock() BitCount
- func (grouping *AddressDivisionGrouping) GetPrefixCount() *big.Int
- func (grouping *AddressDivisionGrouping) GetPrefixCountLen(prefixLen BitCount) *big.Int
- func (grouping *AddressDivisionGrouping) GetPrefixLenForSingleBlock() PrefixLen
- func (grouping *AddressDivisionGrouping) GetSequentialBlockCount() *big.Int
- func (grouping *AddressDivisionGrouping) GetSequentialBlockIndex() int
- func (grouping *AddressDivisionGrouping) GetUpperValue() *big.Int
- func (grouping *AddressDivisionGrouping) GetValue() *big.Int
- func (grouping *AddressDivisionGrouping) IncludesMax() bool
- func (grouping *AddressDivisionGrouping) IncludesZero() bool
- func (grouping *AddressDivisionGrouping) IsAdaptiveZero() bool
- func (grouping *AddressDivisionGrouping) IsFullRange() bool
- func (grouping *AddressDivisionGrouping) IsIP() bool
- func (grouping *AddressDivisionGrouping) IsIPv4() bool
- func (grouping *AddressDivisionGrouping) IsIPv6() bool
- func (grouping *AddressDivisionGrouping) IsMAC() bool
- func (grouping *AddressDivisionGrouping) IsMax() bool
- func (grouping *AddressDivisionGrouping) IsMixedIPv6v4() bool
- func (grouping *AddressDivisionGrouping) IsMultiple() bool
- func (grouping *AddressDivisionGrouping) IsPrefixBlock() bool
- func (grouping *AddressDivisionGrouping) IsPrefixed() bool
- func (grouping *AddressDivisionGrouping) IsSectionBase() bool
- func (grouping *AddressDivisionGrouping) IsSinglePrefixBlock() bool
- func (grouping *AddressDivisionGrouping) IsZero() bool
- func (grouping *AddressDivisionGrouping) String() string
- func (grouping *AddressDivisionGrouping) ToDivGrouping() *AddressDivisionGrouping
- func (grouping *AddressDivisionGrouping) ToIP() *IPAddressSection
- func (grouping *AddressDivisionGrouping) ToIPv4() *IPv4AddressSection
- func (grouping *AddressDivisionGrouping) ToIPv6() *IPv6AddressSection
- func (grouping *AddressDivisionGrouping) ToMAC() *MACAddressSection
- func (grouping *AddressDivisionGrouping) ToMixedIPv6v4() *IPv6v4MixedAddressGrouping
- func (grouping *AddressDivisionGrouping) ToSectionBase() *AddressSection
- func (grouping *AddressDivisionGrouping) UpperBytes() []byte
- type AddressDivisionSeries
- type AddressItem
- type AddressKey
- type AddressSection
- func (section *AddressSection) AdjustPrefixLen(prefixLen BitCount) *AddressSection
- func (section *AddressSection) AdjustPrefixLenZeroed(prefixLen BitCount) (*AddressSection, addrerr.IncompatibleAddressError)
- func (section *AddressSection) AssignMinPrefixForBlock() *AddressSection
- func (section *AddressSection) AssignPrefixForSingleBlock() *AddressSection
- func (section *AddressSection) Bytes() []byte
- func (section *AddressSection) Compare(item AddressItem) int
- func (section *AddressSection) CompareSize(other AddressItem) int
- func (section *AddressSection) Contains(other AddressSectionType) bool
- func (section *AddressSection) ContainsPrefixBlock(prefixLen BitCount) bool
- func (section *AddressSection) ContainsSinglePrefixBlock(prefixLen BitCount) bool
- func (section *AddressSection) CopyBytes(bytes []byte) []byte
- func (section *AddressSection) CopySegments(segs []*AddressSegment) (count int)
- func (section *AddressSection) CopySubSegments(start, end int, segs []*AddressSegment) (count int)
- func (section *AddressSection) CopyUpperBytes(bytes []byte) []byte
- func (section *AddressSection) Enumerate(other AddressSectionType) *big.Int
- func (section *AddressSection) Equal(other AddressSectionType) bool
- func (section *AddressSection) ForEachSegment(consumer func(segmentIndex int, segment *AddressSegment) (stop bool)) int
- func (section AddressSection) Format(state fmt.State, verb rune)
- func (section *AddressSection) GetBitCount() BitCount
- func (section *AddressSection) GetBitsPerSegment() BitCount
- func (section *AddressSection) GetBlockCount(segments int) *big.Int
- func (section *AddressSection) GetByteCount() int
- func (section *AddressSection) GetBytesPerSegment() int
- func (section *AddressSection) GetCount() *big.Int
- func (section *AddressSection) GetGenericSegment(index int) AddressSegmentType
- func (section *AddressSection) GetLeadingBitCount(ones bool) BitCount
- func (section *AddressSection) GetLower() *AddressSection
- func (section *AddressSection) GetMaxSegmentValue() SegInt
- func (section *AddressSection) GetMinPrefixLenForBlock() BitCount
- func (section *AddressSection) GetPrefixCount() *big.Int
- func (section *AddressSection) GetPrefixCountLen(prefixLen BitCount) *big.Int
- func (section *AddressSection) GetPrefixLen() PrefixLen
- func (section *AddressSection) GetPrefixLenForSingleBlock() PrefixLen
- func (section *AddressSection) GetSegment(index int) *AddressSegment
- func (section *AddressSection) GetSegmentCount() int
- func (section *AddressSection) GetSegmentStrings() []string
- func (section *AddressSection) GetSegments() (res []*AddressSegment)
- func (section *AddressSection) GetSequentialBlockCount() *big.Int
- func (section *AddressSection) GetSequentialBlockIndex() int
- func (section *AddressSection) GetSubSection(index, endIndex int) *AddressSection
- func (section *AddressSection) GetTrailingBitCount(ones bool) BitCount
- func (section *AddressSection) GetTrailingSection(index int) *AddressSection
- func (section *AddressSection) GetUpper() *AddressSection
- func (section *AddressSection) GetUpperValue() *big.Int
- func (section *AddressSection) GetValue() *big.Int
- func (section *AddressSection) IncludesMax() bool
- func (section *AddressSection) IncludesZero() bool
- func (section *AddressSection) Increment(increment int64) *AddressSection
- func (section *AddressSection) IncrementBoundary(increment int64) *AddressSection
- func (section *AddressSection) IsAdaptiveZero() bool
- func (section *AddressSection) IsFullRange() bool
- func (section *AddressSection) IsIP() bool
- func (section *AddressSection) IsIPv4() bool
- func (section *AddressSection) IsIPv6() bool
- func (section *AddressSection) IsMAC() bool
- func (section *AddressSection) IsMax() bool
- func (section *AddressSection) IsMultiple() bool
- func (section *AddressSection) IsOneBit(prefixBitIndex BitCount) bool
- func (section *AddressSection) IsPrefixBlock() bool
- func (section *AddressSection) IsPrefixed() bool
- func (section *AddressSection) IsSequential() bool
- func (section *AddressSection) IsSinglePrefixBlock() bool
- func (section *AddressSection) IsZero() bool
- func (section *AddressSection) Iterator() Iterator[*AddressSection]
- func (section *AddressSection) Overlaps(other AddressSectionType) bool
- func (section *AddressSection) PrefixBlockIterator() Iterator[*AddressSection]
- func (section *AddressSection) PrefixContains(other AddressSectionType) (res bool)
- func (section *AddressSection) PrefixEqual(other AddressSectionType) (res bool)
- func (section *AddressSection) PrefixIterator() Iterator[*AddressSection]
- func (section *AddressSection) ReverseBits(perByte bool) (*AddressSection, addrerr.IncompatibleAddressError)
- func (section *AddressSection) ReverseBytes() (*AddressSection, addrerr.IncompatibleAddressError)
- func (section *AddressSection) ReverseSegments() *AddressSection
- func (section *AddressSection) SetPrefixLen(prefixLen BitCount) *AddressSection
- func (section *AddressSection) SetPrefixLenZeroed(prefixLen BitCount) (*AddressSection, addrerr.IncompatibleAddressError)
- func (section *AddressSection) String() string
- func (section *AddressSection) TestBit(n BitCount) bool
- func (section *AddressSection) ToBinaryString(with0bPrefix bool) (string, addrerr.IncompatibleAddressError)
- func (section *AddressSection) ToBlock(segmentIndex int, lower, upper SegInt) *AddressSection
- func (section *AddressSection) ToCanonicalString() string
- func (section *AddressSection) ToCompressedString() string
- func (section *AddressSection) ToCustomString(stringOptions addrstr.StringOptions) string
- func (section *AddressSection) ToDivGrouping() *AddressDivisionGrouping
- func (section *AddressSection) ToHexString(with0xPrefix bool) (string, addrerr.IncompatibleAddressError)
- func (section *AddressSection) ToIP() *IPAddressSection
- func (section *AddressSection) ToIPv4() *IPv4AddressSection
- func (section *AddressSection) ToIPv6() *IPv6AddressSection
- func (section *AddressSection) ToMAC() *MACAddressSection
- func (section *AddressSection) ToNormalizedString() string
- func (section *AddressSection) ToNormalizedWildcardString() string
- func (section *AddressSection) ToOctalString(with0Prefix bool) (string, addrerr.IncompatibleAddressError)
- func (section *AddressSection) ToPrefixBlock() *AddressSection
- func (section *AddressSection) ToPrefixBlockLen(prefLen BitCount) *AddressSection
- func (section *AddressSection) ToSectionBase() *AddressSection
- func (section *AddressSection) UpperBytes() []byte
- func (section *AddressSection) WithoutPrefixLen() *AddressSection
- func (section *AddressSection) Wrap() WrappedAddressSection
- type AddressSectionType
- type AddressSegment
- func (seg *AddressSegment) Bytes() []byte
- func (seg *AddressSegment) Compare(item AddressItem) int
- func (seg *AddressSegment) CompareSize(other AddressItem) int
- func (seg *AddressSegment) Contains(other AddressSegmentType) bool
- func (seg *AddressSegment) ContainsPrefixBlock(prefixLen BitCount) bool
- func (seg *AddressSegment) ContainsSinglePrefixBlock(prefixLen BitCount) bool
- func (seg *AddressSegment) CopyBytes(bytes []byte) []byte
- func (seg *AddressSegment) CopyUpperBytes(bytes []byte) []byte
- func (seg *AddressSegment) Equal(other AddressSegmentType) bool
- func (seg *AddressSegment) GetBitCount() BitCount
- func (seg *AddressSegment) GetByteCount() int
- func (seg *AddressSegment) GetCount() *big.Int
- func (seg *AddressSegment) GetLeadingBitCount(ones bool) BitCount
- func (seg *AddressSegment) GetLower() *AddressSegment
- func (seg *AddressSegment) GetMaxValue() SegInt
- func (seg *AddressSegment) GetMinPrefixLenForBlock() BitCount
- func (seg *AddressSegment) GetPrefixCountLen(segmentPrefixLength BitCount) *big.Int
- func (seg *AddressSegment) GetPrefixLenForSingleBlock() PrefixLen
- func (seg *AddressSegment) GetPrefixValueCountLen(segmentPrefixLength BitCount) SegIntCount
- func (seg *AddressSegment) GetSegmentHostMask(networkBits BitCount) SegInt
- func (seg *AddressSegment) GetSegmentNetworkMask(networkBits BitCount) SegInt
- func (seg *AddressSegment) GetSegmentValue() SegInt
- func (seg *AddressSegment) GetString() string
- func (seg *AddressSegment) GetTrailingBitCount(ones bool) BitCount
- func (seg *AddressSegment) GetUpper() *AddressSegment
- func (seg *AddressSegment) GetUpperSegmentValue() SegInt
- func (seg *AddressSegment) GetUpperValue() *BigDivInt
- func (seg *AddressSegment) GetValue() *BigDivInt
- func (seg *AddressSegment) GetValueCount() SegIntCount
- func (seg *AddressSegment) GetWildcardString() string
- func (seg *AddressSegment) IncludesMax() bool
- func (seg *AddressSegment) IncludesZero() bool
- func (seg *AddressSegment) IsFullRange() bool
- func (seg *AddressSegment) IsIP() bool
- func (seg *AddressSegment) IsIPv4() bool
- func (seg *AddressSegment) IsIPv6() bool
- func (seg *AddressSegment) IsMAC() bool
- func (seg *AddressSegment) IsMax() bool
- func (seg *AddressSegment) IsMultiple() bool
- func (seg *AddressSegment) IsOneBit(segmentBitIndex BitCount) bool
- func (seg *AddressSegment) IsSinglePrefix(divisionPrefixLength BitCount) bool
- func (seg *AddressSegment) IsZero() bool
- func (seg *AddressSegment) Iterator() Iterator[*AddressSegment]
- func (seg *AddressSegment) Matches(value SegInt) bool
- func (seg *AddressSegment) MatchesValsWithMask(lowerValue, upperValue, mask SegInt) bool
- func (seg *AddressSegment) MatchesWithMask(value, mask SegInt) bool
- func (seg *AddressSegment) Overlaps(other AddressSegmentType) bool
- func (seg *AddressSegment) PrefixContains(other AddressSegmentType, prefixLength BitCount) bool
- func (seg *AddressSegment) PrefixEqual(other AddressSegmentType, prefixLength BitCount) bool
- func (seg *AddressSegment) ReverseBits(perByte bool) (res *AddressSegment, err addrerr.IncompatibleAddressError)
- func (seg *AddressSegment) ReverseBytes() (res *AddressSegment, err addrerr.IncompatibleAddressError)
- func (seg *AddressSegment) String() string
- func (seg *AddressSegment) TestBit(n BitCount) bool
- func (seg *AddressSegment) ToDiv() *AddressDivision
- func (seg *AddressSegment) ToHexString(with0xPrefix bool) (string, addrerr.IncompatibleAddressError)
- func (seg *AddressSegment) ToIP() *IPAddressSegment
- func (seg *AddressSegment) ToIPv4() *IPv4AddressSegment
- func (seg *AddressSegment) ToIPv6() *IPv6AddressSegment
- func (seg *AddressSegment) ToMAC() *MACAddressSegment
- func (seg *AddressSegment) ToNormalizedString() string
- func (seg *AddressSegment) ToSegmentBase() *AddressSegment
- func (seg *AddressSegment) UpperBytes() []byte
- type AddressSegmentSeries
- type AddressSegmentType
- type AddressTrie
- type AddressType
- type AddressValueProvider
- type AllocatedBlock
- type AssociativeAddedTree
- type AssociativeAddedTreeNode
- func (node AssociativeAddedTreeNode[T, V]) GetKey() T
- func (node AssociativeAddedTreeNode[T, V]) GetSubNodes() []AssociativeAddedTreeNode[T, V]
- func (node AssociativeAddedTreeNode[T, V]) GetValue() V
- func (node AssociativeAddedTreeNode[T, V]) IsAdded() bool
- func (node AssociativeAddedTreeNode[T, V]) String() string
- func (node AssociativeAddedTreeNode[T, V]) TreeString() string
- type AssociativeAddressTrie
- type AssociativeTrie
- func NewAssociativeTrie[T TrieKeyConstraint[T], V any]() *AssociativeTrie[T, V]
- func NewIPv4AddressAssociativeTrie() *AssociativeTrie[*IPv4Address, any]
- func NewIPv6AddressAssociativeTrie() *AssociativeTrie[*IPv6Address, any]
- func NewMACAddressAssociativeTrie(extended bool) *AssociativeTrie[*MACAddress, any]
- func (trie *AssociativeTrie[T, V]) Add(addr T) bool
- func (trie *AssociativeTrie[T, V]) AddNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) AddTrie(added *AssociativeTrieNode[T, V]) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) AddedNodesTreeString() string
- func (trie *AssociativeTrie[T, V]) AllNodeIterator(forward bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) BlockSizeAllNodeIterator(lowerSubNodeFirst bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) BlockSizeCachingAllNodeIterator() CachingTrieIterator[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) BlockSizeNodeIterator(lowerSubNodeFirst bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) Ceiling(addr T) T
- func (trie *AssociativeTrie[T, V]) CeilingAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Clear()
- func (trie *AssociativeTrie[T, V]) Clone() *AssociativeTrie[T, V]
- func (trie *AssociativeTrie[T, V]) ConstructAddedNodesTree() AssociativeAddedTree[T, V]
- func (trie *AssociativeTrie[T, V]) ContainedFirstAllNodeIterator(forwardSubNodeOrder bool) Iterator[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) ContainedFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) ContainingFirstAllNodeIterator(forwardSubNodeOrder bool) CachingTrieIterator[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) ContainingFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) Contains(addr T) bool
- func (trie *AssociativeTrie[T, V]) DeepEqual(other *AssociativeTrie[T, V]) bool
- func (trie *AssociativeTrie[T, V]) DescendingIterator() IteratorWithRemove[T]
- func (trie *AssociativeTrie[T, V]) ElementContains(addr T) bool
- func (trie *AssociativeTrie[T, V]) ElementsContainedBy(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) ElementsContaining(addr T) *ContainmentValuesPath[T, V]
- func (trie *AssociativeTrie[T, V]) Equal(other *AssociativeTrie[T, V]) bool
- func (trie *AssociativeTrie[T, V]) FirstAddedNode() *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) FirstNode() *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Floor(addr T) T
- func (trie *AssociativeTrie[T, V]) FloorAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (trie AssociativeTrie[T, V]) Format(state fmt.State, verb rune)
- func (trie *AssociativeTrie[T, V]) Get(addr T) (V, bool)
- func (trie *AssociativeTrie[T, V]) GetAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) GetNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) GetRoot() *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Higher(addr T) T
- func (trie *AssociativeTrie[T, V]) HigherAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) IsEmpty() bool
- func (trie *AssociativeTrie[T, V]) Iterator() IteratorWithRemove[T]
- func (trie *AssociativeTrie[T, V]) LastAddedNode() *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) LastNode() *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) LongestPrefixMatch(addr T) T
- func (trie *AssociativeTrie[T, V]) LongestPrefixMatchNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Lower(addr T) T
- func (trie *AssociativeTrie[T, V]) LowerAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) NodeIterator(forward bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrie[T, V]) NodeSize() int
- func (trie *AssociativeTrie[T, V]) Put(addr T, value V) (V, bool)
- func (trie *AssociativeTrie[T, V]) PutNode(addr T, value V) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) PutTrie(added *AssociativeTrieNode[T, V]) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Remap(addr T, remapper func(existingValue V, found bool) (mapped V, mapIt bool)) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) RemapIfAbsent(addr T, supplier func() V) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Remove(addr T) bool
- func (trie *AssociativeTrie[T, V]) RemoveElementsContainedBy(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) ShortestPrefixMatch(addr T) T
- func (trie *AssociativeTrie[T, V]) ShortestPrefixMatchNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrie[T, V]) Size() int
- func (trie *AssociativeTrie[T, V]) String() string
- func (trie *AssociativeTrie[T, V]) TreeString(withNonAddedKeys bool) string
- type AssociativeTrieNode
- func (node *AssociativeTrieNode[T, V]) AllNodeIterator(forward bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) AsNewTrie() *AssociativeTrie[T, V]
- func (node *AssociativeTrieNode[T, V]) BlockSizeAllNodeIterator(lowerSubNodeFirst bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) BlockSizeCachingAllNodeIterator() CachingTrieIterator[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) BlockSizeNodeIterator(lowerSubNodeFirst bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (trie *AssociativeTrieNode[T, V]) Ceiling(addr T) T
- func (node *AssociativeTrieNode[T, V]) CeilingAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) Clear()
- func (node *AssociativeTrieNode[T, V]) ClearValue()
- func (node *AssociativeTrieNode[T, V]) Clone() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) CloneTree() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) Compare(other *AssociativeTrieNode[T, V]) int
- func (node *AssociativeTrieNode[T, V]) ContainedFirstAllNodeIterator(forwardSubNodeOrder bool) Iterator[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) ContainedFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) ContainingFirstAllNodeIterator(forwardSubNodeOrder bool) CachingTrieIterator[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) ContainingFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) Contains(addr T) bool
- func (node *AssociativeTrieNode[T, V]) DeepEqual(other *AssociativeTrieNode[T, V]) bool
- func (node *AssociativeTrieNode[T, V]) DescendingIterator() IteratorWithRemove[T]
- func (node *AssociativeTrieNode[T, V]) ElementContains(addr T) bool
- func (node *AssociativeTrieNode[T, V]) ElementsContainedBy(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) ElementsContaining(addr T) *ContainmentValuesPath[T, V]
- func (node *AssociativeTrieNode[T, V]) Equal(other *AssociativeTrieNode[T, V]) bool
- func (node *AssociativeTrieNode[T, V]) FirstAddedNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) FirstNode() *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrieNode[T, V]) Floor(addr T) T
- func (node *AssociativeTrieNode[T, V]) FloorAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (node AssociativeTrieNode[T, V]) Format(state fmt.State, verb rune)
- func (node *AssociativeTrieNode[T, V]) Get(addr T) (V, bool)
- func (node *AssociativeTrieNode[T, V]) GetAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) GetKey() T
- func (node *AssociativeTrieNode[T, V]) GetLowerSubNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) GetNode(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) GetParent() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) GetUpperSubNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) GetValue() V
- func (trie *AssociativeTrieNode[T, V]) Higher(addr T) T
- func (node *AssociativeTrieNode[T, V]) HigherAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) IsAdded() bool
- func (node *AssociativeTrieNode[T, V]) IsEmpty() bool
- func (node *AssociativeTrieNode[T, V]) IsLeaf() bool
- func (node *AssociativeTrieNode[T, V]) IsRoot() bool
- func (node *AssociativeTrieNode[T, V]) Iterator() IteratorWithRemove[T]
- func (node *AssociativeTrieNode[T, V]) LastAddedNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) LastNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) LongestPrefixMatch(addr T) T
- func (node *AssociativeTrieNode[T, V]) LongestPrefixMatchNode(addr T) *AssociativeTrieNode[T, V]
- func (trie *AssociativeTrieNode[T, V]) Lower(addr T) T
- func (node *AssociativeTrieNode[T, V]) LowerAddedNode(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) NextAddedNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) NextNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) NodeIterator(forward bool) IteratorWithRemove[*AssociativeTrieNode[T, V]]
- func (node *AssociativeTrieNode[T, V]) NodeSize() int
- func (node *AssociativeTrieNode[T, V]) PreviousAddedNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) PreviousNode() *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) Remove()
- func (node *AssociativeTrieNode[T, V]) RemoveElementsContainedBy(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) RemoveNode(addr T) bool
- func (node *AssociativeTrieNode[T, V]) SetAdded()
- func (node *AssociativeTrieNode[T, V]) SetValue(val V)
- func (node *AssociativeTrieNode[T, V]) ShortestPrefixMatch(addr T) T
- func (node *AssociativeTrieNode[T, V]) ShortestPrefixMatchNode(addr T) *AssociativeTrieNode[T, V]
- func (node *AssociativeTrieNode[T, V]) Size() int
- func (node *AssociativeTrieNode[T, V]) String() string
- func (node *AssociativeTrieNode[T, V]) TreeDeepEqual(other *AssociativeTrieNode[T, V]) bool
- func (node *AssociativeTrieNode[T, V]) TreeEqual(other *AssociativeTrieNode[T, V]) bool
- func (node *AssociativeTrieNode[T, V]) TreeString(withNonAddedKeys, withSizes bool) string
- type BigDivInt
- type BitCount
- type BitItem
- type BitwiseOrer
- type Cached
- type CachingTrieIterator
- type CachingTrieIteratorPosition
- func (iterPosition CachingTrieIteratorPosition[V]) CacheWithLowerSubNode(cached Cached) bool
- func (iterPosition CachingTrieIteratorPosition[V]) CacheWithUpperSubNode(cached Cached) bool
- func (iterPosition CachingTrieIteratorPosition[V]) GetCached() Cached
- func (iterPosition CachingTrieIteratorPosition[V]) Remove() V
- func (iterPosition CachingTrieIteratorPosition[V]) Value() V
- type ContainmentPath
- type ContainmentPathNode
- func (node *ContainmentPathNode[T]) Count() int
- func (node *ContainmentPathNode[T]) GetKey() T
- func (node *ContainmentPathNode[T]) ListString() string
- func (node *ContainmentPathNode[T]) Next() *ContainmentPathNode[T]
- func (node *ContainmentPathNode[T]) Previous() *ContainmentPathNode[T]
- func (node *ContainmentPathNode[T]) String() string
- type ContainmentValuesPath
- func (path *ContainmentValuesPath[T, V]) Count() int
- func (path *ContainmentValuesPath[T, V]) LongestPrefixMatch() *ContainmentValuesPathNode[T, V]
- func (path *ContainmentValuesPath[T, V]) ShortestPrefixMatch() *ContainmentValuesPathNode[T, V]
- func (path *ContainmentValuesPath[T, V]) String() string
- type ContainmentValuesPathNode
- func (node *ContainmentValuesPathNode[T, V]) Count() int
- func (node *ContainmentValuesPathNode[T, V]) GetKey() T
- func (node *ContainmentValuesPathNode[T, V]) GetValue() V
- func (node *ContainmentValuesPathNode[T, V]) ListString() string
- func (node *ContainmentValuesPathNode[T, V]) Next() *ContainmentValuesPathNode[T, V]
- func (node *ContainmentValuesPathNode[T, V]) Previous() *ContainmentValuesPathNode[T, V]
- func (node *ContainmentValuesPathNode[T, V]) String() string
- type DefaultAddressConverter
- func (converter DefaultAddressConverter) IsIPv4Convertible(address *IPAddress) bool
- func (converter DefaultAddressConverter) IsIPv6Convertible(address *IPAddress) bool
- func (converter DefaultAddressConverter) ToIPv4(address *IPAddress) *IPv4Address
- func (converter DefaultAddressConverter) ToIPv6(address *IPAddress) *IPv6Address
- type DelimitedAddressString
- type DivInt
- type DivisionType
- type DualIPv4v6AssociativeTries
- func (tries *DualIPv4v6AssociativeTries) Add(addr *IPAddress) bool
- func (tries *DualIPv4v6AssociativeTries[V]) AddIPv4Trie(trie *AssociativeTrieNode[*IPv4Address, V]) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) AddIPv6Trie(trie *AssociativeTrieNode[*IPv6Address, V]) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) AddNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) AddTrie(trie *AssociativeTrieNode[*IPAddress, V]) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) AddedNodesTreeString() string
- func (tries *DualIPv4v6AssociativeTries[V]) BlockSizeNodeIterator(lowerSubNodeFirst bool) IteratorWithRemove[*AssociativeTrieNode[*IPAddress, V]]
- func (tries *DualIPv4v6AssociativeTries) Ceiling(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6AssociativeTries[V]) CeilingAddedNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) Clear()
- func (tries *DualIPv4v6AssociativeTries[V]) Clone() *DualIPv4v6AssociativeTries[V]
- func (tries *DualIPv4v6AssociativeTries[V]) ContainedFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*AssociativeTrieNode[*IPAddress, V]]
- func (tries *DualIPv4v6AssociativeTries[V]) ContainingFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*AssociativeTrieNode[*IPAddress, V]]
- func (tries *DualIPv4v6AssociativeTries) Contains(addr *IPAddress) bool
- func (tries *DualIPv4v6AssociativeTries[V]) DeepEqual(other *DualIPv4v6AssociativeTries[V]) bool
- func (tries *DualIPv4v6AssociativeTries) DescendingIterator() IteratorWithRemove[*IPAddress]
- func (tries *DualIPv4v6AssociativeTries) ElementContains(addr *IPAddress) bool
- func (tries *DualIPv4v6AssociativeTries[V]) ElementsContainedBy(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) ElementsContaining(addr *IPAddress) *ContainmentValuesPath[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) Equal(other *DualIPv4v6AssociativeTries[V]) bool
- func (tries *DualIPv4v6AssociativeTries) Floor(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6AssociativeTries[V]) FloorAddedNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries DualIPv4v6AssociativeTries) Format(state fmt.State, verb rune)
- func (tries *DualIPv4v6AssociativeTries[V]) Get(addr *IPAddress) (V, bool)
- func (tries *DualIPv4v6AssociativeTries[V]) GetAddedNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) GetIPv4Trie() *AssociativeTrie[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) GetIPv6Trie() *AssociativeTrie[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) Higher(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6AssociativeTries[V]) HigherAddedNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) IsEmpty() bool
- func (tries *DualIPv4v6AssociativeTries) Iterator() IteratorWithRemove[*IPAddress]
- func (tries *DualIPv4v6AssociativeTries) LongestPrefixMatch(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6AssociativeTries[V]) LongestPrefixMatchNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) Lower(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6AssociativeTries[V]) LowerAddedNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) NodeIterator(forward bool) IteratorWithRemove[*AssociativeTrieNode[*IPAddress, V]]
- func (tries *DualIPv4v6AssociativeTries[V]) Put(addr *IPAddress, value V) (V, bool)
- func (tries *DualIPv4v6AssociativeTries[V]) PutIPv4Trie(trie *AssociativeTrieNode[*IPv4Address, V]) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) PutIPv6Trie(trie *AssociativeTrieNode[*IPv6Address, V]) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) PutNode(addr *IPAddress, value V) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) PutTrie(trie *AssociativeTrieNode[*IPAddress, V]) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) Remap(addr *IPAddress, ...) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries[V]) RemapIfAbsent(addr *IPAddress, supplier func() V) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) Remove(addr *IPAddress) bool
- func (tries *DualIPv4v6AssociativeTries[V]) RemoveElementsContainedBy(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) ShortestPrefixMatch(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6AssociativeTries[V]) ShortestPrefixMatchNode(addr *IPAddress) *AssociativeTrieNode[*IPAddress, V]
- func (tries *DualIPv4v6AssociativeTries) Size() int
- func (tries *DualIPv4v6AssociativeTries[V]) String() string
- func (tries *DualIPv4v6AssociativeTries[V]) TreeString(withNonAddedKeys bool) string
- type DualIPv4v6Tries
- func (tries *DualIPv4v6Tries) Add(addr *IPAddress) bool
- func (tries *DualIPv4v6Tries) AddIPv4Trie(trie *TrieNode[*IPv4Address]) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) AddIPv6Trie(trie *TrieNode[*IPv6Address]) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) AddNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) AddTrie(trie *TrieNode[*IPAddress]) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) AddedNodesTreeString() string
- func (tries *DualIPv4v6Tries) BlockSizeNodeIterator(lowerSubNodeFirst bool) IteratorWithRemove[*TrieNode[*IPAddress]]
- func (tries *DualIPv4v6Tries) Ceiling(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6Tries) CeilingAddedNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) Clear()
- func (tries *DualIPv4v6Tries) Clone() *DualIPv4v6Tries
- func (tries *DualIPv4v6Tries) ContainedFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*TrieNode[*IPAddress]]
- func (tries *DualIPv4v6Tries) ContainingFirstIterator(forwardSubNodeOrder bool) IteratorWithRemove[*TrieNode[*IPAddress]]
- func (tries *DualIPv4v6Tries) Contains(addr *IPAddress) bool
- func (tries *DualIPv4v6Tries) DescendingIterator() IteratorWithRemove[*IPAddress]
- func (tries *DualIPv4v6Tries) ElementContains(addr *IPAddress) bool
- func (tries *DualIPv4v6Tries) ElementsContainedBy(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) ElementsContaining(addr *IPAddress) *ContainmentPath[*IPAddress]
- func (tries *DualIPv4v6Tries) Equal(other *DualIPv4v6Tries) bool
- func (tries *DualIPv4v6Tries) Floor(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6Tries) FloorAddedNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries DualIPv4v6Tries) Format(state fmt.State, verb rune)
- func (tries *DualIPv4v6Tries) GetAddedNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) GetIPv4Trie() *Trie[*IPAddress]
- func (tries *DualIPv4v6Tries) GetIPv6Trie() *Trie[*IPAddress]
- func (tries *DualIPv4v6Tries) Higher(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6Tries) HigherAddedNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) IsEmpty() bool
- func (tries *DualIPv4v6Tries) Iterator() IteratorWithRemove[*IPAddress]
- func (tries *DualIPv4v6Tries) LongestPrefixMatch(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6Tries) LongestPrefixMatchNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) Lower(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6Tries) LowerAddedNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) NodeIterator(forward bool) IteratorWithRemove[*TrieNode[*IPAddress]]
- func (tries *DualIPv4v6Tries) Remove(addr *IPAddress) bool
- func (tries *DualIPv4v6Tries) RemoveElementsContainedBy(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) ShortestPrefixMatch(addr *IPAddress) *IPAddress
- func (tries *DualIPv4v6Tries) ShortestPrefixMatchNode(addr *IPAddress) *TrieNode[*IPAddress]
- func (tries *DualIPv4v6Tries) Size() int
- func (tries *DualIPv4v6Tries) String() string
- func (tries *DualIPv4v6Tries) TreeString(withNonAddedKeys bool) string
- type EmbeddedIPv6AddressSection
- type ExtendedIPSegmentSeries
- type ExtendedIdentifierString
- type ExtendedMasker
- type ExtendedSegmentSeries
- type GenericKeyConstraint
- type HostBitCount
- type HostIdentifierString
- type HostName
- func NewHostName(str string) *HostName
- func NewHostNameFromAddr(addr *IPAddress) *HostName
- func NewHostNameFromAddrPort(addr *IPAddress, port uint16) *HostName
- func NewHostNameFromNetIP(bytes net.IP) (hostName *HostName, err addrerr.AddressValueError)
- func NewHostNameFromNetIPAddr(addr *net.IPAddr) (hostName *HostName, err addrerr.AddressValueError)
- func NewHostNameFromNetNetIPAddr(addr netip.Addr) *HostName
- func NewHostNameFromNetNetIPAddrPort(addrPort netip.AddrPort) *HostName
- func NewHostNameFromNetNetIPPrefix(addr netip.Prefix) (hostName *HostName, err addrerr.AddressValueError)
- func NewHostNameFromNetTCPAddr(addr *net.TCPAddr) (*HostName, addrerr.AddressValueError)
- func NewHostNameFromNetUDPAddr(addr *net.UDPAddr) (*HostName, addrerr.AddressValueError)
- func NewHostNameFromPrefixedNetIP(bytes net.IP, prefixLen PrefixLen) (hostName *HostName, err addrerr.AddressValueError)
- func NewHostNameFromPrefixedNetIPAddr(addr *net.IPAddr, prefixLen PrefixLen) (hostName *HostName, err addrerr.AddressValueError)
- func NewHostNameParams(str string, params addrstrparam.HostNameParams) *HostName
- func (host *HostName) AsAddress() *IPAddress
- func (host *HostName) AsAddressString() *IPAddressString
- func (host *HostName) Compare(other *HostName) int
- func (host *HostName) Equal(other *HostName) bool
- func (addrStr HostName) Format(state fmt.State, verb rune)
- func (host *HostName) GetAddress() *IPAddress
- func (host *HostName) GetHost() string
- func (host *HostName) GetMask() *IPAddress
- func (host *HostName) GetNetworkPrefixLen() PrefixLen
- func (host *HostName) GetNormalizedLabels() []string
- func (host *HostName) GetPort() Port
- func (host *HostName) GetService() string
- func (host *HostName) GetValidationOptions() addrstrparam.HostNameParams
- func (host *HostName) IsAddress() bool
- func (host *HostName) IsAddressString() bool
- func (host *HostName) IsAllAddresses() bool
- func (host *HostName) IsEmpty() bool
- func (host *HostName) IsLocalHost() bool
- func (host *HostName) IsLoopback() bool
- func (host *HostName) IsReverseDNS() bool
- func (host *HostName) IsSelf() bool
- func (host *HostName) IsUncIPv6Literal() bool
- func (host *HostName) IsValid() bool
- func (host *HostName) ResolvesToSelf() bool
- func (host *HostName) String() string
- func (host *HostName) ToAddress() (addr *IPAddress, err addrerr.AddressError)
- func (host *HostName) ToAddresses() (addrs []*IPAddress, err addrerr.AddressError)
- func (host *HostName) ToNetIP() net.IP
- func (host *HostName) ToNetIPAddr() *net.IPAddr
- func (host *HostName) ToNetTCPAddr() *net.TCPAddr
- func (host *HostName) ToNetTCPAddrService(serviceMapper func(string) Port) *net.TCPAddr
- func (host *HostName) ToNetUDPAddr(serviceMapper func(string) Port) *net.UDPAddr
- func (host *HostName) ToNetUDPAddrService(serviceMapper func(string) Port) *net.UDPAddr
- func (host *HostName) ToNormalizedString() string
- func (host *HostName) ToNormalizedWildcardString() string
- func (host *HostName) ToQualifiedString() string
- func (host *HostName) Validate() addrerr.HostNameError
- func (host *HostName) Wrap() ExtendedIdentifierString
- type IPAddress
- func MergeToPrefixBlocks(addrs ...*IPAddress) (ipv4Blocks, ipv6Blocks []*IPAddress)
- func MergeToSequentialBlocks(addrs ...*IPAddress) (ipv4Blocks, ipv6Blocks []*IPAddress)
- func NewIPAddressFromBytes(ip net.IP) (*IPAddress, addrerr.AddressValueError)
- func NewIPAddressFromNetIP(ip net.IP) (*IPAddress, addrerr.AddressValueError)
- func NewIPAddressFromNetIPAddr(addr *net.IPAddr) (*IPAddress, addrerr.AddressValueError)
- func NewIPAddressFromNetIPMask(ip net.IPMask) (*IPAddress, addrerr.AddressValueError)
- func NewIPAddressFromNetIPNet(ipnet *net.IPNet) (*IPAddress, addrerr.AddressError)
- func NewIPAddressFromNetNetIPAddr(addr netip.Addr) *IPAddress
- func NewIPAddressFromNetNetIPPrefix(prefixedAddr netip.Prefix) (*IPAddress, addrerr.AddressError)
- func NewIPAddressFromPrefixedNetIP(ip net.IP, prefixLength PrefixLen) (*IPAddress, addrerr.AddressValueError)
- func NewIPAddressFromPrefixedNetIPAddr(addr *net.IPAddr, prefixLength PrefixLen) (*IPAddress, addrerr.AddressValueError)
- func NewIPAddressFromPrefixedSegments(segs []*IPAddressSegment, prefixLength PrefixLen) (res *IPAddress, err addrerr.AddressValueError)
- func NewIPAddressFromPrefixedVals(version IPVersion, lowerValueProvider, upperValueProvider SegmentValueProvider, ...) *IPAddress
- func NewIPAddressFromPrefixedZonedVals(version IPVersion, lowerValueProvider, upperValueProvider SegmentValueProvider, ...) *IPAddress
- func NewIPAddressFromSegs(segments []*IPAddressSegment) (res *IPAddress, err addrerr.AddressValueError)
- func NewIPAddressFromVals(version IPVersion, lowerValueProvider SegmentValueProvider) *IPAddress
- func NewIPAddressFromValueProvider(valueProvider IPAddressValueProvider) *IPAddress
- func (addr *IPAddress) AdjustPrefixLen(prefixLen BitCount) *IPAddress
- func (addr *IPAddress) AdjustPrefixLenZeroed(prefixLen BitCount) (*IPAddress, addrerr.IncompatibleAddressError)
- func (addr *IPAddress) AssignMinPrefixForBlock() *IPAddress
- func (addr *IPAddress) AssignPrefixForSingleBlock() *IPAddress
- func (addr *IPAddress) BitwiseOr(other *IPAddress) (masked *IPAddress, err addrerr.IncompatibleAddressError)
- func (addr *IPAddress) BlockIterator(segmentCount int) Iterator[*IPAddress]
- func (addr *IPAddress) Bytes() []byte
- func (addr *IPAddress) Compare(item AddressItem) int
- func (addr *IPAddress) CompareSize(other AddressItem) int
- func (addr *IPAddress) Contains(other AddressType) bool
- func (addr *IPAddress) ContainsPrefixBlock(prefixLen BitCount) bool
- func (addr *IPAddress) ContainsRange(other IPAddressSeqRangeType) bool
- func (addr *IPAddress) ContainsSinglePrefixBlock(prefixLen BitCount) bool
- func (addr *IPAddress) CopyBytes(bytes []byte) []byte
- func (addr *IPAddress) CopyNetIP(ip net.IP) net.IP
- func (addr *IPAddress) CopySegments(segs []*IPAddressSegment) (count int)
- func (addr *IPAddress) CopySubSegments(start, end int, segs []*IPAddressSegment) (count int)
- func (addr *IPAddress) CopyUpperBytes(bytes []byte) []byte
- func (addr *IPAddress) CopyUpperNetIP(ip net.IP) net.IP
- func (addr *IPAddress) CoverWithPrefixBlock() *IPAddress
- func (addr *IPAddress) CoverWithPrefixBlockTo(other *IPAddress) *IPAddress