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