wpa_ctrl.h revision f21452aea786ac056eb01f1cbba4f553bd502747
18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant/hostapd control interface library 38d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi> 48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * This software may be distributed under the terms of the BSD license. 6c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * See README for more details. 78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef WPA_CTRL_H 108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_CTRL_H 118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifdef __cplusplus 138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtextern "C" { 148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif 158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* wpa_supplicant control interface - fixed message prefixes */ 178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Interactive request for identity/password/pin */ 198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_CTRL_REQ "CTRL-REQ-" 208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Response to identity/password/pin request */ 228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_CTRL_RSP "CTRL-RSP-" 238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* Event messages with fixed prefix */ 258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Authentication completed successfully and data connection enabled */ 268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_CONNECTED "CTRL-EVENT-CONNECTED " 278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Disconnected, data connection is not available */ 288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_DISCONNECTED "CTRL-EVENT-DISCONNECTED " 298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Association rejected during connection attempt */ 308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_ASSOC_REJECT "CTRL-EVENT-ASSOC-REJECT " 318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** wpa_supplicant is exiting */ 328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_TERMINATING "CTRL-EVENT-TERMINATING " 338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Password change was completed successfully */ 348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_PASSWORD_CHANGED "CTRL-EVENT-PASSWORD-CHANGED " 358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP-Request/Notification received */ 368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_NOTIFICATION "CTRL-EVENT-EAP-NOTIFICATION " 378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP authentication started (EAP-Request/Identity received) */ 388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_STARTED "CTRL-EVENT-EAP-STARTED " 398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP method proposed by the server */ 408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_PROPOSED_METHOD "CTRL-EVENT-EAP-PROPOSED-METHOD " 418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP method selected */ 428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_METHOD "CTRL-EVENT-EAP-METHOD " 438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP peer certificate from TLS */ 448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_PEER_CERT "CTRL-EVENT-EAP-PEER-CERT " 458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP TLS certificate chain validation error */ 468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_TLS_CERT_ERROR "CTRL-EVENT-EAP-TLS-CERT-ERROR " 478da800a193fb6f8832218715f82a7b4e2d2ad338Dmitry Shmidt/** EAP status */ 488da800a193fb6f8832218715f82a7b4e2d2ad338Dmitry Shmidt#define WPA_EVENT_EAP_STATUS "CTRL-EVENT-EAP-STATUS " 498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP authentication completed successfully */ 508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_SUCCESS "CTRL-EVENT-EAP-SUCCESS " 518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** EAP authentication failed (EAP-Failure received) */ 528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_EAP_FAILURE "CTRL-EVENT-EAP-FAILURE " 5361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt/** Network block temporarily disabled (e.g., due to authentication failure) */ 5461d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_EVENT_TEMP_DISABLED "CTRL-EVENT-SSID-TEMP-DISABLED " 5561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt/** Temporarily disabled network block re-enabled */ 5661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_EVENT_REENABLED "CTRL-EVENT-SSID-REENABLED " 57fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt/** New scan started */ 58fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define WPA_EVENT_SCAN_STARTED "CTRL-EVENT-SCAN-STARTED " 598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** New scan results available */ 608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_SCAN_RESULTS "CTRL-EVENT-SCAN-RESULTS " 618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** wpa_supplicant state change */ 628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_STATE_CHANGE "CTRL-EVENT-STATE-CHANGE " 638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** A new BSS entry was added (followed by BSS entry id and BSSID) */ 648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_BSS_ADDED "CTRL-EVENT-BSS-ADDED " 658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** A BSS entry was removed (followed by BSS entry id and BSSID) */ 668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_EVENT_BSS_REMOVED "CTRL-EVENT-BSS-REMOVED " 678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 68b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt/** RSN IBSS 4-way handshakes completed with specified peer */ 69b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define IBSS_RSN_COMPLETED "IBSS-RSN-COMPLETED " 70b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt 7104f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt/** Notification of frequency conflict due to a concurrent operation. 7204f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt * 7304f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt * The indicated network is disabled and needs to be re-enabled before it can 7404f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt * be used again. 7504f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt */ 7604f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt#define WPA_EVENT_FREQ_CONFLICT "CTRL-EVENT-FREQ-CONFLICT " 77cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt/** Frequency ranges that the driver recommends to avoid */ 78cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt#define WPA_EVENT_AVOID_FREQ "CTRL-EVENT-AVOID-FREQ " 798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** WPS overlap detected in PBC mode */ 808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_OVERLAP "WPS-OVERLAP-DETECTED " 818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Available WPS AP with active PBC found in scan results */ 828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_AVAILABLE_PBC "WPS-AP-AVAILABLE-PBC " 838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Available WPS AP with our address as authorized in scan results */ 848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_AVAILABLE_AUTH "WPS-AP-AVAILABLE-AUTH " 858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Available WPS AP with recently selected PIN registrar found in scan results 868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_AVAILABLE_PIN "WPS-AP-AVAILABLE-PIN " 888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** Available WPS AP found in scan results */ 898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_AVAILABLE "WPS-AP-AVAILABLE " 908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** A new credential received */ 918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_CRED_RECEIVED "WPS-CRED-RECEIVED " 928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** M2D received */ 938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_M2D "WPS-M2D " 948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** WPS registration failed after M2/M2D */ 958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_FAIL "WPS-FAIL " 968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** WPS registration completed successfully */ 978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_SUCCESS "WPS-SUCCESS " 988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** WPS enrollment attempt timed out and was terminated */ 998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_TIMEOUT "WPS-TIMEOUT " 100b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt/* PBC mode was activated */ 101b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define WPS_EVENT_ACTIVE "WPS-PBC-ACTIVE " 102b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt/* PBC mode was disabled */ 103b7b4d0ec07161a6d76c40ba7ef1306e82fbb7e15Dmitry Shmidt#define WPS_EVENT_DISABLE "WPS-PBC-DISABLE " 1048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ENROLLEE_SEEN "WPS-ENROLLEE-SEEN " 1068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_OPEN_NETWORK "WPS-OPEN-NETWORK " 1088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* WPS ER events */ 1108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ER_AP_ADD "WPS-ER-AP-ADD " 1118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ER_AP_REMOVE "WPS-ER-AP-REMOVE " 1128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ER_ENROLLEE_ADD "WPS-ER-ENROLLEE-ADD " 1138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ER_ENROLLEE_REMOVE "WPS-ER-ENROLLEE-REMOVE " 1148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ER_AP_SETTINGS "WPS-ER-AP-SETTINGS " 1158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_ER_SET_SEL_REG "WPS-ER-AP-SET-SEL-REG " 1168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** P2P device found */ 1188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_DEVICE_FOUND "P2P-DEVICE-FOUND " 119497c1d5e50162d6b3c1cce5dbd9c5fd9da69aaefDmitry Shmidt 120497c1d5e50162d6b3c1cce5dbd9c5fd9da69aaefDmitry Shmidt/** P2P device lost */ 121497c1d5e50162d6b3c1cce5dbd9c5fd9da69aaefDmitry Shmidt#define P2P_EVENT_DEVICE_LOST "P2P-DEVICE-LOST " 122497c1d5e50162d6b3c1cce5dbd9c5fd9da69aaefDmitry Shmidt 1238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** A P2P device requested GO negotiation, but we were not ready to start the 1248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * negotiation */ 1258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GO_NEG_REQUEST "P2P-GO-NEG-REQUEST " 1268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GO_NEG_SUCCESS "P2P-GO-NEG-SUCCESS " 1278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GO_NEG_FAILURE "P2P-GO-NEG-FAILURE " 1288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GROUP_FORMATION_SUCCESS "P2P-GROUP-FORMATION-SUCCESS " 1298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GROUP_FORMATION_FAILURE "P2P-GROUP-FORMATION-FAILURE " 1308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GROUP_STARTED "P2P-GROUP-STARTED " 1318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_GROUP_REMOVED "P2P-GROUP-REMOVED " 1328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_CROSS_CONNECT_ENABLE "P2P-CROSS-CONNECT-ENABLE " 1338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_CROSS_CONNECT_DISABLE "P2P-CROSS-CONNECT-DISABLE " 1348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* parameters: <peer address> <PIN> */ 1358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_PROV_DISC_SHOW_PIN "P2P-PROV-DISC-SHOW-PIN " 1368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* parameters: <peer address> */ 1378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_PROV_DISC_ENTER_PIN "P2P-PROV-DISC-ENTER-PIN " 1388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* parameters: <peer address> */ 1398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_PROV_DISC_PBC_REQ "P2P-PROV-DISC-PBC-REQ " 1408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* parameters: <peer address> */ 1418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_PROV_DISC_PBC_RESP "P2P-PROV-DISC-PBC-RESP " 14204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt/* parameters: <peer address> <status> */ 14304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define P2P_EVENT_PROV_DISC_FAILURE "P2P-PROV-DISC-FAILURE" 1448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* parameters: <freq> <src addr> <dialog token> <update indicator> <TLVs> */ 1458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_SERV_DISC_REQ "P2P-SERV-DISC-REQ " 1468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* parameters: <src addr> <update indicator> <TLVs> */ 1478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_SERV_DISC_RESP "P2P-SERV-DISC-RESP " 1488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_INVITATION_RECEIVED "P2P-INVITATION-RECEIVED " 1498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_EVENT_INVITATION_RESULT "P2P-INVITATION-RESULT " 1501f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define P2P_EVENT_FIND_STOPPED "P2P-FIND-STOPPED " 151391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt#define P2P_EVENT_PERSISTENT_PSK_FAIL "P2P-PERSISTENT-PSK-FAIL id=" 152fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define P2P_EVENT_PRESENCE_RESPONSE "P2P-PRESENCE-RESPONSE " 153cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt#define P2P_EVENT_NFC_BOTH_GO "P2P-NFC-BOTH-GO " 154cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt#define P2P_EVENT_NFC_PEER_CLIENT "P2P-NFC-PEER-CLIENT " 155cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt#define P2P_EVENT_NFC_WHILE_CLIENT "P2P-NFC-WHILE-CLIENT " 1561f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 157f7e0a9905988e62e4f70fed8b795722abeab719bDmitry Shmidt/* parameters: <PMF enabled> <timeout in ms> <Session Information URL> */ 158f7e0a9905988e62e4f70fed8b795722abeab719bDmitry Shmidt#define ESS_DISASSOC_IMMINENT "ESS-DISASSOC-IMMINENT " 159cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt#define P2P_EVENT_REMOVE_AND_REFORM_GROUP "P2P-REMOVE-AND-REFORM-GROUP " 160f7e0a9905988e62e4f70fed8b795722abeab719bDmitry Shmidt 1611f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define INTERWORKING_AP "INTERWORKING-AP " 162f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt#define INTERWORKING_BLACKLISTED "INTERWORKING-BLACKLISTED " 1631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#define INTERWORKING_NO_MATCH "INTERWORKING-NO-MATCH " 1645460547a121207cf7a99eac45e05fcdd83be3161Dmitry Shmidt#define INTERWORKING_ALREADY_CONNECTED "INTERWORKING-ALREADY-CONNECTED " 165f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt#define INTERWORKING_SELECTED "INTERWORKING-SELECTED " 1668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 16761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define GAS_RESPONSE_INFO "GAS-RESPONSE-INFO " 168fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt/* parameters: <addr> <dialog_token> <freq> */ 169fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define GAS_QUERY_START "GAS-QUERY-START " 170fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt/* parameters: <addr> <dialog_token> <freq> <status_code> <result> */ 171fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define GAS_QUERY_DONE "GAS-QUERY-DONE " 172fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt 173f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt#define HS20_SUBSCRIPTION_REMEDIATION "HS20-SUBSCRIPTION-REMEDIATION " 174f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt#define HS20_DEAUTH_IMMINENT_NOTICE "HS20-DEAUTH-IMMINENT-NOTICE " 175f21452aea786ac056eb01f1cbba4f553bd502747Dmitry Shmidt 176fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define EXT_RADIO_WORK_START "EXT-RADIO-WORK-START " 177fb79edc9df1f20461e90e478363d207348213d35Dmitry Shmidt#define EXT_RADIO_WORK_TIMEOUT "EXT-RADIO-WORK-TIMEOUT " 17861d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 1798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* hostapd control interface - fixed message prefixes */ 1808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_PIN_NEEDED "WPS-PIN-NEEDED " 1818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_NEW_AP_SETTINGS "WPS-NEW-AP-SETTINGS " 1828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_REG_SUCCESS "WPS-REG-SUCCESS " 1838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_SETUP_LOCKED "WPS-AP-SETUP-LOCKED " 1848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_SETUP_UNLOCKED "WPS-AP-SETUP-UNLOCKED " 1858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_PIN_ENABLED "WPS-AP-PIN-ENABLED " 1868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPS_EVENT_AP_PIN_DISABLED "WPS-AP-PIN-DISABLED " 1878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_STA_CONNECTED "AP-STA-CONNECTED " 1888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define AP_STA_DISCONNECTED "AP-STA-DISCONNECTED " 1898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 190f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt#define AP_REJECTED_MAX_STA "AP-REJECTED-MAX-STA " 191f86232838cf712377867cb42417c1613ab5dc425Dmitry Shmidt#define AP_REJECTED_BLOCKED_STA "AP-REJECTED-BLOCKED-STA " 1928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 193cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define AP_EVENT_ENABLED "AP-ENABLED " 194cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define AP_EVENT_DISABLED "AP-DISABLED " 195cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt 196cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define ACS_EVENT_STARTED "ACS-STARTED " 197cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define ACS_EVENT_COMPLETED "ACS-COMPLETED " 198cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define ACS_EVENT_FAILED "ACS-FAILED " 199cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt 200cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define DFS_EVENT_RADAR_DETECTED "DFS-RADAR-DETECTED " 201cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define DFS_EVENT_NEW_CHANNEL "DFS-NEW-CHANNEL " 202cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define DFS_EVENT_CAC_START "DFS-CAC-START " 203cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define DFS_EVENT_CAC_COMPLETED "DFS-CAC-COMPLETED " 204cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt#define DFS_EVENT_NOP_FINISHED "DFS-NOP-FINISHED " 205cce06667447b5aec83452adb0c15100ada531095Dmitry Shmidt 206e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt#define AP_CSA_FINISHED "AP-CSA-FINISHED " 207e0e48dc666fb14a7bb60264ca87463ba7bc1fe0bDmitry Shmidt 20804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt/* BSS command information masks */ 20904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 2102f3b8dec59373945c5feef8a78ced8967a80cc66Dmitry Shmidt#define WPA_BSS_MASK_ALL 0xFFFDFFFF 21104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_ID BIT(0) 21204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_BSSID BIT(1) 21304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_FREQ BIT(2) 21404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_BEACON_INT BIT(3) 21504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_CAPABILITIES BIT(4) 21604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_QUAL BIT(5) 21704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_NOISE BIT(6) 21804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_LEVEL BIT(7) 21904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_TSF BIT(8) 22004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_AGE BIT(9) 22104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_IE BIT(10) 22204949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_FLAGS BIT(11) 22304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_SSID BIT(12) 22404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_WPS_SCAN BIT(13) 22504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_P2P_SCAN BIT(14) 22604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt#define WPA_BSS_MASK_INTERNETW BIT(15) 22761d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_BSS_MASK_WIFI_DISPLAY BIT(16) 2282f3b8dec59373945c5feef8a78ced8967a80cc66Dmitry Shmidt#define WPA_BSS_MASK_DELIM BIT(17) 22904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 23004949598a23f501be6eec21697465fd46a28840aDmitry Shmidt 2318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* wpa_supplicant/hostapd control interface access */ 2328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_open - Open a control interface to wpa_supplicant/hostapd 2358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl_path: Path for UNIX domain sockets; ignored if UDP sockets are used. 2368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: Pointer to abstract control interface data or %NULL on failure 2378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to open a control interface to wpa_supplicant/hostapd. 2398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * ctrl_path is usually /var/run/wpa_supplicant or /var/run/hostapd. This path 2408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * is configured in wpa_supplicant/hostapd and other programs using the control 2418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface need to use matching path configuration. 2428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wpa_ctrl * wpa_ctrl_open(const char *ctrl_path); 2448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_close - Close a control interface to wpa_supplicant/hostapd 2488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 2498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to close a control interface. 2518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpa_ctrl_close(struct wpa_ctrl *ctrl); 2538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_request - Send a command to wpa_supplicant/hostapd 2578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 2588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @cmd: Command; usually, ASCII text, e.g., "PING" 2598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @cmd_len: Length of the cmd in bytes 2608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reply: Buffer for the response 2618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reply_len: Reply buffer length 2628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @msg_cb: Callback function for unsolicited messages or %NULL if not used 2638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on error (send or receive failed), -2 on timeout 2648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function is used to send commands to wpa_supplicant/hostapd. Received 2668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * response will be written to reply and reply_len is set to the actual length 2678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * of the reply. This function will block for up to two seconds while waiting 2688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * for the reply. If unsolicited messages are received, the blocking time may 2698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * be longer. 2708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * msg_cb can be used to register a callback function that will be called for 2728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * unsolicited messages received while waiting for the command response. These 2738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * messages may be received if wpa_ctrl_request() is called at the same time as 2748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant/hostapd is sending such a message. This can happen only if 2758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the program has used wpa_ctrl_attach() to register itself as a monitor for 2768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * event messages. Alternatively to msg_cb, programs can register two control 2778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * interface connections and use one of them for commands and the other one for 2788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * receiving event messages, in other words, call wpa_ctrl_attach() only for 2798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * the control interface connection that will be used for event messages. 2808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_ctrl_request(struct wpa_ctrl *ctrl, const char *cmd, size_t cmd_len, 2828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt char *reply, size_t *reply_len, 2838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt void (*msg_cb)(char *msg, size_t len)); 2848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 2878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_attach - Register as an event monitor for the control interface 2888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 2898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure, -2 on timeout 2908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 2918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function registers the control interface connection as a monitor for 2928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant/hostapd events. After a success wpa_ctrl_attach() call, the 2938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * control interface connection starts receiving event messages that can be 2948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * read with wpa_ctrl_recv(). 2958d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 2968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_ctrl_attach(struct wpa_ctrl *ctrl); 2978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 2998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_detach - Unregister event monitor from the control interface 3018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 3028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure, -2 on timeout 3038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function unregisters the control interface connection as a monitor for 3058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant/hostapd events, i.e., cancels the registration done with 3068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_attach(). 3078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_ctrl_detach(struct wpa_ctrl *ctrl); 3098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_recv - Receive a pending control interface message 3138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 3148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reply: Buffer for the message data 3158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @reply_len: Length of the reply buffer 3168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 0 on success, -1 on failure 3178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function will receive a pending control interface message. This 3198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * function will block if no messages are available. The received response will 3208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * be written to reply and reply_len is set to the actual length of the reply. 3218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_recv() is only used for event messages, i.e., wpa_ctrl_attach() 3228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * must have been used to register the control interface as an event monitor. 3238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len); 3258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_pending - Check whether there are pending event messages 3298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 3308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: 1 if there are pending messages, 0 if no, or -1 on error 3318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function will check whether there are any pending control interface 3338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * message available to be received with wpa_ctrl_recv(). wpa_ctrl_pending() is 3348d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * only used for event messages, i.e., wpa_ctrl_attach() must have been used to 3358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * register the control interface as an event monitor. 3368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_ctrl_pending(struct wpa_ctrl *ctrl); 3388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/** 3418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_get_fd - Get file descriptor used by the control interface 3428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * @ctrl: Control interface data from wpa_ctrl_open() 3438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Returns: File descriptor used for the connection 3448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * This function can be used to get the file descriptor that is used for the 3468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * control interface connection. The returned value can be used, e.g., with 3478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * select() while waiting for multiple events. 3488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 3498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * The returned file descriptor must not be used directly for sending or 3508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * receiving packets; instead, the library functions wpa_ctrl_request() and 3518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_ctrl_recv() must be used for this. 3528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 3538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpa_ctrl_get_fd(struct wpa_ctrl *ctrl); 3548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 35561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidtchar * wpa_ctrl_get_remote_ifname(struct wpa_ctrl *ctrl); 35661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt 3571f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#ifdef ANDROID 3581f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt/** 3591f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wpa_ctrl_cleanup() - Delete any local UNIX domain socket files that 3601f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * may be left over from clients that were previously connected to 3611f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * wpa_supplicant. This keeps these files from being orphaned in the 3621f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * event of crashes that prevented them from being removed as part 3631f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt * of the normal orderly shutdown. 3641f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt */ 3651f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid wpa_ctrl_cleanup(void); 3661f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt#endif /* ANDROID */ 3671f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt 3688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifdef CONFIG_CTRL_IFACE_UDP 36961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt/* Port range for multiple wpa_supplicant instances and multiple VIFs */ 3708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_CTRL_IFACE_PORT 9877 37161d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_CTRL_IFACE_PORT_LIMIT 50 /* decremented from start */ 3728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define WPA_GLOBAL_CTRL_IFACE_PORT 9878 37361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt#define WPA_GLOBAL_CTRL_IFACE_PORT_LIMIT 20 /* incremented from start */ 3748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* CONFIG_CTRL_IFACE_UDP */ 3758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifdef __cplusplus 3788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt} 3798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif 3808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 3818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* WPA_CTRL_H */ 382