Hi, I trying to implement mailslot support in Wine, and have come across a small problem that isn't easy to solve. My implementation [1] uses a unix domain socket in dgram mode. The Win32 function GetMailslotInfo [2] allows a program to fetch the number of messages waiting in the mailslot. In my implementation, that is the number of datagrams waiting in the socket. In Linux 2.6.11 there is no way to count the the number of datagrams in a socket without reading them all out, one by one. I have attached a small patch that lets me read the number of datagrams in a socket, and makes GetMailslotInfo work in my test case [3]. Questions: Do people thing this is something useful to add to the kernel? What's the right way to assign a value for SIOCINCOUNT, and in which header? Is SIOCDGRAMCOUNT or something else a better name? Should the return value of SIOCINCOUNT for a non-dgram socket be different? If I add this ioctl() for unix domain sockets, should other sockets be made to work the same way? thanks, Mike [1] http://cvs.winehq.org/cvsweb/wine/server/mailslot.c [2] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipc/base/getmailslotinfo.asp [3] http://cvs.winehq.org/cvsweb/wine/dlls/kernel/tests/mailslot.c