mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Bullotta" <rick.bullo...@burningskysoftware.com>
Subject RE: Converting an IP range to CIDR notation
Date Mon, 22 Mar 2010 18:15:02 GMT
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:sai.pullabhotla@jmethods.com] 
Sent: Monday, March 22, 2010 1:49 PM
To: dev@mina.apache.org
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
<rick.bullotta@burningskysoftware.com> wrote:
> Would this work for you?
>
> http://labs.karmasphere.org/dp/javadoc/com/karmasphere/dp/type/CIDR.html
>
>
> -----Original Message-----
> From: Sai Pullabhotla [mailto:sai.pullabhotla@jmethods.com]
> 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
>
>


Mime
View raw message