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
29 #define NONAMELESSUNION
30 #define NONAMELESSSTRUCT
32 #define WIN32_NO_STATUS
49 #define USE_WC_PREFIX /* For CMSG_DATA */
51 #include "ip2string.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 const char magic_loopback_addr
[] = {127, 12, 34, 56};
66 const char *debugstr_sockaddr( const struct sockaddr
*addr
) DECLSPEC_HIDDEN
;
68 struct per_thread_data
70 HANDLE sync_event
; /* event to wait on for synchronous ioctls */
72 struct hostent
*he_buffer
;
73 struct servent
*se_buffer
;
74 struct protoent
*pe_buffer
;
78 char ntoa_buffer
[16]; /* 4*3 digits + 3 '.' + 1 '\0' */
81 extern int num_startup
;
83 struct per_thread_data
*get_per_thread_data(void) DECLSPEC_HIDDEN
;
85 struct getaddrinfo_params
89 const struct WS(addrinfo
) *hints
;
90 struct WS(addrinfo
) *info
;
94 struct gethostbyaddr_params
99 struct WS(hostent
) *host
;
103 struct gethostbyname_params
106 struct WS(hostent
) *host
;
110 struct gethostname_params
116 struct getnameinfo_params
118 const struct WS(sockaddr
) *addr
;
130 ws_unix_gethostbyaddr
,
131 ws_unix_gethostbyname
,
136 extern unixlib_handle_t ws_unix_handle DECLSPEC_HIDDEN
;