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 common layer 2.
7 use shared::guiddef::GUID;
8 use shared::minwindef::DWORD;
9 use um::winnt::PVOID;
10 pub const L2_PROFILE_MAX_NAME_LENGTH: usize = 256;
11 pub const L2_NOTIFICATION_SOURCE_NONE: DWORD = 0;
12 pub const L2_NOTIFICATION_SOURCE_DOT3_AUTO_CONFIG: DWORD = 0x00000001;
13 pub const L2_NOTIFICATION_SOURCE_SECURITY: DWORD = 0x00000002;
14 pub const L2_NOTIFICATION_SOURCE_ONEX: DWORD = 0x00000004;
15 pub const L2_NOTIFICATION_SOURCE_WLAN_ACM: DWORD = 0x00000008;
16 pub const L2_NOTIFICATION_SOURCE_WLAN_MSM: DWORD = 0x00000010;
17 pub const L2_NOTIFICATION_SOURCE_WLAN_SECURITY: DWORD = 0x00000020;
18 pub const L2_NOTIFICATION_SOURCE_WLAN_IHV: DWORD = 0x00000040;
19 pub const L2_NOTIFICATION_SOURCE_WLAN_HNWK: DWORD = 0x00000080;
20 pub const L2_NOTIFICATION_SOURCE_WCM: DWORD = 0x00000100;
21 pub const L2_NOTIFICATION_SOURCE_WCM_CSP: DWORD = 0x00000200;
22 pub const L2_NOTIFICATION_SOURCE_WFD: DWORD = 0x00000400;
23 pub const L2_NOTIFICATION_SOURCE_ALL: DWORD = 0x0000ffff;
24 pub const L2_NOTIFICATION_CODE_PUBLIC_BEGIN: DWORD = 0x00000000;
25 pub const L2_NOTIFICATION_CODE_GROUP_SIZE: DWORD = 0x00001000;
26 pub const L2_NOTIFICATION_CODE_V2_BEGIN: DWORD = L2_NOTIFICATION_CODE_PUBLIC_BEGIN
27     + L2_NOTIFICATION_CODE_GROUP_SIZE;
28 pub const L2_REASON_CODE_GROUP_SIZE: u32 = 0x10000;
29 pub const L2_REASON_CODE_GEN_BASE: u32 = 0x10000;
30 pub const L2_REASON_CODE_DOT11_AC_BASE: u32 = L2_REASON_CODE_GEN_BASE + L2_REASON_CODE_GROUP_SIZE;
31 pub const L2_REASON_CODE_DOT11_MSM_BASE: u32 = L2_REASON_CODE_DOT11_AC_BASE
32     + L2_REASON_CODE_GROUP_SIZE;
33 pub const L2_REASON_CODE_DOT11_SECURITY_BASE: u32 = L2_REASON_CODE_DOT11_MSM_BASE
34     + L2_REASON_CODE_GROUP_SIZE;
35 pub const L2_REASON_CODE_ONEX_BASE: u32 = L2_REASON_CODE_DOT11_SECURITY_BASE
36     + L2_REASON_CODE_GROUP_SIZE;
37 pub const L2_REASON_CODE_DOT3_AC_BASE: u32 = L2_REASON_CODE_ONEX_BASE
38     + L2_REASON_CODE_GROUP_SIZE;
39 pub const L2_REASON_CODE_DOT3_MSM_BASE: u32 = L2_REASON_CODE_DOT3_AC_BASE
40     + L2_REASON_CODE_GROUP_SIZE;
41 pub const L2_REASON_CODE_PROFILE_BASE: u32 = L2_REASON_CODE_DOT3_MSM_BASE
42     + L2_REASON_CODE_GROUP_SIZE;
43 pub const L2_REASON_CODE_IHV_BASE: u32 = L2_REASON_CODE_PROFILE_BASE + L2_REASON_CODE_GROUP_SIZE;
44 pub const L2_REASON_CODE_WIMAX_BASE: u32 = L2_REASON_CODE_IHV_BASE + L2_REASON_CODE_GROUP_SIZE;
45 pub const L2_REASON_CODE_SUCCESS: u32 = 0;
46 pub const L2_REASON_CODE_UNKNOWN: u32 = L2_REASON_CODE_GEN_BASE + 1;
47 pub const L2_REASON_CODE_PROFILE_MISSING: u32 = 0x00000001;
48 STRUCT!{struct L2_NOTIFICATION_DATA {
49     NotificationSource: DWORD,
50     NotificationCode: DWORD,
51     InterfaceGuid: GUID,
52     dwDataSize: DWORD,
53     pData: PVOID,
54 }}
55 pub type PL2_NOTIFICATION_DATA = *mut L2_NOTIFICATION_DATA;
56