iphlpapi: Implement if_nametoindex.
[wine.git] / include / wlanapi.h
blob1cd8c93e653936892af1619441a3702f8e6b0246
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 struct _WLAN_AVAILABLE_NETWORK_LIST
147 DWORD dwNumberOfItems;
148 DWORD dwIndex;
149 WLAN_AVAILABLE_NETWORK Network[1];
150 } WLAN_AVAILABLE_NETWORK_LIST, *PWLAN_AVAILABLE_NETWORK_LIST;
152 DWORD WINAPI WlanCloseHandle(HANDLE, void *);
153 DWORD WINAPI WlanEnumInterfaces(HANDLE, void *, WLAN_INTERFACE_INFO_LIST **);
154 DWORD WINAPI WlanOpenHandle(DWORD, void *, DWORD *, HANDLE *);
155 void *WINAPI WlanAllocateMemory(DWORD);
156 void WINAPI WlanFreeMemory(void *);
157 DWORD WINAPI WlanScan(HANDLE, const GUID *, const DOT11_SSID *, const WLAN_RAW_DATA *, void *);
158 DWORD WINAPI WlanRegisterNotification(HANDLE, DWORD, BOOL, WLAN_NOTIFICATION_CALLBACK, void *, void *, DWORD *);
159 DWORD WINAPI WlanGetAvailableNetworkList(HANDLE, const GUID *, DWORD, void *, WLAN_AVAILABLE_NETWORK_LIST **);
161 #endif /* _WLAN_WLANAPI_H */