2009-11-09 22:51:59 +01:00
|
|
|
/*
|
|
|
|
* WPA Supplicant / dbus-based control interface
|
|
|
|
* Copyright (c) 2006, Dan Williams <dcbw@redhat.com> and Red Hat, Inc.
|
2010-01-16 15:37:37 +01:00
|
|
|
* Copyright (c) 2009-2010, Witold Sowa <witold.sowa@gmail.com>
|
2009-11-09 22:51:59 +01:00
|
|
|
*
|
2012-07-02 11:04:38 +02:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2009-11-09 22:51:59 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CTRL_IFACE_DBUS_NEW_HANDLERS_H
|
|
|
|
#define CTRL_IFACE_DBUS_NEW_HANDLERS_H
|
|
|
|
|
2015-10-13 18:45:33 +02:00
|
|
|
#include "dbus_new_helpers.h"
|
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
struct network_handler_args {
|
|
|
|
struct wpa_supplicant *wpa_s;
|
|
|
|
struct wpa_ssid *ssid;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct bss_handler_args {
|
|
|
|
struct wpa_supplicant *wpa_s;
|
2009-12-28 00:10:07 +01:00
|
|
|
unsigned int id;
|
2009-11-09 22:51:59 +01:00
|
|
|
};
|
|
|
|
|
2018-10-07 14:31:51 +02:00
|
|
|
struct sta_handler_args {
|
|
|
|
struct wpa_supplicant *wpa_s;
|
|
|
|
const u8 *sta;
|
|
|
|
};
|
|
|
|
|
2011-07-29 20:25:39 +02:00
|
|
|
dbus_bool_t wpas_dbus_simple_property_getter(DBusMessageIter *iter,
|
|
|
|
const int type,
|
|
|
|
const void *val,
|
|
|
|
DBusError *error);
|
2010-01-01 10:56:56 +01:00
|
|
|
|
2011-07-29 20:25:39 +02:00
|
|
|
dbus_bool_t wpas_dbus_simple_property_setter(DBusMessageIter *iter,
|
|
|
|
DBusError *error,
|
|
|
|
const int type, void *val);
|
2010-01-01 10:56:56 +01:00
|
|
|
|
2011-07-29 20:25:39 +02:00
|
|
|
dbus_bool_t wpas_dbus_simple_array_property_getter(DBusMessageIter *iter,
|
|
|
|
const int type,
|
|
|
|
const void *array,
|
|
|
|
size_t array_len,
|
|
|
|
DBusError *error);
|
2010-01-01 10:56:56 +01:00
|
|
|
|
2012-02-25 09:45:17 +01:00
|
|
|
dbus_bool_t wpas_dbus_simple_array_array_property_getter(DBusMessageIter *iter,
|
|
|
|
const int type,
|
|
|
|
struct wpabuf **array,
|
|
|
|
size_t array_len,
|
|
|
|
DBusError *error);
|
|
|
|
|
2016-12-23 10:22:00 +01:00
|
|
|
dbus_bool_t wpas_dbus_string_property_getter(DBusMessageIter *iter,
|
|
|
|
const void *val,
|
|
|
|
DBusError *error);
|
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
|
|
|
|
struct wpa_global *global);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_remove_interface(DBusMessage *message,
|
|
|
|
struct wpa_global *global);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_get_interface(DBusMessage *message,
|
|
|
|
struct wpa_global *global);
|
|
|
|
|
2015-09-29 23:13:33 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_expect_disconnect(DBusMessage *message,
|
|
|
|
struct wpa_global *global);
|
|
|
|
|
2015-10-13 18:45:33 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_debug_level);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_debug_timestamp);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_debug_show_keys);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_debug_level);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_debug_timestamp);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_debug_show_keys);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_interfaces);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_eap_methods);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_global_capabilities);
|
2015-10-13 18:47:46 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_iface_global);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_iface_global);
|
2012-09-29 18:06:30 +02:00
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2017-04-13 05:58:11 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_abort_scan(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2014-09-10 19:34:56 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_signal_poll(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2011-07-29 20:25:39 +02:00
|
|
|
dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid,
|
|
|
|
DBusMessageIter *iter,
|
|
|
|
DBusError *error);
|
2011-06-24 10:20:19 +02:00
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_add_network(DBusMessage *message,
|
2012-08-09 12:54:36 +02:00
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_reassociate(DBusMessage *message,
|
2009-11-09 22:51:59 +01:00
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2014-03-06 19:06:04 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_reattach(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2015-06-12 13:27:19 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_reconnect(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
2011-03-20 11:12:12 +01:00
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_remove_all_networks(
|
|
|
|
DBusMessage *message, struct wpa_supplicant *wpa_s);
|
2009-11-09 22:51:59 +01:00
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_select_network(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2011-10-24 18:09:06 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_network_reply(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2020-06-23 19:39:02 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_roam(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_add_blob(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_get_blob(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_remove_blob(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2013-11-23 09:38:07 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_set_pkcs11_engine_and_module_path(
|
|
|
|
DBusMessage *message, struct wpa_supplicant *wpa_s);
|
|
|
|
|
2011-03-20 11:02:33 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_flush_bss(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2012-06-26 18:05:09 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2013-04-23 16:57:55 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_eap_logoff(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_eap_logon(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2021-12-08 08:45:31 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_add_cred(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_remove_cred(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_remove_all_creds(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2021-12-08 08:45:32 +01:00
|
|
|
DBusMessage *
|
|
|
|
wpas_dbus_handler_interworking_select(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2015-10-13 18:45:33 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_capabilities);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_state);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_scanning);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_ap_scan);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_ap_scan);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_fast_reauth);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_fast_reauth);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_disconnect_reason);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_disassociate_reason);
|
2018-07-06 01:29:09 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_auth_status_code);
|
2016-03-03 19:48:09 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_assoc_status_code);
|
2018-06-21 01:42:45 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_roam_time);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_roam_complete);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_session_length);
|
2018-05-04 20:16:18 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_tm_status);
|
2015-10-13 18:45:33 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_expire_age);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_bss_expire_age);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_expire_count);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_bss_expire_count);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_country);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_country);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_scan_interval);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_scan_interval);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_ifname);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_driver);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bridge_ifname);
|
2020-09-30 18:34:36 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_bridge_ifname);
|
2016-08-23 14:16:00 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_config_file);
|
2015-10-13 18:45:33 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_current_bss);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_current_network);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_current_auth_mode);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bsss);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_networks);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_pkcs11_engine_path);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_pkcs11_module_path);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_blobs);
|
2018-10-07 14:31:51 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_stas);
|
2019-10-18 01:03:51 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_mac_address_randomization_mask);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_mac_address_randomization_mask);
|
2018-10-07 14:31:51 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_address);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_aid);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_caps);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_rx_packets);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_tx_packets);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_tx_bytes);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_sta_rx_bytes);
|
2015-10-13 18:45:33 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_bssid);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_ssid);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_privacy);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_mode);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_signal);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_frequency);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_rates);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_wpa);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_rsn);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_wps);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_ies);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_bss_age);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_enabled);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_enabled);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_network_properties);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_network_properties);
|
2009-11-09 22:51:59 +01:00
|
|
|
|
|
|
|
DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2015-05-26 06:08:39 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_wps_cancel(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2015-10-13 18:45:33 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_process_credentials);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_process_credentials);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_config_methods);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_config_methods);
|
2016-12-21 13:24:20 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_wps_device_name);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_wps_device_name);
|
2016-12-21 13:24:21 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_wps_manufacturer);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_wps_manufacturer);
|
2016-12-21 13:24:22 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_wps_device_model_name);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_wps_device_model_name);
|
2016-12-21 13:24:23 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_wps_device_model_number);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_wps_device_model_number);
|
2016-12-21 13:24:24 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_wps_device_serial_number);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_wps_device_serial_number);
|
2016-12-21 13:24:25 +01:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_wps_device_device_type);
|
|
|
|
DECLARE_ACCESSOR(wpas_dbus_setter_wps_device_device_type);
|
2014-10-03 08:10:33 +02:00
|
|
|
|
2017-07-18 09:07:56 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_mesh_peers);
|
2017-07-18 09:07:57 +02:00
|
|
|
DECLARE_ACCESSOR(wpas_dbus_getter_mesh_group);
|
2017-07-18 09:07:56 +02:00
|
|
|
|
2013-11-11 21:13:55 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_tdls_discover(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
DBusMessage * wpas_dbus_handler_tdls_setup(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
DBusMessage * wpas_dbus_handler_tdls_status(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
DBusMessage * wpas_dbus_handler_tdls_teardown(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
2017-05-01 06:05:37 +02:00
|
|
|
DBusMessage *
|
|
|
|
wpas_dbus_handler_tdls_channel_switch(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
2017-04-13 14:09:01 +02:00
|
|
|
DBusMessage *
|
|
|
|
wpas_dbus_handler_tdls_cancel_channel_switch(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
2013-11-11 21:13:55 +01:00
|
|
|
|
2015-12-04 06:27:27 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_vendor_elem_add(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
DBusMessage * wpas_dbus_handler_vendor_elem_get(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
DBusMessage * wpas_dbus_handler_vendor_elem_remove(
|
|
|
|
DBusMessage *message, struct wpa_supplicant *wpa_s);
|
|
|
|
|
2015-11-03 08:01:27 +01:00
|
|
|
DBusMessage * wpas_dbus_handler_save_config(DBusMessage *message,
|
|
|
|
struct wpa_supplicant *wpa_s);
|
|
|
|
|
2010-01-01 20:52:29 +01:00
|
|
|
DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message,
|
|
|
|
const char *arg);
|
2009-12-20 20:04:40 +01:00
|
|
|
DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message,
|
|
|
|
const char *arg);
|
2015-01-01 21:36:52 +01:00
|
|
|
DBusMessage * wpas_dbus_error_no_memory(DBusMessage *message);
|
2009-12-20 20:04:40 +01:00
|
|
|
|
2012-04-01 20:13:38 +02:00
|
|
|
DBusMessage * wpas_dbus_handler_subscribe_preq(
|
|
|
|
DBusMessage *message, struct wpa_supplicant *wpa_s);
|
|
|
|
DBusMessage * wpas_dbus_handler_unsubscribe_preq(
|
|
|
|
DBusMessage *message, struct wpa_supplicant *wpa_s);
|
|
|
|
|
2009-11-09 22:51:59 +01:00
|
|
|
#endif /* CTRL_IFACE_DBUS_HANDLERS_NEW_H */
|