Commit 1c21aeee authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

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

parent 6b4dcb3f
...@@ -3377,7 +3377,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, ...@@ -3377,7 +3377,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
int namelen; int namelen;
switch(optname) switch(optname)
{ {
case IPX_PTYPE: case WS_IPX_PTYPE:
if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR; if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR;
#ifdef SOL_IPX #ifdef SOL_IPX
if(getsockopt(fd, SOL_IPX, IPX_TYPE, optval, (socklen_t *)optlen) == -1) if(getsockopt(fd, SOL_IPX, IPX_TYPE, optval, (socklen_t *)optlen) == -1)
...@@ -3398,7 +3398,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, ...@@ -3398,7 +3398,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
release_sock_fd( s, fd ); release_sock_fd( s, fd );
return ret; return ret;
case IPX_ADDRESS: case WS_IPX_ADDRESS:
/* /*
* On a Win2000 system with one network card there are usually * On a Win2000 system with one network card there are usually
* three ipx devices one with a speed of 28.8kbps, 10Mbps and 100Mbps. * 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, ...@@ -3423,7 +3423,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
* note 1MB = 1000kB in this case */ * note 1MB = 1000kB in this case */
return 0; return 0;
case IPX_MAX_ADAPTER_NUM: case WS_IPX_MAX_ADAPTER_NUM:
FIXME("IPX_MAX_ADAPTER_NUM\n"); FIXME("IPX_MAX_ADAPTER_NUM\n");
*(int*)optval = 1; /* As noted under IPX_ADDRESS we have just one card. */ *(int*)optval = 1; /* As noted under IPX_ADDRESS we have just one card. */
return 0; return 0;
...@@ -4984,10 +4984,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, ...@@ -4984,10 +4984,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname,
case WS_NSPROTO_IPX: case WS_NSPROTO_IPX:
switch(optname) switch(optname)
{ {
case IPX_PTYPE: case WS_IPX_PTYPE:
return set_ipx_packettype(s, *(int*)optval); 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 */ /* Sets the receive filter packet type, at the moment we don't support it */
FIXME("IPX_FILTERPTYPE: %x\n", *optval); FIXME("IPX_FILTERPTYPE: %x\n", *optval);
/* Returning 0 is better for now than returning a SOCKET_ERROR */ /* Returning 0 is better for now than returning a SOCKET_ERROR */
......
...@@ -19,6 +19,13 @@ ...@@ -19,6 +19,13 @@
#ifndef _WSNWLINK_ #ifndef _WSNWLINK_
#define _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_PTYPE 0x4000
#define IPX_FILTERPTYPE 0x4001 #define IPX_FILTERPTYPE 0x4001
#define IPX_DSTYPE 0x4002 #define IPX_DSTYPE 0x4002
...@@ -35,6 +42,24 @@ ...@@ -35,6 +42,24 @@
#define IPX_RERIPNETNUMBER 0x400e #define IPX_RERIPNETNUMBER 0x400e
#define IPX_RECEIVE_BROADCAST 0x400f #define IPX_RECEIVE_BROADCAST 0x400f
#define IPX_IMMEDIATESPXACK 0x4010 #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 { typedef struct _IPX_ADDRESS_DATA {
INT adapternum; INT adapternum;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment