3 * WPA supplicant library with GLib integration
5 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef __G_SUPPLICANT_H
22 #define __G_SUPPLICANT_H
28 #define G_SUPPLICANT_EAP_METHOD_MD5 (1 << 0)
29 #define G_SUPPLICANT_EAP_METHOD_TLS (1 << 1)
30 #define G_SUPPLICANT_EAP_METHOD_MSCHAPV2 (1 << 2)
31 #define G_SUPPLICANT_EAP_METHOD_PEAP (1 << 3)
32 #define G_SUPPLICANT_EAP_METHOD_TTLS (1 << 4)
33 #define G_SUPPLICANT_EAP_METHOD_GTC (1 << 5)
34 #define G_SUPPLICANT_EAP_METHOD_OTP (1 << 6)
35 #define G_SUPPLICANT_EAP_METHOD_LEAP (1 << 7)
36 #define G_SUPPLICANT_EAP_METHOD_WSC (1 << 8)
38 #define G_SUPPLICANT_CAPABILITY_AUTHALG_OPEN (1 << 0)
39 #define G_SUPPLICANT_CAPABILITY_AUTHALG_SHARED (1 << 1)
40 #define G_SUPPLICANT_CAPABILITY_AUTHALG_LEAP (1 << 2)
42 #define G_SUPPLICANT_CAPABILITY_PROTO_WPA (1 << 0)
43 #define G_SUPPLICANT_CAPABILITY_PROTO_RSN (1 << 1)
45 #define G_SUPPLICANT_CAPABILITY_SCAN_ACTIVE (1 << 0)
46 #define G_SUPPLICANT_CAPABILITY_SCAN_PASSIVE (1 << 1)
47 #define G_SUPPLICANT_CAPABILITY_SCAN_SSID (1 << 2)
49 #define G_SUPPLICANT_CAPABILITY_MODE_INFRA (1 << 0)
50 #define G_SUPPLICANT_CAPABILITY_MODE_IBSS (1 << 1)
51 #define G_SUPPLICANT_CAPABILITY_MODE_AP (1 << 2)
52 #define G_SUPPLICANT_CAPABILITY_MODE_P2P (1 << 3)
53 #if defined TIZEN_EXT_WIFI_MESH
54 #define G_SUPPLICANT_CAPABILITY_MODE_MESH (1 << 4)
57 #define G_SUPPLICANT_KEYMGMT_NONE (1 << 0)
58 #define G_SUPPLICANT_KEYMGMT_IEEE8021X (1 << 1)
59 #define G_SUPPLICANT_KEYMGMT_WPA_NONE (1 << 2)
60 #define G_SUPPLICANT_KEYMGMT_WPA_PSK (1 << 3)
61 #define G_SUPPLICANT_KEYMGMT_WPA_PSK_256 (1 << 4)
63 #define G_SUPPLICANT_KEYMGMT_WPA_FT_EAP (1 << 5)
64 #define G_SUPPLICANT_KEYMGMT_WPA_FT_PSK (1 << 6)
66 #define G_SUPPLICANT_KEYMGMT_WPA_FT_PSK (1 << 5)
67 #define G_SUPPLICANT_KEYMGMT_WPA_FT_EAP (1 << 6)
69 #define G_SUPPLICANT_KEYMGMT_WPA_EAP (1 << 7)
70 #define G_SUPPLICANT_KEYMGMT_WPA_EAP_256 (1 << 8)
71 #define G_SUPPLICANT_KEYMGMT_WPS (1 << 9)
73 #define G_SUPPLICANT_KEYMGMT_SAE (1 << 10)
74 #define G_SUPPLICANT_KEYMGMT_OWE (1 << 22)
75 #define G_SUPPLICANT_KEYMGMT_DPP (1 << 23)
78 #define G_SUPPLICANT_PROTO_WPA (1 << 0)
79 #define G_SUPPLICANT_PROTO_RSN (1 << 1)
81 #define G_SUPPLICANT_GROUP_WEP40 (1 << 0)
82 #define G_SUPPLICANT_GROUP_WEP104 (1 << 1)
83 #define G_SUPPLICANT_GROUP_TKIP (1 << 2)
84 #define G_SUPPLICANT_GROUP_CCMP (1 << 3)
86 #define G_SUPPLICANT_PAIRWISE_NONE (1 << 0)
87 #define G_SUPPLICANT_PAIRWISE_TKIP (1 << 1)
88 #define G_SUPPLICANT_PAIRWISE_CCMP (1 << 2)
90 #define G_SUPPLICANT_WPS_CONFIGURED (1 << 0)
91 #define G_SUPPLICANT_WPS_PBC (1 << 1)
92 #define G_SUPPLICANT_WPS_PIN (1 << 2)
93 #define G_SUPPLICANT_WPS_REGISTRAR (1 << 3)
95 #define G_SUPPLICANT_WPS_CONFIG_PBC 0x0080
97 #define G_SUPPLICANT_GROUP_ROLE_CLIENT (1 << 0)
98 #define G_SUPPLICANT_GROUP_ROLE_GO (1 << 1)
101 G_SUPPLICANT_MODE_UNKNOWN,
102 G_SUPPLICANT_MODE_INFRA,
103 G_SUPPLICANT_MODE_IBSS,
104 G_SUPPLICANT_MODE_MASTER,
105 #if defined TIZEN_EXT_WIFI_MESH
106 G_SUPPLICANT_MODE_MESH,
110 #if defined TIZEN_EXT_WIFI_MESH
112 G_SUPPLICANT_IEEE80211W_UNKNOWN,
113 G_SUPPLICANT_IEEE80211W_OPTIONAL,
114 G_SUPPLICANT_IEEE80211W_REQUIRED,
119 G_SUPPLICANT_SECURITY_UNKNOWN,
120 G_SUPPLICANT_SECURITY_NONE,
121 G_SUPPLICANT_SECURITY_WEP,
122 G_SUPPLICANT_SECURITY_PSK,
123 G_SUPPLICANT_SECURITY_IEEE8021X,
124 #if defined TIZEN_EXT
125 G_SUPPLICANT_SECURITY_FT_PSK,
126 G_SUPPLICANT_SECURITY_FT_IEEE8021X,
127 G_SUPPLICANT_SECURITY_SAE,
128 G_SUPPLICANT_SECURITY_OWE,
129 G_SUPPLICANT_SECURITY_DPP,
131 } GSupplicantSecurity;
133 #if defined TIZEN_EXT
135 G_SUPPLICANT_EAP_KEYMGMT_NONE,
136 G_SUPPLICANT_EAP_KEYMGMT_FT,
137 G_SUPPLICANT_EAP_KEYMGMT_CCKM,
138 G_SUPPLICANT_EAP_KEYMGMT_OKC,
139 } GSupplicantEapKeymgmt;
142 G_SUPPLICANT_MODE_IEEE80211_UNKNOWN,
143 G_SUPPLICANT_MODE_IEEE80211B,
144 G_SUPPLICANT_MODE_IEEE80211BG,
145 G_SUPPLICANT_MODE_IEEE80211BGN,
146 G_SUPPLICANT_MODE_IEEE80211A,
147 G_SUPPLICANT_MODE_IEEE80211AN,
148 G_SUPPLICANT_MODE_IEEE80211ANAC,
149 } GSupplicantPhy_mode;
153 G_SUPPLICANT_STATE_UNKNOWN,
154 G_SUPPLICANT_STATE_DISABLED,
155 G_SUPPLICANT_STATE_DISCONNECTED,
156 G_SUPPLICANT_STATE_INACTIVE,
157 G_SUPPLICANT_STATE_SCANNING,
158 G_SUPPLICANT_STATE_AUTHENTICATING,
159 G_SUPPLICANT_STATE_ASSOCIATING,
160 G_SUPPLICANT_STATE_ASSOCIATED,
161 G_SUPPLICANT_STATE_4WAY_HANDSHAKE,
162 G_SUPPLICANT_STATE_GROUP_HANDSHAKE,
163 G_SUPPLICANT_STATE_COMPLETED,
167 G_SUPPLICANT_WPS_STATE_UNKNOWN,
168 G_SUPPLICANT_WPS_STATE_SUCCESS,
169 G_SUPPLICANT_WPS_STATE_FAIL,
170 } GSupplicantWpsState;
173 G_SUPPLICANT_PEER_SERVICES_CHANGED,
174 G_SUPPLICANT_PEER_GROUP_CHANGED,
175 G_SUPPLICANT_PEER_GROUP_STARTED,
176 G_SUPPLICANT_PEER_GROUP_FINISHED,
177 G_SUPPLICANT_PEER_GROUP_JOINED,
178 G_SUPPLICANT_PEER_GROUP_DISCONNECTED,
179 G_SUPPLICANT_PEER_GROUP_FAILED,
180 } GSupplicantPeerState;
182 #if defined TIZEN_EXT
184 G_SUPPLICANT_INS_PREFERRED_FREQ_UNKNOWN,
185 G_SUPPLICANT_INS_PREFERRED_FREQ_24GHZ,
186 G_SUPPLICANT_INS_PREFERRED_FREQ_5GHZ,
187 } GSupplicantINSPreferredFreq;
190 struct _GSupplicantSSID {
191 #if defined TIZEN_EXT
196 unsigned int ssid_len;
197 unsigned int scan_ssid;
198 GSupplicantMode mode;
199 GSupplicantSecurity security;
200 unsigned int protocol;
201 unsigned int pairwise_cipher;
202 unsigned int group_cipher;
205 const char *passphrase;
206 const char *identity;
207 const char *anonymous_identity;
208 const char *ca_cert_path;
209 const char *subject_match;
210 const char *altsubject_match;
211 const char *domain_suffix_match;
212 const char *domain_match;
213 const char *client_cert_path;
214 const char *private_key_path;
215 const char *private_key_passphrase;
216 const char *phase2_auth;
220 #if defined TIZEN_EXT
221 unsigned char *bssid;
222 unsigned int bssid_for_connect_len;
223 unsigned char bssid_for_connect[6];
224 GSupplicantEapKeymgmt eap_keymgmt;
226 const char *pac_file;
228 unsigned int keymgmt;
229 const char *connector;
230 const char *c_sign_key;
231 const char *net_access_key;
235 typedef struct _GSupplicantSSID GSupplicantSSID;
238 * Max number of SSIDs that can be scanned.
239 * In wpa_s 0.7x the limit is 4.
240 * In wps_s 0.8 or later it is 16.
241 * The value is only used if wpa_supplicant does not return any max limit
242 * for number of scannable SSIDs.
244 #define WPAS_MAX_SCAN_SSIDS 4
247 unsigned char ssid[32];
251 struct _GSupplicantScanParams {
260 typedef struct _GSupplicantScanParams GSupplicantScanParams;
262 struct _GSupplicantPeerParams {
268 typedef struct _GSupplicantPeerParams GSupplicantPeerParams;
270 struct _GSupplicantP2PServiceParams {
273 unsigned char *query;
275 unsigned char *response;
277 unsigned char *wfd_ies;
281 typedef struct _GSupplicantP2PServiceParams GSupplicantP2PServiceParams;
284 typedef void (*GSupplicantCountryCallback) (int result,
288 int g_supplicant_set_country(const char *alpha2,
289 GSupplicantCountryCallback callback,
290 const void *user_data);
293 struct _GSupplicantInterface;
294 struct _GSupplicantPeer;
296 typedef struct _GSupplicantInterface GSupplicantInterface;
297 typedef struct _GSupplicantPeer GSupplicantPeer;
298 #if defined TIZEN_EXT_WIFI_MESH
299 typedef struct _GSupplicantMeshPeer GSupplicantMeshPeer;
302 typedef void (*GSupplicantInterfaceCallback) (int result,
303 GSupplicantInterface *interface,
306 #if defined TIZEN_EXT
307 typedef void (*GSupplicantMaxSpeedCallback) (int result, int maxspeed,
308 int strength, void *user_data);
311 void g_supplicant_interface_cancel(GSupplicantInterface *interface);
313 int g_supplicant_interface_create(const char *ifname, const char *driver,
315 GSupplicantInterfaceCallback callback,
317 int g_supplicant_interface_remove(GSupplicantInterface *interface,
318 GSupplicantInterfaceCallback callback,
320 int g_supplicant_interface_scan(GSupplicantInterface *interface,
321 GSupplicantScanParams *scan_data,
322 GSupplicantInterfaceCallback callback,
325 #if defined TIZEN_EXT
326 int g_supplicant_interface_signalpoll(GSupplicantInterface *interface,
327 GSupplicantMaxSpeedCallback callback,
331 int g_supplicant_interface_p2p_find(GSupplicantInterface *interface,
332 GSupplicantInterfaceCallback callback,
335 int g_supplicant_interface_p2p_stop_find(GSupplicantInterface *interface);
337 int g_supplicant_interface_p2p_connect(GSupplicantInterface *interface,
338 GSupplicantPeerParams *peer_params,
339 GSupplicantInterfaceCallback callback,
342 int g_supplicant_interface_p2p_disconnect(GSupplicantInterface *interface,
343 GSupplicantPeerParams *peer_params);
345 int g_supplicant_interface_p2p_listen(GSupplicantInterface *interface,
346 int period, int interval);
348 int g_supplicant_interface_p2p_add_service(GSupplicantInterface *interface,
349 GSupplicantInterfaceCallback callback,
350 GSupplicantP2PServiceParams *p2p_service_params,
353 int g_supplicant_interface_p2p_del_service(GSupplicantInterface *interface,
354 GSupplicantP2PServiceParams *p2p_service_params);
356 int g_supplicant_set_widi_ies(GSupplicantP2PServiceParams *p2p_service_params,
357 GSupplicantInterfaceCallback callback,
360 int g_supplicant_interface_connect(GSupplicantInterface *interface,
361 GSupplicantSSID *ssid,
362 GSupplicantInterfaceCallback callback,
365 int g_supplicant_interface_disconnect(GSupplicantInterface *interface,
366 GSupplicantInterfaceCallback callback,
369 int g_supplicant_interface_set_bss_expiration_age(GSupplicantInterface *interface,
370 unsigned int bss_expiration_age);
372 int g_supplicant_interface_set_apscan(GSupplicantInterface *interface,
373 unsigned int ap_scan);
375 void g_supplicant_interface_set_data(GSupplicantInterface *interface,
377 void *g_supplicant_interface_get_data(GSupplicantInterface *interface);
378 const char *g_supplicant_interface_get_ifname(GSupplicantInterface *interface);
379 #if defined TIZEN_EXT
380 bool g_supplicant_interface_get_is_5_0_ghz_supported(GSupplicantInterface *interface);
382 typedef void (*GSupplicantMacPolicyCallback) (int result, unsigned int policy, void *user_data);
383 int g_supplicant_interface_set_mac_policy(GSupplicantInterface *interface,
384 GSupplicantMacPolicyCallback callback,
388 int g_supplicant_interface_set_preassoc_mac_policy(GSupplicantInterface *interface,
389 GSupplicantMacPolicyCallback callback,
393 typedef void (*GSupplicantRandomMaclifetimeCallback) (int result, unsigned int lifetime, void *user_data);
394 int g_supplicant_interface_set_random_mac_lifetime(GSupplicantInterface *interface,
395 GSupplicantRandomMaclifetimeCallback callback,
396 unsigned int lifetime,
399 const char *g_supplicant_interface_get_driver(GSupplicantInterface *interface);
400 GSupplicantState g_supplicant_interface_get_state(GSupplicantInterface *interface);
401 const char *g_supplicant_interface_get_wps_key(GSupplicantInterface *interface);
402 const void *g_supplicant_interface_get_wps_ssid(GSupplicantInterface *interface,
403 unsigned int *ssid_len);
404 GSupplicantWpsState g_supplicant_interface_get_wps_state(GSupplicantInterface *interface);
405 unsigned int g_supplicant_interface_get_mode(GSupplicantInterface *interface);
406 dbus_bool_t g_supplicant_interface_get_ready(GSupplicantInterface *interface);
407 unsigned int g_supplicant_interface_get_max_scan_ssids(
408 GSupplicantInterface *interface);
410 int g_supplicant_interface_enable_selected_network(GSupplicantInterface *interface,
412 int g_supplicant_interface_set_country(GSupplicantInterface *interface,
413 GSupplicantCountryCallback callback,
416 bool g_supplicant_interface_has_p2p(GSupplicantInterface *interface);
417 int g_supplicant_interface_set_p2p_device_config(GSupplicantInterface *interface,
418 const char *device_name,
419 const char *primary_dev_type);
420 GSupplicantPeer *g_supplicant_interface_peer_lookup(GSupplicantInterface *interface,
421 const char *identifier);
422 bool g_supplicant_interface_is_p2p_finding(GSupplicantInterface *interface);
424 #if defined TIZEN_EXT_WIFI_MESH
425 bool g_supplicant_interface_has_mesh(GSupplicantInterface *interface);
426 int g_supplicant_mesh_interface_create(const char *ifname, const char *driver,
427 const char *bridge, const char *parent_ifname,
428 GSupplicantInterfaceCallback callback, void *user_data);
429 const void *g_supplicant_interface_get_mesh_group_ssid(
430 GSupplicantInterface *interface,
431 unsigned int *ssid_len);
432 int g_supplicant_mesh_get_disconnect_reason(GSupplicantInterface *interface);
433 const char *g_supplicant_mesh_peer_get_address(GSupplicantMeshPeer *mesh_peer);
434 int g_supplicant_mesh_peer_get_disconnect_reason(
435 GSupplicantMeshPeer *mesh_peer);
436 int g_supplicant_interface_abort_scan(GSupplicantInterface *interface,
437 GSupplicantInterfaceCallback callback, void *user_data);
438 int g_supplicant_interface_mesh_peer_change_status(
439 GSupplicantInterface *interface,
440 GSupplicantInterfaceCallback callback, const char *peer_address,
441 const char *method, void *user_data);
444 /* Network and Peer API */
445 struct _GSupplicantNetwork;
446 struct _GSupplicantGroup;
448 typedef struct _GSupplicantNetwork GSupplicantNetwork;
449 typedef struct _GSupplicantGroup GSupplicantGroup;
451 GSupplicantInterface *g_supplicant_network_get_interface(GSupplicantNetwork *network);
452 const char *g_supplicant_network_get_name(GSupplicantNetwork *network);
453 const char *g_supplicant_network_get_identifier(GSupplicantNetwork *network);
454 const char *g_supplicant_network_get_path(GSupplicantNetwork *network);
455 const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
456 unsigned int *ssid_len);
457 const char *g_supplicant_network_get_mode(GSupplicantNetwork *network);
458 const char *g_supplicant_network_get_security(GSupplicantNetwork *network);
459 dbus_int16_t g_supplicant_network_get_signal(GSupplicantNetwork *network);
460 dbus_uint16_t g_supplicant_network_get_frequency(GSupplicantNetwork *network);
461 dbus_bool_t g_supplicant_network_get_wps(GSupplicantNetwork *network);
462 dbus_bool_t g_supplicant_network_is_wps_active(GSupplicantNetwork *network);
463 dbus_bool_t g_supplicant_network_is_wps_pbc(GSupplicantNetwork *network);
464 dbus_bool_t g_supplicant_network_is_wps_advertizing(GSupplicantNetwork *network);
466 GSupplicantInterface *g_supplicant_peer_get_interface(GSupplicantPeer *peer);
467 const char *g_supplicant_peer_get_path(GSupplicantPeer *peer);
468 const char *g_supplicant_peer_get_identifier(GSupplicantPeer *peer);
469 const void *g_supplicant_peer_get_device_address(GSupplicantPeer *peer);
470 const void *g_supplicant_peer_get_iface_address(GSupplicantPeer *peer);
471 const char *g_supplicant_peer_get_name(GSupplicantPeer *peer);
472 const unsigned char *g_supplicant_peer_get_widi_ies(GSupplicantPeer *peer,
474 bool g_supplicant_peer_is_wps_pbc(GSupplicantPeer *peer);
475 bool g_supplicant_peer_is_wps_pin(GSupplicantPeer *peer);
476 bool g_supplicant_peer_is_in_a_group(GSupplicantPeer *peer);
477 GSupplicantInterface *g_supplicant_peer_get_group_interface(GSupplicantPeer *peer);
478 bool g_supplicant_peer_is_client(GSupplicantPeer *peer);
479 bool g_supplicant_peer_has_requested_connection(GSupplicantPeer *peer);
481 #if defined TIZEN_EXT
483 * Description: Network client requires additional wifi specific info
485 const unsigned char *g_supplicant_network_get_bssid(
486 GSupplicantNetwork *network);
487 unsigned int g_supplicant_network_get_maxrate(GSupplicantNetwork *network);
488 const char *g_supplicant_network_get_enc_mode(GSupplicantNetwork *network);
489 bool g_supplicant_network_get_rsn_mode(GSupplicantNetwork *network);
490 bool g_supplicant_network_is_hs20AP(GSupplicantNetwork *network);
491 const char *g_supplicant_network_get_eap(GSupplicantNetwork *network);
492 const char *g_supplicant_network_get_identity(GSupplicantNetwork *network);
493 const char *g_supplicant_network_get_phase2(GSupplicantNetwork *network);
494 unsigned int g_supplicant_network_get_keymgmt(GSupplicantNetwork *network);
495 void *g_supplicant_network_get_wifi_vsie(GSupplicantNetwork *network);
496 const unsigned char *g_supplicant_network_get_countrycode(GSupplicantNetwork
498 void *g_supplicant_network_get_bssid_list(GSupplicantNetwork *network);
499 GSupplicantPhy_mode g_supplicant_network_get_phy_mode(GSupplicantNetwork *network);
500 dbus_bool_t g_supplicant_network_get_transition_mode(GSupplicantNetwork *network);
501 const unsigned char *g_supplicant_network_get_transition_mode_bssid(GSupplicantNetwork *network);
502 const void *g_supplicant_network_get_transition_mode_ssid(GSupplicantNetwork *network,
503 unsigned int *transition_mode_ssid_len);
506 #if defined TIZEN_EXT
507 void g_supplicant_network_set_last_connected_bssid(GSupplicantNetwork *network, const unsigned char *bssid);
508 const unsigned char *g_supplicant_network_get_last_connected_bssid(GSupplicantNetwork *network);
509 void g_supplicant_network_update_assoc_reject(GSupplicantInterface *interface,
510 GSupplicantNetwork *network);
511 GHashTable *g_supplicant_network_get_assoc_reject_table(GSupplicantNetwork *network);
512 GSupplicantNetwork *g_supplicant_interface_get_network(GSupplicantInterface *interface,
516 #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET
517 typedef void (*g_supplicant_eap_callback)(GSupplicantInterface *interface, bool status);
518 #endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
520 struct _GSupplicantCallbacks {
521 void (*system_ready) (void);
522 void (*system_killed) (void);
523 void (*interface_added) (GSupplicantInterface *interface);
524 void (*interface_state) (GSupplicantInterface *interface);
525 void (*interface_removed) (GSupplicantInterface *interface);
526 void (*p2p_support) (GSupplicantInterface *interface);
527 void (*scan_started) (GSupplicantInterface *interface);
528 void (*scan_finished) (GSupplicantInterface *interface);
529 void (*ap_create_fail) (GSupplicantInterface *interface);
530 void (*network_added) (GSupplicantNetwork *network);
531 void (*network_removed) (GSupplicantNetwork *network);
532 #if defined TIZEN_EXT
533 void (*network_merged) (GSupplicantNetwork *network);
535 void (*network_changed) (GSupplicantNetwork *network,
536 const char *property);
537 void (*network_associated) (GSupplicantNetwork *network);
538 #if defined TIZEN_EXT
539 void (*system_power_off) (void);
540 void (*assoc_failed) (void *user_data);
541 void (*scan_done) (GSupplicantInterface *interface);
543 void (*sta_authorized) (GSupplicantInterface *interface,
545 void (*sta_deauthorized) (GSupplicantInterface *interface,
547 void (*peer_found) (GSupplicantPeer *peer);
548 void (*peer_lost) (GSupplicantPeer *peer);
549 void (*peer_changed) (GSupplicantPeer *peer,
550 GSupplicantPeerState state);
551 void (*peer_request) (GSupplicantPeer *peer);
552 void (*debug) (const char *str);
553 void (*disconnect_reasoncode)(GSupplicantInterface *interface,
555 void (*assoc_status_code)(GSupplicantInterface *interface,
557 #if defined TIZEN_EXT_WIFI_MESH
558 void (*mesh_support) (GSupplicantInterface *interface);
559 void (*mesh_group_started) (GSupplicantInterface *interface);
560 void (*mesh_group_removed) (GSupplicantInterface *interface);
561 void (*mesh_peer_connected) (GSupplicantMeshPeer *mesh_peer);
562 void (*mesh_peer_disconnected) (GSupplicantMeshPeer *mesh_peer);
565 #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET
566 g_supplicant_eap_callback eap;
567 #endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
570 typedef struct _GSupplicantCallbacks GSupplicantCallbacks;
572 #if defined TIZEN_EXT
573 void g_supplicant_set_ins_settings(GSupplicantINSPreferredFreq preferred_freq_bssid,
574 bool last_connected_bssid, bool assoc_reject, bool signal_bssid,
575 unsigned int preferred_freq_bssid_score, unsigned int last_connected_bssid_score,
576 unsigned int assoc_reject_score, int signal_level3_5ghz, int signal_level3_24ghz);
579 #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET
580 void g_supplicant_replace_config_file(const char *ifname, const char *config_file);
581 void g_supplicant_register_eap_callback(g_supplicant_eap_callback cb);
582 void g_supplicant_unregister_eap_callback(void);
583 #endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
585 #if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET
586 int g_supplicant_register(GSupplicantCallbacks *callbacks);
587 #else /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
588 int g_supplicant_register(const GSupplicantCallbacks *callbacks);
589 #endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */
590 void g_supplicant_unregister(const GSupplicantCallbacks *callbacks);
593 void g_supplicant_free_scan_params(GSupplicantScanParams *scan_params)
595 g_slist_free_full(scan_params->ssids, g_free);
596 g_free(scan_params->freqs);
604 #endif /* __G_SUPPLICANT_H */