Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] parsing and emitting Unix.inet_addr values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Rouaix <frouaix@h...>
Subject: RE: [Caml-list] parsing and emitting Unix.inet_addr values
Back in 1996/1997, Francis Dupont (Francis.Dupont@inria.fr) was working
on IPv6, and he patched the conversion functions to work with IPv6
addresses (and probably some other stuff from unix.ml/libunix) . IIRC,
he then got MMM (the web browser) to run on IPv6 enabled machines by
simply recompiling it (no source changes in the app).
I guess that this proved that you can get any OCaml application IPv6
enabled if you do the appropriate work in libunix. Maybe Francis still
has a copy of that code BTW.

HTH,
--f
François Rouaix


-----Original Message-----
From: owner-caml-list@pauillac.inria.fr
[mailto:owner-caml-list@pauillac.inria.fr] On Behalf Of james woodyatt
Sent: Thursday, November 15, 2001 12:14 PM
To: Xavier Leroy
Cc: The Trade
Subject: Re: [Caml-list] parsing and emitting Unix.inet_addr values

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
-------------------
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