Home | History | Annotate | Download | only in wpa_supplicant
      1 /*
      2  * wpa_supplicant - Event notifications
      3  * Copyright (c) 2009-2010, Jouni Malinen <j (at) 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 
     15 struct wps_credential;
     16 struct wps_event_m2d;
     17 struct wps_event_fail;
     18 
     19 int wpas_notify_supplicant_initialized(struct wpa_global *global);
     20 void wpas_notify_supplicant_deinitialized(struct wpa_global *global);
     21 int wpas_notify_iface_added(struct wpa_supplicant *wpa_s);
     22 void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s);
     23 void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
     24 			       enum wpa_states new_state,
     25 			       enum wpa_states old_state);
     26 void wpas_notify_disconnect_reason(struct wpa_supplicant *wpa_s);
     27 void wpas_notify_assoc_status_code(struct wpa_supplicant *wpa_s);
     28 void wpas_notify_auth_timeout(struct wpa_supplicant *wpa_s);
     29 void wpas_notify_network_changed(struct wpa_supplicant *wpa_s);
     30 void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s);
     31 void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s);
     32 void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s);
     33 void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
     34 					 struct wpa_ssid *ssid);
     35 void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
     36 				  struct wpa_ssid *ssid);
     37 void wpas_notify_network_request(struct wpa_supplicant *wpa_s,
     38 				 struct wpa_ssid *ssid,
     39 				 enum wpa_ctrl_req_type rtype,
     40 				 const char *default_txt);
     41 void wpas_notify_scanning(struct wpa_supplicant *wpa_s);
     42 void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success);
     43 void wpas_notify_scan_results(struct wpa_supplicant *wpa_s);
     44 void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
     45 				const struct wps_credential *cred);
     46 void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
     47 			       struct wps_event_m2d *m2d);
     48 void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
     49 				struct wps_event_fail *fail);
     50 void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s);
     51 void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant *wpa_s);
     52 void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
     53 			       struct wpa_ssid *ssid);
     54 void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
     55 				 struct wpa_ssid *ssid);
     56 void wpas_notify_bss_added(struct wpa_supplicant *wpa_s, u8 bssid[],
     57 			   unsigned int id);
     58 void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s, u8 bssid[],
     59 			     unsigned int id);
     60 void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s,
     61 				  unsigned int id);
     62 void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s,
     63 				    unsigned int id);
     64 void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s,
     65 				     unsigned int id);
     66 void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s,
     67 				  unsigned int id);
     68 void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s,
     69 				   unsigned int id);
     70 void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s,
     71 				   unsigned int id);
     72 void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s,
     73 				 unsigned int id);
     74 void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s,
     75 				 unsigned int id);
     76 void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s,
     77 				   unsigned int id);
     78 void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id);
     79 void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name);
     80 void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name);
     81 
     82 void wpas_notify_debug_level_changed(struct wpa_global *global);
     83 void wpas_notify_debug_timestamp_changed(struct wpa_global *global);
     84 void wpas_notify_debug_show_keys_changed(struct wpa_global *global);
     85 void wpas_notify_suspend(struct wpa_global *global);
     86 void wpas_notify_resume(struct wpa_global *global);
     87 
     88 void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
     89 				const u8 *mac_addr, int authorized,
     90 				const u8 *p2p_dev_addr);
     91 void wpas_notify_p2p_find_stopped(struct wpa_supplicant *wpa_s);
     92 void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
     93 				 const u8 *addr, const struct p2p_peer_info *info,
     94 				 const u8* peer_wfd_device_info, u8 peer_wfd_device_info_len,
     95 				 int new_device);
     96 void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
     97 				 const u8 *dev_addr);
     98 void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
     99 				   const struct wpa_ssid *ssid,
    100 				   const char *role);
    101 void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
    102 				const u8 *src, u16 dev_passwd_id, u8 go_intent);
    103 void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
    104 				      struct p2p_go_neg_results *res);
    105 void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
    106 				       int status, const u8 *bssid);
    107 void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s,
    108 				int freq, const u8 *sa, u8 dialog_token,
    109 				u16 update_indic, const u8 *tlvs,
    110 				size_t tlvs_len);
    111 void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
    112 				 const u8 *sa, u16 update_indic,
    113 				 const u8 *tlvs, size_t tlvs_len);
    114 void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
    115 					 const u8 *dev_addr, int request,
    116 					 enum p2p_prov_disc_status status,
    117 					 u16 config_methods,
    118 					 unsigned int generated_pin);
    119 void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
    120 				   struct wpa_ssid *ssid, int persistent,
    121 				   int client, const u8 *ip);
    122 void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant *wpa_s,
    123 					     const char *reason);
    124 void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
    125 					struct wpa_ssid *ssid);
    126 void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
    127 					  struct wpa_ssid *ssid);
    128 
    129 void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
    130 				struct wps_event_fail *fail);
    131 
    132 void wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth,
    133 			       const char *subject, const char *altsubject[],
    134 			       int num_altsubject, const char *cert_hash,
    135 			       const struct wpabuf *cert);
    136 void wpas_notify_preq(struct wpa_supplicant *wpa_s,
    137 		      const u8 *addr, const u8 *dst, const u8 *bssid,
    138 		      const u8 *ie, size_t ie_len, u32 ssi_signal);
    139 void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
    140 			    const char *parameter);
    141 void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s,
    142 					   struct wpa_ssid *ssid);
    143 void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s,
    144 				      struct wpa_ssid *ssid);
    145 void wpas_notify_p2p_invitation_received(struct wpa_supplicant *wpa_s,
    146 					 const u8 *sa, const u8 *go_dev_addr,
    147 					 const u8 *bssid, int id, int op_freq);
    148 void wpas_notify_anqp_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
    149 				 const char* result,
    150 				 const struct wpa_bss_anqp *anqp);
    151 void wpas_notify_hs20_icon_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
    152 				      const char* file_name, const u8* image,
    153 				      u32 image_length);
    154 void wpas_notify_hs20_rx_subscription_remediation(struct wpa_supplicant *wpa_s,
    155 						  const char* url,
    156 						  u8 osu_method);
    157 void wpas_notify_hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s,
    158 						u8 code, u16 reauth_delay,
    159 						const char *url);
    160 #endif /* NOTIFY_H */
    161