xref: /freebsd/contrib/wpa/wpa_supplicant/notify.h (revision a90b9d0159070121c221b966469c3e36d912bf82)
1e28a4053SRui Paulo /*
2e28a4053SRui Paulo  * wpa_supplicant - Event notifications
3e28a4053SRui Paulo  * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
4e28a4053SRui Paulo  *
5f05cddf9SRui Paulo  * This software may be distributed under the terms of the BSD license.
6f05cddf9SRui Paulo  * See README for more details.
7e28a4053SRui Paulo  */
8e28a4053SRui Paulo 
9e28a4053SRui Paulo #ifndef NOTIFY_H
10e28a4053SRui Paulo #define NOTIFY_H
11e28a4053SRui Paulo 
12f05cddf9SRui Paulo #include "p2p/p2p.h"
13f05cddf9SRui Paulo 
14e28a4053SRui Paulo struct wps_credential;
15e28a4053SRui Paulo struct wps_event_m2d;
16e28a4053SRui Paulo struct wps_event_fail;
17206b73d0SCy Schubert struct tls_cert_data;
1832a95656SCy Schubert struct wpa_cred;
19*a90b9d01SCy Schubert struct rsn_pmksa_cache_entry;
20e28a4053SRui Paulo 
21e28a4053SRui Paulo int wpas_notify_supplicant_initialized(struct wpa_global *global);
22e28a4053SRui Paulo void wpas_notify_supplicant_deinitialized(struct wpa_global *global);
23e28a4053SRui Paulo int wpas_notify_iface_added(struct wpa_supplicant *wpa_s);
24e28a4053SRui Paulo void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s);
25e28a4053SRui Paulo void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
26e28a4053SRui Paulo 			       enum wpa_states new_state,
27e28a4053SRui Paulo 			       enum wpa_states old_state);
28f05cddf9SRui Paulo void wpas_notify_disconnect_reason(struct wpa_supplicant *wpa_s);
294bc52338SCy Schubert void wpas_notify_auth_status_code(struct wpa_supplicant *wpa_s);
30780fb4a2SCy Schubert void wpas_notify_assoc_status_code(struct wpa_supplicant *wpa_s);
314bc52338SCy Schubert void wpas_notify_roam_time(struct wpa_supplicant *wpa_s);
324bc52338SCy Schubert void wpas_notify_roam_complete(struct wpa_supplicant *wpa_s);
334bc52338SCy Schubert void wpas_notify_session_length(struct wpa_supplicant *wpa_s);
344bc52338SCy Schubert void wpas_notify_bss_tm_status(struct wpa_supplicant *wpa_s);
35e28a4053SRui Paulo void wpas_notify_network_changed(struct wpa_supplicant *wpa_s);
36e28a4053SRui Paulo void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s);
37e28a4053SRui Paulo void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s);
38*a90b9d01SCy Schubert void wpas_notify_mac_address_changed(struct wpa_supplicant *wpa_s);
39f05cddf9SRui Paulo void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s);
40e28a4053SRui Paulo void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
41e28a4053SRui Paulo 					 struct wpa_ssid *ssid);
42e28a4053SRui Paulo void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
43e28a4053SRui Paulo 				  struct wpa_ssid *ssid);
44f05cddf9SRui Paulo void wpas_notify_network_request(struct wpa_supplicant *wpa_s,
45f05cddf9SRui Paulo 				 struct wpa_ssid *ssid,
46f05cddf9SRui Paulo 				 enum wpa_ctrl_req_type rtype,
47f05cddf9SRui Paulo 				 const char *default_txt);
48e28a4053SRui Paulo void wpas_notify_scanning(struct wpa_supplicant *wpa_s);
49e28a4053SRui Paulo void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success);
50e28a4053SRui Paulo void wpas_notify_scan_results(struct wpa_supplicant *wpa_s);
51e28a4053SRui Paulo void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
52e28a4053SRui Paulo 				const struct wps_credential *cred);
53e28a4053SRui Paulo void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
54e28a4053SRui Paulo 			       struct wps_event_m2d *m2d);
55e28a4053SRui Paulo void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
56e28a4053SRui Paulo 				struct wps_event_fail *fail);
57e28a4053SRui Paulo void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s);
58325151a3SRui Paulo void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant *wpa_s);
59e28a4053SRui Paulo void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
60e28a4053SRui Paulo 			       struct wpa_ssid *ssid);
61e28a4053SRui Paulo void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
62e28a4053SRui Paulo 				 struct wpa_ssid *ssid);
63e28a4053SRui Paulo void wpas_notify_bss_added(struct wpa_supplicant *wpa_s, u8 bssid[],
64e28a4053SRui Paulo 			   unsigned int id);
65e28a4053SRui Paulo void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s, u8 bssid[],
66e28a4053SRui Paulo 			     unsigned int id);
67e28a4053SRui Paulo void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s,
68e28a4053SRui Paulo 				  unsigned int id);
69e28a4053SRui Paulo void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s,
70e28a4053SRui Paulo 				    unsigned int id);
71e28a4053SRui Paulo void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s,
72e28a4053SRui Paulo 				     unsigned int id);
73e28a4053SRui Paulo void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s,
74e28a4053SRui Paulo 				  unsigned int id);
75e28a4053SRui Paulo void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s,
76e28a4053SRui Paulo 				   unsigned int id);
77e28a4053SRui Paulo void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s,
78e28a4053SRui Paulo 				   unsigned int id);
79e28a4053SRui Paulo void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s,
80e28a4053SRui Paulo 				 unsigned int id);
81e28a4053SRui Paulo void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s,
82e28a4053SRui Paulo 				 unsigned int id);
83e28a4053SRui Paulo void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s,
84e28a4053SRui Paulo 				   unsigned int id);
855b9c547cSRui Paulo void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id);
86*a90b9d01SCy Schubert void wpas_notify_bss_anqp_changed(struct wpa_supplicant *wpa_s,
87*a90b9d01SCy Schubert 				  unsigned int id);
88e28a4053SRui Paulo void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name);
89e28a4053SRui Paulo void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name);
90e28a4053SRui Paulo 
91e28a4053SRui Paulo void wpas_notify_debug_level_changed(struct wpa_global *global);
92e28a4053SRui Paulo void wpas_notify_debug_timestamp_changed(struct wpa_global *global);
93e28a4053SRui Paulo void wpas_notify_debug_show_keys_changed(struct wpa_global *global);
94e28a4053SRui Paulo void wpas_notify_suspend(struct wpa_global *global);
95e28a4053SRui Paulo void wpas_notify_resume(struct wpa_global *global);
96e28a4053SRui Paulo 
97f05cddf9SRui Paulo void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
98f05cddf9SRui Paulo 				const u8 *mac_addr, int authorized,
99*a90b9d01SCy Schubert 				const u8 *p2p_dev_addr, const u8 *ip);
100325151a3SRui Paulo void wpas_notify_p2p_find_stopped(struct wpa_supplicant *wpa_s);
101f05cddf9SRui Paulo void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
102f05cddf9SRui Paulo 				  const u8 *dev_addr, int new_device);
103f05cddf9SRui Paulo void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
104f05cddf9SRui Paulo 				 const u8 *dev_addr);
105f05cddf9SRui Paulo void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
106f05cddf9SRui Paulo 				   const struct wpa_ssid *ssid,
107f05cddf9SRui Paulo 				   const char *role);
108f05cddf9SRui Paulo void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
109325151a3SRui Paulo 				const u8 *src, u16 dev_passwd_id, u8 go_intent);
110f05cddf9SRui Paulo void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
111f05cddf9SRui Paulo 				      struct p2p_go_neg_results *res);
112f05cddf9SRui Paulo void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
113f05cddf9SRui Paulo 				       int status, const u8 *bssid);
114f05cddf9SRui Paulo void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s,
115f05cddf9SRui Paulo 				int freq, const u8 *sa, u8 dialog_token,
116f05cddf9SRui Paulo 				u16 update_indic, const u8 *tlvs,
117f05cddf9SRui Paulo 				size_t tlvs_len);
118f05cddf9SRui Paulo void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
119f05cddf9SRui Paulo 				 const u8 *sa, u16 update_indic,
120f05cddf9SRui Paulo 				 const u8 *tlvs, size_t tlvs_len);
121f05cddf9SRui Paulo void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
122f05cddf9SRui Paulo 					 const u8 *dev_addr, int request,
123f05cddf9SRui Paulo 					 enum p2p_prov_disc_status status,
124f05cddf9SRui Paulo 					 u16 config_methods,
125f05cddf9SRui Paulo 					 unsigned int generated_pin);
126f05cddf9SRui Paulo void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
127780fb4a2SCy Schubert 				   struct wpa_ssid *ssid, int persistent,
12885732ac8SCy Schubert 				   int client, const u8 *ip);
129325151a3SRui Paulo void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant *wpa_s,
130325151a3SRui Paulo 					     const char *reason);
131f05cddf9SRui Paulo void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
132f05cddf9SRui Paulo 					struct wpa_ssid *ssid);
133f05cddf9SRui Paulo void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
134f05cddf9SRui Paulo 					  struct wpa_ssid *ssid);
135f05cddf9SRui Paulo 
136f05cddf9SRui Paulo void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
137f05cddf9SRui Paulo 				struct wps_event_fail *fail);
138f05cddf9SRui Paulo 
139206b73d0SCy Schubert void wpas_notify_certification(struct wpa_supplicant *wpa_s,
140206b73d0SCy Schubert 			       struct tls_cert_data *cert,
141206b73d0SCy Schubert 			       const char *cert_hash);
142f05cddf9SRui Paulo void wpas_notify_preq(struct wpa_supplicant *wpa_s,
143f05cddf9SRui Paulo 		      const u8 *addr, const u8 *dst, const u8 *bssid,
144f05cddf9SRui Paulo 		      const u8 *ie, size_t ie_len, u32 ssi_signal);
145f05cddf9SRui Paulo void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
146f05cddf9SRui Paulo 			    const char *parameter);
14785732ac8SCy Schubert void wpas_notify_eap_error(struct wpa_supplicant *wpa_s, int error_code);
148*a90b9d01SCy Schubert void wpas_notify_psk_mismatch(struct wpa_supplicant *wpa_s);
1495b9c547cSRui Paulo void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s,
1505b9c547cSRui Paulo 					   struct wpa_ssid *ssid);
1515b9c547cSRui Paulo void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s,
1525b9c547cSRui Paulo 				      struct wpa_ssid *ssid);
153325151a3SRui Paulo void wpas_notify_p2p_invitation_received(struct wpa_supplicant *wpa_s,
154325151a3SRui Paulo 					 const u8 *sa, const u8 *go_dev_addr,
155325151a3SRui Paulo 					 const u8 *bssid, int id, int op_freq);
15685732ac8SCy Schubert void wpas_notify_mesh_group_started(struct wpa_supplicant *wpa_s,
15785732ac8SCy Schubert 				    struct wpa_ssid *ssid);
15885732ac8SCy Schubert void wpas_notify_mesh_group_removed(struct wpa_supplicant *wpa_s,
15985732ac8SCy Schubert 				    const u8 *meshid, u8 meshid_len,
160206b73d0SCy Schubert 				    u16 reason_code);
16185732ac8SCy Schubert void wpas_notify_mesh_peer_connected(struct wpa_supplicant *wpa_s,
16285732ac8SCy Schubert 				     const u8 *peer_addr);
16385732ac8SCy Schubert void wpas_notify_mesh_peer_disconnected(struct wpa_supplicant *wpa_s,
164206b73d0SCy Schubert 					const u8 *peer_addr, u16 reason_code);
16532a95656SCy Schubert void wpas_notify_interworking_ap_added(struct wpa_supplicant *wpa_s,
16632a95656SCy Schubert 				       struct wpa_bss *bss,
16732a95656SCy Schubert 				       struct wpa_cred *cred, int excluded,
16832a95656SCy Schubert 				       const char *type, int bh, int bss_load,
16932a95656SCy Schubert 				       int conn_capab);
17032a95656SCy Schubert void wpas_notify_interworking_select_done(struct wpa_supplicant *wpa_s);
171*a90b9d01SCy Schubert void wpas_notify_anqp_query_done(struct wpa_supplicant *wpa_s,
172*a90b9d01SCy Schubert 				 const u8 *dst, const char *result);
173*a90b9d01SCy Schubert void wpas_notify_pmk_cache_added(struct wpa_supplicant *wpa_s,
174*a90b9d01SCy Schubert 				 struct rsn_pmksa_cache_entry *entry);
175*a90b9d01SCy Schubert void wpas_notify_signal_change(struct wpa_supplicant *wpa_s);
176*a90b9d01SCy Schubert void wpas_notify_hs20_t_c_acceptance(struct wpa_supplicant *wpa_s,
177*a90b9d01SCy Schubert 				     const char *url);
178f05cddf9SRui Paulo 
179e28a4053SRui Paulo #endif /* NOTIFY_H */
180