From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 4B55E7EE49 for ; Fri, 20 Sep 2013 14:20:30 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kosmo.zb@gmail.com) identity=pra; client-ip=74.125.82.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kosmo.zb@gmail.com"; x-sender="kosmo.zb@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kosmo.zb@gmail.com designates 74.125.82.179 as permitted sender) identity=mailfrom; client-ip=74.125.82.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kosmo.zb@gmail.com"; x-sender="kosmo.zb@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f179.google.com) identity=helo; client-ip=74.125.82.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kosmo.zb@gmail.com"; x-sender="postmaster@mail-we0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgICAMk8PFJKfVKzlGdsb2JhbABagz9MBq5qk2MIFg4BAQEBBwsLCRIqgiUBAQQBQAE4AQMBCwEFBQsNLiISAQUBHAYTh3MDCQYHBZwnj1iERScNV4kNAQUMk34Dl3yBL4sXg0cYKYFhgmw7 X-IPAS-Result: AgICAMk8PFJKfVKzlGdsb2JhbABagz9MBq5qk2MIFg4BAQEBBwsLCRIqgiUBAQQBQAE4AQMBCwEFBQsNLiISAQUBHAYTh3MDCQYHBZwnj1iERScNV4kNAQUMk34Dl3yBL4sXg0cYKYFhgmw7 X-IronPort-AV: E=Sophos;i="4.90,944,1371074400"; d="scan'208";a="33682978" Received: from mail-we0-f179.google.com ([74.125.82.179]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 20 Sep 2013 14:20:29 +0200 Received: by mail-we0-f179.google.com with SMTP id x55so400308wes.38 for ; Fri, 20 Sep 2013 05:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HqUckq6QXPw15MyfPsAC3CuFHsIkb+keoONJIpqtT9A=; b=DQ6BTuf93AvHb63A8kw8ZMCmAktz+f9cP38b+ruFTFvUBd+lwsDMS5VnHxNcvhhO71 gyRzftqGAMn6/sauT9mQbyHgkDe0W/gs5xdJP60iyWlBEm5VjSzrCkGl3MN/Gl+rP3kp xaLdrdGws2QQQQRnuWQZHnzQmLDM7aJZoqC75ErTFidQsS+LBjoGeWrf+qktWnqbb17V 0xGXkJMl//TecZTfa39FxQUg7MnLWTitAhmIWgt50Oi6yxGbrB60p8e/ZBkqw+4J6HJg /NfSDfJqLrhLrvQySYbPCLc3ayTYNYu/uFz6AhDJV7ZXL252CNk3OaMDl9xqsY2b96Rf iCTA== MIME-Version: 1.0 X-Received: by 10.180.11.37 with SMTP id n5mr2519050wib.25.1379679629940; Fri, 20 Sep 2013 05:20:29 -0700 (PDT) Sender: kosmo.zb@gmail.com Received: by 10.217.90.195 with HTTP; Fri, 20 Sep 2013 05:20:29 -0700 (PDT) In-Reply-To: <523C369F.5060200@rktmb.org> References: <523C369F.5060200@rktmb.org> Date: Fri, 20 Sep 2013 13:20:29 +0100 X-Google-Sender-Auth: 35LU4aJCYZDXbJr87fNlT5NYtOM Message-ID: From: David Sheets To: Mihamina Rakotomandimby Cc: O Caml Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] exercice with subnets union On Fri, Sep 20, 2013 at 12:50 PM, Mihamina Rakotomandimby 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 , 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.