blob: 2590e9a3069250a1552fd9fbac2ff0adbe776718 [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,
92 const u8 *dev_addr, int new_device);
93void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
94 const u8 *dev_addr);
95void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
96 const struct wpa_ssid *ssid,
97 const char *role);
98void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
Dmitry Shmidt7a53dbb2015-06-11 13:13:53 -070099 const u8 *src, u16 dev_passwd_id, u8 go_intent);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700100void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
Dmitry Shmidt1f69aa52012-01-24 16:10:04 -0800101 struct p2p_go_neg_results *res);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700102void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
103 int status, const u8 *bssid);
104void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s,
105 int freq, const u8 *sa, u8 dialog_token,
106 u16 update_indic, const u8 *tlvs,
107 size_t tlvs_len);
108void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
109 const u8 *sa, u16 update_indic,
110 const u8 *tlvs, size_t tlvs_len);
Jouni Malinen75ecf522011-06-27 15:19:46 -0700111void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
112 const u8 *dev_addr, int request,
113 enum p2p_prov_disc_status status,
114 u16 config_methods,
115 unsigned int generated_pin);
116void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
Dmitry Shmidtd5ab1b52016-06-21 12:38:41 -0700117 struct wpa_ssid *ssid, int persistent,
Dmitry Shmidtabb90a32016-12-05 15:34:39 -0800118 int client, const u8 *ip);
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800119void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant *wpa_s,
120 const char *reason);
Jouni Malinen75ecf522011-06-27 15:19:46 -0700121void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
122 struct wpa_ssid *ssid);
123void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
124 struct wpa_ssid *ssid);
125
126void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
127 struct wps_event_fail *fail);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700128
Dmitry Shmidtc55524a2011-07-07 11:18:38 -0700129void wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth,
Dmitry Shmidt2f74e362015-01-21 13:19:05 -0800130 const char *subject, const char *altsubject[],
131 int num_altsubject, const char *cert_hash,
Dmitry Shmidtc55524a2011-07-07 11:18:38 -0700132 const struct wpabuf *cert);
Dmitry Shmidt04949592012-07-19 12:16:46 -0700133void wpas_notify_preq(struct wpa_supplicant *wpa_s,
134 const u8 *addr, const u8 *dst, const u8 *bssid,
135 const u8 *ie, size_t ie_len, u32 ssi_signal);
136void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
137 const char *parameter);
Dmitry Shmidt661b4f72014-09-29 14:58:27 -0700138void wpas_notify_network_bssid_set_changed(struct wpa_supplicant *wpa_s,
139 struct wpa_ssid *ssid);
Dmitry Shmidt7f656022015-02-25 14:36:37 -0800140void wpas_notify_network_type_changed(struct wpa_supplicant *wpa_s,
141 struct wpa_ssid *ssid);
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800142void wpas_notify_p2p_invitation_received(struct wpa_supplicant *wpa_s,
143 const u8 *sa, const u8 *go_dev_addr,
144 const u8 *bssid, int id, int op_freq);
Roshan Pius04a9d742016-12-12 12:40:46 -0800145void wpas_notify_anqp_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
146 const char* result,
147 const struct wpa_bss_anqp *anqp);
148void wpas_notify_hs20_icon_query_done(struct wpa_supplicant *wpa_s, const u8* bssid,
149 const char* file_name, const u8* image,
150 u32 image_length);
151void wpas_notify_hs20_rx_subscription_remediation(struct wpa_supplicant *wpa_s,
152 const char* url,
153 u8 osu_method);
154void wpas_notify_hs20_rx_deauth_imminent_notice(struct wpa_supplicant *wpa_s,
155 u8 code, u16 reauth_delay,
156 const char *url);
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700157#endif /* NOTIFY_H */