propsys: Implement prop variant integer conversions with tests.
[wine] / include / ntddndis.h
1 /*
2  * Copyright 2009 Jacek Caban for CodeWeavers
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 _NTDDNDIS_
20 #define _NTDDNDIS_
21
22 #include <ifdef.h>
23 #include <devpkey.h>
24 /* #include <pciprop.h> */
25
26 #ifndef GUID_DEFINED
27 # include <guiddef.h>
28 #endif
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #define _NDIS_CONTROL_CODE(request, method) \
35     CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, request, method, FILE_ANY_ACCESS)
36
37 #define IOCTL_NDIS_QUERY_GLOBAL_STATS    _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT)
38 #define IOCTL_NDIS_QUERY_ALL_STATS       _NDIS_CONTROL_CODE(1, METHOD_OUT_DIRECT)
39 #define IOCTL_NDIS_DO_PNP_OPERATION      _NDIS_CONTROL_CODE(2, METHOD_BUFFERED)
40 #define IOCTL_NDIS_QUERY_SELECTED_STATS  _NDIS_CONTROL_CODE(3, METHOD_OUT_DIRECT)
41 #define IOCTL_NDIS_ENUMERATE_INTERFACES  _NDIS_CONTROL_CODE(4, METHOD_BUFFERED)
42 #define IOCTL_NDIS_ADD_TDI_DEVICE        _NDIS_CONTROL_CODE(5, METHOD_BUFFERED)
43 #define IOCTL_NDIS_GET_LOG_DATA          _NDIS_CONTROL_CODE(7, METHOD_OUT_DIRECT)
44 #define IOCTL_NDIS_GET_VERSION           _NDIS_CONTROL_CODE(8, METHOD_BUFFERED)
45
46 #define IOCTL_NDIS_RESERVED1   _NDIS_CONTROL_CODE(0x09, METHOD_BUFFERED)
47 #define IOCTL_NDIS_RESERVED2   _NDIS_CONTROL_CODE(0x0a, METHOD_BUFFERED)
48 #define IOCTL_NDIS_RESERVED3   _NDIS_CONTROL_CODE(0x0b, METHOD_BUFFERED)
49 #define IOCTL_NDIS_RESERVED4   _NDIS_CONTROL_CODE(0x0c, METHOD_BUFFERED)
50 #define IOCTL_NDIS_RESERVED5   CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0x0d, METHOD_BUFFERED, FILE_ANY_ACCESS)
51 #define IOCTL_NDIS_RESERVED6   CTL_CODE(FILE_DEVICE_PHYSICAL_NETCARD, 0x0e, METHOD_BUFFERED, FILE_WRITE_ACCESS)
52 #define IOCTL_NDIS_RESERVED7   _NDIS_CONTROL_CODE(0x0f, METHOD_OUT_DIRECT)
53 #define IOCTL_NDIS_RESERVED8   _NDIS_CONTROL_CODE(0x10, METHOD_BUFFERED)
54 #define IOCTL_NDIS_RESERVED9   _NDIS_CONTROL_CODE(0x11, METHOD_BUFFERED)
55 #define IOCTL_NDIS_RESERVED10  _NDIS_CONTROL_CODE(0x12, METHOD_BUFFERED)
56 #define IOCTL_NDIS_RESERVED11  _NDIS_CONTROL_CODE(0x13, METHOD_BUFFERED)
57 #define IOCTL_NDIS_RESERVED12  _NDIS_CONTROL_CODE(0x14, METHOD_BUFFERED)
58 #define IOCTL_NDIS_RESERVED13  _NDIS_CONTROL_CODE(0x15, METHOD_BUFFERED)
59
60
61 #define OID_802_11_BSSID                    0x0d010101
62 #define OID_802_11_SSID                     0x0d010102
63 #define OID_802_11_NETWORK_TYPES_SUPPORTED  0x0d010203
64 #define OID_802_11_NETWORK_TYPE_IN_USE      0x0d010204
65 #define OID_802_11_TX_POWER_LEVEL           0x0d010205
66 #define OID_802_11_RSSI                     0x0d010206
67 #define OID_802_11_RSSI_TRIGGER             0x0d010207
68 #define OID_802_11_INFRASTRUCTURE_MODE      0x0d010108
69 #define OID_802_11_FRAGMENTATION_THRESHOLD  0x0d010209
70 #define OID_802_11_RTS_THRESHOLD            0x0d01020a
71 #define OID_802_11_NUMBER_OF_ANTENNAS       0x0d01020b
72 #define OID_802_11_RX_ANTENNA_SELECTED      0x0d01020c
73 #define OID_802_11_TX_ANTENNA_SELECTED      0x0d01020d
74 #define OID_802_11_SUPPORTED_RATES          0x0d01020e
75 #define OID_802_11_DESIRED_RATES            0x0d010210
76 #define OID_802_11_CONFIGURATION            0x0d010211
77 #define OID_802_11_STATISTICS               0x0d020212
78 #define OID_802_11_ADD_WEP                  0x0d010113
79 #define OID_802_11_REMOVE_WEP               0x0d010114
80 #define OID_802_11_DISASSOCIATE             0x0d010115
81 #define OID_802_11_POWER_MODE               0x0d010216
82 #define OID_802_11_BSSID_LIST               0x0d010217
83 #define OID_802_11_AUTHENTICATION_MODE      0x0d010118
84 #define OID_802_11_PRIVACY_FILTER           0x0d010119
85 #define OID_802_11_BSSID_LIST_SCAN          0x0d01011a
86 #define OID_802_11_WEP_STATUS               0x0d01011b
87 #define OID_802_11_ENCRYPTION_STATUS        OID_802_11_WEP_STATUS
88 #define OID_802_11_RELOAD_DEFAULTS          0x0d01011c
89 #define OID_802_11_ADD_KEY                  0x0d01011d
90 #define OID_802_11_REMOVE_KEY               0x0d01011e
91 #define OID_802_11_ASSOCIATION_INFORMATION  0x0d01011f
92 #define OID_802_11_TEST                     0x0d010120
93 #define OID_802_11_MEDIA_STREAM_MODE        0x0d010121
94 #define OID_802_11_CAPABILITY               0x0d010122
95 #define OID_802_11_PMKID                    0x0d010123
96 #define OID_802_11_NON_BCAST_SSID_LIST      0x0d010124
97 #define OID_802_11_RADIO_STATUS             0x0d010125
98
99 #define NDIS_802_11_LENGTH_SSID      32
100 #define NDIS_802_11_LENGTH_RATES     8
101 #define NDIS_802_11_LENGTH_RATES_EX  16
102
103 typedef LONG NDIS_802_11_RSSI;
104
105 typedef struct _NDIS_802_11_CONFIGURATION_FH {
106     ULONG Length;
107     ULONG HopPattern;
108     ULONG HopSet;
109     ULONG DwellTime;
110 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
111
112 typedef struct _NDIS_802_11_CONFIGURATION {
113     ULONG Length;
114     ULONG BeaconPeriod;
115     ULONG ATIMWindow;
116     ULONG DSConfig;
117     NDIS_802_11_CONFIGURATION_FH FHConfig;
118 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
119
120 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
121
122 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
123     Ndis802_11IBSS,
124     Ndis802_11Infrastructure,
125     Ndis802_11AutoUnknown,
126     Ndis802_11InfrastructureMax
127 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
128
129 typedef enum _NDIS_802_11_NETWORK_TYPE {
130     Ndis802_11FH,
131     Ndis802_11DS,
132     Ndis802_11OFDM5,
133     Ndis802_11OFDM24,
134     Ndis802_11Automode,
135     Ndis802_11NetworkTypeMax
136 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
137
138 typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES];
139 typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX];
140
141 typedef struct _NDIS_802_11_SSID {
142     ULONG SsidLength;
143     UCHAR Ssid[NDIS_802_11_LENGTH_SSID];
144 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
145
146 typedef struct _NDIS_WLAN_BSSID {
147     ULONG                               Length;
148     NDIS_802_11_MAC_ADDRESS             MacAddress;
149     UCHAR                               Reserved[2];
150     NDIS_802_11_SSID                    Ssid;
151     ULONG                               Privacy;
152     NDIS_802_11_RSSI                    Rssi;
153     NDIS_802_11_NETWORK_TYPE            NetworkTypeInUse;
154     NDIS_802_11_CONFIGURATION           Configuration;
155     NDIS_802_11_NETWORK_INFRASTRUCTURE  InfrastructureMode;
156     NDIS_802_11_RATES                   SupportedRates;
157 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
158
159 typedef struct _NDIS_802_11_BSSID_LIST {
160     ULONG NumberOfItems;
161     NDIS_WLAN_BSSID Bssid[1];
162 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
163
164 #ifndef _NDIS_
165 typedef int NDIS_STATUS, *PNDIS_STATUS;
166 #endif
167
168 #ifdef __cplusplus
169 }
170 #endif
171
172 #endif /* _NTDDNDIS_ */