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_
25 #define MAX_ADAPTER_DESCRIPTION_LENGTH 128
26 #define MAX_ADAPTER_NAME_LENGTH 256
27 #define MAX_ADAPTER_ADDRESS_LENGTH 8
28 #define MAX_HOSTNAME_LEN 128
29 #define MAX_DOMAIN_NAME_LEN 128
30 #define MAX_SCOPE_ID_LEN 256
31 #define MAX_DHCPV6_DUID_LENGTH 130
32 #define MAX_DNS_SUFFIX_STRING_LENGTH 256
34 #define BROADCAST_NODETYPE 1
35 #define PEER_TO_PEER_NODETYPE 2
36 #define MIXED_NODETYPE 4
37 #define HYBRID_NODETYPE 8
41 } IP_ADDRESS_STRING
, *PIP_ADDRESS_STRING
, IP_MASK_STRING
, *PIP_MASK_STRING
;
43 typedef struct _IP_ADDR_STRING
{
44 struct _IP_ADDR_STRING
* Next
;
45 IP_ADDRESS_STRING IpAddress
;
46 IP_MASK_STRING IpMask
;
48 } IP_ADDR_STRING
, *PIP_ADDR_STRING
;
50 typedef struct _IP_ADAPTER_INFO
{
51 struct _IP_ADAPTER_INFO
* Next
;
53 char AdapterName
[MAX_ADAPTER_NAME_LENGTH
+ 4];
54 char Description
[MAX_ADAPTER_DESCRIPTION_LENGTH
+ 4];
56 BYTE Address
[MAX_ADAPTER_ADDRESS_LENGTH
];
60 PIP_ADDR_STRING CurrentIpAddress
;
61 IP_ADDR_STRING IpAddressList
;
62 IP_ADDR_STRING GatewayList
;
63 IP_ADDR_STRING DhcpServer
;
65 IP_ADDR_STRING PrimaryWinsServer
;
66 IP_ADDR_STRING SecondaryWinsServer
;
69 } IP_ADAPTER_INFO
, *PIP_ADAPTER_INFO
;
71 typedef struct _IP_PER_ADAPTER_INFO
{
72 UINT AutoconfigEnabled
;
73 UINT AutoconfigActive
;
74 PIP_ADDR_STRING CurrentDnsServer
;
75 IP_ADDR_STRING DnsServerList
;
76 } IP_PER_ADAPTER_INFO
, *PIP_PER_ADAPTER_INFO
;
79 char HostName
[MAX_HOSTNAME_LEN
+ 4] ;
80 char DomainName
[MAX_DOMAIN_NAME_LEN
+ 4];
81 PIP_ADDR_STRING CurrentDnsServer
;
82 IP_ADDR_STRING DnsServerList
;
84 char ScopeId
[MAX_SCOPE_ID_LEN
+ 4];
88 } FIXED_INFO
, *PFIXED_INFO
;
91 IpPrefixOriginOther
= 0,
93 IpPrefixOriginWellKnown
,
95 IpPrefixOriginRouterAdvertisement
,
96 IpPrefixOriginUnchanged
= 16
100 IpSuffixOriginOther
= 0,
101 IpSuffixOriginManual
,
102 IpSuffixOriginWellKnown
,
104 IpSuffixOriginLinkLayerAddress
,
105 IpSuffixOriginRandom
,
106 IpSuffixOriginUnchanged
= 16
110 IpDadStateInvalid
= 0,
113 IpDadStateDeprecated
,
119 typedef struct _IP_ADAPTER_UNICAST_ADDRESS
{
126 struct _IP_ADAPTER_UNICAST_ADDRESS
*Next
;
127 SOCKET_ADDRESS Address
;
128 IP_PREFIX_ORIGIN PrefixOrigin
;
129 IP_SUFFIX_ORIGIN SuffixOrigin
;
130 IP_DAD_STATE DadState
;
132 ULONG PreferredLifetime
;
134 } IP_ADAPTER_UNICAST_ADDRESS
, *PIP_ADAPTER_UNICAST_ADDRESS
;
136 typedef struct _IP_ADAPTER_ANYCAST_ADDRESS
{
144 struct _IP_ADAPTER_ANYCAST_ADDRESS
*Next
;
145 SOCKET_ADDRESS Address
;
146 } IP_ADAPTER_ANYCAST_ADDRESS
, *PIP_ADAPTER_ANYCAST_ADDRESS
;
148 typedef struct _IP_ADAPTER_MULTICAST_ADDRESS
{
156 struct _IP_ADAPTER_MULTICAST_ADDRESS
*Next
;
157 SOCKET_ADDRESS Address
;
158 } IP_ADAPTER_MULTICAST_ADDRESS
, *PIP_ADAPTER_MULTICAST_ADDRESS
;
160 typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS
{
168 struct _IP_ADAPTER_DNS_SERVER_ADDRESS
*Next
;
169 SOCKET_ADDRESS Address
;
170 } IP_ADAPTER_DNS_SERVER_ADDRESS
, *PIP_ADAPTER_DNS_SERVER_ADDRESS
;
172 typedef struct _IP_ADAPTER_PREFIX
{
180 struct _IP_ADAPTER_PREFIX
*Next
;
181 SOCKET_ADDRESS Address
;
183 } IP_ADAPTER_PREFIX
, *PIP_ADAPTER_PREFIX
;
185 typedef struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH
{
193 struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH
*Next
;
194 SOCKET_ADDRESS Address
;
195 } IP_ADAPTER_WINS_SERVER_ADDRESS_LH
, *PIP_ADAPTER_WINS_SERVER_ADDRESS_LH
;
196 typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH IP_ADAPTER_WINS_SERVER_ADDRESS
;
197 typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH
*PIP_ADAPTER_WINS_SERVER_ADDRESS
;
199 typedef struct _IP_ADAPTER_GATEWAY_ADDRESS_LH
{
207 struct _IP_ADAPTER_GATEWAY_ADDRESS_LH
*Next
;
208 SOCKET_ADDRESS Address
;
209 } IP_ADAPTER_GATEWAY_ADDRESS_LH
, *PIP_ADAPTER_GATEWAY_ADDRESS_LH
;
210 typedef IP_ADAPTER_GATEWAY_ADDRESS_LH IP_ADAPTER_GATEWAY_ADDRESS
;
211 typedef IP_ADAPTER_GATEWAY_ADDRESS_LH
*PIP_ADAPTER_GATEWAY_ADDRESS
;
213 #define IP_ADAPTER_DDNS_ENABLED 0x1
214 #define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x2
215 #define IP_ADAPTER_DHCP_ENABLED 0x4
216 #define IP_ADAPTER_RECEIVE_ONLY 0x8
217 #define IP_ADAPTER_NO_MULTICAST 0x10
218 #define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x20
219 #define IP_ADAPTER_NETBIOS_OVER_TCPIP_ENABLED 0x40
220 #define IP_ADAPTER_IPV4_ENABLED 0x80
221 #define IP_ADAPTER_IPV6_ENABLED 0x100
222 #define IP_ADAPTER_IPV6_MANAGE_ADDRESS_CONFIG 0x200
224 typedef struct _IP_ADAPTER_ADDRESSES
{
232 struct _IP_ADAPTER_ADDRESSES
*Next
;
234 PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress
;
235 PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress
;
236 PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress
;
237 PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress
;
241 BYTE PhysicalAddress
[MAX_ADAPTER_ADDRESS_LENGTH
];
242 DWORD PhysicalAddressLength
;
246 IF_OPER_STATUS OperStatus
;
248 DWORD ZoneIndices
[16];
249 PIP_ADAPTER_PREFIX FirstPrefix
;
250 ULONG64 TransmitLinkSpeed
;
251 ULONG64 ReceiveLinkSpeed
;
252 PIP_ADAPTER_WINS_SERVER_ADDRESS_LH FirstWinsServerAddress
;
253 PIP_ADAPTER_GATEWAY_ADDRESS_LH FirstGatewayAddress
;
257 SOCKET_ADDRESS Dhcpv4Server
;
258 NET_IF_COMPARTMENT_ID CompartmentId
;
259 NET_IF_NETWORK_GUID NetworkGuid
;
260 NET_IF_CONNECTION_TYPE ConnectionType
;
261 TUNNEL_TYPE TunnelType
;
262 SOCKET_ADDRESS Dhcpv6Server
;
263 BYTE Dhcpv6ClientDuid
[MAX_DHCPV6_DUID_LENGTH
];
264 ULONG Dhcpv6ClientDuidLength
;
266 } IP_ADAPTER_ADDRESSES
, *PIP_ADAPTER_ADDRESSES
;
268 #define GAA_FLAG_SKIP_UNICAST 0x00000001
269 #define GAA_FLAG_SKIP_ANYCAST 0x00000002
270 #define GAA_FLAG_SKIP_MULTICAST 0x00000004
271 #define GAA_FLAG_SKIP_DNS_SERVER 0x00000008
272 #define GAA_FLAG_INCLUDE_PREFIX 0x00000010
273 #define GAA_FLAG_SKIP_FRIENDLY_NAME 0x00000020
274 #define GAA_FLAG_INCLUDE_WINS_INFO 0x00000040
275 #define GAA_FLAG_INCLUDE_ALL_GATEWAYS 0x00000080
276 #define GAA_FLAG_INCLUDE_ALL_INTERFACES 0x00000100
277 #define GAA_FLAG_INCLUDE_ALL_COMPARTMENTS 0x00000200
278 #define GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER 0x00000400
280 #endif /* _WINSOCK2API_ */
282 #endif /* WINE_IPTYPES_H_*/