include: Add support for WS_ prefixed IPX names in wsnwlink.h.

This commit is contained in:
Bruno Jesus 2015-01-04 16:57:47 -02:00 committed by Alexandre Julliard
parent 6b4dcb3f35
commit 1c21aeeebc
2 changed files with 30 additions and 5 deletions

View File

@ -3377,7 +3377,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
int namelen;
switch(optname)
{
case IPX_PTYPE:
case WS_IPX_PTYPE:
if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR;
#ifdef SOL_IPX
if(getsockopt(fd, SOL_IPX, IPX_TYPE, optval, (socklen_t *)optlen) == -1)
@ -3398,7 +3398,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
release_sock_fd( s, fd );
return ret;
case IPX_ADDRESS:
case WS_IPX_ADDRESS:
/*
* On a Win2000 system with one network card there are usually
* three ipx devices one with a speed of 28.8kbps, 10Mbps and 100Mbps.
@ -3423,7 +3423,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
* note 1MB = 1000kB in this case */
return 0;
case IPX_MAX_ADAPTER_NUM:
case WS_IPX_MAX_ADAPTER_NUM:
FIXME("IPX_MAX_ADAPTER_NUM\n");
*(int*)optval = 1; /* As noted under IPX_ADDRESS we have just one card. */
return 0;
@ -4984,10 +4984,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
case WS_NSPROTO_IPX:
switch(optname)
{
case IPX_PTYPE:
case WS_IPX_PTYPE:
return set_ipx_packettype(s, *(int*)optval);
case IPX_FILTERPTYPE:
case WS_IPX_FILTERPTYPE:
/* Sets the receive filter packet type, at the moment we don't support it */
FIXME("IPX_FILTERPTYPE: %x\n", *optval);
/* Returning 0 is better for now than returning a SOCKET_ERROR */

View File

@ -19,6 +19,13 @@
#ifndef _WSNWLINK_
#define _WSNWLINK_
#ifdef USE_WS_PREFIX
#define WS(x) WS_##x
#else
#define WS(x) x
#endif
#ifndef USE_WS_PREFIX
#define IPX_PTYPE 0x4000
#define IPX_FILTERPTYPE 0x4001
#define IPX_DSTYPE 0x4002
@ -35,6 +42,24 @@
#define IPX_RERIPNETNUMBER 0x400e
#define IPX_RECEIVE_BROADCAST 0x400f
#define IPX_IMMEDIATESPXACK 0x4010
#else
#define WS_IPX_PTYPE 0x4000
#define WS_IPX_FILTERPTYPE 0x4001
#define WS_IPX_DSTYPE 0x4002
#define WS_IPX_STOPFILTERPTYPE 0x4003
#define WS_IPX_EXTENDED_ADDRESS 0x4004
#define WS_IPX_RECVHDR 0x4005
#define WS_IPX_MAXSIZE 0x4006
#define WS_IPX_ADDRESS 0x4007
#define WS_IPX_GETNETINFO 0x4008
#define WS_IPX_GETNETINFO_NORIP 0x4009
#define WS_IPX_SPXGETCONNECTIONSTATUS 0x400b
#define WS_IPX_ADDRESS_NOTIFY 0x400c
#define WS_IPX_MAX_ADAPTER_NUM 0x400d
#define WS_IPX_RERIPNETNUMBER 0x400e
#define WS_IPX_RECEIVE_BROADCAST 0x400f
#define WS_IPX_IMMEDIATESPXACK 0x4010
#endif /* USE_WS_PREFIX */
typedef struct _IPX_ADDRESS_DATA {
INT adapternum;