ws2_32: Implement SO_EXCLUSIVEADDRUSE for setsockopt.

This commit is contained in:
Kai Blin 2006-11-30 13:27:02 +01:00 committed by Alexandre Julliard
parent 8de1258034
commit e521ee2cee
2 changed files with 11 additions and 0 deletions

View File

@ -2729,6 +2729,15 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
return 0;
}
/* SO_EXCLUSIVEADDRUSE stops applications from binding to a port that is
* already used. This never works on Unix systems, so just ignore this
* setting*/
if ( level == WS_SOL_SOCKET && optname == WS_SO_EXCLUSIVEADDRUSE )
{
TRACE("Ignoring SO_EXCLUSIVEADDRUSE\n");
return 0;
}
#ifdef HAVE_IPX
if(level == NSPROTO_IPX)
{

View File

@ -663,6 +663,7 @@ typedef struct WS(WSAData)
#define SO_DEBUG 0x0001
#define SO_ACCEPTCONN 0x0002
#define SO_REUSEADDR 0x0004
#define SO_EXCLUSIVEADDRUSE ((u_int)(~SO_REUSEADDR))
#define SO_KEEPALIVE 0x0008
#define SO_DONTROUTE 0x0010
#define SO_BROADCAST 0x0020
@ -696,6 +697,7 @@ typedef struct WS(WSAData)
#define WS_SO_DEBUG 0x0001
#define WS_SO_ACCEPTCONN 0x0002
#define WS_SO_REUSEADDR 0x0004
#define WS_SO_EXCLUSIVEADDRUSE ((WS_u_int)(~WS_SO_REUSEADDR))
#define WS_SO_KEEPALIVE 0x0008
#define WS_SO_DONTROUTE 0x0010
#define WS_SO_BROADCAST 0x0020