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 :)

Yeah, only for "normal" raw sockets.

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.

The situation for packet sockets is more similar to vnet headers no (just learning all this stuff)? They require code in qemu anyway, so the helper would do only the set up/tear down.

Paolo


Reply via email to