From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 08F10BBCA for ; Wed, 2 Apr 2008 09:05:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAJrD8kfAXQIn/2dsb2JhbACsGg X-IronPort-AV: E=Sophos;i="4.25,591,1199660400"; d="scan'208";a="24486464" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 02 Apr 2008 09:05:29 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m3275TnR005929 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 2 Apr 2008 09:05:29 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQBAKrC8kdQRFuwiGdsb2JhbACRTwEBAQ8mmhQ X-IronPort-AV: E=Sophos;i="4.25,591,1199660400"; d="scan'208";a="10962434" Received: from furbychan.cocan.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 02 Apr 2008 09:05:28 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1Jgx2F-0000Vf-8r; Wed, 02 Apr 2008 08:05:27 +0100 Date: Wed, 2 Apr 2008 08:05:27 +0100 To: Sylvain Le Gall Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: ANNOUNCE: ocaml bitmatch (Erlang-style bitstrings for OCaml) Message-ID: <20080402070526.GA1497@annexia.org> References: <20080401224256.GB19556@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Miltered: at concorde with ID 47F33039.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 wrote:01 caml-list:01 reuse:01 data:02 define:02 match:02 linking:02 optimization:03 modify:05 matching:05 apr:06 wed:06 examples:07 On Wed, Apr 02, 2008 at 12:17:22AM +0000, Sylvain Le Gall wrote: > I have two questions: > * do you think you can get something efficient (part of the paper you > are linking, talked about performance) There's lots of room for optimization in the current code. It mainly aims to be working. > * is there a way to retain part of the data structure... E.g TCP/UDP > packet has the same IP part (the one you describe) + a TCP/UDP > header... At the moment you cannot define and reuse patterns, but it's certainly something which could be added (as in micmatch). However it is easy to modify the examples so they match over TCP and UDP packets, either by adding a second whole case to the top level bitmatch, or by adding a sub-bitmatch matching the payload. Rich. -- Richard Jones Red Hat