ws2_32: Move the setsockopt(IP_ADD_SOURCE_MEMBERSHIP) implementation to ntdll.
[wine.git] / include / wlanapi.h
bloba3288d7778bdbb95baa6b8d942f0207dc2eb6cbf
1 /*
2 * Copyright (C) 2016 Austin English
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.
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.
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
19 #ifndef _WLAN_WLANAPI_H
20 #define _WLAN_WLANAPI_H
22 typedef enum _WLAN_INTERFACE_STATE
24 wlan_interface_state_not_ready,
25 wlan_interface_state_connected,
26 wlan_interface_state_ad_hoc_network_formed,
27 wlan_interface_state_disconnecting,
28 wlan_interface_state_disconnected,
29 wlan_interface_state_associating,
30 wlan_interface_state_discovering,
31 wlan_interface_state_authenticating
32 } WLAN_INTERFACE_STATE, *PWLAN_INTERFACE_STATE;
34 typedef struct _WLAN_INTERFACE_INFO
36 GUID InterfaceGuid;
37 WCHAR strInterfaceDescription[256];
38 WLAN_INTERFACE_STATE isState;
39 } WLAN_INTERFACE_INFO, *PWLAN_INTERFACE_INFO;
41 typedef struct _WLAN_INTERFACE_INFO_LIST
43 DWORD dwNumberOfItems;
44 DWORD dwIndex;
45 WLAN_INTERFACE_INFO InterfaceInfo[1];
46 } WLAN_INTERFACE_INFO_LIST, *PWLAN_INTERFACE_INFO_LIST;
48 #define DOT11_SSID_MAX_LENGTH 32
49 typedef struct _DOT11_SSID
51 DWORD uSSIDLength;
52 UCHAR ucSSID[DOT11_SSID_MAX_LENGTH];
53 } DOT11_SSID;
55 typedef struct _WLAN_RAW_DATA
57 DWORD dwDataSize;
58 BYTE DataBlob[1];
59 } WLAN_RAW_DATA, *PWLAN_RAW_DATA;
61 typedef struct _WLAN_NOTIFICATION_DATA
63 DWORD NotificationSource;
64 DWORD NotificationCode;
65 GUID InterfaceGuid;
66 DWORD dwDataSize;
67 PVOID pData;
68 } WLAN_NOTIFICATION_DATA, *PWLAN_NOTIFICATION_DATA;
70 typedef void (WINAPI *WLAN_NOTIFICATION_CALLBACK)(WLAN_NOTIFICATION_DATA *, void *);
72 typedef enum _DOT11_BSS_TYPE
74 dot11_BSS_type_infrastructure = 0x01,
75 dot11_BSS_type_independent = 0x02,
76 dot11_BSS_type_any = 0x03
77 } DOT11_BSS_TYPE, *PDOT11_BSS_TYPE;
79 typedef DWORD WLAN_REASON_CODE, *PWLAN_REASON_CODE, WLAN_SIGNAL_QUALITY;
81 typedef enum _DOT11_AUTH_ALGORITHM
83 DOT11_AUTH_ALGO_80211_OPEN = 0x01,
84 DOT11_AUTH_ALGO_80211_SHARED_KEY = 0x02,
85 DOT11_AUTH_ALGO_WPA = 0x03,
86 DOT11_AUTH_ALGO_WPA_PSK = 0x04,
87 DOT11_AUTH_ALGO_WPA_NONE = 0x05,
88 DOT11_AUTH_ALGO_RSNA = 0x06,
89 DOT11_AUTH_ALGO_RSNA_PSK = 0x07,
90 DOT11_AUTH_ALGO_IHV_START = 0x80000000,
91 DOT11_AUTH_ALGO_IHV_END = 0xFFFFFFFF
92 } DOT11_AUTH_ALGORITHM, *PDOT11_AUTH_ALGORITHM;
94 typedef enum _DOT11_CIPHER_ALGORITHM
96 DOT11_CIPHER_ALGO_NONE = 0x00,
97 DOT11_CIPHER_ALGO_WEP40 = 0x01,
98 DOT11_CIPHER_ALGO_TKIP = 0x02,
99 DOT11_CIPHER_ALGO_CCMP = 0x04,
100 DOT11_CIPHER_ALGO_WEP104 = 0x05,
101 DOT11_CIPHER_ALGO_WPA_USE_GROUP = 0x100,
102 DOT11_CIPHER_ALGO_RSN_USE_GROUP = 0x100,
103 DOT11_CIPHER_ALGO_WEP = 0x101,
104 DOT11_CIPHER_ALGO_IHV_START = 0x80000000,
105 DOT11_CIPHER_ALGO_IHV_END = 0xFFFFFFFF
106 } DOT11_CIPHER_ALGORITHM, *PDOT11_CIPHER_ALGORITHM;
108 typedef enum _DOT11_PHY_TYPE
110 dot11_phy_type_unknown = 0x00,
111 dot11_phy_type_any = 0x00,
112 dot11_phy_type_fhss = 0x01,
113 dot11_phy_type_dsss = 0x02,
114 dot11_phy_type_irbaseband = 0x03,
115 dot11_phy_type_ofdm = 0x04,
116 dot11_phy_type_hrdsss = 0x05,
117 dot11_phy_type_erp = 0x06,
118 dot11_phy_type_ht = 0x07,
119 dot11_phy_type_vht = 0x08,
120 dot11_phy_type_IHV_start = 0x80000000,
121 dot11_phy_type_IHV_end = 0xFFFFFFFF
122 } DOT11_PHY_TYPE, *PDOT11_PHY_TYPE;
124 #define WLAN_MAX_PHY_TYPE_NUMBER 8
126 typedef struct _WLAN_AVAILABLE_NETWORK
128 WCHAR strProfileName[256];
129 DOT11_SSID dot11Ssid;
130 DOT11_BSS_TYPE dot11BssType;
131 ULONG uNumberOfBssids;
132 BOOL bNetworkConnectable;
133 WLAN_REASON_CODE wlanNotConnectableReason;
134 ULONG uNumberOfPhyTypes;
135 DOT11_PHY_TYPE dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER];
136 BOOL bMorePhyTypes;
137 WLAN_SIGNAL_QUALITY wlanSignalQuality;
138 BOOL bSecurityEnabled;
139 DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm;
140 DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm;
141 DWORD dwFlags;
142 DWORD dwReserved;
143 } WLAN_AVAILABLE_NETWORK, *PWLAN_AVAILABLE_NETWORK;
145 typedef enum _WLAN_INTF_OPCODE
147 wlan_intf_opcode_autoconf_start = 0x000000000,
148 wlan_intf_opcode_autoconf_enabled,
149 wlan_intf_opcode_background_scan_enabled,
150 wlan_intf_opcode_media_streaming_mode,
151 wlan_intf_opcode_radio_state,
152 wlan_intf_opcode_bss_type,
153 wlan_intf_opcode_interface_state,
154 wlan_intf_opcode_current_connection,
155 wlan_intf_opcode_channel_number,
156 wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs,
157 wlan_intf_opcode_supported_adhoc_auth_cipher_pairs,
158 wlan_intf_opcode_supported_country_or_region_string_list,
159 wlan_intf_opcode_current_operation_mode,
160 wlan_intf_opcode_supported_safe_mode,
161 wlan_intf_opcode_certified_safe_mode,
162 wlan_intf_opcode_hosted_network_capable,
163 wlan_intf_opcode_management_frame_protection_capable,
164 wlan_intf_opcode_autoconf_end = 0x0fffffff,
165 wlan_intf_opcode_msm_start = 0x10000100,
166 wlan_intf_opcode_statistics,
167 wlan_intf_opcode_rssi,
168 wlan_intf_opcode_msm_end = 0x1fffffff,
169 wlan_intf_opcode_security_start = 0x20010000,
170 wlan_intf_opcode_security_end = 0x2fffffff,
171 wlan_intf_opcode_ihv_start = 0x30000000,
172 wlan_intf_opcode_ihv_end = 0x3fffffff
173 } WLAN_INTF_OPCODE, *PWLAN_INTF_OPCODE;
175 typedef enum _WLAN_OPCODE_VALUE_TYPE
177 wlan_opcode_value_type_query_only = 0,
178 wlan_opcode_value_type_set_by_group_policy,
179 wlan_opcode_value_type_set_by_user,
180 wlan_opcode_value_type_invalid
181 } WLAN_OPCODE_VALUE_TYPE, *PWLAN_OPCODE_VALUE_TYPE;
183 typedef struct _WLAN_AVAILABLE_NETWORK_LIST
185 DWORD dwNumberOfItems;
186 DWORD dwIndex;
187 WLAN_AVAILABLE_NETWORK Network[1];
188 } WLAN_AVAILABLE_NETWORK_LIST, *PWLAN_AVAILABLE_NETWORK_LIST;
190 DWORD WINAPI WlanCloseHandle(HANDLE, void *);
191 DWORD WINAPI WlanEnumInterfaces(HANDLE, void *, WLAN_INTERFACE_INFO_LIST **);
192 DWORD WINAPI WlanOpenHandle(DWORD, void *, DWORD *, HANDLE *);
193 void *WINAPI WlanAllocateMemory(DWORD);
194 void WINAPI WlanFreeMemory(void *);
195 DWORD WINAPI WlanScan(HANDLE, const GUID *, const DOT11_SSID *, const WLAN_RAW_DATA *, void *);
196 DWORD WINAPI WlanRegisterNotification(HANDLE, DWORD, BOOL, WLAN_NOTIFICATION_CALLBACK, void *, void *, DWORD *);
197 DWORD WINAPI WlanGetAvailableNetworkList(HANDLE, const GUID *, DWORD, void *, WLAN_AVAILABLE_NETWORK_LIST **);
198 DWORD WINAPI WlanQueryInterface(HANDLE, const GUID *, WLAN_INTF_OPCODE, void *, DWORD *, void **, WLAN_OPCODE_VALUE_TYPE *);
200 #endif /* _WLAN_WLANAPI_H */