blob: 26b07f526f7c443d777ccc26a36cb7e943475178 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * wpa_supplicant - Event notifications
3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#ifndef NOTIFY_H
10#define NOTIFY_H
11
Jouni Malinen75ecf522011-06-27 15:19:46 -070012#include "p2p/p2p.h"
Roshan Pius04a9d742016-12-12 12:40:46 -080013#include "bss.h"
Jouni Malinen75ecf522011-06-27 15:19:46 -070014
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070015struct wps_credential;
16struct wps_event_m2d;
17struct wps_event_fail;
18
19int wpas_notify_supplicant_initialized(struct wpa_global *global);
20void wpas_notify_supplicant_deinitialized(struct wpa_global *global);
21int wpas_notify_iface_added(struct wpa_supplicant *wpa_s);
22void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s);
23void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
24 enum wpa_states new_state,
25 enum wpa_states old_state);
Dmitry Shmidt04949592012-07-19 12:16:46 -070026void wpas_notify_disconnect_reason(struct wpa_supplicant *wpa_s);
Dmitry Shmidt31a29cc2016-03-09 15:58:17 -080027void wpas_notify_assoc_status_code(struct wpa_supplicant *wpa_s);
Roshan Pius38e96762017-01-23 14:52:00 -080028void wpas_notify_auth_timeout(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070029void wpas_notify_network_changed(struct wpa_supplicant *wpa_s);
30void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s);
31void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s);
32void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s);
33void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
34 struct wpa_ssid *ssid);
35void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
36 struct wpa_ssid *ssid);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080037void 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);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070041void wpas_notify_scanning(struct wpa_supplicant *wpa_s);
42void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success);
43void wpas_notify_scan_results(struct wpa_supplicant *wpa_s);
44void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
45 const struct wps_credential *cred);
46void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
47 struct wps_event_m2d *m2d);
48void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
49 struct wps_event_fail *fail);
50void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s);
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -070051void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070052void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
53 struct wpa_ssid *ssid);
54void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
55 struct wpa_ssid *ssid);
56void wpas_notify_bss_added(struct wpa_supplicant *wpa_s, u8 bssid[],
57 unsigned int id);
58void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s, u8 bssid[],
59 unsigned int id);
60void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s,
61 unsigned int id);
62void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s,
63 unsigned int id);
64void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s,
65 unsigned int id);
66void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s,
67 unsigned int id);
68void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s,
69 unsigned int id);
70void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s,
71 unsigned int id);
72void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s,
73 unsigned int id);
74void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s,
75 unsigned int id);
76void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s,
77 unsigned int id);
Dmitry Shmidt661b4f72014-09-29 14:58:27 -070078void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070079void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name);
80void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name);
81
82void wpas_notify_debug_level_changed(struct wpa_global *global);
83void wpas_notify_debug_timestamp_changed(struct wpa_global *global);
84void wpas_notify_debug_show_keys_changed(struct wpa_global *global);
85void wpas_notify_suspend(struct wpa_global *global);
86void wpas_notify_resume(struct wpa_global *global);
87
88void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080089 const u8 *mac_addr, int authorized,
90 const u8 *p2p_dev_addr);
Dmitry Shmidt8bd70b72015-05-26 16:02:19 -070091void wpas_notify_p2p_find_stopped(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070092void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
Roshan Piusfd2fd662017-01-23 13:41:57 -080093 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);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070096void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
97 const u8 *dev_addr);
98void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
99 const struct wpa_ssid *ssid,
100 const char *role);
101void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -0700102 const u8 *src, u16 dev_passwd_id, u8 go_intent);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700103void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -0800104 struct p2p_go_neg_results *res);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700105void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
106 int status, const u8 *bssid);
107void 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);
111void 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);
Jouni Malinen75ecf522011-06-27 15:19:46 -0700114void 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);
119void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
Dmitry Shmidtd5ab1b52016-06-21 12:38:41 -0700120 struct wpa_ssid *ssid, int persistent,
Dmitry Shmidtabb90a32016-12-05 15:34:39 -0800121 int client, const u8 *ip);
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800122void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant *wpa_s,
123 const char *reason);
Jouni Malinen75ecf522011-06-27 15:19:46 -0700124void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
125 struct wpa_ssid *ssid);
126void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
127 struct wpa_ssid *ssid);
128
129void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
130 struct wps_event_fail *fail);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700131
Dmitry Shmidtc55524a2011-07-07 11:18:38 -0700132void wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth,
Dmitry Shmidt2f74e362015-01-21 13:19:05 -0800133 const char *subject, const char *altsubject[],
134 int num_altsubject, const char *cert_hash,
Dmitry Shmidtc55524a2011-07-07 11:18:38 -0700135 const struct wpabuf *cert);
Dmitry Shmidt04949592012-07-19 12:16:46 -0700136void 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);
139void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
140 const char *parameter);
Dmitry Shmidt661b4f72014-09-29 14:58:27 -0700141void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s,
142 struct wpa_ssid *ssid);
Dmitry Shmidt7f656022015-02-25 14:36:37 -0800143void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s,
144 struct wpa_ssid *ssid);
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800145void 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);
Dmitry Shmidtd2986c22017-10-23 14:22:09 -0700148void wpas_notify_mesh_group_started(struct wpa_supplicant *wpa_s,
149 struct wpa_ssid *ssid);
150void wpas_notify_mesh_group_removed(struct wpa_supplicant *wpa_s,
151 const u8 *meshid, u8 meshid_len,
152 int reason_code);
153void wpas_notify_mesh_peer_connected(struct wpa_supplicant *wpa_s,
154 const u8 *peer_addr);
155void wpas_notify_mesh_peer_disconnected(struct wpa_supplicant *wpa_s,
156 const u8 *peer_addr, int reason_code);
Roshan Pius04a9d742016-12-12 12:40:46 -0800157void wpas_notify_anqp_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
158 const char* result,
159 const struct wpa_bss_anqp *anqp);
160void wpas_notify_hs20_icon_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
161 const char* file_name, const u8* image,
162 u32 image_length);
163void wpas_notify_hs20_rx_subscription_remediation(struct wpa_supplicant *wpa_s,
164 const char* url,
165 u8 osu_method);
166void wpas_notify_hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s,
167 u8 code, u16 reauth_delay,
168 const char *url);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700169#endif /* NOTIFY_H */