1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Definitions and data structures for wlan auto config client side API.
7 use shared::devpropdef::DEVPROPKEY;
8 use shared::guiddef::{GUID, LPGUID};
9 use shared::minwindef::{BOOL, BYTE, DWORD, LPBYTE, PBOOL, PBYTE, PDWORD, PUCHAR, ULONG, USHORT};
10 use shared::windef::HWND;
11 use shared::windot11::{
12 DOT11_COUNTRY_OR_REGION_STRING, DOT11_HESSID, DOT11_MAC_ADDRESS, DOT11_PHY_TYPE,
13 DOT11_RATE_SET_MAX_LENGTH, PDOT11_BSSID_LIST, PDOT11_HESSID, PDOT11_MAC_ADDRESS,
14 };
15 use shared::wlantypes::{
16 DOT11_ACCESSNETWORKOPTIONS, DOT11_AUTH_ALGORITHM, DOT11_AUTH_CIPHER_PAIR, DOT11_BSS_TYPE,
17 DOT11_CIPHER_ALGORITHM, DOT11_SSID, DOT11_VENUEINFO, PDOT11_ACCESSNETWORKOPTIONS, PDOT11_SSID,
18 };
19 use um::eaptypes::EAP_METHOD_TYPE;
20 use um::l2cmn::{
21 L2_NOTIFICATION_CODE_PUBLIC_BEGIN, L2_NOTIFICATION_CODE_V2_BEGIN, L2_NOTIFICATION_DATA,
22 L2_NOTIFICATION_SOURCE_ALL, L2_NOTIFICATION_SOURCE_NONE, L2_NOTIFICATION_SOURCE_ONEX,
23 L2_NOTIFICATION_SOURCE_WLAN_ACM, L2_NOTIFICATION_SOURCE_WLAN_HNWK,
24 L2_NOTIFICATION_SOURCE_WLAN_IHV, L2_NOTIFICATION_SOURCE_WLAN_MSM,
25 L2_NOTIFICATION_SOURCE_WLAN_SECURITY, L2_PROFILE_MAX_NAME_LENGTH,
26 L2_REASON_CODE_DOT11_AC_BASE, L2_REASON_CODE_DOT11_MSM_BASE,
27 L2_REASON_CODE_DOT11_SECURITY_BASE, L2_REASON_CODE_GROUP_SIZE, L2_REASON_CODE_PROFILE_BASE,
28 L2_REASON_CODE_SUCCESS, L2_REASON_CODE_UNKNOWN,
29 };
30 use um::winnt::{
31 BOOLEAN, DELETE, FILE_EXECUTE, FILE_READ_DATA, FILE_WRITE_DATA, HANDLE, LONG, LPCWSTR, LPWSTR,
32 PHANDLE, PVOID, PWCHAR, STANDARD_RIGHTS_EXECUTE, STANDARD_RIGHTS_READ, STANDARD_RIGHTS_WRITE,
33 ULONGLONG, WCHAR, WRITE_DAC,
34 };
35 pub const WLAN_API_VERSION_1_0: DWORD = 0x00000001;
36 pub const WLAN_API_VERSION_2_0: DWORD = 0x00000002;
37 #[inline]
WLAN_API_VERSION_MAJOR(v: u32) -> u3238 pub fn WLAN_API_VERSION_MAJOR(v: u32) -> u32 {
39 v & 0xffff
40 }
41 #[inline]
WLAN_API_VERSION_MINOR(v: u32) -> u3242 pub fn WLAN_API_VERSION_MINOR(v: u32) -> u32 {
43 v >> 16
44 }
45 #[inline]
WLAN_API_MAKE_VERSION(major: u32, minor: u32) -> u3246 pub fn WLAN_API_MAKE_VERSION(major: u32, minor: u32) -> u32 {
47 minor << 16 | major
48 }
49 pub const WLAN_API_VERSION: u32 = WLAN_API_VERSION_2_0;
50 pub const WLAN_MAX_NAME_LENGTH: usize = L2_PROFILE_MAX_NAME_LENGTH;
51 pub const WLAN_PROFILE_GROUP_POLICY: DWORD = 0x00000001;
52 pub const WLAN_PROFILE_USER: DWORD = 0x00000002;
53 pub const WLAN_PROFILE_GET_PLAINTEXT_KEY: DWORD = 0x00000004;
54 pub const WLAN_PROFILE_CONNECTION_MODE_SET_BY_CLIENT: DWORD = 0x00010000;
55 pub const WLAN_PROFILE_CONNECTION_MODE_AUTO: DWORD = 0x00020000;
56 pub const WLAN_SET_EAPHOST_DATA_ALL_USERS: DWORD = 0x00000001;
57 STRUCT!{struct WLAN_PROFILE_INFO {
58 strProfileName: [WCHAR; WLAN_MAX_NAME_LENGTH],
59 dwFlags: DWORD,
60 }}
61 pub type PWLAN_PROFILE_INFO = *mut WLAN_PROFILE_INFO;
62 STRUCT!{struct DOT11_NETWORK {
63 dot11Ssid: DOT11_SSID,
64 dot11BssType: DOT11_BSS_TYPE,
65 }}
66 pub type PDOT11_NETWORK = *mut DOT11_NETWORK;
67 pub const DOT11_PSD_IE_MAX_DATA_SIZE: DWORD = 240;
68 pub const DOT11_PSD_IE_MAX_ENTRY_NUMBER: DWORD = 5;
69 STRUCT!{struct WLAN_RAW_DATA {
70 dwDataSize: DWORD,
71 DataBlob: [BYTE; 1],
72 }}
73 pub type PWLAN_RAW_DATA = *mut WLAN_RAW_DATA;
74 STRUCT!{struct WLAN_RAW_DATA_LIST_DataList {
75 dwDataOffset: DWORD,
76 dwDataSize: DWORD,
77 }}
78 STRUCT!{struct WLAN_RAW_DATA_LIST {
79 dwTotalSize: DWORD,
80 dwNumberOfItems: DWORD,
81 DataList: [WLAN_RAW_DATA_LIST_DataList; 1],
82 }}
83 pub type PWLAN_RAW_DATA_LIST = *mut WLAN_RAW_DATA_LIST;
84 ENUM!{enum WLAN_CONNECTION_MODE {
85 wlan_connection_mode_profile = 0,
86 wlan_connection_mode_temporary_profile = 1,
87 wlan_connection_mode_discovery_secure = 2,
88 wlan_connection_mode_discovery_unsecure = 3,
89 wlan_connection_mode_auto = 4,
90 wlan_connection_mode_invalid = 5,
91 }}
92 pub type PWLAN_CONNECTION_MODE = *mut WLAN_CONNECTION_MODE;
93 pub type WLAN_REASON_CODE = DWORD;
94 pub type PWLAN_REASON_CODE = *mut DWORD;
95 pub const WLAN_REASON_CODE_SUCCESS: WLAN_REASON_CODE = L2_REASON_CODE_SUCCESS;
96 pub const WLAN_REASON_CODE_UNKNOWN: WLAN_REASON_CODE = L2_REASON_CODE_UNKNOWN;
97 pub const WLAN_REASON_CODE_RANGE_SIZE: WLAN_REASON_CODE = L2_REASON_CODE_GROUP_SIZE;
98 pub const WLAN_REASON_CODE_BASE: WLAN_REASON_CODE = L2_REASON_CODE_DOT11_AC_BASE;
99 pub const WLAN_REASON_CODE_AC_BASE: WLAN_REASON_CODE = L2_REASON_CODE_DOT11_AC_BASE;
100 pub const WLAN_REASON_CODE_AC_CONNECT_BASE: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_BASE
101 + WLAN_REASON_CODE_RANGE_SIZE / 2;
102 pub const WLAN_REASON_CODE_AC_END: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_BASE
103 + WLAN_REASON_CODE_RANGE_SIZE - 1;
104 pub const WLAN_REASON_CODE_PROFILE_BASE: WLAN_REASON_CODE = L2_REASON_CODE_PROFILE_BASE;
105 pub const WLAN_REASON_CODE_PROFILE_CONNECT_BASE: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
106 + WLAN_REASON_CODE_RANGE_SIZE / 2;
107 pub const WLAN_REASON_CODE_PROFILE_END: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
108 + WLAN_REASON_CODE_RANGE_SIZE - 1;
109 pub const WLAN_REASON_CODE_MSM_BASE: WLAN_REASON_CODE = L2_REASON_CODE_DOT11_MSM_BASE;
110 pub const WLAN_REASON_CODE_MSM_CONNECT_BASE: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_BASE
111 + WLAN_REASON_CODE_RANGE_SIZE / 2;
112 pub const WLAN_REASON_CODE_MSM_END: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_BASE
113 + WLAN_REASON_CODE_RANGE_SIZE - 1;
114 pub const WLAN_REASON_CODE_MSMSEC_BASE: WLAN_REASON_CODE = L2_REASON_CODE_DOT11_SECURITY_BASE;
115 pub const WLAN_REASON_CODE_MSMSEC_CONNECT_BASE: WLAN_REASON_CODE = WLAN_REASON_CODE_MSMSEC_BASE
116 + WLAN_REASON_CODE_RANGE_SIZE / 2;
117 pub const WLAN_REASON_CODE_MSMSEC_END: WLAN_REASON_CODE = WLAN_REASON_CODE_MSMSEC_BASE
118 + WLAN_REASON_CODE_RANGE_SIZE - 1;
119 pub const WLAN_REASON_CODE_NETWORK_NOT_COMPATIBLE: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_BASE + 1;
120 pub const WLAN_REASON_CODE_PROFILE_NOT_COMPATIBLE: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_BASE + 2;
121 pub const WLAN_REASON_CODE_NO_AUTO_CONNECTION: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE
122 + 1;
123 pub const WLAN_REASON_CODE_NOT_VISIBLE: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE + 2;
124 pub const WLAN_REASON_CODE_GP_DENIED: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE + 3;
125 pub const WLAN_REASON_CODE_USER_DENIED: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE + 4;
126 pub const WLAN_REASON_CODE_BSS_TYPE_NOT_ALLOWED: WLAN_REASON_CODE =
127 WLAN_REASON_CODE_AC_CONNECT_BASE + 5;
128 pub const WLAN_REASON_CODE_IN_FAILED_LIST: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE + 6;
129 pub const WLAN_REASON_CODE_IN_BLOCKED_LIST: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE
130 + 7;
131 pub const WLAN_REASON_CODE_SSID_LIST_TOO_LONG: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE
132 + 8;
133 pub const WLAN_REASON_CODE_CONNECT_CALL_FAIL: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE
134 + 9;
135 pub const WLAN_REASON_CODE_SCAN_CALL_FAIL: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE
136 + 10;
137 pub const WLAN_REASON_CODE_NETWORK_NOT_AVAILABLE: WLAN_REASON_CODE =
138 WLAN_REASON_CODE_AC_CONNECT_BASE + 11;
139 pub const WLAN_REASON_CODE_PROFILE_CHANGED_OR_DELETED: WLAN_REASON_CODE =
140 WLAN_REASON_CODE_AC_CONNECT_BASE + 12;
141 pub const WLAN_REASON_CODE_KEY_MISMATCH: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE + 13;
142 pub const WLAN_REASON_CODE_USER_NOT_RESPOND: WLAN_REASON_CODE = WLAN_REASON_CODE_AC_CONNECT_BASE
143 + 14;
144 pub const WLAN_REASON_CODE_AP_PROFILE_NOT_ALLOWED_FOR_CLIENT: WLAN_REASON_CODE =
145 WLAN_REASON_CODE_AC_CONNECT_BASE + 15;
146 pub const WLAN_REASON_CODE_AP_PROFILE_NOT_ALLOWED: WLAN_REASON_CODE =
147 WLAN_REASON_CODE_AC_CONNECT_BASE + 16;
148 pub const WLAN_REASON_CODE_HOTSPOT2_PROFILE_DENIED: WLAN_REASON_CODE =
149 WLAN_REASON_CODE_AC_CONNECT_BASE + 17;
150 pub const WLAN_REASON_CODE_INVALID_PROFILE_SCHEMA: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
151 + 1;
152 pub const WLAN_REASON_CODE_PROFILE_MISSING: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 2;
153 pub const WLAN_REASON_CODE_INVALID_PROFILE_NAME: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
154 + 3;
155 pub const WLAN_REASON_CODE_INVALID_PROFILE_TYPE: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
156 + 4;
157 pub const WLAN_REASON_CODE_INVALID_PHY_TYPE: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 5;
158 pub const WLAN_REASON_CODE_MSM_SECURITY_MISSING: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
159 + 6;
160 pub const WLAN_REASON_CODE_IHV_SECURITY_NOT_SUPPORTED: WLAN_REASON_CODE =
161 WLAN_REASON_CODE_PROFILE_BASE + 7;
162 pub const WLAN_REASON_CODE_IHV_OUI_MISMATCH: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 8;
163 pub const WLAN_REASON_CODE_IHV_OUI_MISSING: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 9;
164 pub const WLAN_REASON_CODE_IHV_SETTINGS_MISSING: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
165 + 10;
166 pub const WLAN_REASON_CODE_CONFLICT_SECURITY: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
167 + 11;
168 pub const WLAN_REASON_CODE_SECURITY_MISSING: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 12;
169 pub const WLAN_REASON_CODE_INVALID_BSS_TYPE: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 13;
170 pub const WLAN_REASON_CODE_INVALID_ADHOC_CONNECTION_MODE: WLAN_REASON_CODE =
171 WLAN_REASON_CODE_PROFILE_BASE + 14;
172 pub const WLAN_REASON_CODE_NON_BROADCAST_SET_FOR_ADHOC: WLAN_REASON_CODE =
173 WLAN_REASON_CODE_PROFILE_BASE + 15;
174 pub const WLAN_REASON_CODE_AUTO_SWITCH_SET_FOR_ADHOC: WLAN_REASON_CODE =
175 WLAN_REASON_CODE_PROFILE_BASE + 16;
176 pub const WLAN_REASON_CODE_AUTO_SWITCH_SET_FOR_MANUAL_CONNECTION: WLAN_REASON_CODE =
177 WLAN_REASON_CODE_PROFILE_BASE + 17;
178 pub const WLAN_REASON_CODE_IHV_SECURITY_ONEX_MISSING: WLAN_REASON_CODE =
179 WLAN_REASON_CODE_PROFILE_BASE + 18;
180 pub const WLAN_REASON_CODE_PROFILE_SSID_INVALID: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE
181 + 19;
182 pub const WLAN_REASON_CODE_TOO_MANY_SSID: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 20;
183 pub const WLAN_REASON_CODE_IHV_CONNECTIVITY_NOT_SUPPORTED: WLAN_REASON_CODE =
184 WLAN_REASON_CODE_PROFILE_BASE + 21;
185 pub const WLAN_REASON_CODE_BAD_MAX_NUMBER_OF_CLIENTS_FOR_AP: WLAN_REASON_CODE =
186 WLAN_REASON_CODE_PROFILE_BASE + 22;
187 pub const WLAN_REASON_CODE_INVALID_CHANNEL: WLAN_REASON_CODE = WLAN_REASON_CODE_PROFILE_BASE + 23;
188 pub const WLAN_REASON_CODE_OPERATION_MODE_NOT_SUPPORTED: WLAN_REASON_CODE =
189 WLAN_REASON_CODE_PROFILE_BASE + 24;
190 pub const WLAN_REASON_CODE_AUTO_AP_PROFILE_NOT_ALLOWED: WLAN_REASON_CODE =
191 WLAN_REASON_CODE_PROFILE_BASE + 25;
192 pub const WLAN_REASON_CODE_AUTO_CONNECTION_NOT_ALLOWED: WLAN_REASON_CODE =
193 WLAN_REASON_CODE_PROFILE_BASE + 26;
194 pub const WLAN_REASON_CODE_HOTSPOT2_PROFILE_NOT_ALLOWED: WLAN_REASON_CODE =
195 WLAN_REASON_CODE_PROFILE_BASE + 27;
196 pub const WLAN_REASON_CODE_UNSUPPORTED_SECURITY_SET_BY_OS: WLAN_REASON_CODE =
197 WLAN_REASON_CODE_MSM_BASE + 1;
198 pub const WLAN_REASON_CODE_UNSUPPORTED_SECURITY_SET: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_BASE
199 + 2;
200 pub const WLAN_REASON_CODE_BSS_TYPE_UNMATCH: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_BASE + 3;
201 pub const WLAN_REASON_CODE_PHY_TYPE_UNMATCH: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_BASE + 4;
202 pub const WLAN_REASON_CODE_DATARATE_UNMATCH: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_BASE + 5;
203 pub const WLAN_REASON_CODE_USER_CANCELLED: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
204 + 1;
205 pub const WLAN_REASON_CODE_ASSOCIATION_FAILURE: WLAN_REASON_CODE =
206 WLAN_REASON_CODE_MSM_CONNECT_BASE + 2;
207 pub const WLAN_REASON_CODE_ASSOCIATION_TIMEOUT: WLAN_REASON_CODE =
208 WLAN_REASON_CODE_MSM_CONNECT_BASE + 3;
209 pub const WLAN_REASON_CODE_PRE_SECURITY_FAILURE: WLAN_REASON_CODE =
210 WLAN_REASON_CODE_MSM_CONNECT_BASE + 4;
211 pub const WLAN_REASON_CODE_START_SECURITY_FAILURE: WLAN_REASON_CODE =
212 WLAN_REASON_CODE_MSM_CONNECT_BASE + 5;
213 pub const WLAN_REASON_CODE_SECURITY_FAILURE: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
214 + 6;
215 pub const WLAN_REASON_CODE_SECURITY_TIMEOUT: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
216 + 7;
217 pub const WLAN_REASON_CODE_ROAMING_FAILURE: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
218 + 8;
219 pub const WLAN_REASON_CODE_ROAMING_SECURITY_FAILURE: WLAN_REASON_CODE =
220 WLAN_REASON_CODE_MSM_CONNECT_BASE + 9;
221 pub const WLAN_REASON_CODE_ADHOC_SECURITY_FAILURE: WLAN_REASON_CODE =
222 WLAN_REASON_CODE_MSM_CONNECT_BASE + 10;
223 pub const WLAN_REASON_CODE_DRIVER_DISCONNECTED: WLAN_REASON_CODE =
224 WLAN_REASON_CODE_MSM_CONNECT_BASE + 11;
225 pub const WLAN_REASON_CODE_DRIVER_OPERATION_FAILURE: WLAN_REASON_CODE =
226 WLAN_REASON_CODE_MSM_CONNECT_BASE + 12;
227 pub const WLAN_REASON_CODE_IHV_NOT_AVAILABLE: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
228 + 13;
229 pub const WLAN_REASON_CODE_IHV_NOT_RESPONDING: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
230 + 14;
231 pub const WLAN_REASON_CODE_DISCONNECT_TIMEOUT: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
232 + 15;
233 pub const WLAN_REASON_CODE_INTERNAL_FAILURE: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
234 + 16;
235 pub const WLAN_REASON_CODE_UI_REQUEST_TIMEOUT: WLAN_REASON_CODE = WLAN_REASON_CODE_MSM_CONNECT_BASE
236 + 17;
237 pub const WLAN_REASON_CODE_TOO_MANY_SECURITY_ATTEMPTS: WLAN_REASON_CODE =
238 WLAN_REASON_CODE_MSM_CONNECT_BASE + 18;
239 pub const WLAN_REASON_CODE_AP_STARTING_FAILURE: WLAN_REASON_CODE =
240 WLAN_REASON_CODE_MSM_CONNECT_BASE + 19;
241 pub const WLAN_REASON_CODE_MSMSEC_MIN: WLAN_REASON_CODE = WLAN_REASON_CODE_MSMSEC_BASE;
242 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_KEY_INDEX: WLAN_REASON_CODE =
243 WLAN_REASON_CODE_MSMSEC_BASE + 1;
244 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_PRESENT: WLAN_REASON_CODE =
245 WLAN_REASON_CODE_MSMSEC_BASE + 2;
246 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_LENGTH: WLAN_REASON_CODE =
247 WLAN_REASON_CODE_MSMSEC_BASE + 3;
248 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_PSK_LENGTH: WLAN_REASON_CODE =
249 WLAN_REASON_CODE_MSMSEC_BASE + 4;
250 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_NO_AUTH_CIPHER_SPECIFIED: WLAN_REASON_CODE =
251 WLAN_REASON_CODE_MSMSEC_BASE + 5;
252 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_TOO_MANY_AUTH_CIPHER_SPECIFIED: WLAN_REASON_CODE =
253 WLAN_REASON_CODE_MSMSEC_BASE + 6;
254 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_DUPLICATE_AUTH_CIPHER: WLAN_REASON_CODE =
255 WLAN_REASON_CODE_MSMSEC_BASE + 7;
256 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_RAWDATA_INVALID: WLAN_REASON_CODE =
257 WLAN_REASON_CODE_MSMSEC_BASE + 8;
258 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_AUTH_CIPHER: WLAN_REASON_CODE =
259 WLAN_REASON_CODE_MSMSEC_BASE + 9;
260 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_DISABLED: WLAN_REASON_CODE =
261 WLAN_REASON_CODE_MSMSEC_BASE + 10;
262 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_ONEX_ENABLED: WLAN_REASON_CODE =
263 WLAN_REASON_CODE_MSMSEC_BASE + 11;
264 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_MODE: WLAN_REASON_CODE =
265 WLAN_REASON_CODE_MSMSEC_BASE + 12;
266 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_SIZE: WLAN_REASON_CODE =
267 WLAN_REASON_CODE_MSMSEC_BASE + 13;
268 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PMKCACHE_TTL: WLAN_REASON_CODE =
269 WLAN_REASON_CODE_MSMSEC_BASE + 14;
270 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PREAUTH_MODE: WLAN_REASON_CODE =
271 WLAN_REASON_CODE_MSMSEC_BASE + 15;
272 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_PREAUTH_THROTTLE: WLAN_REASON_CODE =
273 WLAN_REASON_CODE_MSMSEC_BASE + 16;
274 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_PREAUTH_ONLY_ENABLED: WLAN_REASON_CODE =
275 WLAN_REASON_CODE_MSMSEC_BASE + 17;
276 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_NETWORK: WLAN_REASON_CODE =
277 WLAN_REASON_CODE_MSMSEC_BASE + 18;
278 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_NIC: WLAN_REASON_CODE = WLAN_REASON_CODE_MSMSEC_BASE
279 + 19;
280 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE: WLAN_REASON_CODE =
281 WLAN_REASON_CODE_MSMSEC_BASE + 20;
282 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_DISCOVERY: WLAN_REASON_CODE =
283 WLAN_REASON_CODE_MSMSEC_BASE + 21;
284 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_PASSPHRASE_CHAR: WLAN_REASON_CODE =
285 WLAN_REASON_CODE_MSMSEC_BASE + 22;
286 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_KEYMATERIAL_CHAR: WLAN_REASON_CODE =
287 WLAN_REASON_CODE_MSMSEC_BASE + 23;
288 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_WRONG_KEYTYPE: WLAN_REASON_CODE =
289 WLAN_REASON_CODE_MSMSEC_BASE + 24;
290 pub const WLAN_REASON_CODE_MSMSEC_MIXED_CELL: WLAN_REASON_CODE = WLAN_REASON_CODE_MSMSEC_BASE + 25;
291 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_AUTH_TIMERS_INVALID: WLAN_REASON_CODE =
292 WLAN_REASON_CODE_MSMSEC_BASE + 26;
293 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_INVALID_GKEY_INTV: WLAN_REASON_CODE =
294 WLAN_REASON_CODE_MSMSEC_BASE + 27;
295 pub const WLAN_REASON_CODE_MSMSEC_TRANSITION_NETWORK: WLAN_REASON_CODE =
296 WLAN_REASON_CODE_MSMSEC_BASE + 28;
297 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_KEY_UNMAPPED_CHAR: WLAN_REASON_CODE =
298 WLAN_REASON_CODE_MSMSEC_BASE + 29;
299 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_AUTH: WLAN_REASON_CODE =
300 WLAN_REASON_CODE_MSMSEC_BASE + 30;
301 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_CIPHER: WLAN_REASON_CODE =
302 WLAN_REASON_CODE_MSMSEC_BASE + 31;
303 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_SAFE_MODE: WLAN_REASON_CODE =
304 WLAN_REASON_CODE_MSMSEC_BASE + 32;
305 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_SAFE_MODE_NIC: WLAN_REASON_CODE =
306 WLAN_REASON_CODE_MSMSEC_BASE + 33;
307 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_PROFILE_SAFE_MODE_NW: WLAN_REASON_CODE =
308 WLAN_REASON_CODE_MSMSEC_BASE + 34;
309 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_UNSUPPORTED_AUTH: WLAN_REASON_CODE =
310 WLAN_REASON_CODE_MSMSEC_BASE + 35;
311 pub const WLAN_REASON_CODE_MSMSEC_PROFILE_UNSUPPORTED_CIPHER: WLAN_REASON_CODE =
312 WLAN_REASON_CODE_MSMSEC_BASE + 36;
313 pub const WLAN_REASON_CODE_MSMSEC_CAPABILITY_MFP_NW_NIC: WLAN_REASON_CODE =
314 WLAN_REASON_CODE_MSMSEC_BASE + 37;
315 pub const WLAN_REASON_CODE_MSMSEC_UI_REQUEST_FAILURE: WLAN_REASON_CODE =
316 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 1;
317 pub const WLAN_REASON_CODE_MSMSEC_AUTH_START_TIMEOUT: WLAN_REASON_CODE =
318 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 2;
319 pub const WLAN_REASON_CODE_MSMSEC_AUTH_SUCCESS_TIMEOUT: WLAN_REASON_CODE =
320 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 3;
321 pub const WLAN_REASON_CODE_MSMSEC_KEY_START_TIMEOUT: WLAN_REASON_CODE =
322 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 4;
323 pub const WLAN_REASON_CODE_MSMSEC_KEY_SUCCESS_TIMEOUT: WLAN_REASON_CODE =
324 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 5;
325 pub const WLAN_REASON_CODE_MSMSEC_M3_MISSING_KEY_DATA: WLAN_REASON_CODE =
326 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 6;
327 pub const WLAN_REASON_CODE_MSMSEC_M3_MISSING_IE: WLAN_REASON_CODE =
328 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 7;
329 pub const WLAN_REASON_CODE_MSMSEC_M3_MISSING_GRP_KEY: WLAN_REASON_CODE =
330 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 8;
331 pub const WLAN_REASON_CODE_MSMSEC_PR_IE_MATCHING: WLAN_REASON_CODE =
332 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 9;
333 pub const WLAN_REASON_CODE_MSMSEC_SEC_IE_MATCHING: WLAN_REASON_CODE =
334 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 10;
335 pub const WLAN_REASON_CODE_MSMSEC_NO_PAIRWISE_KEY: WLAN_REASON_CODE =
336 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 11;
337 pub const WLAN_REASON_CODE_MSMSEC_G1_MISSING_KEY_DATA: WLAN_REASON_CODE =
338 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 12;
339 pub const WLAN_REASON_CODE_MSMSEC_G1_MISSING_GRP_KEY: WLAN_REASON_CODE =
340 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 13;
341 pub const WLAN_REASON_CODE_MSMSEC_PEER_INDICATED_INSECURE: WLAN_REASON_CODE =
342 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 14;
343 pub const WLAN_REASON_CODE_MSMSEC_NO_AUTHENTICATOR: WLAN_REASON_CODE =
344 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 15;
345 pub const WLAN_REASON_CODE_MSMSEC_NIC_FAILURE: WLAN_REASON_CODE =
346 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 16;
347 pub const WLAN_REASON_CODE_MSMSEC_CANCELLED: WLAN_REASON_CODE =
348 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 17;
349 pub const WLAN_REASON_CODE_MSMSEC_KEY_FORMAT: WLAN_REASON_CODE =
350 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 18;
351 pub const WLAN_REASON_CODE_MSMSEC_DOWNGRADE_DETECTED: WLAN_REASON_CODE =
352 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 19;
353 pub const WLAN_REASON_CODE_MSMSEC_PSK_MISMATCH_SUSPECTED: WLAN_REASON_CODE =
354 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 20;
355 pub const WLAN_REASON_CODE_MSMSEC_FORCED_FAILURE: WLAN_REASON_CODE =
356 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 21;
357 pub const WLAN_REASON_CODE_MSMSEC_M3_TOO_MANY_RSNIE: WLAN_REASON_CODE =
358 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 22;
359 pub const WLAN_REASON_CODE_MSMSEC_M2_MISSING_KEY_DATA: WLAN_REASON_CODE =
360 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 23;
361 pub const WLAN_REASON_CODE_MSMSEC_M2_MISSING_IE: WLAN_REASON_CODE =
362 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 24;
363 pub const WLAN_REASON_CODE_MSMSEC_AUTH_WCN_COMPLETED: WLAN_REASON_CODE =
364 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 25;
365 pub const WLAN_REASON_CODE_MSMSEC_M3_MISSING_MGMT_GRP_KEY: WLAN_REASON_CODE =
366 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 26;
367 pub const WLAN_REASON_CODE_MSMSEC_G1_MISSING_MGMT_GRP_KEY: WLAN_REASON_CODE =
368 WLAN_REASON_CODE_MSMSEC_CONNECT_BASE + 27;
369 pub const WLAN_REASON_CODE_MSMSEC_MAX: WLAN_REASON_CODE = WLAN_REASON_CODE_MSMSEC_END;
370 pub type WLAN_SIGNAL_QUALITY = ULONG;
371 pub type PWLAN_SIGNAL_QUALITY = *mut ULONG;
372 pub const WLAN_AVAILABLE_NETWORK_CONNECTED: DWORD = 0x00000001;
373 pub const WLAN_AVAILABLE_NETWORK_HAS_PROFILE: DWORD = 0x00000002;
374 pub const WLAN_AVAILABLE_NETWORK_CONSOLE_USER_PROFILE: DWORD = 0x00000004;
375 pub const WLAN_AVAILABLE_NETWORK_INTERWORKING_SUPPORTED: DWORD = 0x00000008;
376 pub const WLAN_AVAILABLE_NETWORK_HOTSPOT2_ENABLED: DWORD = 0x00000010;
377 pub const WLAN_AVAILABLE_NETWORK_ANQP_SUPPORTED: DWORD = 0x00000020;
378 pub const WLAN_AVAILABLE_NETWORK_HOTSPOT2_DOMAIN: DWORD = 0x00000040;
379 pub const WLAN_AVAILABLE_NETWORK_HOTSPOT2_ROAMING: DWORD = 0x00000080;
380 pub const WLAN_AVAILABLE_NETWORK_AUTO_CONNECT_FAILED: DWORD = 0x00000100;
381 pub const WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_ADHOC_PROFILES: DWORD = 0x00000001;
382 pub const WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_MANUAL_HIDDEN_PROFILES: DWORD = 0x00000002;
383 STRUCT!{struct WLAN_RATE_SET {
384 uRateSetLength: ULONG,
385 usRateSet: [USHORT; DOT11_RATE_SET_MAX_LENGTH],
386 }}
387 pub type PWLAN_RATE_SET = *mut WLAN_RATE_SET;
388 pub const WLAN_MAX_PHY_TYPE_NUMBER: usize = 8;
389 STRUCT!{struct WLAN_AVAILABLE_NETWORK {
390 strProfileName: [WCHAR; WLAN_MAX_NAME_LENGTH],
391 dot11Ssid: DOT11_SSID,
392 dot11BssType: DOT11_BSS_TYPE,
393 uNumberOfBssids: ULONG,
394 bNetworkConnectable: BOOL,
395 wlanNotConnectableReason: WLAN_REASON_CODE,
396 uNumberOfPhyTypes: ULONG,
397 dot11PhyTypes: [DOT11_PHY_TYPE; WLAN_MAX_PHY_TYPE_NUMBER],
398 bMorePhyTypes: BOOL,
399 wlanSignalQuality: WLAN_SIGNAL_QUALITY,
400 bSecurityEnabled: BOOL,
401 dot11DefaultAuthAlgorithm: DOT11_AUTH_ALGORITHM,
402 dot11DefaultCipherAlgorithm: DOT11_CIPHER_ALGORITHM,
403 dwFlags: DWORD,
404 dwReserved: DWORD,
405 }}
406 pub type PWLAN_AVAILABLE_NETWORK = *mut WLAN_AVAILABLE_NETWORK;
407 STRUCT!{struct WLAN_AVAILABLE_NETWORK_V2 {
408 strProfileName: [WCHAR; WLAN_MAX_NAME_LENGTH],
409 dot11Ssid: DOT11_SSID,
410 dot11BssType: DOT11_BSS_TYPE,
411 uNumberOfBssids: ULONG,
412 bNetworkConnectable: BOOL,
413 wlanNotConnectableReason: WLAN_REASON_CODE,
414 uNumberOfPhyTypes: ULONG,
415 dot11PhyTypes: [DOT11_PHY_TYPE; WLAN_MAX_PHY_TYPE_NUMBER],
416 bMorePhyTypes: BOOL,
417 wlanSignalQuality: WLAN_SIGNAL_QUALITY,
418 bSecurityEnabled: BOOL,
419 dot11DefaultAuthAlgorithm: DOT11_AUTH_ALGORITHM,
420 dot11DefaultCipherAlgorithm: DOT11_CIPHER_ALGORITHM,
421 dwFlags: DWORD,
422 AccessNetworkOptions: DOT11_ACCESSNETWORKOPTIONS,
423 dot11HESSID: DOT11_HESSID,
424 VenueInfo: DOT11_VENUEINFO,
425 dwReserved: DWORD,
426 }}
427 pub type PWLAN_AVAILABLE_NETWORK_V2 = *mut WLAN_AVAILABLE_NETWORK_V2;
428 STRUCT!{struct WLAN_BSS_ENTRY {
429 dot11Ssid: DOT11_SSID,
430 uPhyId: ULONG,
431 dot11Bssid: DOT11_MAC_ADDRESS,
432 dot11BssType: DOT11_BSS_TYPE,
433 dot11BssPhyType: DOT11_PHY_TYPE,
434 lRssi: LONG,
435 uLinkQuality: ULONG,
436 bInRegDomain: BOOLEAN,
437 usBeaconPeriod: USHORT,
438 ullTimestamp: ULONGLONG,
439 ullHostTimestamp: ULONGLONG,
440 usCapabilityInformation: USHORT,
441 ulChCenterFrequency: ULONG,
442 wlanRateSet: WLAN_RATE_SET,
443 ulIeOffset: ULONG,
444 ulIeSize: ULONG,
445 }}
446 pub type PWLAN_BSS_ENTRY = *mut WLAN_BSS_ENTRY;
447 STRUCT!{struct WLAN_BSS_LIST {
448 dwTotalSize: DWORD,
449 dwNumberOfItems: DWORD,
450 wlanBssEntries: [WLAN_BSS_ENTRY; 1],
451 }}
452 pub type PWLAN_BSS_LIST = *mut WLAN_BSS_LIST;
453 ENUM!{enum WLAN_INTERFACE_STATE {
454 wlan_interface_state_not_ready = 0,
455 wlan_interface_state_connected = 1,
456 wlan_interface_state_ad_hoc_network_formed = 2,
457 wlan_interface_state_disconnecting = 3,
458 wlan_interface_state_disconnected = 4,
459 wlan_interface_state_associating = 5,
460 wlan_interface_state_discovering = 6,
461 wlan_interface_state_authenticating = 7,
462 }}
463 pub type PWLAN_INTERFACE_STATE = *mut WLAN_INTERFACE_STATE;
464 ENUM!{enum WLAN_ADHOC_NETWORK_STATE {
465 wlan_adhoc_network_state_formed = 0,
466 wlan_adhoc_network_state_connected = 1,
467 }}
468 pub type PWLAN_ADHOC_NETWORK_STATE = *mut WLAN_ADHOC_NETWORK_STATE;
469 STRUCT!{struct WLAN_INTERFACE_INFO {
470 InterfaceGuid: GUID,
471 strInterfaceDescription: [WCHAR; WLAN_MAX_NAME_LENGTH],
472 isState: WLAN_INTERFACE_STATE,
473 }}
474 pub type PWLAN_INTERFACE_INFO = *mut WLAN_INTERFACE_INFO;
475 STRUCT!{struct WLAN_ASSOCIATION_ATTRIBUTES {
476 dot11Ssid: DOT11_SSID,
477 dot11BssType: DOT11_BSS_TYPE,
478 dot11Bssid: DOT11_MAC_ADDRESS,
479 dot11PhyType: DOT11_PHY_TYPE,
480 uDot11PhyIndex: ULONG,
481 wlanSignalQuality: WLAN_SIGNAL_QUALITY,
482 ulRxRate: ULONG,
483 ulTxRate: ULONG,
484 }}
485 pub type PWLAN_ASSOCIATION_ATTRIBUTES = *mut WLAN_ASSOCIATION_ATTRIBUTES;
486 STRUCT!{struct WLAN_SECURITY_ATTRIBUTES {
487 bSecurityEnabled: BOOL,
488 bOneXEnabled: BOOL,
489 dot11AuthAlgorithm: DOT11_AUTH_ALGORITHM,
490 dot11CipherAlgorithm: DOT11_CIPHER_ALGORITHM,
491 }}
492 pub type PWLAN_SECURITY_ATTRIBUTES = *mut WLAN_SECURITY_ATTRIBUTES;
493 STRUCT!{struct WLAN_CONNECTION_ATTRIBUTES {
494 isState: WLAN_INTERFACE_STATE,
495 wlanConnectionMode: WLAN_CONNECTION_MODE,
496 strProfileName: [WCHAR; WLAN_MAX_NAME_LENGTH],
497 wlanAssociationAttributes: WLAN_ASSOCIATION_ATTRIBUTES,
498 wlanSecurityAttributes: WLAN_SECURITY_ATTRIBUTES,
499 }}
500 pub type PWLAN_CONNECTION_ATTRIBUTES = *mut WLAN_CONNECTION_ATTRIBUTES;
501 ENUM!{enum DOT11_RADIO_STATE {
502 dot11_radio_state_unknown = 0,
503 dot11_radio_state_on = 1,
504 dot11_radio_state_off = 2,
505 }}
506 pub type PDOT11_RADIO_STATE = *mut DOT11_RADIO_STATE;
507 pub const WLAN_MAX_PHY_INDEX: usize = 64;
508 STRUCT!{struct WLAN_PHY_RADIO_STATE {
509 dwPhyIndex: DWORD,
510 dot11SoftwareRadioState: DOT11_RADIO_STATE,
511 dot11HardwareRadioState: DOT11_RADIO_STATE,
512 }}
513 pub type PWLAN_PHY_RADIO_STATE = *mut WLAN_PHY_RADIO_STATE;
514 STRUCT!{struct WLAN_RADIO_STATE {
515 dwNumberOfPhys: DWORD,
516 PhyRadioState: [WLAN_PHY_RADIO_STATE; WLAN_MAX_PHY_INDEX],
517 }}
518 pub type PWLAN_RADIO_STATE = *mut WLAN_RADIO_STATE;
519 ENUM!{enum WLAN_OPERATIONAL_STATE {
520 wlan_operational_state_unknown = 0,
521 wlan_operational_state_off = 1,
522 wlan_operational_state_on = 2,
523 wlan_operational_state_going_off = 3,
524 wlan_operational_state_going_on = 4,
525 }}
526 pub type PWLAN_OPERATIONAL_STATE = *mut WLAN_OPERATIONAL_STATE;
527 ENUM!{enum WLAN_INTERFACE_TYPE {
528 wlan_interface_type_emulated_802_11 = 0,
529 wlan_interface_type_native_802_11 = 1,
530 wlan_interface_type_invalid = 2,
531 }}
532 pub type PWLAN_INTERFACE_TYPE = *mut WLAN_INTERFACE_TYPE;
533 STRUCT!{struct WLAN_INTERFACE_CAPABILITY {
534 interfaceType: WLAN_INTERFACE_TYPE,
535 bDot11DSupported: BOOL,
536 dwMaxDesiredSsidListSize: DWORD,
537 dwMaxDesiredBssidListSize: DWORD,
538 dwNumberOfSupportedPhys: DWORD,
539 dot11PhyTypes: [DOT11_PHY_TYPE; WLAN_MAX_PHY_INDEX],
540 }}
541 pub type PWLAN_INTERFACE_CAPABILITY = *mut WLAN_INTERFACE_CAPABILITY;
542 STRUCT!{struct WLAN_AUTH_CIPHER_PAIR_LIST {
543 dwNumberOfItems: DWORD,
544 pAuthCipherPairList: [DOT11_AUTH_CIPHER_PAIR; 1],
545 }}
546 pub type PWLAN_AUTH_CIPHER_PAIR_LIST = *mut WLAN_AUTH_CIPHER_PAIR_LIST;
547 STRUCT!{struct WLAN_COUNTRY_OR_REGION_STRING_LIST {
548 dwNumberOfItems: DWORD,
549 pCountryOrRegionStringList: [DOT11_COUNTRY_OR_REGION_STRING; 1],
550 }}
551 pub type PWLAN_COUNTRY_OR_REGION_STRING_LIST = *mut WLAN_COUNTRY_OR_REGION_STRING_LIST;
552 STRUCT!{struct WLAN_PROFILE_INFO_LIST {
553 dwNumberOfItems: DWORD,
554 dwIndex: DWORD,
555 ProfileInfo: [WLAN_PROFILE_INFO; 1],
556 }}
557 pub type PWLAN_PROFILE_INFO_LIST = *mut WLAN_PROFILE_INFO_LIST;
558 STRUCT!{struct WLAN_AVAILABLE_NETWORK_LIST {
559 dwNumberOfItems: DWORD,
560 dwIndex: DWORD,
561 Network: [WLAN_AVAILABLE_NETWORK; 1],
562 }}
563 pub type PWLAN_AVAILABLE_NETWORK_LIST = *mut WLAN_AVAILABLE_NETWORK_LIST;
564 STRUCT!{struct WLAN_AVAILABLE_NETWORK_LIST_V2 {
565 dwNumberOfItems: DWORD,
566 dwIndex: DWORD,
567 Network: [WLAN_AVAILABLE_NETWORK_V2; 1],
568 }}
569 pub type PWLAN_AVAILABLE_NETWORK_LIST_V2 = *mut WLAN_AVAILABLE_NETWORK_LIST_V2;
570 STRUCT!{struct WLAN_INTERFACE_INFO_LIST {
571 dwNumberOfItems: DWORD,
572 dwIndex: DWORD,
573 InterfaceInfo: [WLAN_INTERFACE_INFO; 1],
574 }}
575 pub type PWLAN_INTERFACE_INFO_LIST = *mut WLAN_INTERFACE_INFO_LIST;
576 STRUCT!{struct DOT11_NETWORK_LIST {
577 dwNumberOfItems: DWORD,
578 dwIndex: DWORD,
579 Network: [DOT11_NETWORK; 1],
580 }}
581 pub type PDOT11_NETWORK_LIST = *mut DOT11_NETWORK_LIST;
582 ENUM!{enum WLAN_POWER_SETTING {
583 wlan_power_setting_no_saving = 0,
584 wlan_power_setting_low_saving = 1,
585 wlan_power_setting_medium_saving = 2,
586 wlan_power_setting_maximum_saving = 3,
587 wlan_power_setting_invalid = 4,
588 }}
589 pub type PWLAN_POWER_SETTING = *mut WLAN_POWER_SETTING;
590 pub const WLAN_CONNECTION_HIDDEN_NETWORK: DWORD = 0x00000001;
591 pub const WLAN_CONNECTION_ADHOC_JOIN_ONLY: DWORD = 0x00000002;
592 pub const WLAN_CONNECTION_IGNORE_PRIVACY_BIT: DWORD = 0x00000004;
593 pub const WLAN_CONNECTION_EAPOL_PASSTHROUGH: DWORD = 0x00000008;
594 pub const WLAN_CONNECTION_PERSIST_DISCOVERY_PROFILE: DWORD = 0x00000010;
595 pub const WLAN_CONNECTION_PERSIST_DISCOVERY_PROFILE_CONNECTION_MODE_AUTO: DWORD = 0x00000020;
596 pub const WLAN_CONNECTION_PERSIST_DISCOVERY_PROFILE_OVERWRITE_EXISTING: DWORD = 0x00000040;
597 STRUCT!{struct WLAN_CONNECTION_PARAMETERS {
598 wlanConnectionMode: WLAN_CONNECTION_MODE,
599 strProfile: LPCWSTR,
600 pDot11Ssid: PDOT11_SSID,
601 pDesiredBssidList: PDOT11_BSSID_LIST,
602 dot11BssType: DOT11_BSS_TYPE,
603 dwFlags: DWORD,
604 }}
605 pub type PWLAN_CONNECTION_PARAMETERS = *mut WLAN_CONNECTION_PARAMETERS;
606 STRUCT!{struct WLAN_CONNECTION_PARAMETERS_V2 {
607 wlanConnectionMode: WLAN_CONNECTION_MODE,
608 strProfile: LPCWSTR,
609 pDot11Ssid: PDOT11_SSID,
610 pDot11Hessid: PDOT11_HESSID,
611 pDesiredBssidList: PDOT11_BSSID_LIST,
612 dot11BssType: DOT11_BSS_TYPE,
613 dwFlags: DWORD,
614 pDot11AccessNetworkOptions: PDOT11_ACCESSNETWORKOPTIONS,
615 }}
616 pub type PWLAN_CONNECTION_PARAMETERS_V2 = *mut WLAN_CONNECTION_PARAMETERS_V2;
617 STRUCT!{struct WLAN_MSM_NOTIFICATION_DATA {
618 wlanConnectionMode: WLAN_CONNECTION_MODE,
619 strProfileName: [WCHAR; WLAN_MAX_NAME_LENGTH],
620 dot11Ssid: DOT11_SSID,
621 dot11BssType: DOT11_BSS_TYPE,
622 dot11MacAddr: DOT11_MAC_ADDRESS,
623 bSecurityEnabled: BOOL,
624 bFirstPeer: BOOL,
625 bLastPeer: BOOL,
626 wlanReasonCode: WLAN_REASON_CODE,
627 }}
628 pub type PWLAN_MSM_NOTIFICATION_DATA = *mut WLAN_MSM_NOTIFICATION_DATA;
629 pub const WLAN_CONNECTION_NOTIFICATION_ADHOC_NETWORK_FORMED: DWORD = 0x00000001;
630 pub const WLAN_CONNECTION_NOTIFICATION_CONSOLE_USER_PROFILE: DWORD = 0x00000004;
631 STRUCT!{struct WLAN_CONNECTION_NOTIFICATION_DATA {
632 wlanConnectionMode: WLAN_CONNECTION_MODE,
633 strProfileName: [WCHAR; WLAN_MAX_NAME_LENGTH],
634 dot11Ssid: DOT11_SSID,
635 dot11BssType: DOT11_BSS_TYPE,
636 bSecurityEnabled: BOOL,
637 wlanReasonCode: WLAN_REASON_CODE,
638 dwFlags: DWORD,
639 strProfileXml: [WCHAR; 1],
640 }}
641 pub type PWLAN_CONNECTION_NOTIFICATION_DATA = *mut WLAN_CONNECTION_NOTIFICATION_DATA;
642 pub const WLAN_NOTIFICATION_SOURCE_NONE: DWORD = L2_NOTIFICATION_SOURCE_NONE;
643 pub const WLAN_NOTIFICATION_SOURCE_ALL: DWORD = L2_NOTIFICATION_SOURCE_ALL;
644 pub const WLAN_NOTIFICATION_SOURCE_ACM: DWORD = L2_NOTIFICATION_SOURCE_WLAN_ACM;
645 pub const WLAN_NOTIFICATION_SOURCE_MSM: DWORD = L2_NOTIFICATION_SOURCE_WLAN_MSM;
646 pub const WLAN_NOTIFICATION_SOURCE_SECURITY: DWORD = L2_NOTIFICATION_SOURCE_WLAN_SECURITY;
647 pub const WLAN_NOTIFICATION_SOURCE_IHV: DWORD = L2_NOTIFICATION_SOURCE_WLAN_IHV;
648 pub const WLAN_NOTIFICATION_SOURCE_HNWK: DWORD = L2_NOTIFICATION_SOURCE_WLAN_HNWK;
649 pub const WLAN_NOTIFICATION_SOURCE_ONEX: DWORD = L2_NOTIFICATION_SOURCE_ONEX;
650 ENUM!{enum WLAN_NOTIFICATION_ACM {
651 wlan_notification_acm_start = L2_NOTIFICATION_CODE_PUBLIC_BEGIN,
652 wlan_notification_acm_autoconf_enabled = 1,
653 wlan_notification_acm_autoconf_disabled = 2,
654 wlan_notification_acm_background_scan_enabled = 3,
655 wlan_notification_acm_background_scan_disabled = 4,
656 wlan_notification_acm_bss_type_change = 5,
657 wlan_notification_acm_power_setting_change = 6,
658 wlan_notification_acm_scan_complete = 7,
659 wlan_notification_acm_scan_fail = 8,
660 wlan_notification_acm_connection_start = 9,
661 wlan_notification_acm_connection_complete = 10,
662 wlan_notification_acm_connection_attempt_fail = 11,
663 wlan_notification_acm_filter_list_change = 12,
664 wlan_notification_acm_interface_arrival = 13,
665 wlan_notification_acm_interface_removal = 14,
666 wlan_notification_acm_profile_change = 15,
667 wlan_notification_acm_profile_name_change = 16,
668 wlan_notification_acm_profiles_exhausted = 17,
669 wlan_notification_acm_network_not_available = 18,
670 wlan_notification_acm_network_available = 19,
671 wlan_notification_acm_disconnecting = 20,
672 wlan_notification_acm_disconnected = 21,
673 wlan_notification_acm_adhoc_network_state_change = 22,
674 wlan_notification_acm_profile_unblocked = 23,
675 wlan_notification_acm_screen_power_change = 24,
676 wlan_notification_acm_profile_blocked = 25,
677 wlan_notification_acm_scan_list_refresh = 26,
678 wlan_notification_acm_operational_state_change = 27,
679 wlan_notification_acm_end = 28,
680 }}
681 pub type PWLAN_NOTIFICATION_ACM = *mut WLAN_NOTIFICATION_ACM;
682 ENUM!{enum WLAN_NOTIFICATION_MSM {
683 wlan_notification_msm_start = L2_NOTIFICATION_CODE_PUBLIC_BEGIN,
684 wlan_notification_msm_associating = 1,
685 wlan_notification_msm_associated = 2,
686 wlan_notification_msm_authenticating = 3,
687 wlan_notification_msm_connected = 4,
688 wlan_notification_msm_roaming_start = 5,
689 wlan_notification_msm_roaming_end = 6,
690 wlan_notification_msm_radio_state_change = 7,
691 wlan_notification_msm_signal_quality_change = 8,
692 wlan_notification_msm_disassociating = 9,
693 wlan_notification_msm_disconnected = 10,
694 wlan_notification_msm_peer_join = 11,
695 wlan_notification_msm_peer_leave = 12,
696 wlan_notification_msm_adapter_removal = 13,
697 wlan_notification_msm_adapter_operation_mode_change = 14,
698 wlan_notification_msm_link_degraded = 15,
699 wlan_notification_msm_link_improved = 16,
700 wlan_notification_msm_end = 17,
701 }}
702 pub type PWLAN_NOTIFICATION_MSM = *mut WLAN_NOTIFICATION_MSM;
703 ENUM!{enum WLAN_NOTIFICATION_SECURITY {
704 wlan_notification_security_start = L2_NOTIFICATION_CODE_PUBLIC_BEGIN,
705 wlan_notification_security_end = 1,
706 }}
707 pub type PWLAN_NOTIFICATION_SECURITY = *mut WLAN_NOTIFICATION_SECURITY;
708 pub type WLAN_NOTIFICATION_DATA = L2_NOTIFICATION_DATA;
709 pub type PWLAN_NOTIFICATION_DATA = *mut L2_NOTIFICATION_DATA;
710 FN!{stdcall WLAN_NOTIFICATION_CALLBACK(
711 PWLAN_NOTIFICATION_DATA,
712 PVOID,
713 ) -> ()}
714 ENUM!{enum WLAN_OPCODE_VALUE_TYPE {
715 wlan_opcode_value_type_query_only = 0,
716 wlan_opcode_value_type_set_by_group_policy = 1,
717 wlan_opcode_value_type_set_by_user = 2,
718 wlan_opcode_value_type_invalid = 3,
719 }}
720 pub type PWLAN_OPCODE_VALUE_TYPE = *mut WLAN_OPCODE_VALUE_TYPE;
721 ENUM!{enum WLAN_INTF_OPCODE {
722 wlan_intf_opcode_autoconf_start = 0x000000000,
723 wlan_intf_opcode_autoconf_enabled = 1,
724 wlan_intf_opcode_background_scan_enabled = 2,
725 wlan_intf_opcode_media_streaming_mode = 3,
726 wlan_intf_opcode_radio_state = 4,
727 wlan_intf_opcode_bss_type = 5,
728 wlan_intf_opcode_interface_state = 6,
729 wlan_intf_opcode_current_connection = 7,
730 wlan_intf_opcode_channel_number = 8,
731 wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs = 9,
732 wlan_intf_opcode_supported_adhoc_auth_cipher_pairs = 10,
733 wlan_intf_opcode_supported_country_or_region_string_list = 11,
734 wlan_intf_opcode_current_operation_mode = 12,
735 wlan_intf_opcode_supported_safe_mode = 13,
736 wlan_intf_opcode_certified_safe_mode = 14,
737 wlan_intf_opcode_hosted_network_capable = 15,
738 wlan_intf_opcode_management_frame_protection_capable = 16,
739 wlan_intf_opcode_autoconf_end = 0x0fffffff,
740 wlan_intf_opcode_msm_start = 0x10000100,
741 wlan_intf_opcode_statistics = 268435713,
742 wlan_intf_opcode_rssi = 268435714,
743 wlan_intf_opcode_msm_end = 0x1fffffff,
744 wlan_intf_opcode_security_start = 0x20010000,
745 wlan_intf_opcode_security_end = 0x2fffffff,
746 wlan_intf_opcode_ihv_start = 0x30000000,
747 wlan_intf_opcode_ihv_end = 0x3fffffff,
748 }}
749 pub type PWLAN_INTF_OPCODE = *mut WLAN_INTF_OPCODE;
750 ENUM!{enum WLAN_AUTOCONF_OPCODE {
751 wlan_autoconf_opcode_start = 0,
752 wlan_autoconf_opcode_show_denied_networks = 1,
753 wlan_autoconf_opcode_power_setting = 2,
754 wlan_autoconf_opcode_only_use_gp_profiles_for_allowed_networks = 3,
755 wlan_autoconf_opcode_allow_explicit_creds = 4,
756 wlan_autoconf_opcode_block_period = 5,
757 wlan_autoconf_opcode_allow_virtual_station_extensibility = 6,
758 wlan_autoconf_opcode_end = 7,
759 }}
760 pub type PWLAN_AUTOCONF_OPCODE = *mut WLAN_AUTOCONF_OPCODE;
761 ENUM!{enum WLAN_IHV_CONTROL_TYPE {
762 wlan_ihv_control_type_service = 0,
763 wlan_ihv_control_type_driver = 1,
764 }}
765 pub type PWLAN_IHV_CONTROL_TYPE = *mut WLAN_IHV_CONTROL_TYPE;
766 ENUM!{enum WLAN_FILTER_LIST_TYPE {
767 wlan_filter_list_type_gp_permit = 0,
768 wlan_filter_list_type_gp_deny = 1,
769 wlan_filter_list_type_user_permit = 2,
770 wlan_filter_list_type_user_deny = 3,
771 }}
772 pub type PWLAN_FILTER_LIST_TYPE = *mut WLAN_FILTER_LIST_TYPE;
773 STRUCT!{struct WLAN_PHY_FRAME_STATISTICS {
774 ullTransmittedFrameCount: ULONGLONG,
775 ullMulticastTransmittedFrameCount: ULONGLONG,
776 ullFailedCount: ULONGLONG,
777 ullRetryCount: ULONGLONG,
778 ullMultipleRetryCount: ULONGLONG,
779 ullMaxTXLifetimeExceededCount: ULONGLONG,
780 ullTransmittedFragmentCount: ULONGLONG,
781 ullRTSSuccessCount: ULONGLONG,
782 ullRTSFailureCount: ULONGLONG,
783 ullACKFailureCount: ULONGLONG,
784 ullReceivedFrameCount: ULONGLONG,
785 ullMulticastReceivedFrameCount: ULONGLONG,
786 ullPromiscuousReceivedFrameCount: ULONGLONG,
787 ullMaxRXLifetimeExceededCount: ULONGLONG,
788 ullFrameDuplicateCount: ULONGLONG,
789 ullReceivedFragmentCount: ULONGLONG,
790 ullPromiscuousReceivedFragmentCount: ULONGLONG,
791 ullFCSErrorCount: ULONGLONG,
792 }}
793 pub type PWLAN_PHY_FRAME_STATISTICS = *mut WLAN_PHY_FRAME_STATISTICS;
794 STRUCT!{struct WLAN_MAC_FRAME_STATISTICS {
795 ullTransmittedFrameCount: ULONGLONG,
796 ullReceivedFrameCount: ULONGLONG,
797 ullWEPExcludedCount: ULONGLONG,
798 ullTKIPLocalMICFailures: ULONGLONG,
799 ullTKIPReplays: ULONGLONG,
800 ullTKIPICVErrorCount: ULONGLONG,
801 ullCCMPReplays: ULONGLONG,
802 ullCCMPDecryptErrors: ULONGLONG,
803 ullWEPUndecryptableCount: ULONGLONG,
804 ullWEPICVErrorCount: ULONGLONG,
805 ullDecryptSuccessCount: ULONGLONG,
806 ullDecryptFailureCount: ULONGLONG,
807 }}
808 pub type PWLAN_MAC_FRAME_STATISTICS = *mut WLAN_MAC_FRAME_STATISTICS;
809 STRUCT!{struct WLAN_STATISTICS {
810 ullFourWayHandshakeFailures: ULONGLONG,
811 ullTKIPCounterMeasuresInvoked: ULONGLONG,
812 ullReserved: ULONGLONG,
813 MacUcastCounters: WLAN_MAC_FRAME_STATISTICS,
814 MacMcastCounters: WLAN_MAC_FRAME_STATISTICS,
815 dwNumberOfPhys: DWORD,
816 PhyCounters: [WLAN_PHY_FRAME_STATISTICS; 1],
817 }}
818 pub type PWLAN_STATISTICS = *mut WLAN_STATISTICS;
819 pub const WLAN_READ_ACCESS: DWORD = STANDARD_RIGHTS_READ | FILE_READ_DATA;
820 pub const WLAN_EXECUTE_ACCESS: DWORD = WLAN_READ_ACCESS | STANDARD_RIGHTS_EXECUTE | FILE_EXECUTE;
821 pub const WLAN_WRITE_ACCESS: DWORD = WLAN_READ_ACCESS | WLAN_EXECUTE_ACCESS | STANDARD_RIGHTS_WRITE
822 | FILE_WRITE_DATA | DELETE | WRITE_DAC;
823 ENUM!{enum WLAN_SECURABLE_OBJECT {
824 wlan_secure_permit_list = 0,
825 wlan_secure_deny_list = 1,
826 wlan_secure_ac_enabled = 2,
827 wlan_secure_bc_scan_enabled = 3,
828 wlan_secure_bss_type = 4,
829 wlan_secure_show_denied = 5,
830 wlan_secure_interface_properties = 6,
831 wlan_secure_ihv_control = 7,
832 wlan_secure_all_user_profiles_order = 8,
833 wlan_secure_add_new_all_user_profiles = 9,
834 wlan_secure_add_new_per_user_profiles = 10,
835 wlan_secure_media_streaming_mode_enabled = 11,
836 wlan_secure_current_operation_mode = 12,
837 wlan_secure_get_plaintext_key = 13,
838 wlan_secure_hosted_network_elevated_access = 14,
839 wlan_secure_virtual_station_extensibility = 15,
840 wlan_secure_wfd_elevated_access = 16,
841 WLAN_SECURABLE_OBJECT_COUNT = 17,
842 }}
843 pub type PWLAN_SECURABLE_OBJECT = *mut WLAN_SECURABLE_OBJECT;
844 STRUCT!{struct WLAN_DEVICE_SERVICE_GUID_LIST {
845 dwNumberOfItems: DWORD,
846 dwIndex: DWORD,
847 DeviceService: [GUID; 1],
848 }}
849 pub type PWLAN_DEVICE_SERVICE_GUID_LIST = *mut WLAN_DEVICE_SERVICE_GUID_LIST;
850 pub const WFD_API_VERSION_1_0: DWORD = 0x00000001;
851 pub const WFD_API_VERSION: DWORD = WFD_API_VERSION_1_0;
852 ENUM!{enum WFD_ROLE_TYPE {
853 WFD_ROLE_TYPE_NONE = 0x00,
854 WFD_ROLE_TYPE_DEVICE = 0x01,
855 WFD_ROLE_TYPE_GROUP_OWNER = 0x02,
856 WFD_ROLE_TYPE_CLIENT = 0x04,
857 WFD_ROLE_TYPE_MAX = 0x05,
858 }}
859 pub type PWFD_ROLE_TYPE = *mut WFD_ROLE_TYPE;
860 STRUCT!{struct WFD_GROUP_ID {
861 DeviceAddress: DOT11_MAC_ADDRESS,
862 GroupSSID: DOT11_SSID,
863 }}
864 pub type PWFD_GROUP_ID = *mut WFD_GROUP_ID;
865 extern "system" {
WlanOpenHandle( dwClientVersion: DWORD, pReserved: PVOID, pdwNegotiatedVersion: PDWORD, phClientHandle: PHANDLE, ) -> DWORD866 pub fn WlanOpenHandle(
867 dwClientVersion: DWORD,
868 pReserved: PVOID,
869 pdwNegotiatedVersion: PDWORD,
870 phClientHandle: PHANDLE,
871 ) -> DWORD;
WlanCloseHandle( hClientHandle: HANDLE, pReserved: PVOID, ) -> DWORD872 pub fn WlanCloseHandle(
873 hClientHandle: HANDLE,
874 pReserved: PVOID,
875 ) -> DWORD;
WlanEnumInterfaces( hClientHandle: HANDLE, pReserved: PVOID, ppInterfaceList: *mut PWLAN_INTERFACE_INFO_LIST, ) -> DWORD876 pub fn WlanEnumInterfaces(
877 hClientHandle: HANDLE,
878 pReserved: PVOID,
879 ppInterfaceList: *mut PWLAN_INTERFACE_INFO_LIST,
880 ) -> DWORD;
WlanSetAutoConfigParameter( hClientHandle: HANDLE, OpCode: WLAN_AUTOCONF_OPCODE, dwDataSize: DWORD, pData: PVOID, pReserved: PVOID, ) -> DWORD881 pub fn WlanSetAutoConfigParameter(
882 hClientHandle: HANDLE,
883 OpCode: WLAN_AUTOCONF_OPCODE,
884 dwDataSize: DWORD,
885 pData: PVOID,
886 pReserved: PVOID,
887 ) -> DWORD;
WlanQueryAutoConfigParameter( hClientHandle: HANDLE, OpCode: WLAN_AUTOCONF_OPCODE, pReserved: PVOID, pdwDataSize: PDWORD, ppData: *mut PVOID, pWlanOpcodeValueType: PWLAN_OPCODE_VALUE_TYPE, ) -> DWORD888 pub fn WlanQueryAutoConfigParameter(
889 hClientHandle: HANDLE,
890 OpCode: WLAN_AUTOCONF_OPCODE,
891 pReserved: PVOID,
892 pdwDataSize: PDWORD,
893 ppData: *mut PVOID,
894 pWlanOpcodeValueType: PWLAN_OPCODE_VALUE_TYPE,
895 ) -> DWORD;
WlanGetInterfaceCapability( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pReserved: PVOID, ppCapability: *mut PWLAN_INTERFACE_CAPABILITY, ) -> DWORD896 pub fn WlanGetInterfaceCapability(
897 hClientHandle: HANDLE,
898 pInterfaceGuid: *const GUID,
899 pReserved: PVOID,
900 ppCapability: *mut PWLAN_INTERFACE_CAPABILITY,
901 ) -> DWORD;
WlanSetInterface( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, OpCode: WLAN_INTF_OPCODE, dwDataSize: DWORD, pData: PVOID, pReserved: PVOID, ) -> DWORD902 pub fn WlanSetInterface(
903 hClientHandle: HANDLE,
904 pInterfaceGuid: *const GUID,
905 OpCode: WLAN_INTF_OPCODE,
906 dwDataSize: DWORD,
907 pData: PVOID,
908 pReserved: PVOID,
909 ) -> DWORD;
WlanQueryInterface( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, OpCode: WLAN_INTF_OPCODE, pReserved: PVOID, pdwDataSize: PDWORD, ppData: *mut PVOID, pWlanOpcodeValueType: PWLAN_OPCODE_VALUE_TYPE, ) -> DWORD910 pub fn WlanQueryInterface(
911 hClientHandle: HANDLE,
912 pInterfaceGuid: *const GUID,
913 OpCode: WLAN_INTF_OPCODE,
914 pReserved: PVOID,
915 pdwDataSize: PDWORD,
916 ppData: *mut PVOID,
917 pWlanOpcodeValueType: PWLAN_OPCODE_VALUE_TYPE,
918 ) -> DWORD;
WlanIhvControl( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, Type: WLAN_IHV_CONTROL_TYPE, dwInBufferSize: DWORD, pInBuffer: PVOID, dwOutBufferSize: DWORD, pOutBuffer: PVOID, pdwBytesReturned: PDWORD, ) -> DWORD919 pub fn WlanIhvControl(
920 hClientHandle: HANDLE,
921 pInterfaceGuid: *const GUID,
922 Type: WLAN_IHV_CONTROL_TYPE,
923 dwInBufferSize: DWORD,
924 pInBuffer: PVOID,
925 dwOutBufferSize: DWORD,
926 pOutBuffer: PVOID,
927 pdwBytesReturned: PDWORD,
928 ) -> DWORD;
WlanScan( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pDot11Ssid: PDOT11_SSID, pIeData: PWLAN_RAW_DATA, pReserved: PVOID, ) -> DWORD929 pub fn WlanScan(
930 hClientHandle: HANDLE,
931 pInterfaceGuid: *const GUID,
932 pDot11Ssid: PDOT11_SSID,
933 pIeData: PWLAN_RAW_DATA,
934 pReserved: PVOID,
935 ) -> DWORD;
WlanGetAvailableNetworkList( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, dwFlags: DWORD, pReserved: PVOID, ppAvailableNetworkList: *mut PWLAN_AVAILABLE_NETWORK_LIST, ) -> DWORD936 pub fn WlanGetAvailableNetworkList(
937 hClientHandle: HANDLE,
938 pInterfaceGuid: *const GUID,
939 dwFlags: DWORD,
940 pReserved: PVOID,
941 ppAvailableNetworkList: *mut PWLAN_AVAILABLE_NETWORK_LIST,
942 ) -> DWORD;
WlanGetAvailableNetworkList2( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, dwFlags: DWORD, pReserved: PVOID, ppAvailableNetworkList: *mut PWLAN_AVAILABLE_NETWORK_LIST_V2, ) -> DWORD943 pub fn WlanGetAvailableNetworkList2(
944 hClientHandle: HANDLE,
945 pInterfaceGuid: *const GUID,
946 dwFlags: DWORD,
947 pReserved: PVOID,
948 ppAvailableNetworkList: *mut PWLAN_AVAILABLE_NETWORK_LIST_V2,
949 ) -> DWORD;
WlanGetNetworkBssList( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pDot11Ssid: PDOT11_SSID, dot11BssType: DOT11_BSS_TYPE, bSecurityEnabled: BOOL, pReserved: PVOID, ppWlanBssList: *mut PWLAN_BSS_LIST, ) -> DWORD950 pub fn WlanGetNetworkBssList(
951 hClientHandle: HANDLE,
952 pInterfaceGuid: *const GUID,
953 pDot11Ssid: PDOT11_SSID,
954 dot11BssType: DOT11_BSS_TYPE,
955 bSecurityEnabled: BOOL,
956 pReserved: PVOID,
957 ppWlanBssList: *mut PWLAN_BSS_LIST,
958 ) -> DWORD;
WlanConnect( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pConnectionParameters: PWLAN_CONNECTION_PARAMETERS, pReserved: PVOID, ) -> DWORD959 pub fn WlanConnect(
960 hClientHandle: HANDLE,
961 pInterfaceGuid: *const GUID,
962 pConnectionParameters: PWLAN_CONNECTION_PARAMETERS,
963 pReserved: PVOID,
964 ) -> DWORD;
WlanConnect2( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pConnectionParameters: PWLAN_CONNECTION_PARAMETERS_V2, pReserved: PVOID, ) -> DWORD965 pub fn WlanConnect2(
966 hClientHandle: HANDLE,
967 pInterfaceGuid: *const GUID,
968 pConnectionParameters: PWLAN_CONNECTION_PARAMETERS_V2,
969 pReserved: PVOID,
970 ) -> DWORD;
WlanDisconnect( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pReserved: PVOID, ) -> DWORD971 pub fn WlanDisconnect(
972 hClientHandle: HANDLE,
973 pInterfaceGuid: *const GUID,
974 pReserved: PVOID,
975 ) -> DWORD;
WlanRegisterNotification( hClientHandle: HANDLE, dwNotifSource: DWORD, bIgnoreDuplicate: BOOL, funcCallback: WLAN_NOTIFICATION_CALLBACK, pCallbackContext: PVOID, pReserved: PVOID, pdwPrevNotifSource: PDWORD, ) -> DWORD976 pub fn WlanRegisterNotification(
977 hClientHandle: HANDLE,
978 dwNotifSource: DWORD,
979 bIgnoreDuplicate: BOOL,
980 funcCallback: WLAN_NOTIFICATION_CALLBACK,
981 pCallbackContext: PVOID,
982 pReserved: PVOID,
983 pdwPrevNotifSource: PDWORD,
984 ) -> DWORD;
WlanGetProfile( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, pReserved: PVOID, pstrProfileXml: *mut LPWSTR, pdwFlags: *mut DWORD, pdwGrantedAccess: *mut DWORD, ) -> DWORD985 pub fn WlanGetProfile(
986 hClientHandle: HANDLE,
987 pInterfaceGuid: *const GUID,
988 strProfileName: LPCWSTR,
989 pReserved: PVOID,
990 pstrProfileXml: *mut LPWSTR,
991 pdwFlags: *mut DWORD,
992 pdwGrantedAccess: *mut DWORD,
993 ) -> DWORD;
WlanSetProfileEapUserData( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, eapType: EAP_METHOD_TYPE, dwFlags: DWORD, dwEapUserDataSize: DWORD, pbEapUserData: LPBYTE, pReserved: PVOID, ) -> DWORD994 pub fn WlanSetProfileEapUserData(
995 hClientHandle: HANDLE,
996 pInterfaceGuid: *const GUID,
997 strProfileName: LPCWSTR,
998 eapType: EAP_METHOD_TYPE,
999 dwFlags: DWORD,
1000 dwEapUserDataSize: DWORD,
1001 pbEapUserData: LPBYTE,
1002 pReserved: PVOID,
1003 ) -> DWORD;
WlanSetProfileEapXmlUserData( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, dwFlags: DWORD, strEapXmlUserData: LPCWSTR, pReserved: PVOID, ) -> DWORD1004 pub fn WlanSetProfileEapXmlUserData(
1005 hClientHandle: HANDLE,
1006 pInterfaceGuid: *const GUID,
1007 strProfileName: LPCWSTR,
1008 dwFlags: DWORD,
1009 strEapXmlUserData: LPCWSTR,
1010 pReserved: PVOID,
1011 ) -> DWORD;
WlanSetProfile( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, dwFlags: DWORD, strProfileXml: LPCWSTR, strAllUserProfileSecurity: LPCWSTR, bOverwrite: BOOL, pReserved: PVOID, pdwReasonCode: *mut DWORD, ) -> DWORD1012 pub fn WlanSetProfile(
1013 hClientHandle: HANDLE,
1014 pInterfaceGuid: *const GUID,
1015 dwFlags: DWORD,
1016 strProfileXml: LPCWSTR,
1017 strAllUserProfileSecurity: LPCWSTR,
1018 bOverwrite: BOOL,
1019 pReserved: PVOID,
1020 pdwReasonCode: *mut DWORD,
1021 ) -> DWORD;
WlanDeleteProfile( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, pReserved: PVOID, ) -> DWORD1022 pub fn WlanDeleteProfile(
1023 hClientHandle: HANDLE,
1024 pInterfaceGuid: *const GUID,
1025 strProfileName: LPCWSTR,
1026 pReserved: PVOID,
1027 ) -> DWORD;
WlanRenameProfile( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strOldProfileName: LPCWSTR, strNewProfileName: LPCWSTR, pReserved: PVOID, ) -> DWORD1028 pub fn WlanRenameProfile(
1029 hClientHandle: HANDLE,
1030 pInterfaceGuid: *const GUID,
1031 strOldProfileName: LPCWSTR,
1032 strNewProfileName: LPCWSTR,
1033 pReserved: PVOID,
1034 ) -> DWORD;
WlanGetProfileList( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pReserved: PVOID, ppProfileList: *mut PWLAN_PROFILE_INFO_LIST, ) -> DWORD1035 pub fn WlanGetProfileList(
1036 hClientHandle: HANDLE,
1037 pInterfaceGuid: *const GUID,
1038 pReserved: PVOID,
1039 ppProfileList: *mut PWLAN_PROFILE_INFO_LIST,
1040 ) -> DWORD;
WlanSetProfileList( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, dwItems: DWORD, strProfileNames: *mut LPCWSTR, pReserved: PVOID, ) -> DWORD1041 pub fn WlanSetProfileList(
1042 hClientHandle: HANDLE,
1043 pInterfaceGuid: *const GUID,
1044 dwItems: DWORD,
1045 strProfileNames: *mut LPCWSTR,
1046 pReserved: PVOID,
1047 ) -> DWORD;
WlanSetProfilePosition( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, dwPosition: DWORD, pReserved: PVOID, ) -> DWORD1048 pub fn WlanSetProfilePosition(
1049 hClientHandle: HANDLE,
1050 pInterfaceGuid: *const GUID,
1051 strProfileName: LPCWSTR,
1052 dwPosition: DWORD,
1053 pReserved: PVOID,
1054 ) -> DWORD;
WlanSetProfileCustomUserData( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, dwDataSize: DWORD, pData: PBYTE, pReserved: PVOID, ) -> DWORD1055 pub fn WlanSetProfileCustomUserData(
1056 hClientHandle: HANDLE,
1057 pInterfaceGuid: *const GUID,
1058 strProfileName: LPCWSTR,
1059 dwDataSize: DWORD,
1060 pData: PBYTE,
1061 pReserved: PVOID,
1062 ) -> DWORD;
WlanGetProfileCustomUserData( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, pReserved: PVOID, pdwDataSize: *mut DWORD, ppData: *mut PBYTE, ) -> DWORD1063 pub fn WlanGetProfileCustomUserData(
1064 hClientHandle: HANDLE,
1065 pInterfaceGuid: *const GUID,
1066 strProfileName: LPCWSTR,
1067 pReserved: PVOID,
1068 pdwDataSize: *mut DWORD,
1069 ppData: *mut PBYTE,
1070 ) -> DWORD;
WlanSetFilterList( hClientHandle: HANDLE, wlanFilterListType: WLAN_FILTER_LIST_TYPE, pNetworkList: PDOT11_NETWORK_LIST, pReserved: PVOID, ) -> DWORD1071 pub fn WlanSetFilterList(
1072 hClientHandle: HANDLE,
1073 wlanFilterListType: WLAN_FILTER_LIST_TYPE,
1074 pNetworkList: PDOT11_NETWORK_LIST,
1075 pReserved: PVOID,
1076 ) -> DWORD;
WlanGetFilterList( hClientHandle: HANDLE, wlanFilterListType: WLAN_FILTER_LIST_TYPE, pReserved: PVOID, ppNetworkList: *mut PDOT11_NETWORK_LIST, ) -> DWORD1077 pub fn WlanGetFilterList(
1078 hClientHandle: HANDLE,
1079 wlanFilterListType: WLAN_FILTER_LIST_TYPE,
1080 pReserved: PVOID,
1081 ppNetworkList: *mut PDOT11_NETWORK_LIST,
1082 ) -> DWORD;
WlanSetPsdIEDataList( hClientHandle: HANDLE, strFormat: LPCWSTR, pPsdIEDataList: PWLAN_RAW_DATA_LIST, pReserved: PVOID, ) -> DWORD1083 pub fn WlanSetPsdIEDataList(
1084 hClientHandle: HANDLE,
1085 strFormat: LPCWSTR,
1086 pPsdIEDataList: PWLAN_RAW_DATA_LIST,
1087 pReserved: PVOID,
1088 ) -> DWORD;
WlanSaveTemporaryProfile( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, strProfileName: LPCWSTR, strAllUserProfileSecurity: LPCWSTR, dwFlags: DWORD, bOverWrite: BOOL, pReserved: PVOID, ) -> DWORD1089 pub fn WlanSaveTemporaryProfile(
1090 hClientHandle: HANDLE,
1091 pInterfaceGuid: *const GUID,
1092 strProfileName: LPCWSTR,
1093 strAllUserProfileSecurity: LPCWSTR,
1094 dwFlags: DWORD,
1095 bOverWrite: BOOL,
1096 pReserved: PVOID,
1097 ) -> DWORD;
WlanDeviceServiceCommand( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, pDeviceServiceGuid: LPGUID, dwOpCode: DWORD, dwInBufferSize: DWORD, pInBuffer: PVOID, dwOutBufferSize: DWORD, pOutBuffer: PVOID, pdwBytesReturned: PDWORD, ) -> DWORD1098 pub fn WlanDeviceServiceCommand(
1099 hClientHandle: HANDLE,
1100 pInterfaceGuid: *const GUID,
1101 pDeviceServiceGuid: LPGUID,
1102 dwOpCode: DWORD,
1103 dwInBufferSize: DWORD,
1104 pInBuffer: PVOID,
1105 dwOutBufferSize: DWORD,
1106 pOutBuffer: PVOID,
1107 pdwBytesReturned: PDWORD,
1108 ) -> DWORD;
WlanGetSupportedDeviceServices( hClientHandle: HANDLE, pInterfaceGuid: *const GUID, ppDevSvcGuidList: *mut PWLAN_DEVICE_SERVICE_GUID_LIST, ) -> DWORD1109 pub fn WlanGetSupportedDeviceServices(
1110 hClientHandle: HANDLE,
1111 pInterfaceGuid: *const GUID,
1112 ppDevSvcGuidList: *mut PWLAN_DEVICE_SERVICE_GUID_LIST,
1113 ) -> DWORD;
WlanExtractPsdIEDataList( hClientHandle: HANDLE, dwIeDataSize: DWORD, pRawIeData: PBYTE, strFormat: LPCWSTR, pReserved: PVOID, ppPsdIEDataList: *mut PWLAN_RAW_DATA_LIST, ) -> DWORD1114 pub fn WlanExtractPsdIEDataList(
1115 hClientHandle: HANDLE,
1116 dwIeDataSize: DWORD,
1117 pRawIeData: PBYTE,
1118 strFormat: LPCWSTR,
1119 pReserved: PVOID,
1120 ppPsdIEDataList: *mut PWLAN_RAW_DATA_LIST,
1121 ) -> DWORD;
WlanReasonCodeToString( dwReasonCode: DWORD, dwBufferSize: DWORD, pStringBuffer: PWCHAR, pReserved: PVOID, ) -> DWORD1122 pub fn WlanReasonCodeToString(
1123 dwReasonCode: DWORD,
1124 dwBufferSize: DWORD,
1125 pStringBuffer: PWCHAR,
1126 pReserved: PVOID,
1127 ) -> DWORD;
WlanAllocateMemory( dwMemorySize: DWORD, ) -> PVOID1128 pub fn WlanAllocateMemory(
1129 dwMemorySize: DWORD,
1130 ) -> PVOID;
WlanFreeMemory( pMemory: PVOID, )1131 pub fn WlanFreeMemory(
1132 pMemory: PVOID,
1133 );
WlanSetSecuritySettings( hClientHandle: HANDLE, SecurableObject: WLAN_SECURABLE_OBJECT, strModifiedSDDL: LPCWSTR, ) -> DWORD1134 pub fn WlanSetSecuritySettings(
1135 hClientHandle: HANDLE,
1136 SecurableObject: WLAN_SECURABLE_OBJECT,
1137 strModifiedSDDL: LPCWSTR,
1138 ) -> DWORD;
WlanGetSecuritySettings( hClientHandle: HANDLE, SecurableObject: WLAN_SECURABLE_OBJECT, pValueType: PWLAN_OPCODE_VALUE_TYPE, pstrCurrentSDDL: *mut LPWSTR, pdwGrantedAccess: PDWORD, ) -> DWORD1139 pub fn WlanGetSecuritySettings(
1140 hClientHandle: HANDLE,
1141 SecurableObject: WLAN_SECURABLE_OBJECT,
1142 pValueType: PWLAN_OPCODE_VALUE_TYPE,
1143 pstrCurrentSDDL: *mut LPWSTR,
1144 pdwGrantedAccess: PDWORD,
1145 ) -> DWORD;
1146 }
1147 pub const WLAN_UI_API_VERSION: DWORD = 1;
1148 pub const WLAN_UI_API_INITIAL_VERSION: DWORD = 1;
1149 ENUM!{enum WL_DISPLAY_PAGES {
1150 WLConnectionPage = 0,
1151 WLSecurityPage = 1,
1152 WLAdvPage = 2,
1153 }}
1154 pub type PWL_DISPLAY_PAGES = *mut WL_DISPLAY_PAGES;
1155 extern "system" {
WlanUIEditProfile( dwClientVersion: DWORD, wstrProfileName: LPCWSTR, pInterfaceGuid: *mut GUID, hWnd: HWND, wlStartPage: WL_DISPLAY_PAGES, pReserved: PVOID, pWlanReasonCode: PWLAN_REASON_CODE, ) -> DWORD1156 pub fn WlanUIEditProfile(
1157 dwClientVersion: DWORD,
1158 wstrProfileName: LPCWSTR,
1159 pInterfaceGuid: *mut GUID,
1160 hWnd: HWND,
1161 wlStartPage: WL_DISPLAY_PAGES,
1162 pReserved: PVOID,
1163 pWlanReasonCode: PWLAN_REASON_CODE,
1164 ) -> DWORD;
1165 }
1166 ENUM!{enum WLAN_HOSTED_NETWORK_STATE {
1167 wlan_hosted_network_unavailable = 0,
1168 wlan_hosted_network_idle = 1,
1169 wlan_hosted_network_active = 2,
1170 }}
1171 pub type PWLAN_HOSTED_NETWORK_STATE = *mut WLAN_HOSTED_NETWORK_STATE;
1172 ENUM!{enum WLAN_HOSTED_NETWORK_REASON {
1173 wlan_hosted_network_reason_success = 0,
1174 wlan_hosted_network_reason_unspecified = 1,
1175 wlan_hosted_network_reason_bad_parameters = 2,
1176 wlan_hosted_network_reason_service_shutting_down = 3,
1177 wlan_hosted_network_reason_insufficient_resources = 4,
1178 wlan_hosted_network_reason_elevation_required = 5,
1179 wlan_hosted_network_reason_read_only = 6,
1180 wlan_hosted_network_reason_persistence_failed = 7,
1181 wlan_hosted_network_reason_crypt_error = 8,
1182 wlan_hosted_network_reason_impersonation = 9,
1183 wlan_hosted_network_reason_stop_before_start = 10,
1184 wlan_hosted_network_reason_interface_available = 11,
1185 wlan_hosted_network_reason_interface_unavailable = 12,
1186 wlan_hosted_network_reason_miniport_stopped = 13,
1187 wlan_hosted_network_reason_miniport_started = 14,
1188 wlan_hosted_network_reason_incompatible_connection_started = 15,
1189 wlan_hosted_network_reason_incompatible_connection_stopped = 16,
1190 wlan_hosted_network_reason_user_action = 17,
1191 wlan_hosted_network_reason_client_abort = 18,
1192 wlan_hosted_network_reason_ap_start_failed = 19,
1193 wlan_hosted_network_reason_peer_arrived = 20,
1194 wlan_hosted_network_reason_peer_departed = 21,
1195 wlan_hosted_network_reason_peer_timeout = 22,
1196 wlan_hosted_network_reason_gp_denied = 23,
1197 wlan_hosted_network_reason_service_unavailable = 24,
1198 wlan_hosted_network_reason_device_change = 25,
1199 wlan_hosted_network_reason_properties_change = 26,
1200 wlan_hosted_network_reason_virtual_station_blocking_use = 27,
1201 wlan_hosted_network_reason_service_available_on_virtual_station = 28,
1202 }}
1203 pub type PWLAN_HOSTED_NETWORK_REASON = *mut WLAN_HOSTED_NETWORK_REASON;
1204 ENUM!{enum WLAN_HOSTED_NETWORK_PEER_AUTH_STATE {
1205 wlan_hosted_network_peer_state_invalid = 0,
1206 wlan_hosted_network_peer_state_authenticated = 1,
1207 }}
1208 pub type PWLAN_HOSTED_NETWORK_PEER_AUTH_STATE = *mut WLAN_HOSTED_NETWORK_PEER_AUTH_STATE;
1209 extern "system" {
WlanHostedNetworkStartUsing( hClientHandle: HANDLE, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1210 pub fn WlanHostedNetworkStartUsing(
1211 hClientHandle: HANDLE,
1212 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1213 pvReserved: PVOID,
1214 ) -> DWORD;
WlanHostedNetworkStopUsing( hClientHandle: HANDLE, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1215 pub fn WlanHostedNetworkStopUsing(
1216 hClientHandle: HANDLE,
1217 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1218 pvReserved: PVOID,
1219 ) -> DWORD;
WlanHostedNetworkForceStart( hClientHandle: HANDLE, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1220 pub fn WlanHostedNetworkForceStart(
1221 hClientHandle: HANDLE,
1222 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1223 pvReserved: PVOID,
1224 ) -> DWORD;
WlanHostedNetworkForceStop( hClientHandle: HANDLE, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1225 pub fn WlanHostedNetworkForceStop(
1226 hClientHandle: HANDLE,
1227 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1228 pvReserved: PVOID,
1229 ) -> DWORD;
1230 }
1231 STRUCT!{struct WLAN_HOSTED_NETWORK_PEER_STATE {
1232 PeerMacAddress: DOT11_MAC_ADDRESS,
1233 PeerAuthState: WLAN_HOSTED_NETWORK_PEER_AUTH_STATE,
1234 }}
1235 pub type PWLAN_HOSTED_NETWORK_PEER_STATE = *mut WLAN_HOSTED_NETWORK_PEER_STATE;
1236 STRUCT!{struct WLAN_HOSTED_NETWORK_RADIO_STATE {
1237 dot11SoftwareRadioState: DOT11_RADIO_STATE,
1238 dot11HardwareRadioState: DOT11_RADIO_STATE,
1239 }}
1240 pub type PWLAN_HOSTED_NETWORK_RADIO_STATE = *mut WLAN_HOSTED_NETWORK_RADIO_STATE;
1241 ENUM!{enum WLAN_HOSTED_NETWORK_NOTIFICATION_CODE {
1242 wlan_hosted_network_state_change = L2_NOTIFICATION_CODE_V2_BEGIN,
1243 wlan_hosted_network_peer_state_change = 4097,
1244 wlan_hosted_network_radio_state_change = 4098,
1245 }}
1246 pub type PWLAN_HOSTED_NETWORK_NOTIFICATION_CODE = *mut WLAN_HOSTED_NETWORK_NOTIFICATION_CODE;
1247 STRUCT!{struct WLAN_HOSTED_NETWORK_STATE_CHANGE {
1248 OldState: WLAN_HOSTED_NETWORK_STATE,
1249 NewState: WLAN_HOSTED_NETWORK_STATE,
1250 StateChangeReason: WLAN_HOSTED_NETWORK_REASON,
1251 }}
1252 pub type PWLAN_HOSTED_NETWORK_STATE_CHANGE = *mut WLAN_HOSTED_NETWORK_STATE_CHANGE;
1253 STRUCT!{struct WLAN_HOSTED_NETWORK_DATA_PEER_STATE_CHANGE {
1254 OldState: WLAN_HOSTED_NETWORK_PEER_STATE,
1255 NewState: WLAN_HOSTED_NETWORK_PEER_STATE,
1256 PeerStateChangeReason: WLAN_HOSTED_NETWORK_REASON,
1257 }}
1258 pub type PWLAN_HOSTED_NETWORK_DATA_PEER_STATE_CHANGE =
1259 *mut WLAN_HOSTED_NETWORK_DATA_PEER_STATE_CHANGE;
1260 ENUM!{enum WLAN_HOSTED_NETWORK_OPCODE {
1261 wlan_hosted_network_opcode_connection_settings = 0,
1262 wlan_hosted_network_opcode_security_settings = 1,
1263 wlan_hosted_network_opcode_station_profile = 2,
1264 wlan_hosted_network_opcode_enable = 3,
1265 }}
1266 pub type PWLAN_HOSTED_NETWORK_OPCODE = *mut WLAN_HOSTED_NETWORK_OPCODE;
1267 STRUCT!{struct WLAN_HOSTED_NETWORK_CONNECTION_SETTINGS {
1268 hostedNetworkSSID: DOT11_SSID,
1269 dwMaxNumberOfPeers: DWORD,
1270 }}
1271 pub type PWLAN_HOSTED_NETWORK_CONNECTION_SETTINGS = *mut WLAN_HOSTED_NETWORK_CONNECTION_SETTINGS;
1272 STRUCT!{struct WLAN_HOSTED_NETWORK_SECURITY_SETTINGS {
1273 dot11AuthAlgo: DOT11_AUTH_ALGORITHM,
1274 dot11CipherAlgo: DOT11_CIPHER_ALGORITHM,
1275 }}
1276 pub type PWLAN_HOSTED_NETWORK_SECURITY_SETTINGS = *mut WLAN_HOSTED_NETWORK_SECURITY_SETTINGS;
1277 extern "system" {
WlanHostedNetworkQueryProperty( hClientHandle: HANDLE, OpCode: WLAN_HOSTED_NETWORK_OPCODE, pdwDataSize: PDWORD, ppvData: *mut PVOID, pWlanOpcodeValueType: PWLAN_OPCODE_VALUE_TYPE, pvReserved: PVOID, ) -> DWORD1278 pub fn WlanHostedNetworkQueryProperty(
1279 hClientHandle: HANDLE,
1280 OpCode: WLAN_HOSTED_NETWORK_OPCODE,
1281 pdwDataSize: PDWORD,
1282 ppvData: *mut PVOID,
1283 pWlanOpcodeValueType: PWLAN_OPCODE_VALUE_TYPE,
1284 pvReserved: PVOID,
1285 ) -> DWORD;
WlanHostedNetworkSetProperty( hClientHandle: HANDLE, OpCode: WLAN_HOSTED_NETWORK_OPCODE, dwDataSize: DWORD, pvData: PVOID, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1286 pub fn WlanHostedNetworkSetProperty(
1287 hClientHandle: HANDLE,
1288 OpCode: WLAN_HOSTED_NETWORK_OPCODE,
1289 dwDataSize: DWORD,
1290 pvData: PVOID,
1291 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1292 pvReserved: PVOID,
1293 ) -> DWORD;
WlanHostedNetworkInitSettings( hClientHandle: HANDLE, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1294 pub fn WlanHostedNetworkInitSettings(
1295 hClientHandle: HANDLE,
1296 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1297 pvReserved: PVOID,
1298 ) -> DWORD;
WlanHostedNetworkRefreshSecuritySettings( hClientHandle: HANDLE, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1299 pub fn WlanHostedNetworkRefreshSecuritySettings(
1300 hClientHandle: HANDLE,
1301 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1302 pvReserved: PVOID,
1303 ) -> DWORD;
1304 }
1305 STRUCT!{struct WLAN_HOSTED_NETWORK_STATUS {
1306 HostedNetworkState: WLAN_HOSTED_NETWORK_STATE,
1307 IPDeviceID: GUID,
1308 wlanHostedNetworkBSSID: DOT11_MAC_ADDRESS,
1309 dot11PhyType: DOT11_PHY_TYPE,
1310 ulChannelFrequency: ULONG,
1311 dwNumberOfPeers: DWORD,
1312 PeerList: [WLAN_HOSTED_NETWORK_PEER_STATE; 1],
1313 }}
1314 pub type PWLAN_HOSTED_NETWORK_STATUS = *mut WLAN_HOSTED_NETWORK_STATUS;
1315 extern "system" {
WlanHostedNetworkQueryStatus( hClientHandle: HANDLE, ppWlanHostedNetworkStatus: *mut PWLAN_HOSTED_NETWORK_STATUS, pvReserved: PVOID, ) -> DWORD1316 pub fn WlanHostedNetworkQueryStatus(
1317 hClientHandle: HANDLE,
1318 ppWlanHostedNetworkStatus: *mut PWLAN_HOSTED_NETWORK_STATUS,
1319 pvReserved: PVOID,
1320 ) -> DWORD;
WlanHostedNetworkSetSecondaryKey( hClientHandle: HANDLE, dwKeyLength: DWORD, pucKeyData: PUCHAR, bIsPassPhrase: BOOL, bPersistent: BOOL, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1321 pub fn WlanHostedNetworkSetSecondaryKey(
1322 hClientHandle: HANDLE,
1323 dwKeyLength: DWORD,
1324 pucKeyData: PUCHAR,
1325 bIsPassPhrase: BOOL,
1326 bPersistent: BOOL,
1327 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1328 pvReserved: PVOID,
1329 ) -> DWORD;
WlanHostedNetworkQuerySecondaryKey( hClientHandle: HANDLE, pdwKeyLength: PDWORD, ppucKeyData: *mut PUCHAR, pbIsPassPhrase: PBOOL, pbPersistent: PBOOL, pFailReason: PWLAN_HOSTED_NETWORK_REASON, pvReserved: PVOID, ) -> DWORD1330 pub fn WlanHostedNetworkQuerySecondaryKey(
1331 hClientHandle: HANDLE,
1332 pdwKeyLength: PDWORD,
1333 ppucKeyData: *mut PUCHAR,
1334 pbIsPassPhrase: PBOOL,
1335 pbPersistent: PBOOL,
1336 pFailReason: PWLAN_HOSTED_NETWORK_REASON,
1337 pvReserved: PVOID,
1338 ) -> DWORD;
WlanRegisterVirtualStationNotification( hClientHandle: HANDLE, bRegister: BOOL, pReserved: PVOID, ) -> DWORD1339 pub fn WlanRegisterVirtualStationNotification(
1340 hClientHandle: HANDLE,
1341 bRegister: BOOL,
1342 pReserved: PVOID,
1343 ) -> DWORD;
1344 }
1345 DEFINE_GUID!{GUID_DEVINTERFACE_WIFIDIRECT_DEVICE,
1346 0x439b20af, 0x8955, 0x405b, 0x99, 0xf0, 0xa6, 0x2a, 0xf0, 0xc6, 0x8d, 0x43}
1347 DEFINE_GUID!{GUID_AEPSERVICE_WIFIDIRECT_DEVICE,
1348 0xcc29827c, 0x9caf, 0x4928, 0x99, 0xa9, 0x18, 0xf7, 0xc2, 0x38, 0x13, 0x89}
1349 DEFINE_GUID!{GUID_DEVINTERFACE_ASP_INFRA_DEVICE,
1350 0xff823995, 0x7a72, 0x4c80, 0x87, 0x57, 0xc6, 0x7e, 0xe1, 0x3d, 0x1a, 0x49}
1351 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_DeviceAddress,
1352 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x01}
1353 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_InterfaceAddress,
1354 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x02}
1355 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_InterfaceGuid,
1356 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x03}
1357 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_GroupId,
1358 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x04}
1359 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_IsConnected,
1360 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x05}
1361 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_IsVisible,
1362 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x06}
1363 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_IsLegacyDevice,
1364 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x07}
1365 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_MiracastVersion,
1366 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x08}
1367 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_IsMiracastLCPSupported,
1368 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x09}
1369 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_Services,
1370 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x0a}
1371 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_SupportedChannelList,
1372 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x0b}
1373 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_InformationElements,
1374 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x0c}
1375 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_DeviceAddressCopy,
1376 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x0d}
1377 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_IsRecentlyAssociated,
1378 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x0e}
1379 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_Service_Aeps,
1380 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x0f}
1381 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_NoMiracastAutoProject,
1382 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x10}
1383 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_Supported,
1384 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x11}
1385 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_StreamSecuritySupported,
1386 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x12}
1387 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_AccessPointBssid,
1388 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x13}
1389 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_SinkHostName,
1390 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x14}
1391 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_ChallengeAep,
1392 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x15}
1393 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_IsDMGCapable,
1394 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x16}
1395 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_DevnodeAep,
1396 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x17}
1397 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_FoundWsbService,
1398 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x18}
1399 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_HostName_ResolutionMode,
1400 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x19}
1401 DEFINE_DEVPROPKEY!{DEVPKEY_InfraCast_SinkIpAddress,
1402 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x1a}
1403 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirect_TransientAssociation,
1404 0x1506935d, 0xe3e7, 0x450f, 0x86, 0x37, 0x82, 0x23, 0x3e, 0xbe, 0x5f, 0x6e, 0x1b}
1405 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirectServices_ServiceAddress,
1406 0x31b37743, 0x7c5e, 0x4005, 0x93, 0xe6, 0xe9, 0x53, 0xf9, 0x2b, 0x82, 0xe9, 0x02}
1407 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirectServices_ServiceName,
1408 0x31b37743, 0x7c5e, 0x4005, 0x93, 0xe6, 0xe9, 0x53, 0xf9, 0x2b, 0x82, 0xe9, 0x03}
1409 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirectServices_ServiceInformation,
1410 0x31b37743, 0x7c5e, 0x4005, 0x93, 0xe6, 0xe9, 0x53, 0xf9, 0x2b, 0x82, 0xe9, 0x04}
1411 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirectServices_AdvertisementId,
1412 0x31b37743, 0x7c5e, 0x4005, 0x93, 0xe6, 0xe9, 0x53, 0xf9, 0x2b, 0x82, 0xe9, 0x05}
1413 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirectServices_ServiceConfigMethods,
1414 0x31b37743, 0x7c5e, 0x4005, 0x93, 0xe6, 0xe9, 0x53, 0xf9, 0x2b, 0x82, 0xe9, 0x06}
1415 DEFINE_DEVPROPKEY!{DEVPKEY_WiFiDirectServices_RequestServiceInformation,
1416 0x31b37743, 0x7c5e, 0x4005, 0x93, 0xe6, 0xe9, 0x53, 0xf9, 0x2b, 0x82, 0xe9, 0x07}
1417 extern "system" {
WFDOpenHandle( dwClientVersion: DWORD, pdwNegotiatedVersion: PDWORD, phClientHandle: PHANDLE, ) -> DWORD1418 pub fn WFDOpenHandle(
1419 dwClientVersion: DWORD,
1420 pdwNegotiatedVersion: PDWORD,
1421 phClientHandle: PHANDLE,
1422 ) -> DWORD;
WFDCloseHandle( hClientHandle: HANDLE, ) -> DWORD1423 pub fn WFDCloseHandle(
1424 hClientHandle: HANDLE,
1425 ) -> DWORD;
1426 }
1427 FN!{stdcall WFD_OPEN_SESSION_COMPLETE_CALLBACK(
1428 hSessionHandle: HANDLE,
1429 pvContext: PVOID,
1430 guidSessionInterface: GUID,
1431 dwError: DWORD,
1432 dwReasonCode: DWORD,
1433 ) -> ()}
1434 extern "system" {
WFDStartOpenSession( hClientHandle: HANDLE, pDeviceAddress: PDOT11_MAC_ADDRESS, pvContext: PVOID, pfnCallback: WFD_OPEN_SESSION_COMPLETE_CALLBACK, phSessionHandle: PHANDLE, ) -> DWORD1435 pub fn WFDStartOpenSession(
1436 hClientHandle: HANDLE,
1437 pDeviceAddress: PDOT11_MAC_ADDRESS,
1438 pvContext: PVOID,
1439 pfnCallback: WFD_OPEN_SESSION_COMPLETE_CALLBACK,
1440 phSessionHandle: PHANDLE,
1441 ) -> DWORD;
WFDCancelOpenSession( hSessionHandle: HANDLE, ) -> DWORD1442 pub fn WFDCancelOpenSession(
1443 hSessionHandle: HANDLE,
1444 ) -> DWORD;
WFDOpenLegacySession( hClientHandle: HANDLE, pLegacyMacAddress: PDOT11_MAC_ADDRESS, phSessionHandle: *mut HANDLE, pGuidSessionInterface: *mut GUID, ) -> DWORD1445 pub fn WFDOpenLegacySession(
1446 hClientHandle: HANDLE,
1447 pLegacyMacAddress: PDOT11_MAC_ADDRESS,
1448 phSessionHandle: *mut HANDLE,
1449 pGuidSessionInterface: *mut GUID,
1450 ) -> DWORD;
WFDCloseSession( hSessionHandle: HANDLE, ) -> DWORD1451 pub fn WFDCloseSession(
1452 hSessionHandle: HANDLE,
1453 ) -> DWORD;
WFDUpdateDeviceVisibility( pDeviceAddress: PDOT11_MAC_ADDRESS, ) -> DWORD1454 pub fn WFDUpdateDeviceVisibility(
1455 pDeviceAddress: PDOT11_MAC_ADDRESS,
1456 ) -> DWORD;
1457 }
1458 DEFINE_DEVPROPKEY!{DEVPKEY_WiFi_InterfaceGuid,
1459 0xef1167eb, 0xcbfc, 0x4341, 0xa5, 0x68, 0xa7, 0xc9, 0x1a, 0x68, 0x98, 0x2c, 0x02}
1460