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_
24 #define MAX_ADAPTER_DESCRIPTION_LENGTH 128
25 #define MAX_ADAPTER_NAME_LENGTH 256
26 #define MAX_ADAPTER_ADDRESS_LENGTH 8
27 #define MAX_HOSTNAME_LEN 128
28 #define MAX_DOMAIN_NAME_LEN 128
29 #define MAX_SCOPE_ID_LEN 256
31 #define BROADCAST_NODETYPE 1
32 #define PEER_TO_PEER_NODETYPE 2
33 #define MIXED_NODETYPE 4
34 #define HYBRID_NODETYPE 8
38 } IP_ADDRESS_STRING
, *PIP_ADDRESS_STRING
, IP_MASK_STRING
, *PIP_MASK_STRING
;
40 typedef struct _IP_ADDR_STRING
{
41 struct _IP_ADDR_STRING
* Next
;
42 IP_ADDRESS_STRING IpAddress
;
43 IP_MASK_STRING IpMask
;
45 } IP_ADDR_STRING
, *PIP_ADDR_STRING
;
47 typedef struct _IP_ADAPTER_INFO
{
48 struct _IP_ADAPTER_INFO
* Next
;
50 char AdapterName
[MAX_ADAPTER_NAME_LENGTH
+ 4];
51 char Description
[MAX_ADAPTER_DESCRIPTION_LENGTH
+ 4];
53 BYTE Address
[MAX_ADAPTER_ADDRESS_LENGTH
];
57 PIP_ADDR_STRING CurrentIpAddress
;
58 IP_ADDR_STRING IpAddressList
;
59 IP_ADDR_STRING GatewayList
;
60 IP_ADDR_STRING DhcpServer
;
62 IP_ADDR_STRING PrimaryWinsServer
;
63 IP_ADDR_STRING SecondaryWinsServer
;
66 } IP_ADAPTER_INFO
, *PIP_ADAPTER_INFO
;
68 typedef struct _IP_PER_ADAPTER_INFO
{
69 UINT AutoconfigEnabled
;
70 UINT AutoconfigActive
;
71 PIP_ADDR_STRING CurrentDnsServer
;
72 IP_ADDR_STRING DnsServerList
;
73 } IP_PER_ADAPTER_INFO
, *PIP_PER_ADAPTER_INFO
;
76 char HostName
[MAX_HOSTNAME_LEN
+ 4] ;
77 char DomainName
[MAX_DOMAIN_NAME_LEN
+ 4];
78 PIP_ADDR_STRING CurrentDnsServer
;
79 IP_ADDR_STRING DnsServerList
;
81 char ScopeId
[MAX_SCOPE_ID_LEN
+ 4];
85 } FIXED_INFO
, *PFIXED_INFO
;
88 IpPrefixOriginOther
= 0,
90 IpPrefixOriginWellKnown
,
92 IpPrefixOriginRouterAdvertisement
,
93 IpPrefixOriginUnchanged
= 16
97 IpSuffixOriginOther
= 0,
99 IpSuffixOriginWellKnown
,
101 IpSuffixOriginLinkLayerAddress
,
102 IpSuffixOriginRandom
,
103 IpSuffixOriginUnchanged
= 16
112 IfOperStatusNotPresent
,
113 IfOperStatusLowerLayerDown
117 IpDadStateInvalid
= 0,
120 IpDadStateDeprecated
,
126 typedef struct _IP_ADAPTER_UNICAST_ADDRESS
{
133 struct _IP_ADAPTER_UNICAST_ADDRESS
*Next
;
134 SOCKET_ADDRESS Address
;
135 IP_PREFIX_ORIGIN PrefixOrigin
;
136 IP_SUFFIX_ORIGIN SuffixOrigin
;
137 IP_DAD_STATE DadState
;
139 ULONG PreferredLifetime
;
141 } IP_ADAPTER_UNICAST_ADDRESS
, *PIP_ADAPTER_UNICAST_ADDRESS
;
143 typedef struct _IP_ADAPTER_ANYCAST_ADDRESS
{
151 struct _IP_ADAPTER_ANYCAST_ADDRESS
*Next
;
152 SOCKET_ADDRESS Address
;
153 } IP_ADAPTER_ANYCAST_ADDRESS
, *PIP_ADAPTER_ANYCAST_ADDRESS
;
155 typedef struct _IP_ADAPTER_MULTICAST_ADDRESS
{
163 struct _IP_ADAPTER_MULTICAST_ADDRESS
*Next
;
164 SOCKET_ADDRESS Address
;
165 } IP_ADAPTER_MULTICAST_ADDRESS
, *PIP_ADAPTER_MULTICAST_ADDRESS
;
167 typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS
{
175 struct _IP_ADAPTER_DNS_SERVER_ADDRESS
*Next
;
176 SOCKET_ADDRESS Address
;
177 } IP_ADAPTER_DNS_SERVER_ADDRESS
, *PIP_ADAPTER_DNS_SERVER_ADDRESS
;
179 typedef struct _IP_ADAPTER_PREFIX
{
187 struct _IP_ADAPTER_PREFIX
*Next
;
188 SOCKET_ADDRESS Address
;
190 } IP_ADAPTER_PREFIX
, *PIP_ADAPTER_PREFIX
;
192 #define IP_ADAPTER_DDNS_ENABLED 0x1
193 #define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x2
194 #define IP_ADAPTER_DHCP_ENABLED 0x4
195 #define IP_ADAPTER_RECEIVE_ONLY 0x8
196 #define IP_ADAPTER_NO_MULTICAST 0x10
197 #define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x20
198 #define IP_ADAPTER_NETBIOS_OVER_TCPIP_ENABLED 0x40
199 #define IP_ADAPTER_IPV4_ENABLED 0x80
200 #define IP_ADAPTER_IPV6_ENABLED 0x100
201 #define IP_ADAPTER_IPV6_MANAGE_ADDRESS_CONFIG 0x200
203 typedef struct _IP_ADAPTER_ADDRESSES
{
211 struct _IP_ADAPTER_ADDRESSES
*Next
;
213 PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress
;
214 PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress
;
215 PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress
;
216 PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress
;
220 BYTE PhysicalAddress
[MAX_ADAPTER_ADDRESS_LENGTH
];
221 DWORD PhysicalAddressLength
;
225 IF_OPER_STATUS OperStatus
;
227 DWORD ZoneIndices
[16];
228 PIP_ADAPTER_PREFIX FirstPrefix
;
229 } IP_ADAPTER_ADDRESSES
, *PIP_ADAPTER_ADDRESSES
;
231 #endif /* _WINSOCK2API_ */
233 #endif /* WINE_IPTYPES_H_*/