ReactOS 0.4.16-dev-87-g3dfbe52
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
41typedef struct {
42 char String[4 * 4];
44
45typedef struct _IP_ADDR_STRING {
51
52typedef struct _IP_ADAPTER_INFO {
72
73typedef struct _IP_PER_ADAPTER_INFO {
79
80typedef 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)
106#endif
107
108#ifdef _WINSOCK2API_
109
110typedef struct _IP_ADAPTER_UNICAST_ADDRESS {
111 union {
112 struct {
114 DWORD Flags;
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
127typedef struct _IP_ADAPTER_ANYCAST_ADDRESS {
128 union {
130 struct {
132 DWORD Flags;
135 struct _IP_ADAPTER_ANYCAST_ADDRESS *Next;
137} IP_ADAPTER_ANYCAST_ADDRESS, *PIP_ADAPTER_ANYCAST_ADDRESS;
138
139typedef struct _IP_ADAPTER_MULTICAST_ADDRESS {
140 union {
142 struct {
144 DWORD Flags;
147 struct _IP_ADAPTER_MULTICAST_ADDRESS *Next;
149} IP_ADAPTER_MULTICAST_ADDRESS, *PIP_ADAPTER_MULTICAST_ADDRESS;
150
151typedef struct _IP_ADAPTER_DNS_SERVER_ADDRESS {
152 union {
154 struct {
159 struct _IP_ADAPTER_DNS_SERVER_ADDRESS *Next;
161} IP_ADAPTER_DNS_SERVER_ADDRESS, *PIP_ADAPTER_DNS_SERVER_ADDRESS;
162
163typedef struct _IP_ADAPTER_PREFIX {
164 union {
166 struct {
168 DWORD Flags;
171 struct _IP_ADAPTER_PREFIX *Next;
173 ULONG PrefixLength;
174} IP_ADAPTER_PREFIX, *PIP_ADAPTER_PREFIX;
175
176typedef struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH {
177 union {
179 struct {
184 struct _IP_ADAPTER_WINS_SERVER_ADDRESS_LH *Next;
186} IP_ADAPTER_WINS_SERVER_ADDRESS_LH, *PIP_ADAPTER_WINS_SERVER_ADDRESS_LH;
187typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH IP_ADAPTER_WINS_SERVER_ADDRESS;
188typedef IP_ADAPTER_WINS_SERVER_ADDRESS_LH *PIP_ADAPTER_WINS_SERVER_ADDRESS;
189
190typedef struct _IP_ADAPTER_GATEWAY_ADDRESS_LH {
191 union {
193 struct {
198 struct _IP_ADAPTER_GATEWAY_ADDRESS_LH *Next;
200} IP_ADAPTER_GATEWAY_ADDRESS_LH, *PIP_ADAPTER_GATEWAY_ADDRESS_LH;
201typedef IP_ADAPTER_GATEWAY_ADDRESS_LH IP_ADAPTER_GATEWAY_ADDRESS;
202typedef IP_ADAPTER_GATEWAY_ADDRESS_LH *PIP_ADAPTER_GATEWAY_ADDRESS;
203
204typedef 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
220typedef struct _IP_ADAPTER_ADDRESSES_LH {
221 union {
223 struct {
225 DWORD IfIndex;
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;
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
279typedef struct _IP_ADAPTER_ADDRESSES_XP {
280 union {
282 struct {
284 DWORD IfIndex;
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)
309typedef IP_ADAPTER_ADDRESSES_LH IP_ADAPTER_ADDRESSES;
310typedef IP_ADAPTER_ADDRESSES_LH *PIP_ADAPTER_ADDRESSES;
311#else
312typedef IP_ADAPTER_ADDRESSES_XP IP_ADAPTER_ADDRESSES;
313typedef 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_*/
static const WCHAR Description[]
Definition: oid.c:1266
__kernel_time_t time_t
Definition: linux.h:252
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
union Alignment_ Alignment
IF_OPER_STATUS
Definition: ifdef.h:184
enum _NET_IF_CONNECTION_TYPE NET_IF_CONNECTION_TYPE
UINT32 NET_IF_COMPARTMENT_ID
Definition: ifdef.h:24
TUNNEL_TYPE
Definition: ifdef.h:168
static PIP_ADAPTER_ADDRESSES
Definition: iphlpapi.c:76
struct _IP_ADDR_STRING * PIP_ADDR_STRING
NL_PREFIX_ORIGIN IP_PREFIX_ORIGIN
Definition: iptypes.h:92
#define MAX_ADAPTER_NAME_LENGTH
Definition: iptypes.h:27
#define MAX_DOMAIN_NAME_LEN
Definition: iptypes.h:31
struct IP_ADDRESS_STRING * PIP_ADDRESS_STRING
#define MAX_DNS_SUFFIX_STRING_LENGTH
Definition: iptypes.h:34
struct IP_ADDRESS_STRING * PIP_MASK_STRING
struct _IP_INTERFACE_NAME_INFO * PIP_INTERFACE_NAME_INFO
struct _IP_PER_ADAPTER_INFO IP_PER_ADAPTER_INFO
#define MAX_ADAPTER_DESCRIPTION_LENGTH
Definition: iptypes.h:26
struct _IP_ADAPTER_INFO IP_ADAPTER_INFO
struct IP_ADDRESS_STRING IP_MASK_STRING
#define MAX_DHCPV6_DUID_LENGTH
Definition: iptypes.h:33
NL_DAD_STATE IP_DAD_STATE
Definition: iptypes.h:94
NL_SUFFIX_ORIGIN IP_SUFFIX_ORIGIN
Definition: iptypes.h:93
struct _IP_INTERFACE_NAME_INFO IP_INTERFACE_NAME_INFO
#define MAX_HOSTNAME_LEN
Definition: iptypes.h:30
#define MAX_ADAPTER_ADDRESS_LENGTH
Definition: iptypes.h:28
struct _IP_ADDR_STRING IP_ADDR_STRING
struct _IP_ADAPTER_INFO * PIP_ADAPTER_INFO
struct _IP_PER_ADAPTER_INFO * PIP_PER_ADAPTER_INFO
#define MAX_SCOPE_ID_LEN
Definition: iptypes.h:32
struct FIXED_INFO * PFIXED_INFO
unsigned __int64 ULONG64
Definition: imports.h:198
unsigned int UINT
Definition: ndis.h:50
_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:6016
NL_DAD_STATE
Definition: nldef.h:39
NL_PREFIX_ORIGIN
Definition: nldef.h:8
NL_SUFFIX_ORIGIN
Definition: nldef.h:23
#define DUMMYUNIONNAME1
Definition: ntbasedef.h:33
#define DUMMYSTRUCTNAME1
Definition: ntbasedef.h:59
#define DUMMYUNIONNAME
Definition: ntbasedef.h:32
#define DUMMYSTRUCTNAME
Definition: ntbasedef.h:58
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
static WCHAR Address[46]
Definition: ping.c:68
PIP_ADDR_STRING CurrentDnsServer
Definition: iptypes.h:83
IP_ADDR_STRING DnsServerList
Definition: iptypes.h:84
UINT EnableRouting
Definition: iptypes.h:87
UINT EnableDns
Definition: iptypes.h:89
UINT NodeType
Definition: iptypes.h:85
UINT EnableProxy
Definition: iptypes.h:88
IP_ADDR_STRING SecondaryWinsServer
Definition: iptypes.h:68
IP_ADDR_STRING IpAddressList
Definition: iptypes.h:63
BYTE Address[MAX_ADAPTER_ADDRESS_LENGTH]
Definition: iptypes.h:58
DWORD ComboIndex
Definition: iptypes.h:54
PIP_ADDR_STRING CurrentIpAddress
Definition: iptypes.h:62
IP_ADDR_STRING DhcpServer
Definition: iptypes.h:65
char AdapterName[MAX_ADAPTER_NAME_LENGTH+4]
Definition: iptypes.h:55
time_t LeaseObtained
Definition: iptypes.h:69
IP_ADDR_STRING GatewayList
Definition: iptypes.h:64
time_t LeaseExpires
Definition: iptypes.h:70
struct _IP_ADAPTER_INFO * Next
Definition: iptypes.h:53
UINT AddressLength
Definition: iptypes.h:57
char Description[MAX_ADAPTER_DESCRIPTION_LENGTH+4]
Definition: iptypes.h:56
IP_ADDR_STRING PrimaryWinsServer
Definition: iptypes.h:67
UINT DhcpEnabled
Definition: iptypes.h:61
struct _IP_ADDR_STRING * Next
Definition: iptypes.h:46
IP_ADDRESS_STRING IpAddress
Definition: iptypes.h:47
IP_MASK_STRING IpMask
Definition: iptypes.h:48
DWORD Context
Definition: iptypes.h:49
IP_ADDR_STRING DnsServerList
Definition: iptypes.h:77
UINT AutoconfigEnabled
Definition: iptypes.h:74
PIP_ADDR_STRING CurrentDnsServer
Definition: iptypes.h:76
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193