mfmediaengine: Handle Play() when called before topology is set.
[wine.git] / dlls / ws2_32 / ws2_32_private.h
blobb70f4a1595da1dc5f1c2f9c2f01fe0d0dcca21f6
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 <stdarg.h>
23 #include <stdio.h>
24 #include <string.h>
25 #include <sys/types.h>
26 #include <limits.h>
27 #ifdef HAVE_SYS_IPC_H
28 # include <sys/ipc.h>
29 #endif
30 #ifdef HAVE_SYS_IOCTL_H
31 # include <sys/ioctl.h>
32 #endif
33 #ifdef HAVE_SYS_FILIO_H
34 # include <sys/filio.h>
35 #endif
36 #ifdef HAVE_SYS_SOCKIO_H
37 # include <sys/sockio.h>
38 #endif
40 #if defined(__EMX__)
41 # include <sys/so_ioctl.h>
42 #endif
44 #ifdef HAVE_SYS_PARAM_H
45 # include <sys/param.h>
46 #endif
48 #ifdef HAVE_SYS_MSG_H
49 # include <sys/msg.h>
50 #endif
51 #ifdef HAVE_SYS_WAIT_H
52 # include <sys/wait.h>
53 #endif
54 #ifdef HAVE_SYS_UIO_H
55 # include <sys/uio.h>
56 #endif
57 #ifdef HAVE_SYS_SOCKET_H
58 #include <sys/socket.h>
59 #endif
60 #ifdef HAVE_NETINET_IN_H
61 # include <netinet/in.h>
62 #endif
63 #ifdef HAVE_NETINET_TCP_H
64 # include <netinet/tcp.h>
65 #endif
66 #ifdef HAVE_ARPA_INET_H
67 # include <arpa/inet.h>
68 #endif
69 #include <ctype.h>
70 #include <fcntl.h>
71 #include <errno.h>
72 #ifdef HAVE_NETDB_H
73 #include <netdb.h>
74 #endif
75 #ifdef HAVE_UNISTD_H
76 # include <unistd.h>
77 #endif
78 #include <stdlib.h>
79 #ifdef HAVE_ARPA_NAMESER_H
80 # include <arpa/nameser.h>
81 #endif
82 #ifdef HAVE_RESOLV_H
83 # include <resolv.h>
84 #endif
85 #ifdef HAVE_NET_IF_H
86 # define if_indextoname unix_if_indextoname
87 # define if_nametoindex unix_if_nametoindex
88 # include <net/if.h>
89 # undef if_indextoname
90 # undef if_nametoindex
91 #endif
92 #ifdef HAVE_IFADDRS_H
93 # include <ifaddrs.h>
94 #endif
96 #ifdef HAVE_NETIPX_IPX_H
97 # include <netipx/ipx.h>
98 #elif defined(HAVE_LINUX_IPX_H)
99 # ifdef HAVE_ASM_TYPES_H
100 # include <asm/types.h>
101 # endif
102 # ifdef HAVE_LINUX_TYPES_H
103 # include <linux/types.h>
104 # endif
105 # include <linux/ipx.h>
106 #endif
107 #if defined(SOL_IPX) || defined(SO_DEFAULT_HEADERS)
108 # define HAS_IPX
109 #endif
111 #ifdef HAVE_LINUX_IRDA_H
112 # ifdef HAVE_LINUX_TYPES_H
113 # include <linux/types.h>
114 # endif
115 # include <linux/irda.h>
116 # define HAS_IRDA
117 #endif
119 #ifdef HAVE_POLL_H
120 #include <poll.h>
121 #endif
122 #ifdef HAVE_SYS_POLL_H
123 # include <sys/poll.h>
124 #endif
125 #ifdef HAVE_SYS_TIME_H
126 # include <sys/time.h>
127 #endif
129 #define NONAMELESSUNION
130 #define NONAMELESSSTRUCT
131 #include "ntstatus.h"
132 #define WIN32_NO_STATUS
133 #include "windef.h"
134 #include "winbase.h"
135 #include "wingdi.h"
136 #include "winuser.h"
137 #include "winerror.h"
138 #include "winnls.h"
139 #include "winsock2.h"
140 #include "mswsock.h"
141 #include "ws2tcpip.h"
142 #include "ws2spi.h"
143 #include "wsipx.h"
144 #include "wsnwlink.h"
145 #include "wshisotp.h"
146 #include "mstcpip.h"
147 #include "af_irda.h"
148 #include "winnt.h"
149 #define USE_WC_PREFIX /* For CMSG_DATA */
150 #include "iphlpapi.h"
151 #include "ip2string.h"
152 #include "wine/afd.h"
153 #include "wine/server.h"
154 #include "wine/debug.h"
155 #include "wine/exception.h"
156 #include "wine/unicode.h"
157 #include "wine/heap.h"
159 #define DECLARE_CRITICAL_SECTION(cs) \
160 static CRITICAL_SECTION cs; \
161 static CRITICAL_SECTION_DEBUG cs##_debug = \
162 { 0, 0, &cs, { &cs##_debug.ProcessLocksList, &cs##_debug.ProcessLocksList }, \
163 0, 0, { (DWORD_PTR)(__FILE__ ": " # cs) }}; \
164 static CRITICAL_SECTION cs = { &cs##_debug, -1, 0, 0, 0, 0 }
166 static const char magic_loopback_addr[] = {127, 12, 34, 56};
168 union generic_unix_sockaddr
170 struct sockaddr addr;
171 char data[128]; /* should be big enough for all families */
174 int convert_eai_u2w( int ret ) DECLSPEC_HIDDEN;
175 int convert_socktype_u2w( int type ) DECLSPEC_HIDDEN;
176 int convert_socktype_w2u( int type ) DECLSPEC_HIDDEN;
177 int ws_sockaddr_u2ws( const struct sockaddr *unix_addr, struct WS_sockaddr *win_addr,
178 int *win_addr_len ) DECLSPEC_HIDDEN;
179 unsigned int ws_sockaddr_ws2u( const struct WS_sockaddr *win_addr, int win_addr_len,
180 union generic_unix_sockaddr *unix_addr ) DECLSPEC_HIDDEN;
182 const char *debugstr_sockaddr( const struct WS_sockaddr *addr ) DECLSPEC_HIDDEN;
184 UINT sock_get_error( int err ) DECLSPEC_HIDDEN;
186 struct per_thread_data
188 HANDLE sync_event; /* event to wait on for synchronous ioctls */
189 int opentype;
190 struct WS_hostent *he_buffer;
191 struct WS_servent *se_buffer;
192 struct WS_protoent *pe_buffer;
193 int he_len;
194 int se_len;
195 int pe_len;
196 char ntoa_buffer[16]; /* 4*3 digits + 3 '.' + 1 '\0' */
199 extern int num_startup;
201 struct per_thread_data *get_per_thread_data(void) DECLSPEC_HIDDEN;
203 #endif