Hi all, I need some help to continue my current wine work.
In order to implement SO_PROTOCOL_INFO for getsockopt I need to retrieve some information from the socket like its family and protocol.
I have searched for a few days and ended up with a solution I dislike so I had a better idea (at least I hope I did).
Instead of using non-portable SO_DOMAIN and SO_PROTOCOL/SO_PROTOTYPE to retrieve the socket family and protocol or using non-reliable guessing using only the socket type I thought it would be better to ask the server for this information. Using a request just like is used for several other information in ws2_32 (operation which will work on every OS).
So, all I need is a server request that based on the socket fd will return the socket family, type and protocol. I tried to understand how requests work but I failed completely.
Maybe this request can be later improved to return the connection time so we can finally fix SO_CONNECT_TIME option.
The current solution is attached, since I sent the tests separated and they were commited the patch will not apply, it's only for reference. The idea is to remove the functions get_sock_[family|protocol|type] to a single server request.
So, is this a good idea? If yes, how can I create and use the request? If not I'm all ears.
Best wishes and thanks in advance, Bruno