From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B928FBC57 for ; Fri, 19 Nov 2010 11:27:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhsBAMLf5Uw+yBZznGdsb2JhbACiWRUBAQIBCAsICREivHmFSwQ X-IronPort-AV: E=Sophos;i="4.59,222,1288566000"; d="scan'208";a="79641614" Received: from smtp.eu.citrix.com ([62.200.22.115]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Nov 2010 11:27:16 +0100 X-IronPort-AV: E=Sophos;i="4.59,222,1288569600"; d="scan'208";a="2949198" Received: from lonpmailmx02.citrite.net ([10.30.224.163]) by LONPIPO01.EU.CITRIX.COM with ESMTP/TLS/RC4-MD5; 19 Nov 2010 10:27:14 +0000 Received: from LONPMAILBOX01.citrite.net ([10.30.224.161]) by LONPMAILMX02.citrite.net ([10.30.224.163]) with mapi; Fri, 19 Nov 2010 10:27:14 +0000 From: Dave Scott To: 'Goswin von Brederlow' , "caml-list@inria.fr" Date: Fri, 19 Nov 2010 10:27:13 +0000 Subject: RE: [Caml-list] Looking for stubs for sendmsg/recvmsg Thread-Topic: [Caml-list] Looking for stubs for sendmsg/recvmsg Thread-Index: AcuHqrq+cDT5K/VpSlGkZ2Jpcpx9zgAKOyug Message-ID: <81A73678E76EA642801C8F2E4823AD21933254B4C8@LONPMAILBOX01.citrite.net> References: <87d3q21qe4.fsf@frosties.localnet> In-Reply-To: <87d3q21qe4.fsf@frosties.localnet> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam: no; 0.00; citrix:01 stubs:01 stubs:01 const:01 struct:01 flags:01 struct:01 flags:01 bindings:01 mli:01 stub:01 bytecode:01 stub:01 recv:01 sockaddr:01 > Hi, >=20 > I'm looking for stubs for >=20 > ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); > ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags); >=20 > Specifically I need those to send (among normal messages) an > Unix.file_descr over a Unix Domain Socket. >=20 > Does anyone know of a module that has them? We have some bindings for those: https://github.com/xen-org/xen-api-libs/blob/master/stdext/unixext.mli external send_fd : Unix.file_descr -> string -> int -> int -> Unix.msg_flag= list -> Unix.file_descr -> int =3D "stub_unix_send_fd_bytecode" "stub_unix= _send_fd" external recv_fd : Unix.file_descr -> string -> int -> int -> Unix.msg_flag= list -> int * Unix.sockaddr * Unix.file_descr =3D "stub_unix_recv_fd" You might prefer to extract the relevant functions from the code -- there's= a lot of other misc stuff in that repo which you're probably not intereste= d in. We use those functions quite a lot so hopefully they'll work for you. Cheers, Dave