Implemented IMemAllocator.
[wine] / include / wine / winsock16.h
1 #ifndef __WINE_WINE_WINSOCK16_H
2 #define __WINE_WINE_WINSOCK16_H
3
4 #include "windef.h"
5 #include "pshpack1.h"
6
7 typedef UINT16 SOCKET16;
8
9 typedef struct
10 {
11         UINT16    fd_count;               /* how many are SET? */
12         SOCKET16  fd_array[FD_SETSIZE];   /* an array of SOCKETs */
13 } ws_fd_set16;
14
15 /* ws_hostent16, ws_protoent16, ws_servent16, ws_netent16
16  * are 1-byte aligned here ! */
17 typedef struct ws_hostent16
18 {
19         SEGPTR  h_name;         /* official name of host */
20         SEGPTR  h_aliases;      /* alias list */
21         INT16   h_addrtype;     /* host address type */
22         INT16   h_length;       /* length of address */
23         SEGPTR  h_addr_list;    /* list of addresses from name server */
24 } _ws_hostent16;
25
26 typedef struct ws_protoent16
27 {
28         SEGPTR  p_name;         /* official protocol name */
29         SEGPTR  p_aliases;      /* alias list */
30         INT16   p_proto;        /* protocol # */
31 } _ws_protoent16;
32
33 typedef struct ws_servent16
34 {
35         SEGPTR  s_name;         /* official service name */
36         SEGPTR  s_aliases;      /* alias list */
37         INT16   s_port;         /* port # */
38         SEGPTR  s_proto;        /* protocol to use */
39 } _ws_servent16;
40
41 typedef struct ws_netent16
42 {
43         SEGPTR  n_name;         /* official name of net */
44         SEGPTR  n_aliases;      /* alias list */
45         INT16   n_addrtype;     /* net address type */
46         INT     n_net;          /* network # */
47 } _ws_netent16;
48
49 typedef struct WSAData16
50 {
51     WORD                    wVersion;
52     WORD                    wHighVersion;
53     char                    szDescription[WSADESCRIPTION_LEN+1];
54     char                    szSystemStatus[WSASYS_STATUS_LEN+1];
55     WORD                    iMaxSockets;
56     WORD                    iMaxUdpDg;
57     SEGPTR                  lpVendorInfo;
58 } WSADATA16, *LPWSADATA16;
59
60 #include "poppack.h"
61
62 #define WS_FD_CLR16(fd, set)   __WS_FD_CLR((fd),(set), ws_fd_set16)
63 #define WS_FD_SET16(fd, set)   __WS_FD_SET((fd),(set), ws_fd_set16)
64 #define WS_FD_ZERO16(set)      (((ws_fd_set16*)(set))->fd_count=0)
65 #define WS_FD_ISSET16(fd, set) __WSAFDIsSet16((SOCKET16)(fd), (ws_fd_set16*)(set))
66
67 #define INVALID_SOCKET16  ((SOCKET16)(~0))
68
69 INT16     WINAPI __WSAFDIsSet16( SOCKET16, ws_fd_set16 * );
70 INT16     WINAPI WSAStartup16(UINT16 wVersionRequired, LPWSADATA16 lpWSAData);
71 void      WINAPI WSASetLastError16(INT16 iError);
72 INT16     WINAPI WSAUnhookBlockingHook16(void);
73 FARPROC16 WINAPI WSASetBlockingHook16(FARPROC16 lpBlockFunc);
74 HANDLE16  WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 wMsg, LPCSTR name, LPCSTR proto,
75                                          SEGPTR buf, INT16 buflen);
76 HANDLE16  WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 wMsg, INT16 port,
77                                          LPCSTR proto, SEGPTR buf, INT16 buflen);
78 HANDLE16  WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 wMsg,
79                                           LPCSTR name, SEGPTR buf, INT16 buflen);
80 HANDLE16  WINAPI WSAAsyncGetProtoByNumber16(HWND16 hWnd, UINT16 wMsg,
81                                             INT16 number, SEGPTR buf, INT16 buflen);
82 HANDLE16  WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 wMsg,
83                                          LPCSTR name, SEGPTR buf, INT16 buflen);
84 HANDLE16  WINAPI WSAAsyncGetHostByAddr16(HWND16 hWnd, UINT16 wMsg, LPCSTR addr,
85                               INT16 len, INT16 type, SEGPTR buf, INT16 buflen);
86 INT16     WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle);
87 INT16     WINAPI WSAAsyncSelect16(SOCKET16 s, HWND16 hWnd, UINT16 wMsg, LONG lEvent);
88 INT16     WINAPI WSARecvEx16(SOCKET16 s, char *buf, INT16 len, INT16 *flags);
89
90 #endif /* __WINE_WINE_WINSOCK16_H */