IPAddress

Java library for handling IP addresses and subnets, both IPv4 and IPv6

APACHE-2.0 License

Downloads
9
Stars
467
Committers
5

Bot releases are hidden (Show)

IPAddress - Version 5.5.1 Latest Release

Published by seancfoley about 2 months ago

  • added new merge functions mergeToDualPrefixBlocks and mergeToDualSequentialBlocks for combined IPv4/IPv6 merging
  • added public constructors accepting message strings to AddressValueException and IncompatibleAddressException, issue #127
  • removed caching functionality from containingFirstIterator, use all-node containingFirstAllNodeIterator instead
IPAddress - Version 5.5.0

Published by seancfoley 8 months ago

  • added collection types for dual IPv4/v6 tries and for dual IPv4/v6 associative tries, issue #103
  • trie performance improvements for all trie operations
  • added shortestPrefixMatch trie methods
  • added enumerate methods, the inverse of the increment methods, to find the position of an address in a subnet, or to find the distance between two addresses
  • added an increment method accepting a BigInteger argument to IPv6Address and IPv6AddressSection
  • added the ability to construct an IPv6Address from two longs
  • added replace methods to address classes that take address sections
  • added overlaps methods to check for overlapping subnets, and for checking sequential range overlap with a subnet
  • added floor/lower/ceiling/higher methods to the address trie types, these methods previously accessible only from trie sets
  • added the extraneous digits IPv4 parsing option allow_inet_aton_extraneous_digits, issue #105.
  • includes the fix to invalid radix argument infinite loop, issue #118
IPAddress - Version 5.4.2

Published by seancfoley 9 months ago

  • removed unnecessary SDK dependency incompatible with Java 8 that was introduced with version 5.4.1, issue #121
  • includes the fix to invalid radix argument infinite loop, issue #118
IPAddress - Version 5.4.1

Published by seancfoley 9 months ago

  • fix to invalid radix argument infinite loop, issue #118
IPAddress - Version 5.4.0

Published by seancfoley almost 2 years ago

  • added PrefixBlockAllocator for automatic CIDR prefix block allocation
  • added AddedTree and AssociativeAddedTree classes for expanded constructAddedNodesTree methods
  • added getBlockSize and getBitsForCount in AddressItem
  • added matchUnordered and matchOrdered in Address
  • eliminated invalid AddressValueException when joining a range with the IPv4 max value to an IPv6 range, issue #86
  • fix to generation of strings from parsed address data, issue #87
  • fix to IPv4 address primitive int upper value generation, issue #96
IPAddress - Version 5.3.4

Published by seancfoley over 2 years ago

  • a fix to avoid ClassCastException when converting IPv4-mapped address to java.net.Inet6Address, issue #73
  • fixed the creation of HostName from an unresolved compressed-IPv6 socket address, issue #74
  • added IPAddressString.isIPv4Mapped for issue #75
  • fixed a class-loading issue with string parsing, issue #79
  • removed AddressDivision.getDivisionValueCount() and AddressDivision.getDivisionPrefixCount(int) because of potential overflow with divisions 63 or 64 bits long. If you have a segment, use getValueCount(), or with IPAddressSegment use getPrefixValueCount(int), which both return int. Otherwise, use getPrefixCount(int) or getCount() which return BigInteger
  • fixed issues with comparing non-standard division groupings with address comparators
  • added verification when host-masking multiple-valued segments
  • added verification when splitting IPv6AddressSegment
  • fixed check when reversing per-byte multiple-valued division
  • fixed trie-printing method option withNonAddedKeys
  • fixed an issue with serialization of parsed hosts with qualifiers
  • added control over parsing empty zones (a zone specifier followed by no zone)
  • added a small fix to host name parsing some unusual host names
  • a fix to IPv4AddressSection.toMaxHost
  • fixed a rare synchronization issue when generating division strings in AddressDivisionBase
IPAddress - Version 5.3.3

Published by seancfoley about 4 years ago

  • more flexible and efficient IPv6 zone handling
  • addresses issue #48, converting prefixed addresses with zone to Inet6Address
  • more efficient merging
IPAddress - Version 5.3.2

Published by seancfoley about 4 years ago

  • new longestPrefixMatch and longestPrefixMatchNode methods in AddressTrie, AddressTrieMap and AddressTrieSet, for more efficient matching without using the linked list from elementsContaining
  • added binary string parsing for IPv4 and IPv6 (see javadoc for IPAddressString for supported formats), and producing binary segmented strings with toSegmentedBinaryString
  • added support for parsing strings with uppercase hex 0X and binary 0B
  • improved performance of mergeToPrefixBlocks and mergeToSequentialBlocks, also resulting in a different ordering of the result, sorted by lower value. The old ordering remains attainable with the comparator IPAddressSegmentSeries.getPrefixLenComparator
  • added asNewTrie to TrieNode to create a new trie which is a copy of the sub-trie with the node as root
  • added IPAddressSeqRange.extend(IPAddressRange) to extend ranges more efficiently
  • added IPAddress.applyToBounds to use covering and spanning methods with multiple addresses or subnets, not just two
  • added IPAddressString.prefixContains(IPAddressString) for quick prefix-based containment checks
  • fixed inconsistency between prefixEquals in IPAddressString vs IPAddress with addresses that have no prefix length
  • fixed issue in IPAddressString.prefixEquals involving prefix not on segment boundary
  • fixed issue with spanWithPrefixBlocks not splitting up subnets with multiple prefix blocks
  • fix to string parsing control with allowsReverseRange, also added missing allowBase85
  • fix to issue #41, duplicate property key
  • fix to issue #44, wrong super method call
  • fix to issue #46, wrong boundary check incrementing IPv6 segment at index 2
IPAddress - Version 5.3.1

Published by seancfoley over 4 years ago

Fixes reversed sub-node order with trie block size iterator

IPAddress - Version 5.3.0

Published by seancfoley over 4 years ago

This version introduces address tries, associative address tries, address sets backed by address tries, and maps backed by associative address tries

  • added AddressTrie and its subclasses for IPv4, IPv6 and MAC
  • added AssociativeAddressTrie and its subclasses for IPv4, IPv6 and MAC
  • tries can be used as Java collections framework navigable set
  • associative tries can be used as Java collections framework navigable map
  • added testBit and isOneBit methods to all series and segments
  • fixed IPAddressSeqRange join(IPAddressSeqRange...) for issue #37
  • added OSGI manifest details for OSGI support for issue #33
IPAddress - Version 5.2.1

Published by seancfoley almost 5 years ago

Minor fixes to IPv4/v6 conversions 6 to 4, isatap, and embedded address extraction.

IPAddress - Version 5.2.0

Published by seancfoley almost 5 years ago

This version introduces methods for Java 8 functional-style operations.

  • added stream methods for addresses, address sections, address segments, and ip address sequential ranges: stream, prefixStream, prefixStream(int prefixLength), prefixBlockStream, prefixBlockStream(int prefixLength), blockStream(int segmentCount), sequentialBlockStream, segmentsStream
  • added corresponding spliterator methods: spliterator, prefixSpliterator, prefixSpliterator(int prefixLength), prefixBlockSpliterator, prefixBlockSpliterator(int prefixLength), blockSpliterator(int segmentCount), sequentialBlockSpliterator, segmentsSpliterator
  • added functions to create a single stream from multiple spliterators in AddressComponentRange:
    • <T extends AddressComponent> Stream<T> stream(Function<T, Stream<? extends T>> addrStreamFunc, T ...components)
    • <T extends AddressComponent> Stream<T> stream(Function<T, Stream<? extends T>> addrStreamFunc, Collection<? extends T> components)
  • added coverWithPrefixBlock method to find single covering prefix block, the smallest prefix block covering two subnets or addresses
  • added IPAddressString and HostName parsed mask access through getMask method
  • made sub-typing of address classes easier by loosening restrictions on using multiple network objects
  • altered network mask with prefix length so that it is single host
  • fixed a serialization issue involving IPAddressString instances with masks
  • fixed a threading issue with IPAddressString.getDivisionGrouping
  • fixed issue #32, mergeToPrefixBlocks exception on /1 prefix blocks
IPAddress - Version 4.3.3

Published by seancfoley almost 5 years ago

  • fix to issue #32, mergePrefixBlocks exception on /1 prefix blocks
  • fixed 4.3.2 javadoc
IPAddress - Version 5.1.0

Published by seancfoley almost 5 years ago

Mostly parsing and masking improvements.

  • getSequentialRange() method added to IPAddressString for direct access to sequential range
  • improved handling of masking and bitwise-oring subnets. isMaskCompatibleWithRange replaced by maskRange, same with bitwise-or.
  • getDivisionGrouping() method added to IPAddressString for "as-is" parsing
  • toString() for division strings adjusted, no longer using '*' due to varying bit lengths for divisions and potentially no segment separator to indicate bit length, also using radix matching parsed string
  • reverse ranges allowed in parsed strings
  • improved control/support of inferred range boundaries
  • fix to leading zeros detection for issue #20
  • fix to generation of IPv6 sections from bytes
  • adjusted IPAddress.toAddressString() to improve toHostAddress() in resulting IPAddressString
  • added toZeroNetwork() to get IP address with network bits zeroed
  • added getNetworkMask() and getHostMask() to IPAddressSegmentSeries as requested in issue #27
  • a few other minor fixes
IPAddress - Version 4.3.1

Published by seancfoley almost 5 years ago

  • fix to leading zeros detection for issue #20
  • fix to generation of IPv6 sections from bytes
  • adjusted IPAddress.toAddressString() to improve toHostAddress() in resulting IPAddressString
  • added toZeroNetwork() to get IP address with network bits zeroed
  • added getNetworkMask() and getHostMask() to IPAddressSegmentSeries as requested in issue #27
  • multicast fix and fix to toInetAddress()
IPAddress - Version 5.0.2

Published by seancfoley over 5 years ago

IPAddress - Version 5.0.1

Published by seancfoley almost 6 years ago

  • fixes to IPAddressString.contains (no issues exist with IPAddress.contains)
  • span with and merge to prefix blocks return only addresses with prefix lengths (including bit-count prefix lengths)
  • span with and merge to sequential blocks return no addresses with prefix lengths
  • removeBitCountPrefixLength() removes bit-count prefix lengths
IPAddress - Version 1.0.1

Published by seancfoley almost 6 years ago

Version 1.0.1 source can be compiled with a Java 6 compiler. The IPAddress.jar included with this release is compiled with a Java 6 compiler, and hence can be run on Java 6, Java 7, and up.

IPAddress - Version 5.0.0

Published by seancfoley almost 6 years ago

This version introduces new address range classes and reorganizes classes and code in the inet.ipaddr.format package.

This version is compatible with java 8 and the distributed jars are compiled with java 8, but those jars also include the module-info class for the Java Platform Module System (JPMS) introduced with Java 9, and hence can be used as the JPMS inet.ipaddr module with Java 9, 10, and 11. When compiling the source for Java 8 the module-info source file must be ignored or removed. When running the distributed jars with Java 8 no changes are required since the module-info class will simply be ignored.

  • includes the parsing performance improvements introduced in version 4.3.0 as well as the other 4.3.0 improvements and additions
  • added address range functionality with the new IPAddressSeqRange class and the IPv4 and IPv6 subclasses, along with their associated operations and iterators
  • added IPAddressRange interface for commonality between IPAddress and IPAddressSeqRange ranges
  • reorganization of classes and interfaces in inet.ipaddr.format package to standard, large, and string subpackages
  • expansion of the large division functionality, which uses BigInteger for address division values, to match the standard functionality which uses longs for address divisions
  • new static toNormalizedString string production methods to produce strings directly without intervening objects
  • new iterators: blockIterator(int), sequentialBlockIterator(), prefixIterator(), prefixBlockIterator(int), and their associated count methods, namely getSequentialBlockCount to go with sequentialBlockIterator() and prefixCount to go with iterator(), nonZeroHostIterator() and prefixBlockIterator(). Also added the isSequential() method.
  • added mergeToSequentialBlocks to match mergeToPrefixBlocks
  • works with Java 8, 9, 10, 11 and upwards, comprises the inet.ipaddr module for Java 9 and upwards

The Java 8 code in this release and previous releases is fully compatible with Android using Android API level 24 or higher.

IPAddress - Version 4.3.0

Published by seancfoley almost 6 years ago

  • address string parsing performance improvements
  • changed source encoding to UTF-8 from Cp1252 and changed source to unix line separators
  • new incrementBoundary method to increment from lower or upper subnet boundary
  • increment method changed for consistency between single addresses and subnets:
    changed increment(long) behaviour for subnets to match array indexing, with increment 0 the first element in the subnet, and also matching the behavior for non-subnets, with an increment of 1 giving the element above the upper element of the range
  • fixed issue with incrementing a multiple prefix block subnet
  • added byte copy that takes an index into the target bytes
  • made IPAddressCreator static
  • added prefixEquals and contains methods to IPAddressString for optimized containment checks
  • performance improvement caching Integer prefix lengths of length 128
  • fixed ArrayIndexOutOfBoundException in isPrefixSubnet (issue #10)
Package Rankings
Top 9.72% on Repo1.maven.org
Top 5.08% on Proxy.golang.org
Top 17.19% on Npmjs.org
Badges
Extracted from project README
Maven Central