caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] exercice with subnets union
@ 2013-09-20 11:50 Mihamina Rakotomandimby
  2013-09-20 12:20 ` David Sheets
  0 siblings, 1 reply; 3+ messages in thread
From: Mihamina Rakotomandimby @ 2013-09-20 11:50 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]

Hi all,

I have a list of subnet: http://pastebin.com/e9LPv55K
(These are Google IP ranges lokked up from his AS#)

Some consecutive/adjacent "/24" could be "/23"'d and even multple 
consecutive "/24" coudl be "/18"'d and so on...

Have you got in your bookmarks or notes some IP adresses manipulation 
functions, so that I could shorten that list?

I would like to make that exercice in OCaml.

Thank you.

-- 
RMA.


[-- Attachment #2: Type: text/html, Size: 797 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] exercice with subnets union
  2013-09-20 11:50 [Caml-list] exercice with subnets union Mihamina Rakotomandimby
@ 2013-09-20 12:20 ` David Sheets
  2013-09-20 13:00   ` David Sheets
  0 siblings, 1 reply; 3+ messages in thread
From: David Sheets @ 2013-09-20 12:20 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: O Caml

On Fri, Sep 20, 2013 at 12:50 PM, Mihamina Rakotomandimby
<mihamina@rktmb.org> wrote:
> Hi all,
>
> I have a list of subnet: http://pastebin.com/e9LPv55K
> (These are Google IP ranges lokked up from his AS#)
>
> Some consecutive/adjacent "/24" could be "/23"'d and even multple
> consecutive "/24" coudl be "/18"'d and so on...
>
> Have you got in your bookmarks or notes some IP adresses manipulation
> functions, so that I could shorten that list?

Hi Mihamina,

You may be interested in ipaddr
<https://github.com/mirage/ocaml-ipaddr>, a very small OCaml library
for manipulation of IP address representations.

You can install ipaddr with

$ opam install ipaddr

Hope this helps,

David

> I would like to make that exercice in OCaml.
>
> Thank you.
>
> --
> RMA.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] exercice with subnets union
  2013-09-20 12:20 ` David Sheets
@ 2013-09-20 13:00   ` David Sheets
  0 siblings, 0 replies; 3+ messages in thread
From: David Sheets @ 2013-09-20 13:00 UTC (permalink / raw)
  To: Mihamina Rakotomandimby; +Cc: O Caml

On Fri, Sep 20, 2013 at 1:20 PM, David Sheets <sheets@alum.mit.edu> wrote:
> On Fri, Sep 20, 2013 at 12:50 PM, Mihamina Rakotomandimby
> <mihamina@rktmb.org> wrote:
>> Hi all,
>>
>> I have a list of subnet: http://pastebin.com/e9LPv55K
>> (These are Google IP ranges lokked up from his AS#)
>>
>> Some consecutive/adjacent "/24" could be "/23"'d and even multple
>> consecutive "/24" coudl be "/18"'d and so on...
>>
>> Have you got in your bookmarks or notes some IP adresses manipulation
>> functions, so that I could shorten that list?
>
> Hi Mihamina,
>
> You may be interested in ipaddr
> <https://github.com/mirage/ocaml-ipaddr>, a very small OCaml library
> for manipulation of IP address representations.
>
> You can install ipaddr with
>
> $ opam install ipaddr

I've just released 0.2.3 of ipaddr with a subnet prefix bits accessor.
I would be very happy to collaborate on modifying the library to
incorporate common operations that you may need. Patches and feature
requests welcome on the GitHub issue tracker.

Best regards,

David

> Hope this helps,
>
> David
>
>> I would like to make that exercice in OCaml.
>>
>> Thank you.
>>
>> --
>> RMA.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-20 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-20 11:50 [Caml-list] exercice with subnets union Mihamina Rakotomandimby
2013-09-20 12:20 ` David Sheets
2013-09-20 13:00   ` David Sheets

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).