From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA27578; Thu, 15 Nov 2001 10:48:29 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA30348 for ; Thu, 15 Nov 2001 10:48:28 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fAF9mLj25298; Thu, 15 Nov 2001 10:48:22 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA30642; Thu, 15 Nov 2001 10:48:21 +0100 (MET) Date: Thu, 15 Nov 2001 10:48:21 +0100 From: Xavier Leroy To: jhw@wetware.com Cc: The Trade Subject: Re: [Caml-list] parsing and emitting Unix.inet_addr values Message-ID: <20011115104821.A30296@pauillac.inria.fr> References: <58BE67E6-D97C-11D5-BA32-000502DB38F5@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <58BE67E6-D97C-11D5-BA32-000502DB38F5@mac.com>; from jhwoodyatt@mac.com on Wed, Nov 14, 2001 at 07:53:36PM -0800 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I'm writing an asynchronous DNS stub resolver, and it irritates me to > have to convert 4-octet IPv4 addresses in A records into dot-quad > strings, just so I can then call Unix.inet_addr_of_string to get the > address into the abstract type. I'd much rather construct the > Unix.inet_addr directly from the four octets, especially since I know > that internally they are exactly the same representation. I understand your irritation about the current interface, and agree that additional functions over the inet_addr abstract type are needed, e.g. conversions to and from arrays of integers (each integer representing one byte of the address). But: I'm *extremely* wary about interfaces that assume that an inet_addr is isomorphic to a 32-bit integer or to 4 octets, because these break horribly with IPv6 addresses. We've been hearing for so long that IPv6 is the wave of the future that we might just as well be ready for IPv6. - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr