caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlnet: EAFNOSUPPORT on Max OSX
@ 2007-05-05 12:40 Joel Reymont
  2007-05-05 12:50 ` Joel Reymont
  0 siblings, 1 reply; 13+ messages in thread
From: Joel Reymont @ 2007-05-05 12:40 UTC (permalink / raw)
  To: Gerd Stolpmann; +Cc: OCaml List

Gerd,

Netplex reports EAFNOSUPPORT when starting up on Mac OSX which means  
"Address family not supported by protocol family".

The issue is that in netplex_controller.ml/start_containers you are  
doing

       let (fd_clnt, fd_srv) =
	Unix.socketpair Unix.PF_UNIX Unix.SOCK_STREAM 0 in
       let (sys_fd_clnt, sys_fd_srv) =
	Unix.socketpair Unix.PF_UNIX Unix.SOCK_STREAM 0 in

i.e. creating Unix Domain sockets.

Later on in rpc_transport.ml/stream_rpc_multiplex_controller you are  
doing

     `Sockaddr(Unix.getsockname fd)

which passes, and

     `Sockaddr(Unix.getpeername fd)

which fails with EAFNOSUPPORT.

A Ruby test, on the other hand, ran without a hitch:

irb(main):001:0> require 'socket'
=> true

irb(main):002:0> x = Socket.pair Socket::PF_UNIX, Socket::SOCK_STREAM, 0
=> [#<Socket:0x7daa4>, #<Socket:0x7dab8>]

irb(main):003:0> x.each { |sock| sock.getpeername }
=> [#<Socket:0x7daa4>, #<Socket:0x7dab8>]

	Thanks, Joel

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-05-28 17:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-05 12:40 ocamlnet: EAFNOSUPPORT on Max OSX Joel Reymont
2007-05-05 12:50 ` Joel Reymont
2007-05-05 12:57   ` [Caml-list] " Richard Jones
2007-05-05 14:00     ` Joel Reymont
2007-05-05 13:53   ` Mac OSX getsocketpair/getsockname and IPv6 Joel Reymont
2007-05-05 14:13     ` Serious bug in the OCaml FFI? Joel Reymont
2007-05-05 14:56       ` [Caml-list] " Olivier Andrieu
2007-05-05 15:24         ` Joel Reymont
2007-05-05 14:31     ` Mac OSX getsocketpair/getsockname and IPv6 Joel Reymont
2007-05-05 15:16       ` Solved! (was Re: Mac OSX getsocketpair/getsockname and IPv6) Joel Reymont
2007-05-06 10:05         ` [Caml-list] " Gerd Stolpmann
2007-05-28 17:08         ` Paul Snively
2007-05-05 14:46     ` Mac OSX getsocketpair/getsockname and IPv6 Joel Reymont

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