[PATCH 2/3] server: Implement an interface change notification object (resend).

Erich E. Hoover erich.e.hoover at gmail.com
Tue Mar 18 16:04:28 CDT 2014


This patch implements the SIO_ADDRESS_LIST_CHANGE call inside of the
wineserver.  The implementation uses a per-socket queue so that when a
socket is destroyed prior to a notification event then that socket's
async operations are all appropriately woken up.  Only one interface
change notification object exists at a time, this object is destroyed
whenever there are no sockets expecting events and is then re-created
as necessary.

This third attempt contains several revisions:
1) made most of sock_ioctl dependent upon HAVE_LINUX_RTNETLINK_H
2) moved default_fd_ioctl in sock_ioctl to simplify the logic a little
3) removed HAVE_LINUX_RTNETLINK_H from "struct sock" and related areas
(init_sock, sock_destroy)
4) added a couple missing set_error calls for STATUS_NO_MEMORY
5) moved ifchange_add_sock() to after where things could have failed
6) consolidated init_ifchange into create_ifchange
7) renamed sock_add_ifchange() to sock_get_ifchange_q() and
reorganized it to be more straightforward
8) renamed sock_ifchange_wake_up() to sock_destroy_ifchange_q() and
moved the async_wake_up() outside the routine so that
sock_destroy_ifchange_q() can be called when the socket is destroyed
9) various minor whitespace changes

Revisions in the second attempt:
1) ifchange_poll_event now uses a non-blocking recv() and checks for
EWOULDBLOCK/EAGAIN.
2) ifchange_poll_event now causes a wake up and reports errors (if one occurs).
3) ifchange_poll_event loops over all NLMSGs within a message buffer.
4) all of the ifchange code is now within an "#ifdef
HAVE_LINUX_RTNETLINK_H" block so that it is completely unused when
this header is unavailable.
5) the WSA_FLAG_OVERLAPPED define has been removed since it is
contained within winsock2.h.
6) the comment spacing for "struct ifchange", "struct object_ops
ifchange_ops", and "struct fd_ops ifchange_fd_ops" has been reduced to
the minimum necessary spacing to keep the comments at the same level.
7) the space after "(struct ifchange *)" and "(struct nlmsghdr*)" have
been removed.
8) the fprintf for unsupported platforms has been moved out to an
equivalent statement in ws2_32 (part of patch 1).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-server-Implement-an-interface-change-notification-ob.patch
Type: text/x-diff
Size: 16189 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140318/53b86058/attachment-0001.patch>


More information about the wine-patches mailing list