Commit 904c05d3 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

include: Do not include winsock.h in winsock2.h.

parent 40315aa0
...@@ -905,7 +905,7 @@ static const int ws_proto_map[][2] = ...@@ -905,7 +905,7 @@ static const int ws_proto_map[][2] =
MAP_OPTION( IPPROTO_ICMP ), MAP_OPTION( IPPROTO_ICMP ),
MAP_OPTION( IPPROTO_IGMP ), MAP_OPTION( IPPROTO_IGMP ),
MAP_OPTION( IPPROTO_RAW ), MAP_OPTION( IPPROTO_RAW ),
MAP_OPTION( IPPROTO_IPIP ), {WS_IPPROTO_IPV4, IPPROTO_IPIP},
{FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO}, {FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO},
}; };
......
...@@ -21,9 +21,7 @@ ...@@ -21,9 +21,7 @@
*/ */
#ifdef __WINESRC__ #ifdef __WINESRC__
# ifndef __WINE_WINSOCK2__ # error Please use winsock2 in Wine
# error Please use Winsock2 in Wine
# endif
#endif #endif
#ifndef __WINE_WINSOCKAPI_STDLIB_H #ifndef __WINE_WINSOCKAPI_STDLIB_H
...@@ -168,12 +166,7 @@ extern "C" { ...@@ -168,12 +166,7 @@ extern "C" {
#define AF_FIREFOX 19 #define AF_FIREFOX 19
#define AF_UNKNOWN1 20 #define AF_UNKNOWN1 20
#define AF_BAN 21 #define AF_BAN 21
#define AF_ATM 22 #define AF_MAX 22
#define AF_INET6 23
#define AF_CLUSTER 24
#define AF_12844 25
#define AF_IRDA 26
#define AF_MAX 27
#define PF_UNSPEC AF_UNSPEC #define PF_UNSPEC AF_UNSPEC
#define PF_UNIX AF_UNIX #define PF_UNIX AF_UNIX
#define PF_INET AF_INET #define PF_INET AF_INET
...@@ -223,12 +216,7 @@ extern "C" { ...@@ -223,12 +216,7 @@ extern "C" {
#define WS_AF_FIREFOX 19 #define WS_AF_FIREFOX 19
#define WS_AF_UNKNOWN1 20 #define WS_AF_UNKNOWN1 20
#define WS_AF_BAN 21 #define WS_AF_BAN 21
#define WS_AF_ATM 22 #define WS_AF_MAX 22
#define WS_AF_INET6 23
#define WS_AF_CLUSTER 24
#define WS_AF_12844 25
#define WS_AF_IRDA 26
#define WS_AF_MAX 27
#endif /* USE_WS_PREFIX */ #endif /* USE_WS_PREFIX */
/* /*
...@@ -257,12 +245,9 @@ extern "C" { ...@@ -257,12 +245,9 @@ extern "C" {
#define IPPROTO_ICMP 1 #define IPPROTO_ICMP 1
#define IPPROTO_IGMP 2 #define IPPROTO_IGMP 2
#define IPPROTO_GGP 3 #define IPPROTO_GGP 3
#define IPPROTO_IPIP 4
#define IPPROTO_TCP 6 #define IPPROTO_TCP 6
#define IPPROTO_UDP 17 #define IPPROTO_UDP 17
#define IPPROTO_IDP 22 #define IPPROTO_IDP 22
#define IPPROTO_IPV6 41
#define IPPROTO_ICMPV6 58
#define IPPROTO_ND 77 #define IPPROTO_ND 77
#define IPPROTO_RAW 255 #define IPPROTO_RAW 255
#define IPPROTO_MAX 256 #define IPPROTO_MAX 256
...@@ -271,12 +256,9 @@ extern "C" { ...@@ -271,12 +256,9 @@ extern "C" {
#define WS_IPPROTO_ICMP 1 #define WS_IPPROTO_ICMP 1
#define WS_IPPROTO_IGMP 2 #define WS_IPPROTO_IGMP 2
#define WS_IPPROTO_GGP 3 #define WS_IPPROTO_GGP 3
#define WS_IPPROTO_IPIP 4
#define WS_IPPROTO_TCP 6 #define WS_IPPROTO_TCP 6
#define WS_IPPROTO_UDP 17 #define WS_IPPROTO_UDP 17
#define WS_IPPROTO_IDP 22 #define WS_IPPROTO_IDP 22
#define WS_IPPROTO_IPV6 41
#define WS_IPPROTO_ICMPV6 58
#define WS_IPPROTO_ND 77 #define WS_IPPROTO_ND 77
#define WS_IPPROTO_RAW 255 #define WS_IPPROTO_RAW 255
#define WS_IPPROTO_MAX 256 #define WS_IPPROTO_MAX 256
...@@ -468,32 +450,11 @@ typedef struct WS(timeval) ...@@ -468,32 +450,11 @@ typedef struct WS(timeval)
} \ } \
} \ } \
} while(0) } while(0)
#define __WS_FD_SET1(fd, set, cast) do { \
#define __WS_FD_SET(fd, set, cast) do { \
if (((cast*)(set))->fd_count < FD_SETSIZE) \ if (((cast*)(set))->fd_count < FD_SETSIZE) \
((cast*)(set))->fd_array[((cast*)(set))->fd_count++]=(fd); \ ((cast*)(set))->fd_array[((cast*)(set))->fd_count++]=(fd); \
} while(0) } while(0)
/* This version checks if the filedesc is already in the list, and appends it
* only if it's not the case
*/
#define __WS_FD_SET2(fd, set, cast) do { \
unsigned int __i; \
for (__i = 0; __i < ((cast*)(set))->fd_count ; __i++) \
{ \
if (((cast*)(set))->fd_array[__i]==(fd)) \
break; \
} \
if (__i == ((cast*)(set))->fd_count && ((cast*)(set))->fd_count < FD_SETSIZE) \
{ \
((cast*)(set))->fd_count++; \
((cast*)(set))->fd_array[__i]=(fd);\
} \
} while(0)
#ifndef __WINE_WINSOCK2__
#define __WS_FD_SET(fd, set, cast) __WS_FD_SET1((fd),(set), cast)
#else
#define __WS_FD_SET(fd, set, cast) __WS_FD_SET2((fd),(set), cast)
#endif
#ifndef USE_WS_PREFIX #ifndef USE_WS_PREFIX
#define FD_CLR(fd, set) __WS_FD_CLR((fd),(set), fd_set) #define FD_CLR(fd, set) __WS_FD_CLR((fd),(set), fd_set)
...@@ -613,13 +574,11 @@ typedef struct WS(sockaddr_in) ...@@ -613,13 +574,11 @@ typedef struct WS(sockaddr_in)
* Multicast group information * Multicast group information
*/ */
#if !defined(__WINE_WINSOCK2__)
struct WS(ip_mreq) struct WS(ip_mreq)
{ {
struct WS(in_addr) imr_multiaddr; struct WS(in_addr) imr_multiaddr;
struct WS(in_addr) imr_interface; struct WS(in_addr) imr_interface;
}; };
#endif
/* /*
* WSAStartup * WSAStartup
...@@ -672,12 +631,6 @@ typedef struct WS(WSAData) ...@@ -672,12 +631,6 @@ typedef struct WS(WSAData)
#define SO_RCVTIMEO 0x1006 #define SO_RCVTIMEO 0x1006
#define SO_ERROR 0x1007 #define SO_ERROR 0x1007
#define SO_TYPE 0x1008 #define SO_TYPE 0x1008
#define SO_BSP_STATE 0x1009
#define SO_RANDOMIZE_PORT 0x3005
#define SO_PORT_SCALABILITY 0x3006
#define SO_REUSE_UNICASTPORT 0x3007
#define SO_REUSE_MULTICASTPORT 0x3008
#define IOCPARM_MASK 0x7f #define IOCPARM_MASK 0x7f
#define IOC_VOID 0x20000000 #define IOC_VOID 0x20000000
...@@ -711,12 +664,6 @@ typedef struct WS(WSAData) ...@@ -711,12 +664,6 @@ typedef struct WS(WSAData)
#define WS_SO_RCVTIMEO 0x1006 #define WS_SO_RCVTIMEO 0x1006
#define WS_SO_ERROR 0x1007 #define WS_SO_ERROR 0x1007
#define WS_SO_TYPE 0x1008 #define WS_SO_TYPE 0x1008
#define WS_SO_BSP_STATE 0x1009
#define WS_SO_RANDOMIZE_PORT 0x3005
#define WS_SO_PORT_SCALABILITY 0x3006
#define WS_SO_REUSE_UNICASTPORT 0x3007
#define WS_SO_REUSE_MULTICASTPORT 0x3008
#define WS_IOCPARM_MASK 0x7f #define WS_IOCPARM_MASK 0x7f
#define WS_IOC_VOID 0x20000000 #define WS_IOC_VOID 0x20000000
...@@ -737,31 +684,26 @@ typedef struct WS(WSAData) ...@@ -737,31 +684,26 @@ typedef struct WS(WSAData)
#define WS_TCP_NODELAY 1 #define WS_TCP_NODELAY 1
#endif #endif
/* IPPROTO_IP options */ #ifndef USE_WS_PREFIX
#ifndef __WINE_WINSOCK2__ /* WinSock2 has different values for the IP_ constants */ # define IP_OPTIONS 1
# ifndef USE_WS_PREFIX # define IP_MULTICAST_IF 2
# define IP_OPTIONS 1 # define IP_MULTICAST_TTL 3
# define IP_MULTICAST_IF 2 # define IP_MULTICAST_LOOP 4
# define IP_MULTICAST_TTL 3 # define IP_ADD_MEMBERSHIP 5
# define IP_MULTICAST_LOOP 4 # define IP_DROP_MEMBERSHIP 6
# define IP_ADD_MEMBERSHIP 5 # define IP_TTL 7
# define IP_DROP_MEMBERSHIP 6 # define IP_TOS 8
# define IP_TTL 7 # define IP_DONTFRAGMENT 9
# define IP_TOS 8 #else
# define IP_DONTFRAGMENT 9 # define WS_IP_OPTIONS 1
# define IP_RECEIVE_BROADCAST 22 # define WS_IP_MULTICAST_IF 2
# else # define WS_IP_MULTICAST_TTL 3
# define WS_IP_OPTIONS 1 # define WS_IP_MULTICAST_LOOP 4
# define WS_IP_MULTICAST_IF 2 # define WS_IP_ADD_MEMBERSHIP 5
# define WS_IP_MULTICAST_TTL 3 # define WS_IP_DROP_MEMBERSHIP 6
# define WS_IP_MULTICAST_LOOP 4 # define WS_IP_TTL 7
# define WS_IP_ADD_MEMBERSHIP 5 # define WS_IP_TOS 8
# define WS_IP_DROP_MEMBERSHIP 6 # define WS_IP_DONTFRAGMENT 9
# define WS_IP_TTL 7
# define WS_IP_TOS 8
# define WS_IP_DONTFRAGMENT 9
# define WS_IP_RECEIVE_BROADCAST 22
# endif
#endif #endif
...@@ -797,8 +739,6 @@ typedef struct WS(WSAData) ...@@ -797,8 +739,6 @@ typedef struct WS(WSAData)
#define MSG_OOB 0x0001 #define MSG_OOB 0x0001
#define MSG_PEEK 0x0002 #define MSG_PEEK 0x0002
#define MSG_DONTROUTE 0x0004 #define MSG_DONTROUTE 0x0004
#define MSG_WAITALL 0x0008
#define MSG_INTERRUPT 0x0010
#define MSG_PARTIAL 0x8000 #define MSG_PARTIAL 0x8000
#define MSG_MAXIOVLEN 16 #define MSG_MAXIOVLEN 16
#else /* USE_WS_PREFIX */ #else /* USE_WS_PREFIX */
...@@ -807,8 +747,6 @@ typedef struct WS(WSAData) ...@@ -807,8 +747,6 @@ typedef struct WS(WSAData)
#define WS_MSG_OOB 0x0001 #define WS_MSG_OOB 0x0001
#define WS_MSG_PEEK 0x0002 #define WS_MSG_PEEK 0x0002
#define WS_MSG_DONTROUTE 0x0004 #define WS_MSG_DONTROUTE 0x0004
#define WS_MSG_WAITALL 0x0008
#define WS_MSG_INTERRUPT 0x0010
#define WS_MSG_PARTIAL 0x8000 #define WS_MSG_PARTIAL 0x8000
#define WS_MSG_MAXIOVLEN 16 #define WS_MSG_MAXIOVLEN 16
#endif /* USE_WS_PREFIX */ #endif /* USE_WS_PREFIX */
...@@ -833,15 +771,6 @@ typedef struct WS(WSAData) ...@@ -833,15 +771,6 @@ typedef struct WS(WSAData)
#define FD_CONNECT 0x00000010 #define FD_CONNECT 0x00000010
#define FD_CLOSE 0x00000020 #define FD_CLOSE 0x00000020
/* internal per-socket flags */
#ifdef __WINESRC__
#define FD_WINE_LISTENING 0x10000000
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
#define FD_WINE_RAW 0x80000000
#define FD_WINE_INTERNAL 0xFFFF0000
#endif
/* /*
* All Windows Sockets error constants are biased by WSABASEERR from * All Windows Sockets error constants are biased by WSABASEERR from
* the "normal". They are also defined in winerror.h. * the "normal". They are also defined in winerror.h.
...@@ -905,17 +834,6 @@ typedef struct WS(WSAData) ...@@ -905,17 +834,6 @@ typedef struct WS(WSAData)
#define WSAVERNOTSUPPORTED (WSABASEERR+92) #define WSAVERNOTSUPPORTED (WSABASEERR+92)
#define WSANOTINITIALISED (WSABASEERR+93) #define WSANOTINITIALISED (WSABASEERR+93)
#define WSAEDISCON (WSABASEERR+101) #define WSAEDISCON (WSABASEERR+101)
#define WSAENOMORE (WSABASEERR+102)
#define WSAECANCELLED (WSABASEERR+103)
#define WSAEINVALIDPROCTABLE (WSABASEERR+104)
#define WSAEINVALIDPROVIDER (WSABASEERR+105)
#define WSAEPROVIDERFAILEDINIT (WSABASEERR+106)
#define WSASYSCALLFAILURE (WSABASEERR+107)
#define WSASERVICE_NOT_FOUND (WSABASEERR+108)
#define WSATYPE_NOT_FOUND (WSABASEERR+109)
#define WSA_E_NO_MORE (WSABASEERR+110)
#define WSA_E_CANCELLED (WSABASEERR+111)
#define WSAEREFUSED (WSABASEERR+112)
/* /*
* Error return codes from gethostbyname() and gethostbyaddr() * Error return codes from gethostbyname() and gethostbyaddr()
...@@ -1007,7 +925,6 @@ typedef struct WS(WSAData) ...@@ -1007,7 +925,6 @@ typedef struct WS(WSAData)
* Remember to keep this section in sync with the * Remember to keep this section in sync with the
* "Winsock Function Typedefs" section in winsock2.h. * "Winsock Function Typedefs" section in winsock2.h.
*/ */
#if !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES
HANDLE WINAPI WSAAsyncGetHostByAddr(HWND,WS(u_int),const char*,int,int,char*,int); HANDLE WINAPI WSAAsyncGetHostByAddr(HWND,WS(u_int),const char*,int,int,char*,int);
HANDLE WINAPI WSAAsyncGetHostByName(HWND,WS(u_int),const char*,char*,int); HANDLE WINAPI WSAAsyncGetHostByName(HWND,WS(u_int),const char*,char*,int);
HANDLE WINAPI WSAAsyncGetProtoByName(HWND,WS(u_int),const char*,char*,int); HANDLE WINAPI WSAAsyncGetProtoByName(HWND,WS(u_int),const char*,char*,int);
...@@ -1058,16 +975,10 @@ SOCKET WINAPI WS(socket)(int,int,int); ...@@ -1058,16 +975,10 @@ SOCKET WINAPI WS(socket)(int,int,int);
int WINAPI WS(gethostname)(char*,int); int WINAPI WS(gethostname)(char*,int);
#endif #endif
#endif /* !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifndef __WINE_WINSOCK2__
#undef WS #undef WS
#undef WS_API_PROTOTYPES
#undef WS_API_TYPEDEFS
#endif
#endif /* _WINSOCKAPI_ */ #endif /* _WINSOCKAPI_ */
...@@ -29,6 +29,166 @@ ...@@ -29,6 +29,166 @@
typedef USHORT ADDRESS_FAMILY; typedef USHORT ADDRESS_FAMILY;
typedef struct WS(sockaddr)
{
unsigned short sa_family;
char sa_data[14];
} SOCKADDR, *PSOCKADDR, *LPSOCKADDR;
#ifndef USE_WS_PREFIX
#define AF_UNSPEC 0
#define AF_UNIX 1
#define AF_INET 2
#define AF_IMPLINK 3
#define AF_PUP 4
#define AF_CHAOS 5
#define AF_NS 6
#define AF_IPX AF_NS
#define AF_ISO 7
#define AF_OSI AF_ISO
#define AF_ECMA 8
#define AF_DATAKIT 9
#define AF_CCITT 10
#define AF_SNA 11
#define AF_DECnet 12
#define AF_DLI 13
#define AF_LAT 14
#define AF_HYLINK 15
#define AF_APPLETALK 16
#define AF_NETBIOS 17
#define AF_VOICEVIEW 18
#define AF_FIREFOX 19
#define AF_UNKNOWN1 20
#define AF_BAN 21
#define AF_ATM 22
#define AF_INET6 23
#define AF_CLUSTER 24
#define AF_12844 25
#define AF_IRDA 26
#define AF_MAX 27
#else /* USE_WS_PREFIX */
#define WS_AF_UNSPEC 0
#define WS_AF_UNIX 1
#define WS_AF_INET 2
#define WS_AF_IMPLINK 3
#define WS_AF_PUP 4
#define WS_AF_CHAOS 5
#define WS_AF_NS 6
#define WS_AF_IPX WS_AF_NS
#define WS_AF_ISO 7
#define WS_AF_OSI WS_AF_ISO
#define WS_AF_ECMA 8
#define WS_AF_DATAKIT 9
#define WS_AF_CCITT 10
#define WS_AF_SNA 11
#define WS_AF_DECnet 12
#define WS_AF_DLI 13
#define WS_AF_LAT 14
#define WS_AF_HYLINK 15
#define WS_AF_APPLETALK 16
#define WS_AF_NETBIOS 17
#define WS_AF_VOICEVIEW 18
#define WS_AF_FIREFOX 19
#define WS_AF_UNKNOWN1 20
#define WS_AF_BAN 21
#define WS_AF_ATM 22
#define WS_AF_INET6 23
#define WS_AF_CLUSTER 24
#define WS_AF_12844 25
#define WS_AF_IRDA 26
#define WS_AF_MAX 27
#endif /* USE_WS_PREFIX */
#ifndef USE_WS_PREFIX
#define IPPROTO_IP 0
#else
#define WS_IPPROTO_IP 0
#endif
typedef enum
{
WS(IPPROTO_ICMP) = 1,
WS(IPPROTO_IGMP) = 2,
WS(IPPROTO_GGP) = 3,
WS(IPPROTO_IPV4) = 4,
WS(IPPROTO_TCP) = 6,
WS(IPPROTO_UDP) = 17,
WS(IPPROTO_IDP) = 22,
WS(IPPROTO_IPV6) = 41,
WS(IPPROTO_ICMPV6) = 58,
WS(IPPROTO_ND) = 77,
WS(IPPROTO_RAW) = 255,
WS(IPPROTO_MAX) = 256,
} IPPROTO;
#ifndef USE_WS_PREFIX
#define INADDR_ANY ((ULONG)0x00000000)
#define INADDR_LOOPBACK 0x7f000001
#define INADDR_BROADCAST ((ULONG)0xffffffff)
#define INADDR_NONE 0xffffffff
#else
#define WS_INADDR_ANY ((ULONG)0x00000000)
#define WS_INADDR_LOOPBACK 0x7f000001
#define WS_INADDR_BROADCAST ((ULONG)0xffffffff)
#define WS_INADDR_NONE 0xffffffff
#endif
#ifndef USE_WS_PREFIX
#define IN_CLASSA_NSHIFT 24
#define IN_CLASSA_MAX 128
#define IN_CLASSA_NET 0xff000000
#define IN_CLASSA_HOST 0x00ffffff
#define IN_CLASSA(i) (((LONG)(i) & 0x80000000) == 0)
#define IN_CLASSB_NSHIFT 16
#define IN_CLASSB_MAX 65536
#define IN_CLASSB_NET 0xffff0000
#define IN_CLASSB_HOST 0x0000ffff
#define IN_CLASSB(i) (((LONG)(i) & 0xc0000000) == 0x80000000)
#define IN_CLASSC_NSHIFT 8
#define IN_CLASSC_NET 0xffffff00
#define IN_CLASSC_HOST 0x000000ff
#define IN_CLASSC(i) (((LONG)(i) & 0xe0000000) == 0xc0000000)
#else
#define WS_IN_CLASSA_NSHIFT 24
#define WS_IN_CLASSA_MAX 128
#define WS_IN_CLASSA_NET 0xff000000
#define WS_IN_CLASSA_HOST 0x00ffffff
#define WS_IN_CLASSA(i) (((LONG)(i) & 0x80000000) == 0)
#define WS_IN_CLASSB_NSHIFT 16
#define WS_IN_CLASSB_MAX 65536
#define WS_IN_CLASSB_NET 0xffff0000
#define WS_IN_CLASSB_HOST 0x0000ffff
#define WS_IN_CLASSB(i) (((LONG)(i) & 0xc0000000) == 0x80000000)
#define WS_IN_CLASSC_NSHIFT 8
#define WS_IN_CLASSC_NET 0xffffff00
#define WS_IN_CLASSC_HOST 0x000000ff
#define WS_IN_CLASSC(i) (((LONG)(i) & 0xe0000000) == 0xc0000000)
#endif /* USE_WS_PREFIX */
#ifndef USE_WS_PREFIX
#define SO_BSP_STATE 0x1009
#define SO_RANDOMIZE_PORT 0x3005
#define SO_PORT_SCALABILITY 0x3006
#define SO_REUSE_UNICASTPORT 0x3007
#define SO_REUSE_MULTICASTPORT 0x3008
#define TCP_NODELAY 0x0001
#else
#define WS_SO_BSP_STATE 0x1009
#define WS_SO_RANDOMIZE_PORT 0x3005
#define WS_SO_PORT_SCALABILITY 0x3006
#define WS_SO_REUSE_UNICASTPORT 0x3007
#define WS_SO_REUSE_MULTICASTPORT 0x3008
#define WS_TCP_NODELAY 0x0001
#endif
typedef struct WS(sockaddr_in)
{
short sin_family;
unsigned short sin_port;
struct WS(in_addr) sin_addr;
char sin_zero[8];
} SOCKADDR_IN, *PSOCKADDR_IN, *LPSOCKADDR_IN;
#ifndef __CSADDR_DEFINED__ #ifndef __CSADDR_DEFINED__
#define __CSADDR_DEFINED__ #define __CSADDR_DEFINED__
......
...@@ -96,32 +96,6 @@ ...@@ -96,32 +96,6 @@
#include "request.h" #include "request.h"
#include "user.h" #include "user.h"
/* From winsock.h */
#define FD_MAX_EVENTS 10
#define FD_READ_BIT 0
#define FD_WRITE_BIT 1
#define FD_OOB_BIT 2
#define FD_ACCEPT_BIT 3
#define FD_CONNECT_BIT 4
#define FD_CLOSE_BIT 5
/*
* Define flags to be used with the WSAAsyncSelect() call.
*/
#define FD_READ 0x00000001
#define FD_WRITE 0x00000002
#define FD_OOB 0x00000004
#define FD_ACCEPT 0x00000008
#define FD_CONNECT 0x00000010
#define FD_CLOSE 0x00000020
/* internal per-socket flags */
#define FD_WINE_LISTENING 0x10000000
#define FD_WINE_NONBLOCKING 0x20000000
#define FD_WINE_CONNECTED 0x40000000
#define FD_WINE_RAW 0x80000000
#define FD_WINE_INTERNAL 0xFFFF0000
struct accept_req struct accept_req
{ {
struct list entry; struct list entry;
...@@ -988,7 +962,7 @@ static int get_unix_protocol( int protocol ) ...@@ -988,7 +962,7 @@ static int get_unix_protocol( int protocol )
case WS_IPPROTO_ICMP: return IPPROTO_ICMP; case WS_IPPROTO_ICMP: return IPPROTO_ICMP;
case WS_IPPROTO_IGMP: return IPPROTO_IGMP; case WS_IPPROTO_IGMP: return IPPROTO_IGMP;
case WS_IPPROTO_IP: return IPPROTO_IP; case WS_IPPROTO_IP: return IPPROTO_IP;
case WS_IPPROTO_IPIP: return IPPROTO_IPIP; case WS_IPPROTO_IPV4: return IPPROTO_IPIP;
case WS_IPPROTO_IPV6: return IPPROTO_IPV6; case WS_IPPROTO_IPV6: return IPPROTO_IPV6;
case WS_IPPROTO_RAW: return IPPROTO_RAW; case WS_IPPROTO_RAW: return IPPROTO_RAW;
case WS_IPPROTO_TCP: return IPPROTO_TCP; case WS_IPPROTO_TCP: return IPPROTO_TCP;
......
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