Nope.  Not going to work either.

-----Original Message-----
From: Rick Bullotta [mailto:[email protected]] 
Sent: Monday, March 22, 2010 2:15 PM
To: [email protected]
Subject: RE: Converting an IP range to CIDR notation

Hi, Sai.

In that same package, there's a CIDRIterator class that may do the trick.
I'll take a look at let you know.

Rick

-----Original Message-----
From: Sai Pullabhotla [mailto:[email protected]] 
Sent: Monday, March 22, 2010 1:49 PM
To: [email protected]
Subject: Re: Converting an IP range to CIDR notation

Does not look like it. What I'm looking for is - given a from and to
IP addresses, it needs to generate corresponding Subnets using the
CIDR notation. So, for example, if the from address is 192.168.1.1 and
the to address is 192.168.1.12, the subnets should be -

192.168.1.1/32
192.168.1.2/31
192.168.1.4/30
192.168.1.8/30
192.168.1.12/32

I downloaded the source code of Apache James too, and did not find
anything that would do this.

Regards,
Sai Pullabhotla





On Mon, Mar 22, 2010 at 12:10 PM, Rick Bullotta
<[email protected]> wrote:
> Would this work for you?
>
> http://labs.karmasphere.org/dp/javadoc/com/karmasphere/dp/type/CIDR.html
>
>
> -----Original Message-----
> From: Sai Pullabhotla [mailto:[email protected]]
> Sent: Monday, March 22, 2010 10:16 AM
> To: dev
> Subject: Converting an IP range to CIDR notation
>
> Does any one have Java code for converting a given range of IP
> addresses to CIDR notation, like the one here http://ip2cidr.com/.
>
> Thanks.
>
> Regards,
> Sai Pullabhotla
>
>


Reply via email to