From: Dave Scott <Dave.Scott@eu.citrix.com>
To: '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 10:27:13 +0000 [thread overview]
Message-ID: <81A73678E76EA642801C8F2E4823AD21933254B4C8@LONPMAILBOX01.citrite.net> (raw)
In-Reply-To: <87d3q21qe4.fsf@frosties.localnet>
> 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
next prev parent reply other threads:[~2010-11-19 10:27 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 ` Dave Scott [this message]
2010-11-19 16:28 ` [Caml-list] " Goswin von Brederlow
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=81A73678E76EA642801C8F2E4823AD21933254B4C8@LONPMAILBOX01.citrite.net \
--to=dave.scott@eu.citrix.com \
--cc=caml-list@inria.fr \
--cc=goswin-v-b@web.de \
/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