1 | /* WINE ifdef.h
|
---|
2 | * Copyright 2010 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 | #ifndef WINE_IFDEF_H
|
---|
19 | #define WINE_IFDEF_H
|
---|
20 |
|
---|
21 | #include <ipifcons.h>
|
---|
22 |
|
---|
23 | typedef ULONG32 NET_IF_OBJECT_ID, *PNET_IF_OBJECT_ID;
|
---|
24 | typedef UINT32 NET_IF_COMPARTMENT_ID, *PNET_IF_COMPARTMENT_ID;
|
---|
25 | typedef GUID NET_IF_NETWORK_GUID, *PNET_IF_NETWORK_GUID;
|
---|
26 | typedef ULONG NET_IFINDEX, *PNET_IFINDEX;
|
---|
27 | typedef NET_IFINDEX IF_INDEX, *PIF_INDEX;
|
---|
28 | typedef UINT16 NET_IFTYPE, *PNET_IFTYPE;
|
---|
29 |
|
---|
30 | #define NET_IF_OPER_STATUS_DOWN_NOT_AUTHENTICATED 0x00000001
|
---|
31 | #define NET_IF_OPER_STATUS_DOWN_NOT_MEDIA_CONNECTED 0x00000002
|
---|
32 | #define NET_IF_OPER_STATUS_DORMANT_PAUSED 0x00000004
|
---|
33 | #define NET_IF_OPER_STATUS_DORMANT_LOW_POWER 0x00000008
|
---|
34 |
|
---|
35 | #define NET_IF_COMPARTMENT_ID_UNSPECIFIED 0
|
---|
36 | #define NET_IF_COMPARTMENT_ID_PRIMARY 1
|
---|
37 |
|
---|
38 | #define NET_IF_OID_IF_ALIAS 0x00000001
|
---|
39 | #define NET_IF_OID_COMPARTMENT_ID 0x00000002
|
---|
40 | #define NET_IF_OID_NETWORK_GUID 0x00000003
|
---|
41 | #define NET_IF_OID_IF_ENTRY 0x00000004
|
---|
42 |
|
---|
43 | #define NET_SET_UNSPECIFIED_NETWORK_GUID(x)
|
---|
44 | #define NET_IS_UNSPECIFIED_NETWORK_GUID(x)
|
---|
45 |
|
---|
46 | #define NET_SITEID_UNSPECIFIED 0
|
---|
47 | #define NET_SITEID_MAXUSER 0x07ffffff
|
---|
48 | #define NET_SITEID_MAXSYSTEM 0x0fffffff
|
---|
49 |
|
---|
50 | #define NET_IFINDEX_UNSPECIFIED 0
|
---|
51 | #define IFI_UNSPECIFIED NET_IFINDEX_UNSPECIFIED
|
---|
52 |
|
---|
53 | #define NET_IFLUID_UNSPECIFIED 0
|
---|
54 |
|
---|
55 | #define NIIF_HARDWARE_INTERFACE 0x00000001
|
---|
56 | #define NIIF_FILTER_INTERFACE 0x00000002
|
---|
57 | #define NIIF_NDIS_WDM_INTERFACE 0x00000020
|
---|
58 | #define NIIF_NDIS_ENDPOINT_INTERFACE 0x00000040
|
---|
59 | #define NIIF_NDIS_ISCSI_INTERFACE 0x00000080
|
---|
60 | #define NIIF_WAN_TUNNEL_TYPE_UNKNOWN 0xffffffff
|
---|
61 |
|
---|
62 | #define NET_BUS_NUMBER_UNKNOWN 0xffffffff
|
---|
63 | #define NET_SLOT_NUMBER_UNKNOWN 0xffffffff
|
---|
64 | #define NET_FUNCTION_NUMBER_UNKNOWN 0xffffffff
|
---|
65 |
|
---|
66 | #define IF_MAX_STRING_SIZE 256
|
---|
67 | #define IF_MAX_PHYS_ADDRESS_LENGTH 32
|
---|
68 |
|
---|
69 | typedef enum _NET_IF_ADMIN_STATUS {
|
---|
70 | NET_IF_ADMIN_STATUS_UP = 1,
|
---|
71 | NET_IF_ADMIN_STATUS_DOWN = 2,
|
---|
72 | NET_IF_ADMIN_STATUS_TESTING = 3
|
---|
73 | } NET_IF_ADMIN_STATUS, *PNET_IF_ADMIN_STATUS;
|
---|
74 |
|
---|
75 | typedef enum _NET_IF_OPER_STATUS {
|
---|
76 | NET_IF_OPER_STATUS_UP = 1,
|
---|
77 | NET_IF_OPER_STATUS_DOWN = 2,
|
---|
78 | NET_IF_OPER_STATUS_TESTING = 3,
|
---|
79 | NET_IF_OPER_STATUS_UNKNOWN = 4,
|
---|
80 | NET_IF_OPER_STATUS_DORMANT = 5,
|
---|
81 | NET_IF_OPER_STATUS_NOT_PRESENT = 6,
|
---|
82 | NET_IF_OPER_STATUS_LOWER_LAYER_DOWN = 7
|
---|
83 | } NET_IF_OPER_STATUS, *PNET_IF_OPER_STATUS;
|
---|
84 |
|
---|
85 | typedef enum _NET_IF_RCV_ADDRESS_TYPE {
|
---|
86 | NET_IF_RCV_ADDRESS_TYPE_OTHER = 1,
|
---|
87 | NET_IF_RCV_ADDRESS_TYPE_VOLATILE = 2,
|
---|
88 | NET_IF_RCV_ADDRESS_TYPE_NON_VOLATILE = 3
|
---|
89 | } NET_IF_RCV_ADDRESS_TYPE, *PNET_IF_RCV_ADDRESS_TYPE;
|
---|
90 |
|
---|
91 | typedef struct _NET_IF_RCV_ADDRESS_LH {
|
---|
92 | NET_IF_RCV_ADDRESS_TYPE ifRcvAddressType;
|
---|
93 | USHORT ifRcvAddressLength;
|
---|
94 | USHORT ifRcvAddressOffset;
|
---|
95 | } NET_IF_RCV_ADDRESS_LH, *PNET_IF_RCV_ADDRESS_LH;
|
---|
96 | typedef NET_IF_RCV_ADDRESS_LH NET_IF_RCV_ADDRESS;
|
---|
97 | typedef NET_IF_RCV_ADDRESS_LH *PNET_IF_RCV_ADDRESS;
|
---|
98 |
|
---|
99 | typedef union _NET_LUID_LH {
|
---|
100 | ULONG64 Value;
|
---|
101 | struct {
|
---|
102 | ULONG64 Reserved : 24;
|
---|
103 | ULONG64 NetLuidIndex : 24;
|
---|
104 | ULONG64 IfType : 16;
|
---|
105 | } Info;
|
---|
106 | } NET_LUID_LH, *PNET_LUID_LH;
|
---|
107 | typedef NET_LUID_LH NET_LUID;
|
---|
108 | typedef NET_LUID *PNET_LUID;
|
---|
109 | typedef NET_LUID IF_LUID;
|
---|
110 | typedef NET_LUID *PIF_LUID;
|
---|
111 |
|
---|
112 | typedef enum _NET_IF_ACCESS_TYPE {
|
---|
113 | NET_IF_ACCESS_LOOPBACK = 1,
|
---|
114 | NET_IF_ACCESS_BROADCAST = 2,
|
---|
115 | NET_IF_ACCESS_POINT_TO_POINT = 2,
|
---|
116 | NET_IF_ACCESS_POINT_TO_MULTI_POINT = 4,
|
---|
117 | NET_IF_ACCESS_MAXIMUM = 5
|
---|
118 | } NET_IF_ACCESS_TYPE, *PNET_IF_ACCESS_TYPE;
|
---|
119 |
|
---|
120 | typedef enum _NET_IF_DIRECTION_TYPE {
|
---|
121 | NET_IF_DIRECTION_SENDRECEIVE = 0,
|
---|
122 | NET_IF_DIRECTION_SENDONLY = 1,
|
---|
123 | NET_IF_DIRECTION_RECEIVEONLY = 2,
|
---|
124 | NET_IF_DIRECTION_MAXIMUM = 3
|
---|
125 | } NET_IF_DIRECTION_TYPE, *PNET_IF_DIRECTION_TYPE;
|
---|
126 |
|
---|
127 | typedef enum _NET_IF_CONNECTION_TYPE {
|
---|
128 | NET_IF_CONNECTION_DEDICATED = 1,
|
---|
129 | NET_IF_CONNECTION_PASSIVE = 2,
|
---|
130 | NET_IF_CONNECTION_DEMAND = 3,
|
---|
131 | NET_IF_CONNECTION_MAXIMUM = 4,
|
---|
132 | } NET_IF_CONNECTION_TYPE, *PNET_IF_CONNECTION_TYPE;
|
---|
133 |
|
---|
134 | typedef enum _NET_IF_MEDIA_CONNECT_STATE {
|
---|
135 | MediaConnectStateUnknown = 0,
|
---|
136 | MediaConnectStateConnected = 1,
|
---|
137 | MediaConnectStateDisconnected = 2
|
---|
138 | } NET_IF_MEDIA_CONNECT_STATE, *PNET_IF_MEDIA_CONNECT_STATE;
|
---|
139 |
|
---|
140 | typedef enum _NET_IF_MEDIA_DUPLEX_STATE {
|
---|
141 | MediaDuplexStateUnknown = 0,
|
---|
142 | MediaDuplexStateHalf = 1,
|
---|
143 | MediaDuplexStateFull = 2
|
---|
144 | } NET_IF_MEDIA_DUPLEX_STATE, *PNET_IF_MEDIA_DUPLEX_STATE;
|
---|
145 |
|
---|
146 | typedef struct _NET_PHYSICAL_LOCATION_LH {
|
---|
147 | ULONG BusNumber;
|
---|
148 | ULONG SlotNumber;
|
---|
149 | ULONG FunctionNumber;
|
---|
150 | } NET_PHYSICAL_LOCATION_LH, *PNET_PHYSICAL_LOCATION_LH;
|
---|
151 | typedef NET_PHYSICAL_LOCATION_LH NET_PHYSICAL_LOCATION;
|
---|
152 | typedef NET_PHYSICAL_LOCATION *PNET_PHYSICAL_LOCATION;
|
---|
153 |
|
---|
154 | typedef struct _IF_COUNTED_STRING_LH {
|
---|
155 | USHORT Length;
|
---|
156 | WCHAR String[IF_MAX_STRING_SIZE + 1];
|
---|
157 | } IF_COUNTED_STRING_LH, *PIF_COUNTED_STRING_LH;
|
---|
158 | typedef IF_COUNTED_STRING_LH IF_COUNTED_STRING;
|
---|
159 | typedef IF_COUNTED_STRING *PIF_COUNTED_STRING;
|
---|
160 |
|
---|
161 | typedef struct _IF_PHYSICAL_ADDRESS_LH {
|
---|
162 | USHORT Length;
|
---|
163 | UCHAR Address[IF_MAX_PHYS_ADDRESS_LENGTH];
|
---|
164 | } IF_PHYSICAL_ADDRESS_LH, *PIF_PHYSICAL_ADDRESS_LH;
|
---|
165 | typedef IF_PHYSICAL_ADDRESS_LH IF_PHYSICAL_ADDRESS;
|
---|
166 | typedef IF_PHYSICAL_ADDRESS *PIF_PHYSICAL_ADDRESS;
|
---|
167 |
|
---|
168 | typedef enum {
|
---|
169 | TUNNEL_TYPE_NONE = 0,
|
---|
170 | TUNNEL_TYPE_OTHER = 1,
|
---|
171 | TUNNEL_TYPE_DIRECT = 2,
|
---|
172 | TUNNEL_TYPE_6TO4 = 11,
|
---|
173 | TUNNEL_TYPE_ISATAP = 13,
|
---|
174 | TUNNEL_TYPE_TEREDO = 14,
|
---|
175 | TUNNEL_TYPE_IPHTTPS = 15,
|
---|
176 | } TUNNEL_TYPE;
|
---|
177 |
|
---|
178 | typedef enum _IF_ADMINISTRATIVE_STATE {
|
---|
179 | IF_ADMINISTRATIVE_STATE_DISABLED = 0,
|
---|
180 | IF_ADMINISTRATIVE_STATE_ENABLED = 1,
|
---|
181 | IF_ADMINISTRATIVE_STATE_DEMANDDIAL = 2
|
---|
182 | } IF_ADMINISTRATIVE_STATE, *PIF_ADMINISTRATIVE_STATE;
|
---|
183 |
|
---|
184 | typedef enum {
|
---|
185 | IfOperStatusUp = 1,
|
---|
186 | IfOperStatusDown,
|
---|
187 | IfOperStatusTesting,
|
---|
188 | IfOperStatusUnknown,
|
---|
189 | IfOperStatusDormant,
|
---|
190 | IfOperStatusNotPresent,
|
---|
191 | IfOperStatusLowerLayerDown
|
---|
192 | } IF_OPER_STATUS;
|
---|
193 |
|
---|
194 | typedef struct _NDIS_INTERFACE_INFORMATION {
|
---|
195 | NET_IF_OPER_STATUS ifOperStatus;
|
---|
196 | ULONG ifOperStatusFlags;
|
---|
197 | NET_IF_MEDIA_CONNECT_STATE MediaConnectState;
|
---|
198 | NET_IF_MEDIA_DUPLEX_STATE MediaDuplexState;
|
---|
199 | ULONG ifMtu;
|
---|
200 | BOOLEAN ifPromiscuousMode;
|
---|
201 | BOOLEAN ifDeviceWakeUpEnable;
|
---|
202 | ULONG64 XmitLinkSpeed;
|
---|
203 | ULONG64 RcvLinkSpeed;
|
---|
204 | ULONG64 ifLastChange;
|
---|
205 | ULONG64 ifCounterDiscontinuityTime;
|
---|
206 | ULONG64 ifInUnknownProtos;
|
---|
207 | ULONG64 ifInDiscards;
|
---|
208 | ULONG64 ifInErrors;
|
---|
209 | ULONG64 ifHCInOctets;
|
---|
210 | ULONG64 ifHCInUcastPkts;
|
---|
211 | ULONG64 ifHCInMulticastPkts;
|
---|
212 | ULONG64 ifHCInBroadcastPkts;
|
---|
213 | ULONG64 ifHCOutOctets;
|
---|
214 | ULONG64 ifHCOutUcastPkts;
|
---|
215 | ULONG64 ifHCOutMulticastPkts;
|
---|
216 | ULONG64 ifHCOutBroadcastPkts;
|
---|
217 | ULONG64 ifOutErrors;
|
---|
218 | ULONG64 ifOutDiscards;
|
---|
219 | ULONG64 ifHCInUcastOctets;
|
---|
220 | ULONG64 ifHCInMulticastOctets;
|
---|
221 | ULONG64 ifHCInBroadcastOctets;
|
---|
222 | ULONG64 ifHCOutUcastOctets;
|
---|
223 | ULONG64 ifHCOutMulticastOctets;
|
---|
224 | ULONG64 ifHCOutBroadcastOctets;
|
---|
225 | NET_IF_COMPARTMENT_ID CompartmentId;
|
---|
226 | ULONG SupportedStatistics;
|
---|
227 | } NDIS_INTERFACE_INFORMATION, *PNDIS_INTERFACE_INFORMATION;
|
---|
228 |
|
---|
229 | #endif /* WINE_IFDEF_H*/
|
---|