_Original issue created by adrian.f.cole on 2013-01-14 at 03:37 AM_
Seems the following should be possible to include, and save a lot of people parsing on their own. WDYT?
Range<InetAddress> slash22 = InetAddresses.cidrRange("198.51.100.0/22");
or..
Range<InetAddress> slash48 = InetAddresses.cidrRange("2001:db8::", 48);
Does anyone know what the state of this is? This seems very useful and I'd be interested in taking a stab at it if no-one is. I imagine it would be something similar to getAllAddresses in Apache Commons SubnetUtils: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/util/SubnetUtils.java?view=markup
:+1:
Would also be nice if there was support for checking if a given IPv4/IPv6 address is in the range of a given Subnet. Something like the SubnetInfo isInRange method.
We have a use case with the exact same need as the one described in the original issue. It would be fantastic to have Guava supporting CIDR to ranges computations for IPv4 and IPv6 addresses.
馃憤
Most helpful comment
Would also be nice if there was support for checking if a given IPv4/IPv6 address is in the range of a given Subnet. Something like the SubnetInfo isInRange method.