caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: jhw@wetware.com
Cc: The Trade <caml-list@inria.fr>
Subject: Re: [Caml-list] parsing and emitting Unix.inet_addr values
Date: Thu, 15 Nov 2001 10:48:21 +0100	[thread overview]
Message-ID: <20011115104821.A30296@pauillac.inria.fr> (raw)
In-Reply-To: <58BE67E6-D97C-11D5-BA32-000502DB38F5@mac.com>; from jhwoodyatt@mac.com on Wed, Nov 14, 2001 at 07:53:36PM -0800

> 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


  reply	other threads:[~2001-11-15  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-15  3:53 james woodyatt
2001-11-15  9:48 ` Xavier Leroy [this message]
2001-11-15 20:13   ` james woodyatt
2001-11-15 20:30     ` Francois Rouaix
2001-11-15 21:26       ` james woodyatt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011115104821.A30296@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=jhw@wetware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).