Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2001-11-16 (10:18)
From: Francois Rouaix <frouaix@h...>
Subject: RE: [Caml-list] parsing and emitting Unix.inet_addr values
Back in 1996/1997, Francis Dupont ( was working
on IPv6, and he patched the conversion functions to work with IPv6
addresses (and probably some other stuff from . 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.

François Rouaix

-----Original Message-----
[] 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
> 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 <>
"...the antidote to misinformation is more information, not less."
                                                      --vinton cerf

Bug reports:  FAQ:
To unsubscribe, mail  Archives:
Bug reports:  FAQ:
To unsubscribe, mail  Archives: