On Wed, Jan 06, 2010 at 08:48:16PM +0100, Paolo Bonzini wrote: > On 01/06/2010 04:10 PM, Anthony Liguori wrote: >> We have ones that require read/write, ones that require send/recv, and >> ones that require vhost interaction. Really, the first two are the same >> but the distinction is necessary for Windows. > > Not necessarily, you can open sockets on Windows so that they support > read/write. Just create it with > > fh = WSASocket (domain, type, protocol, NULL, 0, 0); > > instead of socket. Since Windows already has enough problems passing > file descriptors to processes, imposing the above on an external > management interface is not a huge chore. > > Paolo
For linux read/write often isn't a good idea :) E.g. for packet sockets you really need to use sendmsg and set msg_name with the proper protocol. You also must use recvmsg and set MSG_TRUNC otherwise packets can get truncatred silently. -- MST