Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 1 | /* |
| 2 | * hostapd / DPP integration |
| 3 | * Copyright (c) 2017, Qualcomm Atheros, Inc. |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 4 | * Copyright (c) 2018-2020, The Linux Foundation |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 5 | * |
| 6 | * This software may be distributed under the terms of the BSD license. |
| 7 | * See README for more details. |
| 8 | */ |
| 9 | |
| 10 | #ifndef DPP_HOSTAPD_H |
| 11 | #define DPP_HOSTAPD_H |
| 12 | |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 13 | struct dpp_bootstrap_info; |
| 14 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 15 | int hostapd_dpp_qr_code(struct hostapd_data *hapd, const char *cmd); |
Ahmed ElArabawy | 0ff61c5 | 2019-12-26 12:38:39 -0800 | [diff] [blame] | 16 | int hostapd_dpp_nfc_uri(struct hostapd_data *hapd, const char *cmd); |
Hai Shalom | fdcde76 | 2020-04-02 11:19:20 -0700 | [diff] [blame] | 17 | int hostapd_dpp_nfc_handover_req(struct hostapd_data *hapd, const char *cmd); |
| 18 | int hostapd_dpp_nfc_handover_sel(struct hostapd_data *hapd, const char *cmd); |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 19 | int hostapd_dpp_auth_init(struct hostapd_data *hapd, const char *cmd); |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 20 | int hostapd_dpp_listen(struct hostapd_data *hapd, const char *cmd); |
| 21 | void hostapd_dpp_listen_stop(struct hostapd_data *hapd); |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 22 | void hostapd_dpp_rx_action(struct hostapd_data *hapd, const u8 *src, |
| 23 | const u8 *buf, size_t len, unsigned int freq); |
| 24 | void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst, |
| 25 | const u8 *data, size_t data_len, int ok); |
| 26 | struct wpabuf * |
| 27 | hostapd_dpp_gas_req_handler(struct hostapd_data *hapd, const u8 *sa, |
Hai Shalom | 81f62d8 | 2019-07-22 12:10:00 -0700 | [diff] [blame] | 28 | const u8 *query, size_t query_len, |
| 29 | const u8 *data, size_t data_len); |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 30 | void hostapd_dpp_gas_status_handler(struct hostapd_data *hapd, int ok); |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 31 | int hostapd_dpp_configurator_add(struct hostapd_data *hapd, const char *cmd); |
| 32 | int hostapd_dpp_configurator_remove(struct hostapd_data *hapd, const char *id); |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 33 | int hostapd_dpp_configurator_sign(struct hostapd_data *hapd, const char *cmd); |
| 34 | int hostapd_dpp_configurator_get_key(struct hostapd_data *hapd, unsigned int id, |
| 35 | char *buf, size_t buflen); |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 36 | int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd); |
| 37 | int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id); |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 38 | void hostapd_dpp_stop(struct hostapd_data *hapd); |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 39 | int hostapd_dpp_init(struct hostapd_data *hapd); |
| 40 | void hostapd_dpp_deinit(struct hostapd_data *hapd); |
Roshan Pius | 3a1667e | 2018-07-03 15:17:14 -0700 | [diff] [blame] | 41 | void hostapd_dpp_init_global(struct hapd_interfaces *ifaces); |
| 42 | void hostapd_dpp_deinit_global(struct hapd_interfaces *ifaces); |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 43 | |
Hai Shalom | 899fcc7 | 2020-10-19 14:38:18 -0700 | [diff] [blame] | 44 | int hostapd_dpp_controller_start(struct hostapd_data *hapd, const char *cmd); |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 45 | int hostapd_dpp_chirp(struct hostapd_data *hapd, const char *cmd); |
| 46 | void hostapd_dpp_chirp_stop(struct hostapd_data *hapd); |
| 47 | void hostapd_dpp_remove_bi(void *ctx, struct dpp_bootstrap_info *bi); |
Sunil Ravi | 89eba10 | 2022-09-13 21:04:37 -0700 | [diff] [blame] | 48 | int hostapd_dpp_push_button(struct hostapd_data *hapd, const char *cmd); |
| 49 | void hostapd_dpp_push_button_stop(struct hostapd_data *hapd); |
| 50 | bool hostapd_dpp_configurator_connectivity(struct hostapd_data *hapd); |
| 51 | int hostapd_dpp_add_controller(struct hostapd_data *hapd, const char *cmd); |
| 52 | void hostapd_dpp_remove_controller(struct hostapd_data *hapd, const char *cmd); |
Hai Shalom | 4fbc08f | 2020-05-18 12:37:00 -0700 | [diff] [blame] | 53 | |
Dmitry Shmidt | d2986c2 | 2017-10-23 14:22:09 -0700 | [diff] [blame] | 54 | #endif /* DPP_HOSTAPD_H */ |