sapi: Add SpMMAudioOut stub.
[wine.git] / dlls / ws2_32 / ws2_32_private.h
blob41d9e5124885933eef8c351b3a8d76f668a4fe3b
1 /*
2 * Copyright (C) 2021 Zebediah Figura for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_WS2_32_PRIVATE_H
20 #define __WINE_WS2_32_PRIVATE_H
22 #include <assert.h>
23 #include <stdarg.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27 #include <limits.h>
29 #define NONAMELESSUNION
30 #define NONAMELESSSTRUCT
31 #include "ntstatus.h"
32 #define WIN32_NO_STATUS
33 #include "windef.h"
34 #include "winbase.h"
35 #include "wingdi.h"
36 #include "winuser.h"
37 #include "winerror.h"
38 #include "winnls.h"
39 #include "winsock2.h"
40 #include "mswsock.h"
41 #include "ws2tcpip.h"
42 #include "ws2spi.h"
43 #include "wsipx.h"
44 #include "wsnwlink.h"
45 #include "wshisotp.h"
46 #include "mstcpip.h"
47 #include "af_irda.h"
48 #include "winnt.h"
49 #define USE_WC_PREFIX /* For CMSG_DATA */
50 #include "iphlpapi.h"
51 #include "ip2string.h"
52 #include "windns.h"
53 #include "wine/afd.h"
54 #include "wine/debug.h"
55 #include "wine/unixlib.h"
57 #define DECLARE_CRITICAL_SECTION(cs) \
58 static CRITICAL_SECTION cs; \
59 static CRITICAL_SECTION_DEBUG cs##_debug = \
60 { 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
61 0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
62 static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 }
64 static inline char *strdupWtoA( const WCHAR *str )
66 char *ret = NULL;
67 if (str)
69 DWORD len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL );
70 if ((ret = malloc( len )))
71 WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL );
73 return ret;
76 static const char magic_loopback_addr[] = {127, 12, 34, 56};
78 const char *debugstr_sockaddr( const struct sockaddr *addr ) DECLSPEC_HIDDEN;
80 struct per_thread_data
82 HANDLE sync_event; /* event to wait on for synchronous ioctls */
83 int opentype;
84 struct hostent *he_buffer;
85 struct servent *se_buffer;
86 struct protoent *pe_buffer;
87 int he_len;
88 int se_len;
89 int pe_len;
90 char ntoa_buffer[16]; /* 4*3 digits + 3 '.' + 1 '\0' */
93 extern int num_startup;
95 struct per_thread_data *get_per_thread_data(void) DECLSPEC_HIDDEN;
97 struct getaddrinfo_params
99 const char *node;
100 const char *service;
101 const struct WS(addrinfo) *hints;
102 struct WS(addrinfo) *info;
103 unsigned int *size;
106 struct gethostbyaddr_params
108 const void *addr;
109 int len;
110 int family;
111 struct WS(hostent) *host;
112 unsigned int *size;
115 struct gethostbyname_params
117 const char *name;
118 struct WS(hostent) *host;
119 unsigned int *size;
122 struct gethostname_params
124 char *name;
125 unsigned int size;
128 struct getnameinfo_params
130 const struct WS(sockaddr) *addr;
131 int addr_len;
132 char *host;
133 DWORD host_len;
134 char *serv;
135 DWORD serv_len;
136 int flags;
139 enum ws_unix_funcs
141 ws_unix_getaddrinfo,
142 ws_unix_gethostbyaddr,
143 ws_unix_gethostbyname,
144 ws_unix_gethostname,
145 ws_unix_getnameinfo,
148 #endif