ReactOS  0.4.13-dev-242-g611e6d7
iptypes.h
Go to the documentation of this file.
1 /* WINE iptypes.h
2  * Copyright (C) 2003 Juan Lang
3  *
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.
8  *
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.
13  *
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
17  */
18 
19 #ifndef WINE_IPTYPES_H_
20 #define WINE_IPTYPES_H_
21 
22 #include <time.h>
23 #include <ifdef.h>
24 #include <nldef.h>
25 
26 #define MAX_ADAPTER_DESCRIPTION_LENGTH 128
27 #define MAX_ADAPTER_NAME_LENGTH 256
28 #define MAX_ADAPTER_ADDRESS_LENGTH 8
29 #define DEFAULT_MINIMUM_ENTITIES 32
30 #define MAX_HOSTNAME_LEN 128
31 #define MAX_DOMAIN_NAME_LEN 128
32 #define MAX_SCOPE_ID_LEN 256
33 #define MAX_DHCPV6_DUID_LENGTH 130
34 #define MAX_DNS_SUFFIX_STRING_LENGTH 256
35 
36 #define BROADCAST_NODETYPE 1
37 #define PEER_TO_PEER_NODETYPE 2
38 #define MIXED_NODETYPE 4
39 #define HYBRID_NODETYPE 8
40 
41 typedef struct {
42  char String[4 * 4];
44 
45 typedef struct _IP_ADDR_STRING {
51 
52 typedef struct _IP_ADAPTER_INFO {
72 
73 typedef struct _IP_PER_ADAPTER_INFO {
79 
80 typedef struct {
81  char HostName[MAX_HOSTNAME_LEN + 4] ;
82  char DomainName[MAX_DOMAIN_NAME_LEN + 4];
86  char ScopeId[MAX_SCOPE_ID_LEN + 4];
91 
95 
96 /* ReactOS */
97 #if (NTDDI_VERSION >= NTDDI_WIN2KSP1)
98 typedef struct _IP_INTERFACE_NAME_INFO {
106 #endif
107 
108 #ifdef _WINSOCK2API_
109 
110 typedef struct _IP_ADAPTER_UNICAST_ADDRESS {
111  union {
112  struct {
113  ULONG Length;
114  DWORD Flags;
115  } DUMMYSTRUCTNAME;
116  } DUMMYUNIONNAME;
117  struct _IP_ADAPTER_UNICAST_ADDRESS *Next;
119  IP_PREFIX_ORIGIN PrefixOrigin;
120  IP_SUFFIX_ORIGIN SuffixOrigin;
121  IP_DAD_STATE DadState;
122  ULONG ValidLifetime;
123  ULONG PreferredLifetime;
124  ULONG LeaseLifetime;
125 } IP_ADAPTER_UNICAST_ADDRESS, *PIP_ADAPTER_UNICAST_ADDRESS;
126 
127 typedef struct _IP_ADAPTER_ANYCAST_ADDRESS {
128  union {
130  struct {
131  ULONG Length;
132  DWORD Flags;
133  } DUMMYSTRUCTNAME;
134  } DUMMYUNIONNAME;
135  struct _IP_ADAPTER_ANYCAST_ADDRESS *Next;
137 } IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS;
138 
139 typedef struct _IP_ADAPTER_MULTICAST_ADDRESS {
140  union {
142  struct {
143  ULONG Length;
144  DWORD Flags;
145  } DUMMYSTRUCTNAME;
146  } DUMMYUNIONNAME;
147  struct _IP_ADAPTER_MULTICAST_ADDRESS *Next;
149 } IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS;
150 
151 typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS {
152  union {
154  struct {
155  ULONG Length;
156  DWORD Reserved;
157  } DUMMYSTRUCTNAME;
158  } DUMMYUNIONNAME;
159  struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next;
161 } IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS;
162 
163 typedef struct _IP_ADAPTER_PREFIX {
164  union {
166  struct {
167  ULONG Length;
168  DWORD Flags;
169  } DUMMYSTRUCTNAME;
170  } DUMMYUNIONNAME;
171  struct _IP_ADAPTER_PREFIX *Next;
173  ULONG PrefixLength;
174 } IP_ADAPTER_PREFIX, *PIP_ADAPTER_PREFIX;
175 
176 typedef struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH {
177  union {
179  struct {
180  ULONG Length;
181  DWORD Reserved;
182  } DUMMYSTRUCTNAME;
183  } DUMMYUNIONNAME;
184  struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH *Next;
186 } IP_ADAPTER_WINS_SERVER_ADDRESS_LH, *PIP_ADAPTER_WINS_SERVER_ADDRESS_LH;
187 typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH IP_ADAPTER_WINS_SERVER_ADDRESS;
188 typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH *PIP_ADAPTER_WINS_SERVER_ADDRESS;
189 
190 typedef struct _IP_ADAPTER_GATEWAY_ADDRESS_LH {
191  union {
193  struct {
194  ULONG Length;
195  DWORD Reserved;
196  } DUMMYSTRUCTNAME;
197  } DUMMYUNIONNAME;
198  struct _IP_ADAPTER_GATEWAY_ADDRESS_LH *Next;
200 } IP_ADAPTER_GATEWAY_ADDRESS_LH, *PIP_ADAPTER_GATEWAY_ADDRESS_LH;
201 typedef IP_ADAPTER_GATEWAY_ADDRESS_LH IP_ADAPTER_GATEWAY_ADDRESS;
202 typedef IP_ADAPTER_GATEWAY_ADDRESS_LH *PIP_ADAPTER_GATEWAY_ADDRESS;
203 
204 typedef struct _IP_ADAPTER_DNS_SUFFIX {
205  struct _IP_ADAPTER_DNS_SUFFIX *Next;
207 } IP_ADAPTER_DNS_SUFFIX, *PIP_ADAPTER_DNS_SUFFIX;
208 
209 #define IP_ADAPTER_DDNS_ENABLED 0x1
210 #define IP_ADAPTER_REGISTER_ADAPTER_SUFFIX 0x2
211 #define IP_ADAPTER_DHCP_ENABLED 0x4
212 #define IP_ADAPTER_RECEIVE_ONLY 0x8
213 #define IP_ADAPTER_NO_MULTICAST 0x10
214 #define IP_ADAPTER_IPV6_OTHER_STATEFUL_CONFIG 0x20
215 #define IP_ADAPTER_NETBIOS_OVER_TCPIP_ENABLED 0x40
216 #define IP_ADAPTER_IPV4_ENABLED 0x80
217 #define IP_ADAPTER_IPV6_ENABLED 0x100
218 #define IP_ADAPTER_IPV6_MANAGE_ADDRESS_CONFIG 0x200
219 
220 typedef struct _IP_ADAPTER_ADDRESSES_LH {
221  union {
223  struct {
224  ULONG Length;
225  DWORD IfIndex;
226  } DUMMYSTRUCTNAME;
227  } DUMMYUNIONNAME;
228  struct _IP_ADAPTER_ADDRESSES_LH *Next;
230  PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
231  PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress;
232  PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress;
233  PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress;
234  PWCHAR DnsSuffix;
236  PWCHAR FriendlyName;
238  DWORD PhysicalAddressLength;
239  union {
240  DWORD Flags;
241  struct {
242  DWORD DdnsEnabled : 1;
243  DWORD RegisterAdapterSuffix : 1;
244  DWORD Dhcpv4Enabled : 1;
245  DWORD ReceiveOnly : 1;
246  DWORD NoMulticast : 1;
247  DWORD Ipv6OtherStatefulConfig : 1;
248  DWORD NetbiosOverTcpipEnabled : 1;
249  DWORD Ipv4Enabled : 1;
250  DWORD Ipv6Enabled : 1;
251  DWORD Ipv6ManagedAddressConfigurationSupported : 1;
253  } DUMMYUNIONNAME1;
254  DWORD Mtu;
255  DWORD IfType;
256  IF_OPER_STATUS OperStatus;
257  DWORD Ipv6IfIndex;
258  DWORD ZoneIndices[16];
259  PIP_ADAPTER_PREFIX FirstPrefix;
260  ULONG64 TransmitLinkSpeed;
261  ULONG64 ReceiveLinkSpeed;
262  PIP_ADAPTER_WINS_SERVER_ADDRESS_LH FirstWinsServerAddress;
263  PIP_ADAPTER_GATEWAY_ADDRESS_LH FirstGatewayAddress;
264  ULONG Ipv4Metric;
265  ULONG Ipv6Metric;
266  IF_LUID Luid;
267  SOCKET_ADDRESS Dhcpv4Server;
268  NET_IF_COMPARTMENT_ID CompartmentId;
269  NET_IF_NETWORK_GUID NetworkGuid;
270  NET_IF_CONNECTION_TYPE ConnectionType;
271  TUNNEL_TYPE TunnelType;
272  SOCKET_ADDRESS Dhcpv6Server;
273  BYTE Dhcpv6ClientDuid[MAX_DHCPV6_DUID_LENGTH];
274  ULONG Dhcpv6ClientDuidLength;
275  ULONG Dhcpv6Iaid;
276  PIP_ADAPTER_DNS_SUFFIX FirstDnsSuffix;
277 } IP_ADAPTER_ADDRESSES_LH, *PIP_ADAPTER_ADDRESSES_LH;
278 
279 typedef struct _IP_ADAPTER_ADDRESSES_XP {
280  union {
282  struct {
283  ULONG Length;
284  DWORD IfIndex;
285  } DUMMYSTRUCTNAME;
286  } DUMMYUNIONNAME;
287  struct _IP_ADAPTER_ADDRESSES_XP *Next;
289  PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
290  PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress;
291  PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress;
292  PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress;
293  PWCHAR DnsSuffix;
295  PWCHAR FriendlyName;
297  DWORD PhysicalAddressLength;
298  DWORD Flags;
299  DWORD Mtu;
300  DWORD IfType;
301  IF_OPER_STATUS OperStatus;
302  DWORD Ipv6IfIndex;
303  DWORD ZoneIndices[16];
304  PIP_ADAPTER_PREFIX FirstPrefix;
305 } IP_ADAPTER_ADDRESSES_XP, *PIP_ADAPTER_ADDRESSES_XP;
306 
307 /* ReactOS */
308 #if (NTDDI_VERSION >= NTDDI_VISTA)
309 typedef IP_ADAPTER_ADDRESSES_LH IP_ADAPTER_ADDRESSES;
310 typedef IP_ADAPTER_ADDRESSES_LH *PIP_ADAPTER_ADDRESSES;
311 #else
312 typedef IP_ADAPTER_ADDRESSES_XP IP_ADAPTER_ADDRESSES;
313 typedef IP_ADAPTER_ADDRESSES_XP *PIP_ADAPTER_ADDRESSES;
314 #endif
315 
316 #define GAA_FLAG_SKIP_UNICAST 0x00000001
317 #define GAA_FLAG_SKIP_ANYCAST 0x00000002
318 #define GAA_FLAG_SKIP_MULTICAST 0x00000004
319 #define GAA_FLAG_SKIP_DNS_SERVER 0x00000008
320 #define GAA_FLAG_INCLUDE_PREFIX 0x00000010
321 #define GAA_FLAG_SKIP_FRIENDLY_NAME 0x00000020
322 #define GAA_FLAG_INCLUDE_WINS_INFO 0x00000040
323 #define GAA_FLAG_INCLUDE_ALL_GATEWAYS 0x00000080
324 #define GAA_FLAG_INCLUDE_ALL_INTERFACES 0x00000100
325 #define GAA_FLAG_INCLUDE_ALL_COMPARTMENTS 0x00000200
326 #define GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER 0x00000400
327 
328 #endif /* _WINSOCK2API_ */
329 
330 #endif /* WINE_IPTYPES_H_*/
UINT AddressLength
Definition: iptypes.h:57
signed char * PCHAR
Definition: retypes.h:7
struct _IP_INTERFACE_NAME_INFO IP_INTERFACE_NAME_INFO
UINT EnableDns
Definition: iptypes.h:89
#define MAX_ADAPTER_DESCRIPTION_LENGTH
Definition: iptypes.h:26
UINT AutoconfigEnabled
Definition: iptypes.h:74
IP_ADDR_STRING DhcpServer
Definition: iptypes.h:65
char Description[MAX_ADAPTER_DESCRIPTION_LENGTH+4]
Definition: iptypes.h:56
UINT EnableRouting
Definition: iptypes.h:87
NL_DAD_STATE IP_DAD_STATE
Definition: iptypes.h:94
UINT DhcpEnabled
Definition: iptypes.h:61
#define DUMMYSTRUCTNAME1
Definition: ntbasedef.h:59
IP_ADDRESS_STRING IpAddress
Definition: iptypes.h:47
struct _IP_ADDR_STRING * Next
Definition: iptypes.h:46
struct _IP_ADDR_STRING * PIP_ADDR_STRING
struct IP_ADDRESS_STRING IP_MASK_STRING
IP_ADDR_STRING SecondaryWinsServer
Definition: iptypes.h:68
IF_OPER_STATUS
Definition: ifdef.h:184
#define MAX_DNS_SUFFIX_STRING_LENGTH
Definition: iptypes.h:34
TUNNEL_TYPE
Definition: ifdef.h:168
static WCHAR String[]
Definition: stringtable.c:55
static const WCHAR Description[]
Definition: oid.c:1266
uint16_t * PWCHAR
Definition: typedefs.h:54
PIP_ADDR_STRING CurrentDnsServer
Definition: iptypes.h:83
#define DUMMYUNIONNAME
Definition: ntbasedef.h:32
struct _IP_ADAPTER_INFO IP_ADAPTER_INFO
char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]
Definition: iptypes.h:55
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
struct _IP_INTERFACE_NAME_INFO * PIP_INTERFACE_NAME_INFO
struct _IP_ADAPTER_INFO * PIP_ADAPTER_INFO
unsigned int BOOL
Definition: ntddk_ex.h:94
#define MAX_DOMAIN_NAME_LEN
Definition: iptypes.h:31
union Alignment_ Alignment
DWORD Context
Definition: iptypes.h:49
static WCHAR Address[46]
Definition: ping.c:68
UINT EnableProxy
Definition: iptypes.h:88
BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]
Definition: iptypes.h:58
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define MAX_ADAPTER_ADDRESS_LENGTH
Definition: iptypes.h:28
time_t LeaseObtained
Definition: iptypes.h:69
NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN
Definition: iptypes.h:93
#define MAX_HOSTNAME_LEN
Definition: iptypes.h:30
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_SCOPE_ID_LEN
Definition: iptypes.h:32
struct _IP_PER_ADAPTER_INFO IP_PER_ADAPTER_INFO
uint64_t ULONGLONG
Definition: typedefs.h:65
UINT NodeType
Definition: iptypes.h:85
NL_SUFFIX_ORIGIN
Definition: nldef.h:23
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _IP_PER_ADAPTER_INFO * PIP_PER_ADAPTER_INFO
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NL_PREFIX_ORIGIN
Definition: nldef.h:8
unsigned __int64 ULONG64
Definition: imports.h:198
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1060
unsigned char UCHAR
Definition: xmlstorage.h:181
#define MAX_ADAPTER_NAME_LENGTH
Definition: iptypes.h:27
IP_ADDR_STRING DnsServerList
Definition: iptypes.h:77
struct IP_ADDRESS_STRING * PIP_ADDRESS_STRING
unsigned char BYTE
Definition: mem.h:68
struct FIXED_INFO * PFIXED_INFO
enum _NET_IF_CONNECTION_TYPE NET_IF_CONNECTION_TYPE
DWORD ComboIndex
Definition: iptypes.h:54
__kernel_time_t time_t
Definition: linux.h:252
IP_MASK_STRING IpMask
Definition: iptypes.h:48
IP_ADDR_STRING GatewayList
Definition: iptypes.h:64
PIP_ADDR_STRING CurrentDnsServer
Definition: iptypes.h:76
unsigned int UINT
Definition: ndis.h:50
IP_ADDR_STRING PrimaryWinsServer
Definition: iptypes.h:67
struct IP_ADDRESS_STRING * PIP_MASK_STRING
unsigned int ULONG
Definition: retypes.h:1
PIP_ADDR_STRING CurrentIpAddress
Definition: iptypes.h:62
#define DUMMYUNIONNAME1
Definition: ntbasedef.h:33
IP_ADDR_STRING DnsServerList
Definition: iptypes.h:84
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT _In_ NDIS_HANDLE _In_ NDIS_HANDLE _In_ PNDIS_STRING AdapterName
Definition: ndis.h:6013
#define DUMMYSTRUCTNAME
Definition: ntbasedef.h:58
#define MAX_DHCPV6_DUID_LENGTH
Definition: iptypes.h:33
static PIP_ADAPTER_ADDRESSES
Definition: iphlpapi.c:76
UINT32 NET_IF_COMPARTMENT_ID
Definition: ifdef.h:24
NL_DAD_STATE
Definition: nldef.h:39
time_t LeaseExpires
Definition: iptypes.h:70
struct _IP_ADAPTER_INFO * Next
Definition: iptypes.h:53
IP_ADDR_STRING IpAddressList
Definition: iptypes.h:63
struct _IP_ADDR_STRING IP_ADDR_STRING
NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN
Definition: iptypes.h:92