<div dir="ltr"><div>Hi,</div><div><br></div><div>I am looking at implementing fd-passing for win32. I have learned that the way to share sockets and other objects with Windows is through the DuplicateHandle() and WSADuplicateSocket() calls. The slightly annoying thing is that unlike ancillary data, the dbus protocol would need to be modified to send the list of target HANDLEs and WSAPROTOCOL_INFOs along with the message, for each message target.<br></div><div><br></div><div>I have started hacking gdbus to experiment with the implementation. It seems practical, as processes by default seem to have the PROCESS_DUP_HANDLE capability, and we can map fd<->{HANDLE,SOCKET} transparently. But I could use some help on how best to transmit the ARRAY of UNION { HANDLE, WSAPROTOCOL_INFO }. One reasonable approach would be to add new header fields (however, I think the same type should not be present multiple times) and serialize the win32 data/structs in dbus form. The major downside is that the header will need to be modified for each target process, although at fixed size/location.<br></div><div><br></div><div>Another approach would be to prepend or append some new data (before/after body for example), perhaps not necessarily using the dbus encoding, but the native data/struct types.<br></div><div><br></div><div>Any other idea? (of course, the protocol change would need to be negotiated first!)</div><div><br></div><div>Thanks for your feedback and help!<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Marc-AndrĂ© Lureau<br></div></div></div>