ntdll/tests: Check the alternate NT path only if it is present.
[wine.git] / include / iptypes.h
blobc1ee7322b019f62cc791360a559821c6e0481420
1 /* WINE iptypes.h
2 * Copyright (C) 2003 Juan Lang
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_IPTYPES_H_
20 #define WINE_IPTYPES_H_
22 #include <time.h>
23 #include <ifdef.h>
24 #include <nldef.h>
26 #define MAX_ADAPTER_DESCRIPTION_LENGTH 128
27 #define MAX_ADAPTER_NAME_LENGTH 256
28 #define MAX_ADAPTER_ADDRESS_LENGTH 8
29 #define MAX_HOSTNAME_LEN 128
30 #define MAX_DOMAIN_NAME_LEN 128
31 #define MAX_SCOPE_ID_LEN 256
32 #define MAX_DHCPV6_DUID_LENGTH 130
33 #define MAX_DNS_SUFFIX_STRING_LENGTH 256
35 #define BROADCAST_NODETYPE 1
36 #define PEER_TO_PEER_NODETYPE 2
37 #define MIXED_NODETYPE 4
38 #define HYBRID_NODETYPE 8
40 typedef struct {
41 char String[4 * 4];
42 } IP_ADDRESS_STRING, *PIP_ADDRESS_STRING, IP_MASK_STRING, *PIP_MASK_STRING;
44 typedef struct _IP_ADDR_STRING {
45 struct _IP_ADDR_STRING* Next;
46 IP_ADDRESS_STRING IpAddress;
47 IP_MASK_STRING IpMask;
48 DWORD Context;
49 } IP_ADDR_STRING, *PIP_ADDR_STRING;
51 typedef struct _IP_ADAPTER_INFO {
52 struct _IP_ADAPTER_INFO* Next;
53 DWORD ComboIndex;
54 char AdapterName[MAX_ADAPTER_NAME_LENGTH + 4];
55 char Description[MAX_ADAPTER_DESCRIPTION_LENGTH + 4];
56 UINT AddressLength;
57 BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH];
58 DWORD Index;
59 UINT Type;
60 UINT DhcpEnabled;
61 PIP_ADDR_STRING CurrentIpAddress;
62 IP_ADDR_STRING IpAddressList;
63 IP_ADDR_STRING GatewayList;
64 IP_ADDR_STRING DhcpServer;
65 BOOL HaveWins;
66 IP_ADDR_STRING PrimaryWinsServer;
67 IP_ADDR_STRING SecondaryWinsServer;
68 time_t LeaseObtained;
69 time_t LeaseExpires;
70 } IP_ADAPTER_INFO, *PIP_ADAPTER_INFO;
72 typedef struct _IP_PER_ADAPTER_INFO {
73 UINT AutoconfigEnabled;
74 UINT AutoconfigActive;
75 PIP_ADDR_STRING CurrentDnsServer;
76 IP_ADDR_STRING DnsServerList;
77 } IP_PER_ADAPTER_INFO, *PIP_PER_ADAPTER_INFO;
79 typedef struct {
80 char HostName[MAX_HOSTNAME_LEN + 4] ;
81 char DomainName[MAX_DOMAIN_NAME_LEN + 4];
82 PIP_ADDR_STRING CurrentDnsServer;
83 IP_ADDR_STRING DnsServerList;
84 UINT NodeType;
85 char ScopeId[MAX_SCOPE_ID_LEN + 4];
86 UINT EnableRouting;
87 UINT EnableProxy;
88 UINT EnableDns;
89 } FIXED_INFO, *PFIXED_INFO;
91 typedef NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN;
92 typedef NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN;
93 typedef NL_DAD_STATE IP_DAD_STATE;
95 #ifdef _WINSOCK2API_
97 #define IP_ADAPTER_ADDRESS_DNS_ELIGIBLE 0x00000001
98 #define IP_ADAPTER_ADDRESS_TRANSIENT 0x00000002
100 typedef struct _IP_ADAPTER_UNICAST_ADDRESS_LH {
101 union {
102 struct {
103 ULONG Length;
104 DWORD Flags;
105 } DUMMYSTRUCTNAME;
106 } DUMMYUNIONNAME;
107 struct _IP_ADAPTER_UNICAST_ADDRESS_LH *Next;
108 SOCKET_ADDRESS Address;
109 IP_PREFIX_ORIGIN PrefixOrigin;
110 IP_SUFFIX_ORIGIN SuffixOrigin;
111 IP_DAD_STATE DadState;
112 ULONG ValidLifetime;
113 ULONG PreferredLifetime;
114 ULONG LeaseLifetime;
115 UINT8 OnLinkPrefixLength;
116 } IP_ADAPTER_UNICAST_ADDRESS_LH, *PIP_ADAPTER_UNICAST_ADDRESS_LH;
118 typedef struct _IP_ADAPTER_UNICAST_ADDRESS_XP {
119 union {
120 struct {
121 ULONG Length;
122 DWORD Flags;
123 } DUMMYSTRUCTNAME;
124 } DUMMYUNIONNAME;
125 struct _IP_ADAPTER_UNICAST_ADDRESS_XP *Next;
126 SOCKET_ADDRESS Address;
127 IP_PREFIX_ORIGIN PrefixOrigin;
128 IP_SUFFIX_ORIGIN SuffixOrigin;
129 IP_DAD_STATE DadState;
130 ULONG ValidLifetime;
131 ULONG PreferredLifetime;
132 ULONG LeaseLifetime;
133 } IP_ADAPTER_UNICAST_ADDRESS_XP, *PIP_ADAPTER_UNICAST_ADDRESS_XP;
135 typedef IP_ADAPTER_UNICAST_ADDRESS_LH IP_ADAPTER_UNICAST_ADDRESS;
136 typedef IP_ADAPTER_UNICAST_ADDRESS_LH *PIP_ADAPTER_UNICAST_ADDRESS;
138 typedef struct _IP_ADAPTER_ANYCAST_ADDRESS {
139 union {
140 ULONGLONG Alignment;
141 struct {
142 ULONG Length;
143 DWORD Flags;
144 } DUMMYSTRUCTNAME;
145 } DUMMYUNIONNAME;
146 struct _IP_ADAPTER_ANYCAST_ADDRESS *Next;
147 SOCKET_ADDRESS Address;
148 } IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS;
150 typedef struct _IP_ADAPTER_MULTICAST_ADDRESS {
151 union {
152 ULONGLONG Alignment;
153 struct {
154 ULONG Length;
155 DWORD Flags;
156 } DUMMYSTRUCTNAME;
157 } DUMMYUNIONNAME;
158 struct _IP_ADAPTER_MULTICAST_ADDRESS *Next;
159 SOCKET_ADDRESS Address;
160 } IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS;
162 typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS {
163 union {
164 ULONGLONG Alignment;
165 struct {
166 ULONG Length;
167 DWORD Reserved;
168 } DUMMYSTRUCTNAME;
169 } DUMMYUNIONNAME;
170 struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next;
171 SOCKET_ADDRESS Address;
172 } IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS;
174 typedef struct _IP_ADAPTER_PREFIX {
175 union {
176 ULONGLONG Alignment;
177 struct {
178 ULONG Length;
179 DWORD Flags;
180 } DUMMYSTRUCTNAME;
181 } DUMMYUNIONNAME;
182 struct _IP_ADAPTER_PREFIX *Next;
183 SOCKET_ADDRESS Address;
184 ULONG PrefixLength;
185 } IP_ADAPTER_PREFIX, *PIP_ADAPTER_PREFIX;
187 typedef struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH {
188 union {
189 ULONGLONG Alignment;
190 struct {
191 ULONG Length;
192 DWORD Reserved;
193 } DUMMYSTRUCTNAME;
194 } DUMMYUNIONNAME;
195 struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH *Next;
196 SOCKET_ADDRESS Address;
197 } IP_ADAPTER_WINS_SERVER_ADDRESS_LH, *PIP_ADAPTER_WINS_SERVER_ADDRESS_LH;
198 typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH IP_ADAPTER_WINS_SERVER_ADDRESS;
199 typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH *PIP_ADAPTER_WINS_SERVER_ADDRESS;
201 typedef struct _IP_ADAPTER_GATEWAY_ADDRESS_LH {
202 union {
203 ULONGLONG Alignment;
204 struct {
205 ULONG Length;
206 DWORD Reserved;
207 } DUMMYSTRUCTNAME;
208 } DUMMYUNIONNAME;
209 struct _IP_ADAPTER_GATEWAY_ADDRESS_LH *Next;
210 SOCKET_ADDRESS Address;
211 } IP_ADAPTER_GATEWAY_ADDRESS_LH, *PIP_ADAPTER_GATEWAY_ADDRESS_LH;
212 typedef IP_ADAPTER_GATEWAY_ADDRESS_LH IP_ADAPTER_GATEWAY_ADDRESS;
213 typedef IP_ADAPTER_GATEWAY_ADDRESS_LH *PIP_ADAPTER_GATEWAY_ADDRESS;
215 typedef struct _IP_ADAPTER_DNS_SUFFIX {
216 struct _IP_ADAPTER_DNS_SUFFIX *Next;
217 WCHAR String[MAX_DNS_SUFFIX_STRING_LENGTH];
218 } IP_ADAPTER_DNS_SUFFIX, *PIP_ADAPTER_DNS_SUFFIX;
220 #define IP_ADAPTER_DDNS_ENABLED 0x1
221 #define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x2
222 #define IP_ADAPTER_DHCP_ENABLED 0x4
223 #define IP_ADAPTER_RECEIVE_ONLY 0x8
224 #define IP_ADAPTER_NO_MULTICAST 0x10
225 #define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x20
226 #define IP_ADAPTER_NETBIOS_OVER_TCPIP_ENABLED 0x40
227 #define IP_ADAPTER_IPV4_ENABLED 0x80
228 #define IP_ADAPTER_IPV6_ENABLED 0x100
229 #define IP_ADAPTER_IPV6_MANAGE_ADDRESS_CONFIG 0x200
231 typedef struct _IP_ADAPTER_ADDRESSES_LH {
232 union {
233 ULONGLONG Alignment;
234 struct {
235 ULONG Length;
236 DWORD IfIndex;
237 } DUMMYSTRUCTNAME;
238 } DUMMYUNIONNAME;
239 struct _IP_ADAPTER_ADDRESSES_LH *Next;
240 PCHAR AdapterName;
241 PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
242 PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress;
243 PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress;
244 PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress;
245 PWCHAR DnsSuffix;
246 PWCHAR Description;
247 PWCHAR FriendlyName;
248 BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
249 DWORD PhysicalAddressLength;
250 union {
251 DWORD Flags;
252 struct {
253 DWORD DdnsEnabled : 1;
254 DWORD RegisterAdapterSuffix : 1;
255 DWORD Dhcpv4Enabled : 1;
256 DWORD ReceiveOnly : 1;
257 DWORD NoMulticast : 1;
258 DWORD Ipv6OtherStatefulConfig : 1;
259 DWORD NetbiosOverTcpipEnabled : 1;
260 DWORD Ipv4Enabled : 1;
261 DWORD Ipv6Enabled : 1;
262 DWORD Ipv6ManagedAddressConfigurationSupported : 1;
263 } DUMMYSTRUCTNAME1;
264 } DUMMYUNIONNAME1;
265 DWORD Mtu;
266 DWORD IfType;
267 IF_OPER_STATUS OperStatus;
268 DWORD Ipv6IfIndex;
269 DWORD ZoneIndices[16];
270 PIP_ADAPTER_PREFIX FirstPrefix;
271 ULONG64 TransmitLinkSpeed;
272 ULONG64 ReceiveLinkSpeed;
273 PIP_ADAPTER_WINS_SERVER_ADDRESS_LH FirstWinsServerAddress;
274 PIP_ADAPTER_GATEWAY_ADDRESS_LH FirstGatewayAddress;
275 ULONG Ipv4Metric;
276 ULONG Ipv6Metric;
277 IF_LUID Luid;
278 SOCKET_ADDRESS Dhcpv4Server;
279 NET_IF_COMPARTMENT_ID CompartmentId;
280 NET_IF_NETWORK_GUID NetworkGuid;
281 NET_IF_CONNECTION_TYPE ConnectionType;
282 TUNNEL_TYPE TunnelType;
283 SOCKET_ADDRESS Dhcpv6Server;
284 BYTE Dhcpv6ClientDuid[MAX_DHCPV6_DUID_LENGTH];
285 ULONG Dhcpv6ClientDuidLength;
286 ULONG Dhcpv6Iaid;
287 PIP_ADAPTER_DNS_SUFFIX FirstDnsSuffix;
288 } IP_ADAPTER_ADDRESSES_LH, *PIP_ADAPTER_ADDRESSES_LH;
290 typedef struct _IP_ADAPTER_ADDRESSES_XP {
291 union {
292 ULONGLONG Alignment;
293 struct {
294 ULONG Length;
295 DWORD IfIndex;
296 } DUMMYSTRUCTNAME;
297 } DUMMYUNIONNAME;
298 struct _IP_ADAPTER_ADDRESSES_XP *Next;
299 PCHAR AdapterName;
300 PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
301 PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress;
302 PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress;
303 PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress;
304 PWCHAR DnsSuffix;
305 PWCHAR Description;
306 PWCHAR FriendlyName;
307 BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
308 DWORD PhysicalAddressLength;
309 DWORD Flags;
310 DWORD Mtu;
311 DWORD IfType;
312 IF_OPER_STATUS OperStatus;
313 DWORD Ipv6IfIndex;
314 DWORD ZoneIndices[16];
315 PIP_ADAPTER_PREFIX FirstPrefix;
316 } IP_ADAPTER_ADDRESSES_XP, *PIP_ADAPTER_ADDRESSES_XP;
318 typedef IP_ADAPTER_ADDRESSES_LH IP_ADAPTER_ADDRESSES;
319 typedef IP_ADAPTER_ADDRESSES_LH *PIP_ADAPTER_ADDRESSES;
321 #define GAA_FLAG_SKIP_UNICAST 0x00000001
322 #define GAA_FLAG_SKIP_ANYCAST 0x00000002
323 #define GAA_FLAG_SKIP_MULTICAST 0x00000004
324 #define GAA_FLAG_SKIP_DNS_SERVER 0x00000008
325 #define GAA_FLAG_INCLUDE_PREFIX 0x00000010
326 #define GAA_FLAG_SKIP_FRIENDLY_NAME 0x00000020
327 #define GAA_FLAG_INCLUDE_WINS_INFO 0x00000040
328 #define GAA_FLAG_INCLUDE_ALL_GATEWAYS 0x00000080
329 #define GAA_FLAG_INCLUDE_ALL_INTERFACES 0x00000100
330 #define GAA_FLAG_INCLUDE_ALL_COMPARTMENTS 0x00000200
331 #define GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER 0x00000400
333 #endif /* _WINSOCK2API_ */
335 #endif /* WINE_IPTYPES_H_*/