18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/* 28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant - Event notifications 38d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi> 48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * 5c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * This software may be distributed under the terms of the BSD license. 6c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * See README for more details. 78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */ 88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef NOTIFY_H 108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define NOTIFY_H 118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 1275ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen#include "p2p/p2p.h" 1375ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen 148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wps_credential; 158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wps_event_m2d; 168d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct wps_event_fail; 178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_notify_supplicant_initialized(struct wpa_global *global); 198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_supplicant_deinitialized(struct wpa_global *global); 208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_notify_iface_added(struct wpa_supplicant *wpa_s); 218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_iface_removed(struct wpa_supplicant *wpa_s); 228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_state_changed(struct wpa_supplicant *wpa_s, 238d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum wpa_states new_state, 248d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt enum wpa_states old_state); 258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_network_changed(struct wpa_supplicant *wpa_s); 268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s); 278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s); 288d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_auth_changed(struct wpa_supplicant *wpa_s); 298d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s, 308d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_ssid *ssid); 318d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_network_selected(struct wpa_supplicant *wpa_s, 328d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_ssid *ssid); 331f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid wpas_notify_network_request(struct wpa_supplicant *wpa_s, 341f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt struct wpa_ssid *ssid, 351f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt enum wpa_ctrl_req_type rtype, 361f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const char *default_txt); 378d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_scanning(struct wpa_supplicant *wpa_s); 388d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success); 398d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_scan_results(struct wpa_supplicant *wpa_s); 408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_wps_credential(struct wpa_supplicant *wpa_s, 418d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct wps_credential *cred); 428d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s, 438d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wps_event_m2d *m2d); 448d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s, 458d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wps_event_fail *fail); 468d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s); 478d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_network_added(struct wpa_supplicant *wpa_s, 488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_ssid *ssid); 498d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_network_removed(struct wpa_supplicant *wpa_s, 508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt struct wpa_ssid *ssid); 518d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_added(struct wpa_supplicant *wpa_s, u8 bssid[], 528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_removed(struct wpa_supplicant *wpa_s, u8 bssid[], 548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s, 568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s, 588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s, 608d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 618d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s, 628d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s, 648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 658d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s, 668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s, 688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 698d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s, 708d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 718d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s, 728d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt unsigned int id); 738d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name); 748d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name); 758d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 768d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_debug_level_changed(struct wpa_global *global); 778d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_debug_timestamp_changed(struct wpa_global *global); 788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_debug_show_keys_changed(struct wpa_global *global); 798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_suspend(struct wpa_global *global); 808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_resume(struct wpa_global *global); 818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s, 831f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *mac_addr, int authorized, 841f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt const u8 *p2p_dev_addr); 858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s, 868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *dev_addr, int new_device); 878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s, 888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *dev_addr); 898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s, 908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const struct wpa_ssid *ssid, 918d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const char *role); 928d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s, 938d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *src, u16 dev_passwd_id); 948d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s, 951f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt struct p2p_go_neg_results *res); 968d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s, 978d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int status, const u8 *bssid); 988d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s, 998d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt int freq, const u8 *sa, u8 dialog_token, 1008d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt u16 update_indic, const u8 *tlvs, 1018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt size_t tlvs_len); 1028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s, 1038d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *sa, u16 update_indic, 1048d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt const u8 *tlvs, size_t tlvs_len); 10575ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinenvoid wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s, 10675ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen const u8 *dev_addr, int request, 10775ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen enum p2p_prov_disc_status status, 10875ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen u16 config_methods, 10975ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen unsigned int generated_pin); 11075ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinenvoid wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s, 11175ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen struct wpa_ssid *ssid, int network_id, 11275ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen int client); 11375ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinenvoid wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s, 11475ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen struct wpa_ssid *ssid); 11575ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinenvoid wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s, 11675ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen struct wpa_ssid *ssid); 11775ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen 11875ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinenvoid wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s, 11975ecf5267604f166b85a7ee2cf0d9cb682966680Jouni Malinen struct wps_event_fail *fail); 1208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt 121c55524ad84d13014e8019491c2b17e5dcf13545aDmitry Shmidtvoid wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth, 122c55524ad84d13014e8019491c2b17e5dcf13545aDmitry Shmidt const char *subject, const char *cert_hash, 123c55524ad84d13014e8019491c2b17e5dcf13545aDmitry Shmidt const struct wpabuf *cert); 124c55524ad84d13014e8019491c2b17e5dcf13545aDmitry Shmidt 1258d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* NOTIFY_H */ 126