[Bug 7929] C&C 3 network does not work
wine-bugs at winehq.org
Sun May 20 01:30:33 CDT 2007
------- Additional Comments From d13f00l at gmail.com 2007-20-05 01:30 -------
I really can't think of a sane way to do this...SO_BINDTODEVICE is root
only...so we can't use that. I posted a few comments on linux-net, hoping
someone would have something interesting to say.
We can use IP_PKTINFO with sendmsg() and recvmsg()....and keep a table of what
each socket should listen and send on. If you bind a socket to INADDR_ANY under
linux, you'll be able to receive from any interface, but sending defaults on the
sendmsg() can be persuaded to send out on other interfaces _I THINK_ by setting
that socket option, and giving it a struct in_pktinfo filled out w/ the device
So Wine's recv and send implementations would have to be changed slightly...we'd
have to maintain a list of what each socket should map to, since we override
what windows programs suggest and bind to 0.0.0.0...probably with a linked
list...adding new elements on bind()...but this can create all sorts of memory
leaks if applications don't close() sockets...
It's pretty silly...so_bindtodevice does all this flawlessly in kernel space.
Another person suggested on the boards that the kernel be modified to have a
socket option to be able to recv broadcasts even if sockets are bound to an ip
other than INADDR_ANY.....that's looking to be a good option at this point. I
wonder if people can be persuaded this is a good idea...
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the wine-bugs