|
From: | Paolo Bonzini |
Subject: | Re: passfd on more platforms |
Date: | Mon, 14 Mar 2011 16:36:33 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 03/14/2011 04:19 PM, Bastien ROUCARIES wrote:
> But that was a different problem. That was not related to sendfd/recvfd. > > However, there are cases in which you want to send a file descriptor as > out-of-band messages on a stream socket, and libvirt also has one of those.Does sending as oob data process id will fall on the previous trap on SOCK_STREAM ?
I was using "out-of-band" as a generic term, so SCM_RIGHTS also falls under the definition of "out-of-band".
oob are not implemented for unix so it will work under windows emulation
While using TCP out-of-band data would be an interesting solution for Windows, UDP doesn't have out-of-band data. So, if sendfd/recvfd is going to be limited to SOCK_DGRAM, using out-of-band data for Windows is not going to work.
On the other hand, if sendfd/recvfd is limited to SOCK_DGRAM, it is okay under Windows to send the handle normally as a UDP datagram through send/recv (your original plan).
The limitation of sendfd/recvfd to SOCK_DGRAM is perfectly sane---I just wanted to point out that it would not be possible for libvirt to use sendfd, at least in one of the two scenarios where it is currently using SCM_RIGHTS.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |