caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: james woodyatt <jhwoodyatt@mac.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: The Trade <caml-list@inria.fr>
Subject: Re: [Caml-list] parsing and emitting Unix.inet_addr values
Date: Thu, 15 Nov 2001 12:13:46 -0800	[thread overview]
Message-ID: <466E903B-DA05-11D5-832E-000502DB38F5@mac.com> (raw)
In-Reply-To: <20011115104821.A30296@pauillac.inria.fr>

On Thursday, November 15, 2001, at 01:48 , Xavier Leroy wrote:
>
> 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.

I received another response that raised this same issue.

It's nice to know that the abstract Unix.inet_addr type is intended to 
represent both IPv4 and IPv6 addresses.  The current conversions to and 
from strings just deal with dot quads and don't seem to understand 
textual representations of IPv6 addresses yet, but I guess I can see the 
roadmap now.

Consider this:

	val inet_addr_of_octets: string -> inet_addr
	val octets_of_inet_addr: inet_addr -> string

If inet_addr_of_octets is applied to a string that isn't four or eight 
octets in length, then it can raise Invalid_arg.


--
j h woodyatt <jhw@wetware.com>
"...the antidote to misinformation is more information, not less."
                                                      --vinton cerf

-------------------
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 20:13 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
2001-11-15 20:13   ` james woodyatt [this message]
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=466E903B-DA05-11D5-832E-000502DB38F5@mac.com \
    --to=jhwoodyatt@mac.com \
    --cc=caml-list@inria.fr \
    --cc=jhw@wetware.com \
    --cc=xavier.leroy@inria.fr \
    /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).