1 /* 2 * wpa_supplicant - Event notifications 3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef NOTIFY_H 10 #define NOTIFY_H 11 12 #include "p2p/p2p.h" 13 #include "bss.h" 14 #include "rsn_supp/pmksa_cache.h" 15 #include "dpp.h" 16 17 struct wps_credential; 18 struct wps_event_m2d; 19 struct wps_event_fail; 20 struct tls_cert_data; 21 struct wpa_cred; 22 struct rsn_pmksa_cache_entry; 23 24 int wpas_notify_supplicant_initialized(struct wpa_global *global); 25 void wpas_notify_supplicant_deinitialized(struct wpa_global *global); 26 int wpas_notify_iface_added(struct wpa_supplicant *wpa_s); 27 void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s); 28 void wpas_notify_state_changed(struct wpa_supplicant *wpa_s, 29 enum wpa_states new_state, 30 enum wpa_states old_state); 31 void wpas_notify_disconnect_reason(struct wpa_supplicant *wpa_s); 32 void wpas_notify_auth_status_code(struct wpa_supplicant *wpa_s); 33 void wpas_notify_assoc_status_code(struct wpa_supplicant *wpa_s, const u8 *bssid, u8 timed_out, 34 const u8 *assoc_resp_ie, size_t assoc_resp_ie_len); 35 void wpas_notify_auth_timeout(struct wpa_supplicant *wpa_s); 36 void wpas_notify_roam_time(struct wpa_supplicant *wpa_s); 37 void wpas_notify_roam_complete(struct wpa_supplicant *wpa_s); 38 void wpas_notify_session_length(struct wpa_supplicant *wpa_s); 39 void wpas_notify_bss_tm_status(struct wpa_supplicant *wpa_s); 40 void wpas_notify_network_changed(struct wpa_supplicant *wpa_s); 41 void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s); 42 void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s); 43 void wpas_notify_mac_address_changed(struct wpa_supplicant *wpa_s); 44 void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s); 45 void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s, 46 struct wpa_ssid *ssid); 47 void wpas_notify_network_selected(struct wpa_supplicant *wpa_s, 48 struct wpa_ssid *ssid); 49 void wpas_notify_network_request(struct wpa_supplicant *wpa_s, 50 struct wpa_ssid *ssid, 51 enum wpa_ctrl_req_type rtype, 52 const char *default_txt); 53 void wpas_notify_permanent_id_req_denied(struct wpa_supplicant *wpa_s); 54 void wpas_notify_scanning(struct wpa_supplicant *wpa_s); 55 void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success); 56 void wpas_notify_scan_results(struct wpa_supplicant *wpa_s); 57 void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s, 58 const struct wps_credential *cred); 59 void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s, 60 struct wps_event_m2d *m2d); 61 void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s, 62 struct wps_event_fail *fail); 63 void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s); 64 void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant *wpa_s); 65 void wpas_notify_network_added(struct wpa_supplicant *wpa_s, 66 struct wpa_ssid *ssid); 67 void wpas_notify_network_removed(struct wpa_supplicant *wpa_s, 68 struct wpa_ssid *ssid); 69 void wpas_notify_bss_added(struct wpa_supplicant *wpa_s, u8 bssid[], 70 unsigned int id); 71 void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s, u8 bssid[], 72 unsigned int id); 73 void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s, 74 unsigned int id); 75 void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s, 76 unsigned int id); 77 void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s, 78 unsigned int id); 79 void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s, 80 unsigned int id); 81 void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s, 82 unsigned int id); 83 void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s, 84 unsigned int id); 85 void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s, 86 unsigned int id); 87 void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s, 88 unsigned int id); 89 void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s, 90 unsigned int id); 91 void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id); 92 void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name); 93 void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name); 94 95 void wpas_notify_debug_level_changed(struct wpa_global *global); 96 void wpas_notify_debug_timestamp_changed(struct wpa_global *global); 97 void wpas_notify_debug_show_keys_changed(struct wpa_global *global); 98 void wpas_notify_suspend(struct wpa_global *global); 99 void wpas_notify_resume(struct wpa_global *global); 100 101 void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s, 102 const u8 *mac_addr, int authorized, 103 const u8 *p2p_dev_addr); 104 void wpas_notify_p2p_find_stopped(struct wpa_supplicant *wpa_s); 105 void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s, 106 const u8 *addr, const struct p2p_peer_info *info, 107 const u8* peer_wfd_device_info, u8 peer_wfd_device_info_len, 108 const u8* peer_wfd_r2_device_info, u8 peer_wfd_r2_device_info_len, 109 int new_device); 110 void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s, 111 const u8 *dev_addr); 112 void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s, 113 const struct wpa_ssid *ssid, 114 const char *role); 115 void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s, 116 const u8 *src, u16 dev_passwd_id, u8 go_intent); 117 void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s, 118 struct p2p_go_neg_results *res); 119 void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s, 120 int status, const u8 *bssid); 121 void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s, 122 int freq, const u8 *sa, u8 dialog_token, 123 u16 update_indic, const u8 *tlvs, 124 size_t tlvs_len); 125 void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s, 126 const u8 *sa, u16 update_indic, 127 const u8 *tlvs, size_t tlvs_len); 128 void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s, 129 const u8 *dev_addr, int request, 130 enum p2p_prov_disc_status status, 131 u16 config_methods, 132 unsigned int generated_pin); 133 void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s, 134 struct wpa_ssid *ssid, int persistent, 135 int client, const u8 *ip); 136 void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant *wpa_s, 137 const char *reason); 138 void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s, 139 struct wpa_ssid *ssid); 140 void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s, 141 struct wpa_ssid *ssid); 142 143 void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s, 144 struct wps_event_fail *fail); 145 146 void wpas_notify_certification(struct wpa_supplicant *wpa_s, 147 struct tls_cert_data *cert, 148 const char *cert_hash); 149 void wpas_notify_preq(struct wpa_supplicant *wpa_s, 150 const u8 *addr, const u8 *dst, const u8 *bssid, 151 const u8 *ie, size_t ie_len, u32 ssi_signal); 152 void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status, 153 const char *parameter); 154 void wpas_notify_eap_error(struct wpa_supplicant *wpa_s, int error_code); 155 void wpas_notify_psk_mismatch(struct wpa_supplicant *wpa_s); 156 void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s, 157 struct wpa_ssid *ssid); 158 void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s, 159 struct wpa_ssid *ssid); 160 void wpas_notify_p2p_invitation_received(struct wpa_supplicant *wpa_s, 161 const u8 *sa, const u8 *go_dev_addr, 162 const u8 *bssid, int id, int op_freq); 163 void wpas_notify_mesh_group_started(struct wpa_supplicant *wpa_s, 164 struct wpa_ssid *ssid); 165 void wpas_notify_mesh_group_removed(struct wpa_supplicant *wpa_s, 166 const u8 *meshid, u8 meshid_len, 167 u16 reason_code); 168 void wpas_notify_mesh_peer_connected(struct wpa_supplicant *wpa_s, 169 const u8 *peer_addr); 170 void wpas_notify_mesh_peer_disconnected(struct wpa_supplicant *wpa_s, 171 const u8 *peer_addr, u16 reason_code); 172 void wpas_notify_anqp_query_done(struct wpa_supplicant *wpa_s, const u8* bssid, 173 const char* result, 174 const struct wpa_bss_anqp *anqp); 175 void wpas_notify_hs20_icon_query_done(struct wpa_supplicant *wpa_s, const u8* bssid, 176 const char* file_name, const u8* image, 177 u32 image_length); 178 void wpas_notify_hs20_rx_subscription_remediation(struct wpa_supplicant *wpa_s, 179 const char* url, 180 u8 osu_method); 181 void wpas_notify_hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s, 182 u8 code, u16 reauth_delay, 183 const char *url); 184 void wpas_notify_hs20_rx_terms_and_conditions_acceptance( 185 struct wpa_supplicant *wpa_s, const char *url); 186 void wpas_notify_dpp_config_received(struct wpa_supplicant *wpa_s, 187 struct wpa_ssid *ssid, bool conn_status_requested); 188 void wpas_notify_dpp_config_sent(struct wpa_supplicant *wpa_s); 189 void wpas_notify_dpp_connection_status_sent(struct wpa_supplicant *wpa_s, 190 enum dpp_status_error result); 191 void wpas_notify_dpp_auth_success(struct wpa_supplicant *wpa_s); 192 void wpas_notify_dpp_resp_pending(struct wpa_supplicant *wpa_s); 193 void wpas_notify_dpp_not_compatible(struct wpa_supplicant *wpa_s); 194 void wpas_notify_dpp_missing_auth(struct wpa_supplicant *wpa_s); 195 void wpas_notify_dpp_configuration_failure(struct wpa_supplicant *wpa_s); 196 void wpas_notify_dpp_timeout(struct wpa_supplicant *wpa_s); 197 void wpas_notify_dpp_auth_failure(struct wpa_supplicant *wpa_s); 198 void wpas_notify_dpp_failure(struct wpa_supplicant *wpa_s); 199 void wpas_notify_dpp_config_sent_wait_response(struct wpa_supplicant *wpa_s); 200 void wpas_notify_dpp_conn_status(struct wpa_supplicant *wpa_s, 201 enum dpp_status_error status, const char *ssid, 202 const char *channel_list, unsigned short band_list[], int size); 203 void wpas_notify_dpp_config_accepted(struct wpa_supplicant *wpa_s); 204 void wpas_notify_dpp_config_rejected(struct wpa_supplicant *wpa_s); 205 void wpas_notify_transition_disable(struct wpa_supplicant *wpa_s, 206 struct wpa_ssid *ssid, 207 u8 bitmap); 208 void wpas_notify_network_not_found(struct wpa_supplicant *wpa_s); 209 void wpas_notify_interworking_ap_added(struct wpa_supplicant *wpa_s, 210 struct wpa_bss *bss, 211 struct wpa_cred *cred, int excluded, 212 const char *type, int bh, int bss_load, 213 int conn_capab); 214 void wpas_notify_interworking_select_done(struct wpa_supplicant *wpa_s); 215 void wpas_notify_eap_method_selected(struct wpa_supplicant *wpa_s, 216 const char* reason_string); 217 void wpas_notify_ssid_temp_disabled(struct wpa_supplicant *wpa_s, 218 const char *reason_string); 219 void wpas_notify_open_ssl_failure(struct wpa_supplicant *wpa_s, 220 const char *reason_string); 221 void wpas_notify_qos_policy_reset(struct wpa_supplicant *wpa_s); 222 void wpas_notify_qos_policy_request(struct wpa_supplicant *wpa_s, 223 struct dscp_policy_data *policies, int num_policies); 224 void wpas_notify_frequency_changed(struct wpa_supplicant *wpa_s, int frequency); 225 ssize_t wpas_get_certificate(const char *alias, uint8_t** value); 226 ssize_t wpas_list_aliases(const char *prefix, char ***aliases); 227 void wpas_notify_pmk_cache_added(struct wpa_supplicant *wpa_s, 228 struct rsn_pmksa_cache_entry *entry); 229 void wpas_notify_signal_change(struct wpa_supplicant *wpa_s); 230 void wpas_notify_qos_policy_scs_response(struct wpa_supplicant *wpa_s, 231 unsigned int num_scs_resp, int **scs_resp); 232 void wpas_notify_mlo_info_change_reason(struct wpa_supplicant *wpa_s, 233 enum mlo_info_change_reason reason); 234 235 #endif /* NOTIFY_H */ 236