Author: akhaldi
Date: Tue Mar 30 12:39:52 2010
New Revision: 46591
URL:
http://svn.reactos.org/svn/reactos?rev=46591&view=rev
Log:
[PSDK]
- Add missing ws2ipdef.h definitions.
- Group related definitions.
Modified:
branches/header-work/include/psdk/mswsock.h
branches/header-work/include/psdk/winsock.h
branches/header-work/include/psdk/winsock2.h
branches/header-work/include/psdk/ws2bth.h
branches/header-work/include/psdk/ws2def.h
branches/header-work/include/psdk/ws2ipdef.h
Modified: branches/header-work/include/psdk/mswsock.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/mswsoc…
==============================================================================
--- branches/header-work/include/psdk/mswsock.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/mswsock.h [iso-8859-1] Tue Mar 30 12:39:52 2010
@@ -299,7 +299,7 @@
OUT char FAR *buf,
IN int len,
IN OUT int FAR *flags);
-#else //(_WIN32_WINNT < 0x0600)
+#else
INT
PASCAL
FAR
@@ -308,7 +308,7 @@
OUT CHAR FAR *buf,
IN INT len,
IN OUT INT FAR *flags);
-#endif //(_WIN32_WINNT < 0x0600)
+#endif /* (_WIN32_WINNT < 0x0600) */
BOOL
PASCAL
Modified: branches/header-work/include/psdk/winsock.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/winsoc…
==============================================================================
--- branches/header-work/include/psdk/winsock.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/winsock.h [iso-8859-1] Tue Mar 30 12:39:52 2010
@@ -314,38 +314,9 @@
#define INADDR_BROADCAST (u_long)0xffffffff
#define INADDR_NONE 0xffffffff
-struct sockaddr_in {
- short sin_family;
- u_short sin_port;
- struct in_addr sin_addr;
- char sin_zero[8];
-};
-
#define WSADESCRIPTION_LEN 256
#define WSASYS_STATUS_LEN 128
-typedef struct WSAData {
- WORD wVersion;
- WORD wHighVersion;
-#ifdef _WIN64
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char *lpVendorInfo;
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
-#else
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char *lpVendorInfo;
-} WSADATA, FAR *LPWSADATA;
-
-/*
- * Note that the next 5 IP defines are specific to WinSock 1.1 (wsock32.dll).
- * They will cause errors or unexpected results if used with the
- * (gs)etsockopts exported from the WinSock 2 lib, ws2_32.dll. Refer ws2tcpip.h.
- */
#define IP_MULTICAST_IF 2
#define IP_MULTICAST_TTL 3
#define IP_MULTICAST_LOOP 4
@@ -358,11 +329,6 @@
#define IP_DEFAULT_MULTICAST_TTL 1
#define IP_DEFAULT_MULTICAST_LOOP 1
#define IP_MAX_MEMBERSHIPS 20
-
-struct ip_mreq {
- struct in_addr imr_multiaddr;
- struct in_addr imr_interface;
-};
#define INVALID_SOCKET (SOCKET)(~0)
#define SOCKET_ERROR (-1)
@@ -402,11 +368,6 @@
#define AF_BAN 21
#define AF_ATM 22
#define AF_INET6 23
-
-struct sockproto {
- u_short sp_family;
- u_short sp_protocol;
-};
#define PF_UNSPEC AF_UNSPEC
#define PF_UNIX AF_UNIX
@@ -510,365 +471,9 @@
#define WSANO_ADDRESS WSANO_DATA
-SOCKET
-PASCAL FAR
-accept(
- IN SOCKET s,
- OUT struct sockaddr FAR *addr OPTIONAL,
- IN OUT int FAR *addrlen OPTIONAL);
-
-int
-PASCAL FAR
-bind(
- IN SOCKET s,
- IN const struct sockaddr FAR *addr,
- IN int namelen);
-
-int
-PASCAL FAR
-closesocket(
- IN SOCKET s);
-
-int
-PASCAL FAR
-connect(
- IN SOCKET s,
- IN const struct sockaddr FAR *name,
- IN int namelen);
-
-int
-PASCAL FAR
-ioctlsocket(
- IN SOCKET s,
- IN long cmd,
- IN OUT u_long FAR *argp);
-
-int
-PASCAL FAR
-getpeername(
- IN SOCKET s,
- OUT struct sockaddr FAR *name,
- IN OUT int FAR *namelen);
-
-int
-PASCAL FAR
-getsockname(
- IN SOCKET s,
- OUT struct sockaddr FAR *name,
- IN OUT int FAR *namelen);
-
-int
-PASCAL FAR
-getsockopt(
- IN SOCKET s,
- IN int level,
- IN int optname,
- OUT char FAR *optval,
- IN OUT int FAR *optlen);
-
-u_long
-PASCAL FAR
-htonl(
- IN u_long hostlong);
-
-u_short
-PASCAL FAR
-htons(
- IN u_short hostshort);
-
-unsigned long
-PASCAL FAR
-inet_addr(
- IN const char FAR *cp);
-
-char FAR
-*PASCAL FAR
-inet_ntoa(
- IN struct in_addr in);
-
-int
-PASCAL FAR
-listen(
- IN SOCKET s,
- IN int backlog);
-
-u_long
-PASCAL FAR
-ntohl(
- IN u_long netlong);
-
-u_short
-PASCAL FAR
-ntohs(
- IN u_short netshort);
-
-int
-PASCAL FAR
-recv(
- IN SOCKET s,
- OUT char FAR *buf,
- IN int len,
- IN int flags);
-
-int
-PASCAL FAR
-recvfrom(
- IN SOCKET s,
- OUT char FAR *buf,
- IN int len,
- IN int flags,
- OUT struct sockaddr FAR *from OPTIONAL,
- IN OUY int FAR * fromlen OPTIONAL);
-
-int
-PASCAL FAR
-select(
- IN int nfds,
- IN OUT fd_set FAR *readfds OPTIONAL,
- IN OUT fd_set FAR *writefds OPTIONAL,
- IN OUT fd_set FAR *exceptfds OPTIONAL,
- IN const struct timeval FAR *timeout OPTIONAL);
-
-int
-PASCAL FAR
-send(
- IN SOCKET s,
- IN const char FAR *buf,
- IN int len,
- IN int flags);
-
-int
-PASCAL FAR
-sendto(
- IN SOCKET s,
- IN const char FAR *buf,
- IN int len,
- IN int flags,
- IN const struct sockaddr FAR *to OPTIONAL,
- IN int tolen);
-
-int
-PASCAL FAR
-setsockopt(
- IN SOCKET s,
- IN int level,
- IN int optname,
- IN const char FAR *optval OPTIONAL,
- IN int optlen);
-
-int
-PASCAL FAR
-shutdown(
- IN SOCKET s,
- IN int how);
-
-SOCKET
-PASCAL FAR
-socket(
- IN int af,
- IN int type,
- IN int protocol);
-
-struct hostent FAR
-*PASCAL FAR
-gethostbyaddr(
- IN const char FAR *addr,
- IN int len,
- IN int type);
-
-struct hostent FAR
-*PASCAL FAR
-gethostbyname(
- IN const char FAR *name);
-
-int
-PASCAL FAR
-gethostname(
- OUT char FAR *name,
- IN int namelen);
-
-struct servent FAR
-*PASCAL FAR
-getservbyport(
- IN int port,
- IN const char FAR *proto);
-
-struct servent FAR
-*PASCAL FAR
-getservbyname(
- IN const char FAR *name,
- IN const char FAR *proto);
-
-struct protoent FAR
-*PASCAL FAR
-getprotobynumber(
- IN int number);
-
-struct protoent FAR
-*PASCAL FAR
-getprotobyname(
- IN const char FAR *name);
-
-int
-PASCAL FAR
-WSAStartup(
- IN WORD wVersionRequired,
- OUT LPWSADATA lpWSAData);
-
-int
-PASCAL FAR
-WSACleanup(void);
-
-void
-PASCAL FAR
-WSASetLastError(
- IN int iError);
-
-int
-PASCAL FAR
-WSAGetLastError(void);
-
-BOOL
-PASCAL FAR
-WSAIsBlocking(void);
-
-int
-PASCAL FAR
-WSAUnhookBlockingHook(void);
-
-FARPROC
-PASCAL FAR
-WSASetBlockingHook(
- IN FARPROC lpBlockFunc);
-
-int
-PASCAL FAR
-WSACancelBlockingCall(void);
-
-HANDLE
-PASCAL FAR
-WSAAsyncGetServByName(
- IN HWND hWnd,
- IN u_int wMsg,
- IN const char FAR *name,
- IN const char FAR *proto,
- OUT char FAR *buf,
- IN int buflen);
-
-HANDLE
-PASCAL FAR
-WSAAsyncGetServByPort(
- IN HWND hWnd,
- IN u_int wMsg,
- IN int port,
- IN const char FAR *proto,
- OUT char FAR *buf,
- IN int buflen);
-
-HANDLE
-PASCAL FAR
-WSAAsyncGetProtoByName(
- IN HWND hWnd,
- IN u_int wMsg,
- IN const char FAR *name,
- OUT char FAR *buf,
- IN int buflen);
-
-HANDLE
-PASCAL FAR
-WSAAsyncGetProtoByNumber(
- IN HWND hWnd,
- IN u_int wMsg,
- IN int number,
- OUT char FAR *buf,
- IN int buflen);
-
-HANDLE
-PASCAL FAR
-WSAAsyncGetHostByName(
- IN HWND hWnd,
- IN u_int wMsg,
- IN const char FAR *name,
- OUT char FAR *buf,
- IN int buflen);
-
-HANDLE
-PASCAL FAR
-WSAAsyncGetHostByAddr(
- IN HWND hWnd,
- IN u_int wMsg,
- IN const char FAR *addr,
- IN int len,
- IN int type,
- OUT char FAR *buf,
- IN int buflen);
-
-int
-PASCAL FAR
-WSACancelAsyncRequest(
- IN HANDLE hAsyncTaskHandle);
-
-int
-PASCAL FAR
-WSAAsyncSelect(
- IN SOCKET s,
- IN HWND hWnd,
- IN u_int wMsg,
- IN long lEvent);
-
-int
-PASCAL FAR
-WSARecvEx(
- IN SOCKET s,
- OUT char FAR *buf,
- IN int len,
- IN OUT int FAR *flags);
-
-typedef struct _TRANSMIT_FILE_BUFFERS {
- PVOID Head;
- DWORD HeadLength;
- PVOID Tail;
- DWORD TailLength;
-} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS;
-
#define TF_DISCONNECT 0x01
#define TF_REUSE_SOCKET 0x02
#define TF_WRITE_BEHIND 0x04
-
-BOOL
-PASCAL FAR
-TransmitFile(
- IN SOCKET hSocket,
- IN HANDLE hFile,
- IN DWORD nNumberOfBytesToWrite,
- IN DWORD nNumberOfBytesPerSend,
- IN OUT LPOVERLAPPED lpOverlapped OPTIONAL,
- IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers OPTIONAL,
- IN DWORD dwReserved);
-
-BOOL
-PASCAL FAR
-AcceptEx(
- IN SOCKET sListenSocket,
- IN SOCKET sAcceptSocket,
- OUT PVOID lpOutputBuffer,
- IN DWORD dwReceiveDataLength,
- IN DWORD dwLocalAddressLength,
- IN DWORD dwRemoteAddressLength,
- OUT LPDWORD lpdwBytesReceived,
- IN OUT LPOVERLAPPED lpOverlapped);
-
-VOID
-PASCAL FAR
-GetAcceptExSockaddrs(
- IN PVOID lpOutputBuffer,
- IN DWORD dwReceiveDataLength,
- IN DWORD dwLocalAddressLength,
- IN DWORD dwRemoteAddressLength,
- OUT struct sockaddr **LocalSockaddr,
- OUT LPINT LocalSockaddrLength,
- OUT struct sockaddr **RemoteSockaddr,
- OUT LPINT RemoteSockaddrLength);
#define WSAMAKEASYNCREPLY(b,e) MAKELONG(b,e)
#define WSAMAKESELECTREPLY(e,error) MAKELONG(e,error)
@@ -905,6 +510,396 @@
typedef struct timeval *PTIMEVAL;
typedef struct timeval *LPTIMEVAL;
+struct sockaddr_in {
+ short sin_family;
+ u_short sin_port;
+ struct in_addr sin_addr;
+ char sin_zero[8];
+};
+
+typedef struct WSAData {
+ WORD wVersion;
+ WORD wHighVersion;
+#ifdef _WIN64
+ unsigned short iMaxSockets;
+ unsigned short iMaxUdpDg;
+ char *lpVendorInfo;
+ char szDescription[WSADESCRIPTION_LEN+1];
+ char szSystemStatus[WSASYS_STATUS_LEN+1];
+#else
+ char szDescription[WSADESCRIPTION_LEN+1];
+ char szSystemStatus[WSASYS_STATUS_LEN+1];
+ unsigned short iMaxSockets;
+ unsigned short iMaxUdpDg;
+ char *lpVendorInfo;
+} WSADATA, FAR *LPWSADATA;
+
+struct ip_mreq {
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_interface;
+};
+
+struct sockproto {
+ u_short sp_family;
+ u_short sp_protocol;
+};
+
+SOCKET
+PASCAL FAR
+accept(
+ IN SOCKET s,
+ OUT struct sockaddr FAR *addr OPTIONAL,
+ IN OUT int FAR *addrlen OPTIONAL);
+
+int
+PASCAL FAR
+bind(
+ IN SOCKET s,
+ IN const struct sockaddr FAR *addr,
+ IN int namelen);
+
+int
+PASCAL FAR
+closesocket(
+ IN SOCKET s);
+
+int
+PASCAL FAR
+connect(
+ IN SOCKET s,
+ IN const struct sockaddr FAR *name,
+ IN int namelen);
+
+int
+PASCAL FAR
+ioctlsocket(
+ IN SOCKET s,
+ IN long cmd,
+ IN OUT u_long FAR *argp);
+
+int
+PASCAL FAR
+getpeername(
+ IN SOCKET s,
+ OUT struct sockaddr FAR *name,
+ IN OUT int FAR *namelen);
+
+int
+PASCAL FAR
+getsockname(
+ IN SOCKET s,
+ OUT struct sockaddr FAR *name,
+ IN OUT int FAR *namelen);
+
+int
+PASCAL FAR
+getsockopt(
+ IN SOCKET s,
+ IN int level,
+ IN int optname,
+ OUT char FAR *optval,
+ IN OUT int FAR *optlen);
+
+u_long
+PASCAL FAR
+htonl(
+ IN u_long hostlong);
+
+u_short
+PASCAL FAR
+htons(
+ IN u_short hostshort);
+
+unsigned long
+PASCAL FAR
+inet_addr(
+ IN const char FAR *cp);
+
+char FAR
+*PASCAL FAR
+inet_ntoa(
+ IN struct in_addr in);
+
+int
+PASCAL FAR
+listen(
+ IN SOCKET s,
+ IN int backlog);
+
+u_long
+PASCAL FAR
+ntohl(
+ IN u_long netlong);
+
+u_short
+PASCAL FAR
+ntohs(
+ IN u_short netshort);
+
+int
+PASCAL FAR
+recv(
+ IN SOCKET s,
+ OUT char FAR *buf,
+ IN int len,
+ IN int flags);
+
+int
+PASCAL FAR
+recvfrom(
+ IN SOCKET s,
+ OUT char FAR *buf,
+ IN int len,
+ IN int flags,
+ OUT struct sockaddr FAR *from OPTIONAL,
+ IN OUY int FAR * fromlen OPTIONAL);
+
+int
+PASCAL FAR
+select(
+ IN int nfds,
+ IN OUT fd_set FAR *readfds OPTIONAL,
+ IN OUT fd_set FAR *writefds OPTIONAL,
+ IN OUT fd_set FAR *exceptfds OPTIONAL,
+ IN const struct timeval FAR *timeout OPTIONAL);
+
+int
+PASCAL FAR
+send(
+ IN SOCKET s,
+ IN const char FAR *buf,
+ IN int len,
+ IN int flags);
+
+int
+PASCAL FAR
+sendto(
+ IN SOCKET s,
+ IN const char FAR *buf,
+ IN int len,
+ IN int flags,
+ IN const struct sockaddr FAR *to OPTIONAL,
+ IN int tolen);
+
+int
+PASCAL FAR
+setsockopt(
+ IN SOCKET s,
+ IN int level,
+ IN int optname,
+ IN const char FAR *optval OPTIONAL,
+ IN int optlen);
+
+int
+PASCAL FAR
+shutdown(
+ IN SOCKET s,
+ IN int how);
+
+SOCKET
+PASCAL FAR
+socket(
+ IN int af,
+ IN int type,
+ IN int protocol);
+
+struct hostent FAR
+*PASCAL FAR
+gethostbyaddr(
+ IN const char FAR *addr,
+ IN int len,
+ IN int type);
+
+struct hostent FAR
+*PASCAL FAR
+gethostbyname(
+ IN const char FAR *name);
+
+int
+PASCAL FAR
+gethostname(
+ OUT char FAR *name,
+ IN int namelen);
+
+struct servent FAR
+*PASCAL FAR
+getservbyport(
+ IN int port,
+ IN const char FAR *proto);
+
+struct servent FAR
+*PASCAL FAR
+getservbyname(
+ IN const char FAR *name,
+ IN const char FAR *proto);
+
+struct protoent FAR
+*PASCAL FAR
+getprotobynumber(
+ IN int number);
+
+struct protoent FAR
+*PASCAL FAR
+getprotobyname(
+ IN const char FAR *name);
+
+int
+PASCAL FAR
+WSAStartup(
+ IN WORD wVersionRequired,
+ OUT LPWSADATA lpWSAData);
+
+int
+PASCAL FAR
+WSACleanup(void);
+
+void
+PASCAL FAR
+WSASetLastError(
+ IN int iError);
+
+int
+PASCAL FAR
+WSAGetLastError(void);
+
+BOOL
+PASCAL FAR
+WSAIsBlocking(void);
+
+int
+PASCAL FAR
+WSAUnhookBlockingHook(void);
+
+FARPROC
+PASCAL FAR
+WSASetBlockingHook(
+ IN FARPROC lpBlockFunc);
+
+int
+PASCAL FAR
+WSACancelBlockingCall(void);
+
+HANDLE
+PASCAL FAR
+WSAAsyncGetServByName(
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN const char FAR *name,
+ IN const char FAR *proto,
+ OUT char FAR *buf,
+ IN int buflen);
+
+HANDLE
+PASCAL FAR
+WSAAsyncGetServByPort(
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN int port,
+ IN const char FAR *proto,
+ OUT char FAR *buf,
+ IN int buflen);
+
+HANDLE
+PASCAL FAR
+WSAAsyncGetProtoByName(
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN const char FAR *name,
+ OUT char FAR *buf,
+ IN int buflen);
+
+HANDLE
+PASCAL FAR
+WSAAsyncGetProtoByNumber(
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN int number,
+ OUT char FAR *buf,
+ IN int buflen);
+
+HANDLE
+PASCAL FAR
+WSAAsyncGetHostByName(
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN const char FAR *name,
+ OUT char FAR *buf,
+ IN int buflen);
+
+HANDLE
+PASCAL FAR
+WSAAsyncGetHostByAddr(
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN const char FAR *addr,
+ IN int len,
+ IN int type,
+ OUT char FAR *buf,
+ IN int buflen);
+
+int
+PASCAL FAR
+WSACancelAsyncRequest(
+ IN HANDLE hAsyncTaskHandle);
+
+int
+PASCAL FAR
+WSAAsyncSelect(
+ IN SOCKET s,
+ IN HWND hWnd,
+ IN u_int wMsg,
+ IN long lEvent);
+
+int
+PASCAL FAR
+WSARecvEx(
+ IN SOCKET s,
+ OUT char FAR *buf,
+ IN int len,
+ IN OUT int FAR *flags);
+
+typedef struct _TRANSMIT_FILE_BUFFERS {
+ PVOID Head;
+ DWORD HeadLength;
+ PVOID Tail;
+ DWORD TailLength;
+} TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS;
+
+BOOL
+PASCAL FAR
+TransmitFile(
+ IN SOCKET hSocket,
+ IN HANDLE hFile,
+ IN DWORD nNumberOfBytesToWrite,
+ IN DWORD nNumberOfBytesPerSend,
+ IN OUT LPOVERLAPPED lpOverlapped OPTIONAL,
+ IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers OPTIONAL,
+ IN DWORD dwReserved);
+
+BOOL
+PASCAL FAR
+AcceptEx(
+ IN SOCKET sListenSocket,
+ IN SOCKET sAcceptSocket,
+ OUT PVOID lpOutputBuffer,
+ IN DWORD dwReceiveDataLength,
+ IN DWORD dwLocalAddressLength,
+ IN DWORD dwRemoteAddressLength,
+ OUT LPDWORD lpdwBytesReceived,
+ IN OUT LPOVERLAPPED lpOverlapped);
+
+VOID
+PASCAL FAR
+GetAcceptExSockaddrs(
+ IN PVOID lpOutputBuffer,
+ IN DWORD dwReceiveDataLength,
+ IN DWORD dwLocalAddressLength,
+ IN DWORD dwRemoteAddressLength,
+ OUT struct sockaddr **LocalSockaddr,
+ OUT LPINT LocalSockaddrLength,
+ OUT struct sockaddr **RemoteSockaddr,
+ OUT LPINT RemoteSockaddrLength);
+
#if(_WIN32_WINNT >= 0x0501)
#ifdef IPV6STRICT
Modified: branches/header-work/include/psdk/winsock2.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/winsoc…
==============================================================================
--- branches/header-work/include/psdk/winsock2.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/winsock2.h [iso-8859-1] Tue Mar 30 12:39:52 2010
@@ -270,46 +270,10 @@
#define IMPLINK_LOWEXPER 156
#define IMPLINK_HIGHEXPER 158
-#ifndef s_addr
-
-#define s_addr S_un.S_addr
-#define s_host S_un.S_un_b.s_b2
-#define s_net S_un.S_un_b.s_b1
-#define s_imp S_un.S_un_w.s_w2
-#define s_impno S_un.S_un_b.s_b4
-#define s_lh S_un.S_un_b.s_b3
-
-typedef struct in_addr {
- union {
- struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
- struct { u_short s_w1,s_w2; } S_un_w;
- u_long S_addr;
- } S_un;
-} IN_ADDR, *PIN_ADDR;
-
-#endif /* s_addr */
-
#define ADDR_ANY INADDR_ANY
#define WSADESCRIPTION_LEN 256
#define WSASYS_STATUS_LEN 128
-
-typedef struct WSAData {
- WORD wVersion;
- WORD wHighVersion;
-#ifdef _WIN64
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char *lpVendorInfo;
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
-#else
- char szDescription[WSADESCRIPTION_LEN+1];
- char szSystemStatus[WSASYS_STATUS_LEN+1];
- unsigned short iMaxSockets;
- unsigned short iMaxUdpDg;
- char *lpVendorInfo;
-} WSADATA, FAR *LPWSADATA;
#define INVALID_SOCKET (SOCKET)(~0)
@@ -355,11 +319,6 @@
#define SO_PROTOCOL_INFO SO_PROTOCOL_INFOA
#endif
#define PVD_CONFIG 0x3001
-
-struct sockproto {
- u_short sp_family;
- u_short sp_protocol;
-};
#define PF_UNSPEC AF_UNSPEC
#define PF_UNIX AF_UNIX
@@ -517,6 +476,211 @@
#endif /* !WSABASEERR */
+#define CF_ACCEPT 0x0000
+#define CF_REJECT 0x0001
+#define CF_DEFER 0x0002
+#define SD_RECEIVE 0x00
+#define SD_SEND 0x01
+#define SD_BOTH 0x02
+
+#define SG_UNCONSTRAINED_GROUP 0x01
+#define SG_CONSTRAINED_GROUP 0x02
+
+#define MAX_PROTOCOL_CHAIN 7
+
+#define BASE_PROTOCOL 1
+#define LAYERED_PROTOCOL 0
+
+#define WSAPROTOCOL_LEN 255
+
+#define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
+#define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
+#define PFL_HIDDEN 0x00000004
+#define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
+#define PFL_NETWORKDIRECT_PROVIDER 0x00000010
+
+#define XP1_CONNECTIONLESS 0x00000001
+#define XP1_GUARANTEED_DELIVERY 0x00000002
+#define XP1_GUARANTEED_ORDER 0x00000004
+#define XP1_MESSAGE_ORIENTED 0x00000008
+#define XP1_PSEUDO_STREAM 0x00000010
+#define XP1_GRACEFUL_CLOSE 0x00000020
+#define XP1_EXPEDITED_DATA 0x00000040
+#define XP1_CONNECT_DATA 0x00000080
+#define XP1_DISCONNECT_DATA 0x00000100
+#define XP1_SUPPORT_BROADCAST 0x00000200
+#define XP1_SUPPORT_MULTIPOINT 0x00000400
+#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
+#define XP1_MULTIPOINT_DATA_PLANE 0x00001000
+#define XP1_QOS_SUPPORTED 0x00002000
+#define XP1_INTERRUPT 0x00004000
+#define XP1_UNI_SEND 0x00008000
+#define XP1_UNI_RECV 0x00010000
+#define XP1_IFS_HANDLES 0x00020000
+#define XP1_PARTIAL_MESSAGE 0x00040000
+#define XP1_SAN_SUPPORT_SDP 0x00080000
+
+#define BIGENDIAN 0x0000
+#define LITTLEENDIAN 0x0001
+
+#define SECURITY_PROTOCOL_NONE 0x0000
+
+#define JL_SENDER_ONLY 0x01
+#define JL_RECEIVER_ONLY 0x02
+#define JL_BOTH 0x04
+
+#define WSA_FLAG_OVERLAPPED 0x01
+#define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
+#define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
+#define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
+#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
+#define WSA_FLAG_ACCESS_SYSTEM_SECURITY 0x40
+
+#define TH_NETDEV 0x00000001
+#define TH_TAPI 0x00000002
+
+#define SERVICE_MULTIPLE 0x00000001
+
+#define NS_ALL 0
+#define NS_SAP 1
+#define NS_NDS 2
+#define NS_PEER_BROWSE 3
+#define NS_SLP 5
+#define NS_DHCP 6
+#define NS_TCPIP_LOCAL 10
+#define NS_TCPIP_HOSTS 11
+#define NS_DNS 12
+#define NS_NETBT 13
+#define NS_WINS 14
+#if(_WIN32_WINNT >= 0x0501)
+#define NS_NLA 15
+#endif
+#if(_WIN32_WINNT >= 0x0600)
+#define NS_BTH 16
+#endif
+#define NS_NBP 20
+#define NS_MS 30
+#define NS_STDA 31
+#define NS_NTDS 32
+#if(_WIN32_WINNT >= 0x0600)
+#define NS_EMAIL 37
+#define NS_PNRPNAME 38
+#define NS_PNRPCLOUD 39
+#endif
+#define NS_X500 40
+#define NS_NIS 41
+#define NS_NISPLUS 42
+#define NS_WRQ 50
+#define NS_NETDES 60
+
+#define RES_UNUSED_1 0x00000001
+#define RES_FLUSH_CACHE 0x00000002
+#ifndef RES_SERVICE
+#define RES_SERVICE 0x00000004
+#endif
+
+#define SERVICE_TYPE_VALUE_IPXPORTA "IpxSocket"
+#define SERVICE_TYPE_VALUE_IPXPORTW L"IpxSocket"
+#define SERVICE_TYPE_VALUE_SAPIDA "SapId"
+#define SERVICE_TYPE_VALUE_SAPIDW L"SapId"
+
+#define SERVICE_TYPE_VALUE_TCPPORTA "TcpPort"
+#define SERVICE_TYPE_VALUE_TCPPORTW L"TcpPort"
+
+#define SERVICE_TYPE_VALUE_UDPPORTA "UdpPort"
+#define SERVICE_TYPE_VALUE_UDPPORTW L"UdpPort"
+
+#define SERVICE_TYPE_VALUE_OBJECTIDA "ObjectId"
+#define SERVICE_TYPE_VALUE_OBJECTIDW L"ObjectId"
+
+#ifdef UNICODE
+#define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDW
+#define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTW
+#define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTW
+#define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDW
+#else
+#define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDA
+#define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTA
+#define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTA
+#define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDA
+#endif
+
+#define LUP_DEEP 0x0001
+#define LUP_CONTAINERS 0x0002
+#define LUP_NOCONTAINERS 0x0004
+#define LUP_NEAREST 0x0008
+#define LUP_RETURN_NAME 0x0010
+#define LUP_RETURN_TYPE 0x0020
+#define LUP_RETURN_VERSION 0x0040
+#define LUP_RETURN_COMMENT 0x0080
+#define LUP_RETURN_ADDR 0x0100
+#define LUP_RETURN_BLOB 0x0200
+#define LUP_RETURN_ALIASES 0x0400
+#define LUP_RETURN_QUERY_STRING 0x0800
+#define LUP_RETURN_ALL 0x0FF0
+#define LUP_RES_SERVICE 0x8000
+#define LUP_FLUSHCACHE 0x1000
+#define LUP_FLUSHPREVIOUS 0x2000
+#define LUP_NON_AUTHORITATIVE 0x4000
+#define LUP_SECURE 0x8000
+#define LUP_RETURN_PREFERRED_NAMES 0x10000
+#define LUP_ADDRCONFIG 0x00100000
+#define LUP_DUAL_ADDR 0x00200000
+#define LUP_FILESERVER 0x00400000
+
+#define RESULT_IS_ALIAS 0x0001
+#if(_WIN32_WINNT >= 0x0501)
+#define RESULT_IS_ADDED 0x0010
+#define RESULT_IS_CHANGED 0x0020
+#define RESULT_IS_DELETED 0x0040
+#endif
+
+
+
+
+
+
+#ifndef s_addr
+
+#define s_addr S_un.S_addr
+#define s_host S_un.S_un_b.s_b2
+#define s_net S_un.S_un_b.s_b1
+#define s_imp S_un.S_un_w.s_w2
+#define s_impno S_un.S_un_b.s_b4
+#define s_lh S_un.S_un_b.s_b3
+
+typedef struct in_addr {
+ union {
+ struct { u_char s_b1,s_b2,s_b3,s_b4; } S_un_b;
+ struct { u_short s_w1,s_w2; } S_un_w;
+ u_long S_addr;
+ } S_un;
+} IN_ADDR, *PIN_ADDR;
+
+#endif /* s_addr */
+
+typedef struct WSAData {
+ WORD wVersion;
+ WORD wHighVersion;
+#ifdef _WIN64
+ unsigned short iMaxSockets;
+ unsigned short iMaxUdpDg;
+ char *lpVendorInfo;
+ char szDescription[WSADESCRIPTION_LEN+1];
+ char szSystemStatus[WSASYS_STATUS_LEN+1];
+#else
+ char szDescription[WSADESCRIPTION_LEN+1];
+ char szSystemStatus[WSASYS_STATUS_LEN+1];
+ unsigned short iMaxSockets;
+ unsigned short iMaxUdpDg;
+ char *lpVendorInfo;
+} WSADATA, FAR *LPWSADATA;
+
+struct sockproto {
+ u_short sp_family;
+ u_short sp_protocol;
+};
+
#ifdef WIN32
#define WSAAPI FAR PASCAL
@@ -575,17 +739,7 @@
WSABUF ProviderSpecific;
} QOS, *LPQOS;
-#define CF_ACCEPT 0x0000
-#define CF_REJECT 0x0001
-#define CF_DEFER 0x0002
-#define SD_RECEIVE 0x00
-#define SD_SEND 0x01
-#define SD_BOTH 0x02
-
typedef unsigned int GROUP;
-
-#define SG_UNCONSTRAINED_GROUP 0x01
-#define SG_CONSTRAINED_GROUP 0x02
typedef struct _WSANETWORKEVENTS {
LONG lNetworkEvents;
@@ -596,17 +750,10 @@
#include <guiddef.h>
#endif
-#define MAX_PROTOCOL_CHAIN 7
-
-#define BASE_PROTOCOL 1
-#define LAYERED_PROTOCOL 0
-
typedef struct _WSAPROTOCOLCHAIN {
int ChainLen;
DWORD ChainEntries[MAX_PROTOCOL_CHAIN];
} WSAPROTOCOLCHAIN, *LPWSAPROTOCOLCHAIN;
-
-#define WSAPROTOCOL_LEN 255
typedef struct _WSAPROTOCOL_INFOA {
DWORD dwServiceFlags1;
@@ -662,49 +809,6 @@
typedef LPWSAPROTOCOL_INFOA LPWSAPROTOCOL_INFO;
#endif
-#define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
-#define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
-#define PFL_HIDDEN 0x00000004
-#define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
-#define PFL_NETWORKDIRECT_PROVIDER 0x00000010
-
-#define XP1_CONNECTIONLESS 0x00000001
-#define XP1_GUARANTEED_DELIVERY 0x00000002
-#define XP1_GUARANTEED_ORDER 0x00000004
-#define XP1_MESSAGE_ORIENTED 0x00000008
-#define XP1_PSEUDO_STREAM 0x00000010
-#define XP1_GRACEFUL_CLOSE 0x00000020
-#define XP1_EXPEDITED_DATA 0x00000040
-#define XP1_CONNECT_DATA 0x00000080
-#define XP1_DISCONNECT_DATA 0x00000100
-#define XP1_SUPPORT_BROADCAST 0x00000200
-#define XP1_SUPPORT_MULTIPOINT 0x00000400
-#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
-#define XP1_MULTIPOINT_DATA_PLANE 0x00001000
-#define XP1_QOS_SUPPORTED 0x00002000
-#define XP1_INTERRUPT 0x00004000
-#define XP1_UNI_SEND 0x00008000
-#define XP1_UNI_RECV 0x00010000
-#define XP1_IFS_HANDLES 0x00020000
-#define XP1_PARTIAL_MESSAGE 0x00040000
-#define XP1_SAN_SUPPORT_SDP 0x00080000
-
-#define BIGENDIAN 0x0000
-#define LITTLEENDIAN 0x0001
-
-#define SECURITY_PROTOCOL_NONE 0x0000
-
-#define JL_SENDER_ONLY 0x01
-#define JL_RECEIVER_ONLY 0x02
-#define JL_BOTH 0x04
-
-#define WSA_FLAG_OVERLAPPED 0x01
-#define WSA_FLAG_MULTIPOINT_C_ROOT 0x02
-#define WSA_FLAG_MULTIPOINT_C_LEAF 0x04
-#define WSA_FLAG_MULTIPOINT_D_ROOT 0x08
-#define WSA_FLAG_MULTIPOINT_D_LEAF 0x10
-#define WSA_FLAG_ACCESS_SYSTEM_SECURITY 0x40
-
typedef int
(CALLBACK *LPCONDITIONPROC)(
IN LPWSABUF lpCallerId,
@@ -760,9 +864,6 @@
#endif /* (_WIN32_WINNT >= 0x0501) */
-#define TH_NETDEV 0x00000001
-#define TH_TAPI 0x00000002
-
#ifndef __BLOB_T_DEFINED /* also in wtypes.h and nspapi.h */
#define __BLOB_T_DEFINED
/* wine is using a diff define */
@@ -779,72 +880,6 @@
#endif /* _tagBLOB_DEFINED */
#endif /* __BLOB_T_DEFINED */
-
-#define SERVICE_MULTIPLE 0x00000001
-
-#define NS_ALL 0
-#define NS_SAP 1
-#define NS_NDS 2
-#define NS_PEER_BROWSE 3
-#define NS_SLP 5
-#define NS_DHCP 6
-#define NS_TCPIP_LOCAL 10
-#define NS_TCPIP_HOSTS 11
-#define NS_DNS 12
-#define NS_NETBT 13
-#define NS_WINS 14
-#if(_WIN32_WINNT >= 0x0501)
-#define NS_NLA 15
-#endif
-#if(_WIN32_WINNT >= 0x0600)
-#define NS_BTH 16
-#endif
-#define NS_NBP 20
-#define NS_MS 30
-#define NS_STDA 31
-#define NS_NTDS 32
-#if(_WIN32_WINNT >= 0x0600)
-#define NS_EMAIL 37
-#define NS_PNRPNAME 38
-#define NS_PNRPCLOUD 39
-#endif
-#define NS_X500 40
-#define NS_NIS 41
-#define NS_NISPLUS 42
-#define NS_WRQ 50
-#define NS_NETDES 60
-
-#define RES_UNUSED_1 0x00000001
-#define RES_FLUSH_CACHE 0x00000002
-#ifndef RES_SERVICE
-#define RES_SERVICE 0x00000004
-#endif
-
-#define SERVICE_TYPE_VALUE_IPXPORTA "IpxSocket"
-#define SERVICE_TYPE_VALUE_IPXPORTW L"IpxSocket"
-#define SERVICE_TYPE_VALUE_SAPIDA "SapId"
-#define SERVICE_TYPE_VALUE_SAPIDW L"SapId"
-
-#define SERVICE_TYPE_VALUE_TCPPORTA "TcpPort"
-#define SERVICE_TYPE_VALUE_TCPPORTW L"TcpPort"
-
-#define SERVICE_TYPE_VALUE_UDPPORTA "UdpPort"
-#define SERVICE_TYPE_VALUE_UDPPORTW L"UdpPort"
-
-#define SERVICE_TYPE_VALUE_OBJECTIDA "ObjectId"
-#define SERVICE_TYPE_VALUE_OBJECTIDW L"ObjectId"
-
-#ifdef UNICODE
-#define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDW
-#define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTW
-#define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTW
-#define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDW
-#else
-#define SERVICE_TYPE_VALUE_SAPID SERVICE_TYPE_VALUE_SAPIDA
-#define SERVICE_TYPE_VALUE_TCPPORT SERVICE_TYPE_VALUE_TCPPORTA
-#define SERVICE_TYPE_VALUE_UDPPORT SERVICE_TYPE_VALUE_UDPPORTA
-#define SERVICE_TYPE_VALUE_OBJECTID SERVICE_TYPE_VALUE_OBJECTIDA
-#endif
typedef struct _AFPROTOCOLS {
INT iAddressFamily;
@@ -946,36 +981,6 @@
typedef PWSAQUERYSET2A PWSAQUERYSET2;
typedef LPWSAQUERYSET2A LPWSAQUERYSET2;
#endif /* UNICODE */
-
-#define LUP_DEEP 0x0001
-#define LUP_CONTAINERS 0x0002
-#define LUP_NOCONTAINERS 0x0004
-#define LUP_NEAREST 0x0008
-#define LUP_RETURN_NAME 0x0010
-#define LUP_RETURN_TYPE 0x0020
-#define LUP_RETURN_VERSION 0x0040
-#define LUP_RETURN_COMMENT 0x0080
-#define LUP_RETURN_ADDR 0x0100
-#define LUP_RETURN_BLOB 0x0200
-#define LUP_RETURN_ALIASES 0x0400
-#define LUP_RETURN_QUERY_STRING 0x0800
-#define LUP_RETURN_ALL 0x0FF0
-#define LUP_RES_SERVICE 0x8000
-#define LUP_FLUSHCACHE 0x1000
-#define LUP_FLUSHPREVIOUS 0x2000
-#define LUP_NON_AUTHORITATIVE 0x4000
-#define LUP_SECURE 0x8000
-#define LUP_RETURN_PREFERRED_NAMES 0x10000
-#define LUP_ADDRCONFIG 0x00100000
-#define LUP_DUAL_ADDR 0x00200000
-#define LUP_FILESERVER 0x00400000
-
-#define RESULT_IS_ALIAS 0x0001
-#if(_WIN32_WINNT >= 0x0501)
-#define RESULT_IS_ADDED 0x0010
-#define RESULT_IS_CHANGED 0x0020
-#define RESULT_IS_DELETED 0x0040
-#endif
typedef enum _WSAESETSERVICEOP {
RNRSERVICE_REGISTER=0,
Modified: branches/header-work/include/psdk/ws2bth.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ws2bth…
==============================================================================
--- branches/header-work/include/psdk/ws2bth.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/ws2bth.h [iso-8859-1] Tue Mar 30 12:39:52 2010
@@ -20,13 +20,6 @@
#ifndef NS_BTH
#define NS_BTH 16
#endif
-
-typedef struct _SOCKADDR_BTH {
- USHORT addressFamily;
- BTH_ADDR btAddr;
- GUID serviceClassId;
- ULONG port;
-} SOCKADDR_BTH, *PSOCKADDR_BTH;
DEFINE_GUID(SVCID_BTH_PROVIDER, 0x6aa63e0, 0x7d60, 0x41ff, 0xaf, 0xb2, 0x3e, 0xe6, 0xd2,
0xd9, 0x39, 0x2d);
@@ -50,15 +43,6 @@
#define BTH_SDP_VERSION 1
-typedef struct _BTH_SET_SERVICE {
- PULONG pSdpVersion;
- HANDLE *pRecordHandle;
- ULONG fCodService;
- ULONG Reserved[5];
- ULONG ulRecordLength;
- UCHAR pRecord[1];
-} BTH_SET_SERVICE, *PBTH_SET_SERVICE;
-
#define SDP_DEFAULT_INQUIRY_SECONDS 6
#define SDP_MAX_INQUIRY_SECONDS 60
@@ -67,19 +51,6 @@
#define SDP_SERVICE_SEARCH_REQUEST 1
#define SDP_SERVICE_ATTRIBUTE_REQUEST 2
#define SDP_SERVICE_SEARCH_ATTRIBUTE_REQUEST 3
-
-typedef struct _BTH_QUERY_DEVICE {
- ULONG LAP;
- UCHAR length;
-} BTH_QUERY_DEVICE, *PBTH_QUERY_DEVICE;
-
-typedef struct _BTH_QUERY_SERVICE {
- ULONG type;
- ULONG serviceHandle;
- SdpQueryUuid uuids[MAX_UUIDS_IN_QUERY];
- ULONG numRange;
- SdpAttributeRange pRange[1];
-} BTH_QUERY_SERVICE, *PBTH_QUERY_SERVICE;
#define BTHNS_RESULT_DEVICE_CONNECTED 0x00010000
#define BTHNS_RESULT_DEVICE_REMEMBERED 0x00020000
@@ -108,19 +79,10 @@
#define MSC_BREAK_BIT BIT(1)
#define MSC_SET_BREAK_LENGTH(b, l) ((b) = ((b)&0x3) | (((l)&0xf) << 4))
-typedef struct _RFCOMM_MSC_DATA {
- UCHAR Signals;
- UCHAR Break;
-} RFCOMM_MSC_DATA, *PRFCOMM_MSC_DATA;
-
#define RLS_ERROR 0x01
#define RLS_OVERRUN 0x02
#define RLS_PARITY 0x04
#define RLS_FRAMING 0x08
-
-typedef struct _RFCOMM_RLS_DATA {
- UCHAR LineStatus;
-} RFCOMM_RLS_DATA, *PRFCOMM_RLS_DATA;
#define RPN_BAUD_2400 0
#define RPN_BAUD_4800 1
@@ -174,6 +136,50 @@
#define RFCOMM_CMD_RPN_REQUEST 4
#define RFCOMM_CMD_RPN_RESPONSE 5
+
+
+
+
+
+
+typedef struct _SOCKADDR_BTH {
+ USHORT addressFamily;
+ BTH_ADDR btAddr;
+ GUID serviceClassId;
+ ULONG port;
+} SOCKADDR_BTH, *PSOCKADDR_BTH;
+
+typedef struct _BTH_SET_SERVICE {
+ PULONG pSdpVersion;
+ HANDLE *pRecordHandle;
+ ULONG fCodService;
+ ULONG Reserved[5];
+ ULONG ulRecordLength;
+ UCHAR pRecord[1];
+} BTH_SET_SERVICE, *PBTH_SET_SERVICE;
+
+typedef struct _BTH_QUERY_DEVICE {
+ ULONG LAP;
+ UCHAR length;
+} BTH_QUERY_DEVICE, *PBTH_QUERY_DEVICE;
+
+typedef struct _BTH_QUERY_SERVICE {
+ ULONG type;
+ ULONG serviceHandle;
+ SdpQueryUuid uuids[MAX_UUIDS_IN_QUERY];
+ ULONG numRange;
+ SdpAttributeRange pRange[1];
+} BTH_QUERY_SERVICE, *PBTH_QUERY_SERVICE;
+
+typedef struct _RFCOMM_MSC_DATA {
+ UCHAR Signals;
+ UCHAR Break;
+} RFCOMM_MSC_DATA, *PRFCOMM_MSC_DATA;
+
+typedef struct _RFCOMM_RLS_DATA {
+ UCHAR LineStatus;
+} RFCOMM_RLS_DATA, *PRFCOMM_RLS_DATA;
+
typedef struct _RFCOMM_RPN_DATA {
UCHAR Baud;
UCHAR Data;
Modified: branches/header-work/include/psdk/ws2def.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ws2def…
==============================================================================
--- branches/header-work/include/psdk/ws2def.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/ws2def.h [iso-8859-1] Tue Mar 30 12:39:52 2010
@@ -130,43 +130,6 @@
#define TCP_NODELAY 0x0001
-typedef struct sockaddr {
-#if (_WIN32_WINNT < 0x0600)
- u_short sa_family;
-#else
- ADDRESS_FAMILY sa_family;
-#endif
- CHAR sa_data[14];
-} SOCKADDR, *PSOCKADDR, FAR *LPSOCKADDR;
-
-#ifndef __CSADDR_DEFINED__
-#define __CSADDR_DEFINED__
-
-typedef struct _SOCKET_ADDRESS {
- LPSOCKADDR lpSockaddr;
- INT iSockaddrLength;
-} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
-
-typedef struct _SOCKET_ADDRESS_LIST {
- INT iAddressCount;
- SOCKET_ADDRESS Address[1];
-} SOCKET_ADDRESS_LIST, *PSOCKET_ADDRESS_LIST, FAR *LPSOCKET_ADDRESS_LIST;
-
-#if (_WIN32_WINNT >= 0x0600)
-#define SIZEOF_SOCKET_ADDRESS_LIST(AddressCount) \
- (FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address) + \
- AddressCount * sizeof(SOCKET_ADDRESS))
-#endif
-
-typedef struct _CSADDR_INFO {
- SOCKET_ADDRESS LocalAddr;
- SOCKET_ADDRESS RemoteAddr;
- INT iSocketType;
- INT iProtocol;
-} CSADDR_INFO, *PCSADDR_INFO, FAR *LPCSADDR_INFO ;
-
-#endif /* __CSADDR_DEFINED__ */
-
#define _SS_MAXSIZE 128
#define _SS_ALIGNSIZE (sizeof(__int64))
@@ -179,32 +142,6 @@
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (short))
#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (short) + _SS_PAD1SIZE + _SS_ALIGNSIZE))
-
-#endif /* (_WIN32_WINNT >= 0x0600) */
-
-typedef struct sockaddr_storage {
- ADDRESS_FAMILY ss_family;
- CHAR __ss_pad1[_SS_PAD1SIZE];
- __int64 __ss_align;
- CHAR __ss_pad2[_SS_PAD2SIZE];
-} SOCKADDR_STORAGE_LH, *PSOCKADDR_STORAGE_LH, FAR *LPSOCKADDR_STORAGE_LH;
-
-typedef struct sockaddr_storage_xp {
- short ss_family;
- CHAR __ss_pad1[_SS_PAD1SIZE];
- __int64 __ss_align;
- CHAR __ss_pad2[_SS_PAD2SIZE];
-} SOCKADDR_STORAGE_XP, *PSOCKADDR_STORAGE_XP, FAR *LPSOCKADDR_STORAGE_XP;
-
-#if (_WIN32_WINNT >= 0x0600)
-
-typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;
-typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
-
-#elif (_WIN32_WINNT >= 0x0501)
-
-typedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;
-typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
#endif /* (_WIN32_WINNT >= 0x0600) */
@@ -252,59 +189,6 @@
#define IPPROTO_IP 0
-typedef enum {
-#if (_WIN32_WINNT >= 0x0501)
- IPPROTO_HOPOPTS = 0,
-#endif
- IPPROTO_ICMP = 1,
- IPPROTO_IGMP = 2,
- IPPROTO_GGP = 3,
-#if (_WIN32_WINNT >= 0x0501)
- IPPROTO_IPV4 = 4,
-#endif
-#if (_WIN32_WINNT >= 0x0600)
- IPPROTO_ST = 5,
-#endif
- IPPROTO_TCP = 6,
-#if (_WIN32_WINNT >= 0x0600)
- IPPROTO_CBT = 7,
- IPPROTO_EGP = 8,
- IPPROTO_IGP = 9,
-#endif
- IPPROTO_PUP = 12,
- IPPROTO_UDP = 17,
- IPPROTO_IDP = 22,
-#if (_WIN32_WINNT >= 0x0600)
- IPPROTO_RDP = 27,
-#endif
-#if (_WIN32_WINNT >= 0x0501)
- IPPROTO_IPV6 = 41,
- IPPROTO_ROUTING = 43,
- IPPROTO_FRAGMENT = 44,
- IPPROTO_ESP = 50,
- IPPROTO_AH = 51,
- IPPROTO_ICMPV6 = 58,
- IPPROTO_NONE = 59,
- IPPROTO_DSTOPTS = 60,
-#endif /* (_WIN32_WINNT >= 0x0501) */
- IPPROTO_ND = 77,
-#if(_WIN32_WINNT >= 0x0501)
- IPPROTO_ICLFXBM = 78,
-#endif
-#if (_WIN32_WINNT >= 0x0600)
- IPPROTO_PIM = 103,
- IPPROTO_PGM = 113,
- IPPROTO_L2TP = 115,
- IPPROTO_SCTP = 132,
-#endif /* (_WIN32_WINNT >= 0x0600) */
- IPPROTO_RAW = 255,
- IPPROTO_MAX = 256,
- IPPROTO_RESERVED_RAW = 257,
- IPPROTO_RESERVED_IPSEC = 258,
- IPPROTO_RESERVED_IPSECOFFLOAD = 259,
- IPPROTO_RESERVED_MAX = 260
-} IPPROTO, *PIPROTO;
-
#define IPPORT_TCPMUX 1
#define IPPORT_ECHO 7
#define IPPORT_DISCARD 9
@@ -389,6 +273,206 @@
#define INADDR_BROADCAST (ULONG)0xffffffff
#define INADDR_NONE 0xffffffff
+#define SCOPEID_UNSPECIFIED_INIT {0}
+
+#define IOCPARM_MASK 0x7f
+#define IOC_VOID 0x20000000
+#define IOC_OUT 0x40000000
+#define IOC_IN 0x80000000
+#define IOC_INOUT (IOC_IN|IOC_OUT)
+
+#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
+#define _IOR(x,y,t)
(IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
+#define _IOW(x,y,t)
(IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
+
+#define MSG_TRUNC 0x0100
+#define MSG_CTRUNC 0x0200
+#define MSG_BCAST 0x0400
+#define MSG_MCAST 0x0800
+
+#define AI_PASSIVE 0x00000001
+#define AI_CANONNAME 0x00000002
+#define AI_NUMERICHOST 0x00000004
+#define AI_NUMERICSERV 0x00000008
+
+#define AI_ALL 0x00000100
+#define AI_ADDRCONFIG 0x00000400
+#define AI_V4MAPPED 0x00000800
+
+#define AI_NON_AUTHORITATIVE 0x00004000
+#define AI_SECURE 0x00008000
+#define AI_RETURN_PREFERRED_NAMES 0x00010000
+
+#define AI_FQDN 0x00020000
+#define AI_FILESERVER 0x00040000
+
+#define NS_ALL 0
+
+#define NS_SAP 1
+#define NS_NDS 2
+#define NS_PEER_BROWSE 3
+#define NS_SLP 5
+#define NS_DHCP 6
+
+#define NS_TCPIP_LOCAL 10
+#define NS_TCPIP_HOSTS 11
+#define NS_DNS 12
+#define NS_NETBT 13
+#define NS_WINS 14
+
+#if(_WIN32_WINNT >= 0x0501)
+#define NS_NLA 15
+#endif
+
+#if(_WIN32_WINNT >= 0x0600)
+#define NS_BTH 16
+#endif
+
+#define NS_NBP 20
+
+#define NS_MS 30
+#define NS_STDA 31
+#define NS_NTDS 32
+
+#if(_WIN32_WINNT >= 0x0600)
+#define NS_EMAIL 37
+#define NS_PNRPNAME 38
+#define NS_PNRPCLOUD 39
+#endif
+
+#define NS_X500 40
+#define NS_NIS 41
+#define NS_NISPLUS 42
+
+#define NS_WRQ 50
+
+#define NS_NETDES 60
+
+#define NI_NOFQDN 0x01
+#define NI_NUMERICHOST 0x02
+#define NI_NAMEREQD 0x04
+#define NI_NUMERICSERV 0x08
+#define NI_DGRAM 0x10
+
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+typedef struct sockaddr {
+#if (_WIN32_WINNT < 0x0600)
+ u_short sa_family;
+#else
+ ADDRESS_FAMILY sa_family;
+#endif
+ CHAR sa_data[14];
+} SOCKADDR, *PSOCKADDR, FAR *LPSOCKADDR;
+
+#ifndef __CSADDR_DEFINED__
+#define __CSADDR_DEFINED__
+
+typedef struct _SOCKET_ADDRESS {
+ LPSOCKADDR lpSockaddr;
+ INT iSockaddrLength;
+} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS;
+
+typedef struct _SOCKET_ADDRESS_LIST {
+ INT iAddressCount;
+ SOCKET_ADDRESS Address[1];
+} SOCKET_ADDRESS_LIST, *PSOCKET_ADDRESS_LIST, FAR *LPSOCKET_ADDRESS_LIST;
+
+#if (_WIN32_WINNT >= 0x0600)
+#define SIZEOF_SOCKET_ADDRESS_LIST(AddressCount) \
+ (FIELD_OFFSET(SOCKET_ADDRESS_LIST, Address) + \
+ AddressCount * sizeof(SOCKET_ADDRESS))
+#endif
+
+typedef struct _CSADDR_INFO {
+ SOCKET_ADDRESS LocalAddr;
+ SOCKET_ADDRESS RemoteAddr;
+ INT iSocketType;
+ INT iProtocol;
+} CSADDR_INFO, *PCSADDR_INFO, FAR *LPCSADDR_INFO ;
+
+#endif /* __CSADDR_DEFINED__ */
+
+typedef struct sockaddr_storage {
+ ADDRESS_FAMILY ss_family;
+ CHAR __ss_pad1[_SS_PAD1SIZE];
+ __int64 __ss_align;
+ CHAR __ss_pad2[_SS_PAD2SIZE];
+} SOCKADDR_STORAGE_LH, *PSOCKADDR_STORAGE_LH, FAR *LPSOCKADDR_STORAGE_LH;
+
+typedef struct sockaddr_storage_xp {
+ short ss_family;
+ CHAR __ss_pad1[_SS_PAD1SIZE];
+ __int64 __ss_align;
+ CHAR __ss_pad2[_SS_PAD2SIZE];
+} SOCKADDR_STORAGE_XP, *PSOCKADDR_STORAGE_XP, FAR *LPSOCKADDR_STORAGE_XP;
+
+#if (_WIN32_WINNT >= 0x0600)
+
+typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;
+typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
+
+#elif (_WIN32_WINNT >= 0x0501)
+
+typedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;
+typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;
+
+#endif /* (_WIN32_WINNT >= 0x0600) */
+
+typedef enum {
+#if (_WIN32_WINNT >= 0x0501)
+ IPPROTO_HOPOPTS = 0,
+#endif
+ IPPROTO_ICMP = 1,
+ IPPROTO_IGMP = 2,
+ IPPROTO_GGP = 3,
+#if (_WIN32_WINNT >= 0x0501)
+ IPPROTO_IPV4 = 4,
+#endif
+#if (_WIN32_WINNT >= 0x0600)
+ IPPROTO_ST = 5,
+#endif
+ IPPROTO_TCP = 6,
+#if (_WIN32_WINNT >= 0x0600)
+ IPPROTO_CBT = 7,
+ IPPROTO_EGP = 8,
+ IPPROTO_IGP = 9,
+#endif
+ IPPROTO_PUP = 12,
+ IPPROTO_UDP = 17,
+ IPPROTO_IDP = 22,
+#if (_WIN32_WINNT >= 0x0600)
+ IPPROTO_RDP = 27,
+#endif
+#if (_WIN32_WINNT >= 0x0501)
+ IPPROTO_IPV6 = 41,
+ IPPROTO_ROUTING = 43,
+ IPPROTO_FRAGMENT = 44,
+ IPPROTO_ESP = 50,
+ IPPROTO_AH = 51,
+ IPPROTO_ICMPV6 = 58,
+ IPPROTO_NONE = 59,
+ IPPROTO_DSTOPTS = 60,
+#endif /* (_WIN32_WINNT >= 0x0501) */
+ IPPROTO_ND = 77,
+#if(_WIN32_WINNT >= 0x0501)
+ IPPROTO_ICLFXBM = 78,
+#endif
+#if (_WIN32_WINNT >= 0x0600)
+ IPPROTO_PIM = 103,
+ IPPROTO_PGM = 113,
+ IPPROTO_L2TP = 115,
+ IPPROTO_SCTP = 132,
+#endif /* (_WIN32_WINNT >= 0x0600) */
+ IPPROTO_RAW = 255,
+ IPPROTO_MAX = 256,
+ IPPROTO_RESERVED_RAW = 257,
+ IPPROTO_RESERVED_IPSEC = 258,
+ IPPROTO_RESERVED_IPSECOFFLOAD = 259,
+ IPPROTO_RESERVED_MAX = 260
+} IPPROTO, *PIPROTO;
+
typedef enum {
ScopeLevelInterface = 1,
ScopeLevelLink = 2,
@@ -410,8 +494,6 @@
};
} SCOPE_ID, *PSCOPE_ID;
-#define SCOPEID_UNSPECIFIED_INIT {0}
-
typedef struct sockaddr_in {
#if(_WIN32_WINNT < 0x0600)
short sin_family;
@@ -430,16 +512,6 @@
UCHAR sdl_zero[4];
} SOCKADDR_DL, *PSOCKADDR_DL;
#endif
-
-#define IOCPARM_MASK 0x7f
-#define IOC_VOID 0x20000000
-#define IOC_OUT 0x40000000
-#define IOC_IN 0x80000000
-#define IOC_INOUT (IOC_IN|IOC_OUT)
-
-#define _IO(x,y) (IOC_VOID|((x)<<8)|(y))
-#define _IOR(x,y,t)
(IOC_OUT|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
-#define _IOW(x,y,t)
(IOC_IN|(((long)sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))
typedef struct _WSABUF {
ULONG len;
@@ -587,27 +659,6 @@
#define CMSG_LEN WSA_CMSG_LEN
#endif
-#define MSG_TRUNC 0x0100
-#define MSG_CTRUNC 0x0200
-#define MSG_BCAST 0x0400
-#define MSG_MCAST 0x0800
-
-#define AI_PASSIVE 0x00000001
-#define AI_CANONNAME 0x00000002
-#define AI_NUMERICHOST 0x00000004
-#define AI_NUMERICSERV 0x00000008
-
-#define AI_ALL 0x00000100
-#define AI_ADDRCONFIG 0x00000400
-#define AI_V4MAPPED 0x00000800
-
-#define AI_NON_AUTHORITATIVE 0x00004000
-#define AI_SECURE 0x00008000
-#define AI_RETURN_PREFERRED_NAMES 0x00010000
-
-#define AI_FQDN 0x00020000
-#define AI_FILESERVER 0x00040000
-
typedef struct addrinfo {
int ai_flags;
int ai_family;
@@ -662,57 +713,6 @@
#endif /* (_WIN32_WINNT >= 0x0600) */
-#define NS_ALL 0
-
-#define NS_SAP 1
-#define NS_NDS 2
-#define NS_PEER_BROWSE 3
-#define NS_SLP 5
-#define NS_DHCP 6
-
-#define NS_TCPIP_LOCAL 10
-#define NS_TCPIP_HOSTS 11
-#define NS_DNS 12
-#define NS_NETBT 13
-#define NS_WINS 14
-
-#if(_WIN32_WINNT >= 0x0501)
-#define NS_NLA 15
-#endif
-
-#if(_WIN32_WINNT >= 0x0600)
-#define NS_BTH 16
-#endif
-
-#define NS_NBP 20
-
-#define NS_MS 30
-#define NS_STDA 31
-#define NS_NTDS 32
-
-#if(_WIN32_WINNT >= 0x0600)
-#define NS_EMAIL 37
-#define NS_PNRPNAME 38
-#define NS_PNRPCLOUD 39
-#endif
-
-#define NS_X500 40
-#define NS_NIS 41
-#define NS_NISPLUS 42
-
-#define NS_WRQ 50
-
-#define NS_NETDES 60
-
-#define NI_NOFQDN 0x01
-#define NI_NUMERICHOST 0x02
-#define NI_NAMEREQD 0x04
-#define NI_NUMERICSERV 0x08
-#define NI_DGRAM 0x10
-
-#define NI_MAXHOST 1025
-#define NI_MAXSERV 32
-
#ifdef __cplusplus
}
#endif
Modified: branches/header-work/include/psdk/ws2ipdef.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/psdk/ws2ipd…
==============================================================================
--- branches/header-work/include/psdk/ws2ipdef.h [iso-8859-1] (original)
+++ branches/header-work/include/psdk/ws2ipdef.h [iso-8859-1] Tue Mar 30 12:39:52 2010
@@ -1,15 +1,593 @@
-#ifndef _WS2IPDEF_
+#pragma once
+
#define _WS2IPDEF_
#ifdef __cplusplus
extern "C" {
#endif
-
-
+#ifndef WS2IPDEF_ASSERT
+#define WS2IPDEF_ASSERT(exp) ((VOID) 0)
+#endif
+
+#ifdef _MSC_VER
+#define WS2TCPIP_INLINE __inline
+#else
+#define WS2TCPIP_INLINE extern inline
+#endif
+
+#include <in6addr.h>
+
+#define IFF_UP 0x00000001
+#define IFF_BROADCAST 0x00000002
+#define IFF_LOOPBACK 0x00000004
+#define IFF_POINTTOPOINT 0x00000008
+#define IFF_MULTICAST 0x00000010
+
+#define IP_OPTIONS 1
+#define IP_HDRINCL 2
+#define IP_TOS 3
+#define IP_TTL 4
+#define IP_MULTICAST_IF 9
+#define IP_MULTICAST_TTL 10
+#define IP_MULTICAST_LOOP 11
+#define IP_ADD_MEMBERSHIP 12
+#define IP_DROP_MEMBERSHIP 13
+#define IP_DONTFRAGMENT 14
+#define IP_ADD_SOURCE_MEMBERSHIP 15
+#define IP_DROP_SOURCE_MEMBERSHIP 16
+#define IP_BLOCK_SOURCE 17
+#define IP_UNBLOCK_SOURCE 18
+#define IP_PKTINFO 19
+#define IP_HOPLIMIT 21
+#define IP_RECEIVE_BROADCAST 22
+#define IP_RECVIF 24
+#define IP_RECVDSTADDR 25
+#define IP_IFLIST 28
+#define IP_ADD_IFLIST 29
+#define IP_DEL_IFLIST 30
+#define IP_UNICAST_IF 31
+#define IP_RTHDR 32
+#define IP_RECVRTHDR 38
+#define IP_TCLASS 39
+#define IP_RECVTCLASS 40
+#define IP_ORIGINAL_ARRIVAL_IF 47
+
+#define IP_UNSPECIFIED_TYPE_OF_SERVICE -1
+
+#define IPV6_ADDRESS_BITS RTL_BITS_OF(IN6_ADDR)
+
+#define SS_PORT(ssp) (((PSOCKADDR_IN)(ssp))->sin_port)
+
+#define SIO_GET_INTERFACE_LIST _IOR('t', 127, ULONG)
+#define SIO_GET_INTERFACE_LIST_EX _IOR('t', 126, ULONG)
+#define SIO_SET_MULTICAST_FILTER _IOW('t', 125, ULONG)
+#define SIO_GET_MULTICAST_FILTER _IOW('t', 124 | IOC_IN, ULONG)
+#define SIOCSIPMSFILTER SIO_SET_MULTICAST_FILTER
+#define SIOCGIPMSFILTER SIO_GET_MULTICAST_FILTER
+
+#define SIOCSMSFILTER _IOW('t', 126, ULONG)
+#define SIOCGMSFILTER _IOW('t', 127 | IOC_IN, ULONG)
+
+#if (NTDDI_VERSION >= NTDDI_VISTASP1)
+
+#define IDEAL_SEND_BACKLOG_IOCTLS
+
+#define SIO_IDEAL_SEND_BACKLOG_QUERY _IOR('t', 123, ULONG)
+#define SIO_IDEAL_SEND_BACKLOG_CHANGE _IO('t', 122)
+
+#endif /* (NTDDI_VERSION >= NTDDI_VISTASP1) */
+
+#define MCAST_JOIN_GROUP 41
+#define MCAST_LEAVE_GROUP 42
+#define MCAST_BLOCK_SOURCE 43
+#define MCAST_UNBLOCK_SOURCE 44
+#define MCAST_JOIN_SOURCE_GROUP 45
+#define MCAST_LEAVE_SOURCE_GROUP 46
+
+#define IP_MSFILTER_SIZE(NumSources) \
+ (sizeof(IP_MSFILTER) - sizeof(IN_ADDR) + (NumSources) * sizeof(IN_ADDR))
+
+#define IPV6_HOPOPTS 1
+#define IPV6_HDRINCL 2
+#define IPV6_UNICAST_HOPS 4
+#define IPV6_MULTICAST_IF 9
+#define IPV6_MULTICAST_HOPS 10
+#define IPV6_MULTICAST_LOOP 11
+#define IPV6_ADD_MEMBERSHIP 12
+#define IPV6_JOIN_GROUP IPV6_ADD_MEMBERSHIP
+#define IPV6_DROP_MEMBERSHIP 13
+#define IPV6_LEAVE_GROUP IPV6_DROP_MEMBERSHIP
+#define IPV6_DONTFRAG 14
+#define IPV6_PKTINFO 19
+#define IPV6_HOPLIMIT 21
+#define IPV6_PROTECTION_LEVEL 23
+#define IPV6_RECVIF 24
+#define IPV6_RECVDSTADDR 25
+#define IPV6_CHECKSUM 26
+#define IPV6_V6ONLY 27
+#define IPV6_IFLIST 28
+#define IPV6_ADD_IFLIST 29
+#define IPV6_DEL_IFLIST 30
+#define IPV6_UNICAST_IF 31
+#define IPV6_RTHDR 32
+#define IPV6_RECVRTHDR 38
+#define IPV6_TCLASS 39
+#define IPV6_RECVTCLASS 40
+
+#define IP_UNSPECIFIED_HOP_LIMIT -1
+
+#define IP_PROTECTION_LEVEL IPV6_PROTECTION_LEVEL
+#define PROTECTION_LEVEL_UNRESTRICTED 10
+#define PROTECTION_LEVEL_EDGERESTRICTED 20
+#define PROTECTION_LEVEL_RESTRICTED 30
+
+#if (NTDDI_VERSION < NTDDI_VISTA)
+#define PROTECTION_LEVEL_DEFAULT PROTECTION_LEVEL_EDGERESTRICTED
+#else
+#define PROTECTION_LEVEL_DEFAULT ((UINT)-1)
+#endif
+
+#define INET_ADDRSTRLEN 22
+#define INET6_ADDRSTRLEN 65
+
+#define TCP_OFFLOAD_NO_PREFERENCE 0
+#define TCP_OFFLOAD_NOT_PREFERRED 1
+#define TCP_OFFLOAD_PREFERRED 2
+
+#define TCP_EXPEDITED_1122 0x0002
+#define TCP_KEEPALIVE 3
+#define TCP_MAXSEG 4
+#define TCP_MAXRT 5
+#define TCP_STDURG 6
+#define TCP_NOURG 7
+#define TCP_ATMARK 8
+#define TCP_NOSYNRETRIES 9
+#define TCP_TIMESTAMPS 10
+#define TCP_OFFLOAD_PREFERENCE 11
+#define TCP_CONGESTION_ALGORITHM 12
+#define TCP_DELAY_FIN_ACK 13
+
+struct sockaddr_in6_old {
+ SHORT sin6_family;
+ USHORT sin6_port;
+ ULONG sin6_flowinfo;
+ IN6_ADDR sin6_addr;
+};
+
+typedef union sockaddr_gen {
+ struct sockaddr Address;
+ struct sockaddr_in AddressIn;
+ struct sockaddr_in6_old AddressIn6;
+} sockaddr_gen;
+
+typedef struct _INTERFACE_INFO {
+ ULONG iiFlags;
+ sockaddr_gen iiAddress;
+ sockaddr_gen iiBroadcastAddress;
+ sockaddr_gen iiNetmask;
+} INTERFACE_INFO, FAR *LPINTERFACE_INFO;
+
+typedef struct _INTERFACE_INFO_EX {
+ ULONG iiFlags;
+ SOCKET_ADDRESS iiAddress;
+ SOCKET_ADDRESS iiBroadcastAddress;
+ SOCKET_ADDRESS iiNetmask;
+} INTERFACE_INFO_EX, FAR *LPINTERFACE_INFO_EX;
+
+typedef struct sockaddr_in6 {
+ ADDRESS_FAMILY sin6_family;
+ USHORT sin6_port;
+ ULONG sin6_flowinfo;
+ IN6_ADDR sin6_addr;
+ union {
+ ULONG sin6_scope_id;
+ SCOPE_ID sin6_scope_struct;
+ };
+} SOCKADDR_IN6_LH, *PSOCKADDR_IN6_LH, FAR *LPSOCKADDR_IN6_LH;
+
+typedef struct sockaddr_in6_w2ksp1 {
+ short sin6_family;
+ USHORT sin6_port;
+ ULONG sin6_flowinfo;
+ struct in6_addr sin6_addr;
+ ULONG sin6_scope_id;
+} SOCKADDR_IN6_W2KSP1, *PSOCKADDR_IN6_W2KSP1, FAR *LPSOCKADDR_IN6_W2KSP1;
+
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+
+typedef SOCKADDR_IN6_LH SOCKADDR_IN6;
+typedef SOCKADDR_IN6_LH *PSOCKADDR_IN6;
+typedef SOCKADDR_IN6_LH FAR *LPSOCKADDR_IN6;
+
+#elif(NTDDI_VERSION >= NTDDI_WIN2KSP1)
+
+typedef SOCKADDR_IN6_W2KSP1 SOCKADDR_IN6;
+typedef SOCKADDR_IN6_W2KSP1 *PSOCKADDR_IN6;
+typedef SOCKADDR_IN6_W2KSP1 FAR *LPSOCKADDR_IN6;
+
+#else
+
+typedef SOCKADDR_IN6_LH SOCKADDR_IN6;
+typedef SOCKADDR_IN6_LH *PSOCKADDR_IN6;
+typedef SOCKADDR_IN6_LH FAR *LPSOCKADDR_IN6;
+
+#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
+
+typedef union _SOCKADDR_INET {
+ SOCKADDR_IN Ipv4;
+ SOCKADDR_IN6 Ipv6;
+ ADDRESS_FAMILY si_family;
+} SOCKADDR_INET, *PSOCKADDR_INET;
+
+typedef struct _sockaddr_in6_pair {
+ PSOCKADDR_IN6 SourceAddress;
+ PSOCKADDR_IN6 DestinationAddress;
+} SOCKADDR_IN6_PAIR, *PSOCKADDR_IN6_PAIR;
+
+#if (NTDDI_VERSION >= NTDDI_WIN2KSP1)
+
+#define IN6ADDR_ANY_INIT {0}
+#define IN6ADDR_LOOPBACK_INIT {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}
+#define IN6ADDR_ALLNODESONNODE_INIT {0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
+#define IN6ADDR_ALLNODESONLINK_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}
+#define IN6ADDR_ALLROUTERSONLINK_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}
+#define IN6ADDR_ALLMLDV2ROUTERSONLINK_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16}
+#define IN6ADDR_TEREDOINITIALLINKLOCALADDRESS_INIT {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe}
+#define IN6ADDR_TEREDOOLDLINKLOCALADDRESSXP_INIT {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 'T', 'E', 'R', 'E', 'D',
'O'}
+#define IN6ADDR_TEREDOOLDLINKLOCALADDRESSVISTA_INIT {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
+#define IN6ADDR_LINKLOCALPREFIX_INIT {0xfe, 0x80, }
+#define IN6ADDR_MULTICASTPREFIX_INIT {0xff, 0x00, }
+#define IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_INIT {0xff, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, }
+#define IN6ADDR_V4MAPPEDPREFIX_INIT {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, }
+#define IN6ADDR_6TO4PREFIX_INIT {0x20, 0x02, }
+#define IN6ADDR_TEREDOPREFIX_INIT {0x20, 0x01, 0x00, 0x00, }
+#define IN6ADDR_TEREDOPREFIX_INIT_OLD {0x3f, 0xfe, 0x83, 0x1f, }
+
+#define IN6ADDR_LINKLOCALPREFIX_LENGTH 64
+#define IN6ADDR_MULTICASTPREFIX_LENGTH 8
+#define IN6ADDR_SOLICITEDNODEMULTICASTPREFIX_LENGTH 104
+#define IN6ADDR_V4MAPPEDPREFIX_LENGTH 96
+#define IN6ADDR_6TO4PREFIX_LENGTH 16
+#define IN6ADDR_TEREDOPREFIX_LENGTH 32
+
+extern CONST SCOPE_ID scopeid_unspecified;
+
+extern CONST IN_ADDR in4addr_any;
+extern CONST IN_ADDR in4addr_loopback;
+extern CONST IN_ADDR in4addr_broadcast;
+extern CONST IN_ADDR in4addr_allnodesonlink;
+extern CONST IN_ADDR in4addr_allroutersonlink;
+extern CONST IN_ADDR in4addr_alligmpv3routersonlink;
+extern CONST IN_ADDR in4addr_allteredohostsonlink;
+extern CONST IN_ADDR in4addr_linklocalprefix;
+extern CONST IN_ADDR in4addr_multicastprefix;
+
+extern CONST IN6_ADDR in6addr_any;
+extern CONST IN6_ADDR in6addr_loopback;
+extern CONST IN6_ADDR in6addr_allnodesonnode;
+extern CONST IN6_ADDR in6addr_allnodesonlink;
+extern CONST IN6_ADDR in6addr_allroutersonlink;
+extern CONST IN6_ADDR in6addr_allmldv2routersonlink;
+extern CONST IN6_ADDR in6addr_teredoinitiallinklocaladdress;
+extern CONST IN6_ADDR in6addr_linklocalprefix;
+extern CONST IN6_ADDR in6addr_multicastprefix;
+extern CONST IN6_ADDR in6addr_solicitednodemulticastprefix;
+extern CONST IN6_ADDR in6addr_v4mappedprefix;
+extern CONST IN6_ADDR in6addr_6to4prefix;
+extern CONST IN6_ADDR in6addr_teredoprefix;
+extern CONST IN6_ADDR in6addr_teredoprefix_old;
+
+#ifndef __midl
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_ADDR_EQUAL(CONST IN6_ADDR *x, CONST IN6_ADDR *y) {
+ __int64 UNALIGNED *a;
+ __int64 UNALIGNED *b;
+
+ a = (__int64 UNALIGNED *)x;
+ b = (__int64 UNALIGNED *)y;
+ return (BOOLEAN)((a[1] == b[1]) && (a[0] == b[0]));
+}
+
+#define IN6_ARE_ADDR_EQUAL IN6_ADDR_EQUAL
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_UNSPECIFIED(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
+ (a->s6_words[1] == 0) &&
+ (a->s6_words[2] == 0) &&
+ (a->s6_words[3] == 0) &&
+ (a->s6_words[4] == 0) &&
+ (a->s6_words[5] == 0) &&
+ (a->s6_words[6] == 0) &&
+ (a->s6_words[7] == 0));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_LOOPBACK(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
+ (a->s6_words[1] == 0) &&
+ (a->s6_words[2] == 0) &&
+ (a->s6_words[3] == 0) &&
+ (a->s6_words[4] == 0) &&
+ (a->s6_words[5] == 0) &&
+ (a->s6_words[6] == 0) &&
+ (a->s6_words[7] == 0x0100));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_MULTICAST(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(a->s6_bytes[0] == 0xff);
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_EUI64(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(((a->s6_bytes[0] & 0xe0) != 0) &&
+ !IN6_IS_ADDR_MULTICAST(a));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_EUI64(a) &&
+ (a->s6_words[4] == 0) &&
+ (a->s6_words[5] == 0) &&
+ (a->s6_words[6] == 0) &&
+ (a->s6_words[7] == 0));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_EUI64(a) &&
+ (a->s6_words[4] == 0xfffd) &&
+ (a->s6_words[5] == 0xffff) &&
+ (a->s6_words[6] == 0xffff) &&
+ ((a->s6_words[7] & 0x80ff) == 0x80ff));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_ANYCAST(CONST IN6_ADDR *a) {
+ return (IN6_IS_ADDR_SUBNET_RESERVED_ANYCAST(a) ||
+ IN6_IS_ADDR_SUBNET_ROUTER_ANYCAST(a));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_LINKLOCAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
+ ((a->s6_bytes[1] & 0xc0) == 0x80));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_SITELOCAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_bytes[0] == 0xfe) &&
+ ((a->s6_bytes[1] & 0xc0) == 0xc0));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_GLOBAL(CONST IN6_ADDR *a) {
+ ULONG High = (a->s6_bytes[0] & 0xf0);
+ return (BOOLEAN)((High != 0) && (High != 0xf0));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_V4MAPPED(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
+ (a->s6_words[1] == 0) &&
+ (a->s6_words[2] == 0) &&
+ (a->s6_words[3] == 0) &&
+ (a->s6_words[4] == 0) &&
+ (a->s6_words[5] == 0xffff));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_V4COMPAT(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
+ (a->s6_words[1] == 0) &&
+ (a->s6_words[2] == 0) &&
+ (a->s6_words[3] == 0) &&
+ (a->s6_words[4] == 0) &&
+ (a->s6_words[5] == 0) &&
+ !((a->s6_words[6] == 0) &&
+ (a->s6_addr[14] == 0) &&
+ ((a->s6_addr[15] == 0) || (a->s6_addr[15] == 1))));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_V4TRANSLATED(CONST IN6_ADDR *a) {
+ return (BOOLEAN)((a->s6_words[0] == 0) &&
+ (a->s6_words[1] == 0) &&
+ (a->s6_words[2] == 0) &&
+ (a->s6_words[3] == 0) &&
+ (a->s6_words[4] == 0xffff) &&
+ (a->s6_words[5] == 0));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_MC_NODELOCAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
+ ((a->s6_bytes[1] & 0xf) == 1));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_MC_LINKLOCAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
+ ((a->s6_bytes[1] & 0xf) == 2));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_MC_SITELOCAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
+ ((a->s6_bytes[1] & 0xf) == 5));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_MC_ORGLOCAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
+ ((a->s6_bytes[1] & 0xf) == 8));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6_IS_ADDR_MC_GLOBAL(CONST IN6_ADDR *a) {
+ return (BOOLEAN)(IN6_IS_ADDR_MULTICAST(a) &&
+ ((a->s6_bytes[1] & 0xf) == 0xe));
+}
+
+WS2TCPIP_INLINE
+VOID
+IN6_SET_ADDR_UNSPECIFIED(PIN6_ADDR a) {
+ memset(a->s6_bytes, 0, sizeof(IN6_ADDR));
+}
+
+WS2TCPIP_INLINE
+VOID
+IN6_SET_ADDR_LOOPBACK(PIN6_ADDR a) {
+ memset(a->s6_bytes, 0, sizeof(IN6_ADDR));
+ a->s6_bytes[15] = 1;
+}
+
+WS2TCPIP_INLINE
+VOID
+IN6ADDR_SETANY(PSOCKADDR_IN6 a) {
+ a->sin6_family = AF_INET6;
+ a->sin6_port = 0;
+ a->sin6_flowinfo = 0;
+ IN6_SET_ADDR_UNSPECIFIED(&a->sin6_addr);
+ a->sin6_scope_id = 0;
+}
+
+WS2TCPIP_INLINE
+VOID
+IN6ADDR_SETLOOPBACK(PSOCKADDR_IN6 a) {
+ a->sin6_family = AF_INET6;
+ a->sin6_port = 0;
+ a->sin6_flowinfo = 0;
+ IN6_SET_ADDR_LOOPBACK(&a->sin6_addr);
+ a->sin6_scope_id = 0;
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6ADDR_ISANY(CONST SOCKADDR_IN6 *a) {
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
+ return IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr);
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6ADDR_ISLOOPBACK(CONST SOCKADDR_IN6 *a) {
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
+ return IN6_IS_ADDR_LOOPBACK(&a->sin6_addr);
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6ADDR_ISEQUAL(CONST SOCKADDR_IN6 *a, CONST SOCKADDR_IN6 *b) {
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
+ return (BOOLEAN)(a->sin6_scope_id == b->sin6_scope_id &&
+ IN6_ADDR_EQUAL(&a->sin6_addr, &b->sin6_addr));
+}
+
+WS2TCPIP_INLINE
+BOOLEAN
+IN6ADDR_ISUNSPECIFIED(CONST SOCKADDR_IN6 *a) {
+ WS2IPDEF_ASSERT(a->sin6_family == AF_INET6);
+ return (BOOLEAN)(a->sin6_scope_id == 0 &&
+ IN6_IS_ADDR_UNSPECIFIED(&a->sin6_addr));
+}
+
+#endif /* __midl */
+
+#endif /* (NTDDI_VERSION >= NTDDI_WIN2KSP1) */
+
+typedef enum _MULTICAST_MODE_TYPE {
+ MCAST_INCLUDE = 0,
+ MCAST_EXCLUDE
+} MULTICAST_MODE_TYPE;
+
+typedef struct ip_mreq {
+ IN_ADDR imr_multiaddr;
+ IN_ADDR imr_interface;
+} IP_MREQ, *PIP_MREQ;
+
+typedef struct ip_mreq_source {
+ IN_ADDR imr_multiaddr;
+ IN_ADDR imr_sourceaddr;
+ IN_ADDR imr_interface;
+} IP_MREQ_SOURCE, *PIP_MREQ_SOURCE;
+
+typedef struct ip_msfilter {
+ IN_ADDR imsf_multiaddr;
+ IN_ADDR imsf_interface;
+ MULTICAST_MODE_TYPE imsf_fmode;
+ ULONG imsf_numsrc;
+ IN_ADDR imsf_slist[1];
+} IP_MSFILTER, *PIP_MSFILTER;
+
+typedef struct ipv6_mreq {
+ IN6_ADDR ipv6mr_multiaddr;
+ ULONG ipv6mr_interface;
+} IPV6_MREQ, *PIPV6_MREQ;
+
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+
+typedef struct group_req {
+ ULONG gr_interface;
+ SOCKADDR_STORAGE gr_group;
+} GROUP_REQ, *PGROUP_REQ;
+
+typedef struct group_source_req {
+ ULONG gsr_interface;
+ SOCKADDR_STORAGE gsr_group;
+ SOCKADDR_STORAGE gsr_source;
+} GROUP_SOURCE_REQ, *PGROUP_SOURCE_REQ;
+
+typedef struct group_filter {
+ ULONG gf_interface;
+ SOCKADDR_STORAGE gf_group;
+ MULTICAST_MODE_TYPE gf_fmode;
+ ULONG gf_numsrc;
+ SOCKADDR_STORAGE gf_slist[1];
+} GROUP_FILTER, *PGROUP_FILTER;
+
+#define GROUP_FILTER_SIZE(numsrc) \
+ (sizeof(GROUP_FILTER) - sizeof(SOCKADDR_STORAGE) \
+ + (numsrc) * sizeof(SOCKADDR_STORAGE))
+
+#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
+
+typedef struct in_pktinfo {
+ IN_ADDR ipi_addr;
+ ULONG ipi_ifindex;
+} IN_PKTINFO, *PIN_PKTINFO;
+
+C_ASSERT(sizeof(IN_PKTINFO) == 8);
+
+typedef struct in6_pktinfo {
+ IN6_ADDR ipi6_addr;
+ ULONG ipi6_ifindex;
+} IN6_PKTINFO, *PIN6_PKTINFO;
+
+C_ASSERT(sizeof(IN6_PKTINFO) == 20);
#ifdef __cplusplus
}
#endif
-
-#endif