caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Dave Scott <Dave.Scott@eu.citrix.com>
Cc: 'Goswin von Brederlow' <goswin-v-b@web.de>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Looking for stubs for sendmsg/recvmsg
Date: Fri, 19 Nov 2010 17:28:52 +0100	[thread overview]
Message-ID: <87eiahl1kr.fsf@frosties.localnet> (raw)
In-Reply-To: <81A73678E76EA642801C8F2E4823AD21933254B4C8@LONPMAILBOX01.citrite.net> (Dave Scott's message of "Fri, 19 Nov 2010 10:27:13 +0000")

Dave Scott <Dave.Scott@eu.citrix.com> writes:

>> Hi,
>> 
>> I'm looking for stubs for
>> 
>>        ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);
>>        ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
>> 
>> Specifically I need those to send (among normal messages) an
>> Unix.file_descr over a Unix Domain Socket.
>> 
>> 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 = "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 = "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 interested in.
>
> We use those functions quite a lot so hopefully they'll work for you.
>
> Cheers,
> Dave

Neigther one is directly suitable but cut&paste into my own stub is easy
enough with that. Thanks Dave and Jérémie.

MfG
        Goswin


      reply	other threads:[~2010-11-19 16:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 17:40 Goswin von Brederlow
2010-11-19  8:50 ` [Caml-list] " Jérémie Dimino
2010-11-19  8:56 ` Sylvain Le Gall
2010-11-19 16:06   ` [Caml-list] " Goswin von Brederlow
2010-11-19 16:30     ` Sylvain Le Gall
2010-11-19 18:39       ` [Caml-list] " Goswin von Brederlow
2010-11-19 22:10         ` Sylvain Le Gall
2010-11-20 20:32           ` [Caml-list] " Goswin von Brederlow
2010-11-20 23:00             ` Sylvain Le Gall
2010-11-21 18:34               ` FDs as cutsom blocks instead of int Goswin von Brederlow
2010-11-21 21:38       ` [Caml-list] Re: Looking for stubs for sendmsg/recvmsg ygrek
2010-11-19 10:27 ` [Caml-list] " Dave Scott
2010-11-19 16:28   ` Goswin von Brederlow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eiahl1kr.fsf@frosties.localnet \
    --to=goswin-v-b@web.de \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).