blob: e2b63b5132f186794d21caeb481a85a7ddf2dee9 [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);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070028void wpas_notify_network_changed(struct wpa_supplicant *wpa_s);
29void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s);
30void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s);
31void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s);
32void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
33 struct wpa_ssid *ssid);
34void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
35 struct wpa_ssid *ssid);
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080036void wpas_notify_network_request(struct wpa_supplicant *wpa_s,
37 struct wpa_ssid *ssid,
38 enum wpa_ctrl_req_type rtype,
39 const char *default_txt);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070040void wpas_notify_scanning(struct wpa_supplicant *wpa_s);
41void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success);
42void wpas_notify_scan_results(struct wpa_supplicant *wpa_s);
43void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
44 const struct wps_credential *cred);
45void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
46 struct wps_event_m2d *m2d);
47void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
48 struct wps_event_fail *fail);
49void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s);
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -070050void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070051void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
52 struct wpa_ssid *ssid);
53void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
54 struct wpa_ssid *ssid);
55void wpas_notify_bss_added(struct wpa_supplicant *wpa_s, u8 bssid[],
56 unsigned int id);
57void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s, u8 bssid[],
58 unsigned int id);
59void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s,
60 unsigned int id);
61void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s,
62 unsigned int id);
63void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s,
64 unsigned int id);
65void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s,
66 unsigned int id);
67void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s,
68 unsigned int id);
69void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s,
70 unsigned int id);
71void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s,
72 unsigned int id);
73void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s,
74 unsigned int id);
75void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s,
76 unsigned int id);
Dmitry Shmidt661b4f72014-09-29 14:58:27 -070077void wpas_notify_bss_seen(struct wpa_supplicant *wpa_s, unsigned int id);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070078void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name);
79void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name);
80
81void wpas_notify_debug_level_changed(struct wpa_global *global);
82void wpas_notify_debug_timestamp_changed(struct wpa_global *global);
83void wpas_notify_debug_show_keys_changed(struct wpa_global *global);
84void wpas_notify_suspend(struct wpa_global *global);
85void wpas_notify_resume(struct wpa_global *global);
86
87void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -080088 const u8 *mac_addr, int authorized,
89 const u8 *p2p_dev_addr);
Dmitry Shmidt8bd70b72015-05-26 16:02:19 -070090void wpas_notify_p2p_find_stopped(struct wpa_supplicant *wpa_s);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070091void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
Roshan Piusfd2fd662017-01-23 13:41:57 -080092 const u8 *addr, const struct p2p_peer_info *info,
93 const u8* peer_wfd_device_info, u8 peer_wfd_device_info_len,
94 int new_device);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070095void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
96 const u8 *dev_addr);
97void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
98 const struct wpa_ssid *ssid,
99 const char *role);
100void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -0700101 const u8 *src, u16 dev_passwd_id, u8 go_intent);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700102void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -0800103 struct p2p_go_neg_results *res);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700104void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
105 int status, const u8 *bssid);
106void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s,
107 int freq, const u8 *sa, u8 dialog_token,
108 u16 update_indic, const u8 *tlvs,
109 size_t tlvs_len);
110void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
111 const u8 *sa, u16 update_indic,
112 const u8 *tlvs, size_t tlvs_len);
Jouni Malinen75ecf522011-06-27 15:19:46 -0700113void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
114 const u8 *dev_addr, int request,
115 enum p2p_prov_disc_status status,
116 u16 config_methods,
117 unsigned int generated_pin);
118void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
Dmitry Shmidtd5ab1b52016-06-21 12:38:41 -0700119 struct wpa_ssid *ssid, int persistent,
Dmitry Shmidtabb90a32016-12-05 15:34:39 -0800120 int client, const u8 *ip);
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800121void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant *wpa_s,
122 const char *reason);
Jouni Malinen75ecf522011-06-27 15:19:46 -0700123void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
124 struct wpa_ssid *ssid);
125void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
126 struct wpa_ssid *ssid);
127
128void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
129 struct wps_event_fail *fail);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700130
Dmitry Shmidtc55524a2011-07-07 11:18:38 -0700131void wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth,
Dmitry Shmidt2f74e362015-01-21 13:19:05 -0800132 const char *subject, const char *altsubject[],
133 int num_altsubject, const char *cert_hash,
Dmitry Shmidtc55524a2011-07-07 11:18:38 -0700134 const struct wpabuf *cert);
Dmitry Shmidt04949592012-07-19 12:16:46 -0700135void wpas_notify_preq(struct wpa_supplicant *wpa_s,
136 const u8 *addr, const u8 *dst, const u8 *bssid,
137 const u8 *ie, size_t ie_len, u32 ssi_signal);
138void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
139 const char *parameter);
Dmitry Shmidt661b4f72014-09-29 14:58:27 -0700140void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s,
141 struct wpa_ssid *ssid);
Dmitry Shmidt7f656022015-02-25 14:36:37 -0800142void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s,
143 struct wpa_ssid *ssid);
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800144void wpas_notify_p2p_invitation_received(struct wpa_supplicant *wpa_s,
145 const u8 *sa, const u8 *go_dev_addr,
146 const u8 *bssid, int id, int op_freq);
Roshan Pius04a9d742016-12-12 12:40:46 -0800147void wpas_notify_anqp_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
148 const char* result,
149 const struct wpa_bss_anqp *anqp);
150void wpas_notify_hs20_icon_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
151 const char* file_name, const u8* image,
152 u32 image_length);
153void wpas_notify_hs20_rx_subscription_remediation(struct wpa_supplicant *wpa_s,
154 const char* url,
155 u8 osu_method);
156void wpas_notify_hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s,
157 u8 code, u16 reauth_delay,
158 const char *url);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700159#endif /* NOTIFY_H */