From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 19ABDBC0A for ; Sat, 5 May 2007 16:31:30 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l45EVTA1008323 for ; Sat, 5 May 2007 16:31:29 +0200 Received: by ug-out-1314.google.com with SMTP id k3so717104ugf for ; Sat, 05 May 2007 07:31:29 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=dKPgrAenWNWdxwh71L1irhlBA4GKQeqWs0ao4kgYX9iw5uRSsolwRwNm/eBvV9tHL0ryQTHfoDw/SE8aD5AN4/WcxePCb95MLkr4U/ZOiUmixncK9WT0f4mW8PQroHHZBbyOd7YuO4cy2rvu+ZijhZUXQdEBzO9o9RL7TCtgno0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=tYgZV/y/MEEpjkw9t9ChWROCIXU5p+UNA9hbDbazOKgE/96L8fp7ZifCeSRzr+CrcF9bUpCcii8qlbVPMeM/IrRwMr+z11HU6InpLuiKrZdNlcsEsB9YDrj4at79sZD8lomBwacIwHaH08A0kx0fV8DQ8NO4/AzHDGeftuTSGt4= Received: by 10.67.97.7 with SMTP id z7mr3541419ugl.1178375489434; Sat, 05 May 2007 07:31:29 -0700 (PDT) Received: from ?192.168.1.33? ( [83.34.3.221]) by mx.google.com with ESMTP id j3sm715591ugd.2007.05.05.07.31.27; Sat, 05 May 2007 07:31:27 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <71B2C4B5-3ECB-450F-B015-3C5EAB90855F@gmail.com> <75F71DDF-CACC-4AD9-A3DA-E0049FC9FB2F@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: Mac OSX getsocketpair/getsockname and IPv6 Date: Sat, 5 May 2007 15:31:24 +0100 To: OCaml List X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 463C9541.000 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 463C9541.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; osx:01 getsockname:01 ocaml:01 ffi:01 printf:01 val:01 val:01 topfind:01 getpeername:01 unix:01 unix:01 exception:01 int:01 int:01 bugs:03 There are no bugs in the OCaml FFI. socketpair.c: printf("unix_socketpair: domain = %d/%d/%d, type = %d/%d/%d, proto = %d\n", PF_UNIX, Int_val(domain), socket_domain_table[Int_val(domain)], SOCK_STREAM, Int_val(type), socket_type_table[Int_val(type)], Int_val(proto)); Running the test #use "topfind";; #require "unix";; let x, y = Unix.socketpair Unix.PF_UNIX Unix.SOCK_STREAM 0;; Unix.getpeername y;; produces unix_socketpair: domain = 1/0/1, type = 1/0/1, proto = 0 Exception: Unix.Unix_error (Unix.EAFNOSUPPORT, "", ""). So we _are_ passing the proper values and they become proper values as well. The problem must be somewhere else, possibly in getsockbyname.c. Joel -- http://wagerlabs.com/