2017-06-15 20:18:10 +02:00
|
|
|
/*
|
|
|
|
* wpa_supplicant - DPP
|
|
|
|
* Copyright (c) 2017, Qualcomm Atheros, Inc.
|
2020-01-27 16:04:26 +01:00
|
|
|
* Copyright (c) 2018-2020, The Linux Foundation
|
DPP: Allow Configurator parameters to be provided during config exchange
This provides an alternative mechanism for upper layer components to
control configuration parameters to be used by the local Configurator.
Instead of the previously used design where the Configurator parameters
had to be provided before initiating the DPP Authentication exchange,
the new alternative approach allows the DPP Authentication exchange to
be started before any Configurator parameters have been determined and
wpa_supplicant will then request the parameters once the DPP
Configuration Request has been received from the Enrollee. This allows
the Config Request information to be used at upper layers to determine
how the Enrollee should be configured.
For example for an Initiator:
CTRL: DPP_QR_CODE <URI from Responder/Enrollee>
CTRL: DPP_AUTH_INIT peer=1 conf=query
<3>DPP-CONF-NEEDED peer=1 src=02:00:00:00:00:00 net_role=sta name="Test" opclass=81,82,83,84,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130 mud_url=N/A
(upper layer processing; potentially including user interaction)
CTRL: DPP_CONF_SET peer=1 conf=sta-sae ssid=736165 pass=70617373776f7264
<3>DPP-CONF-SENT
For example for a Responder:
CTRL: SET dpp_configurator_params conf=query
CTRL: DPP_LISTEN 2412 role=configurator
<3>DPP-CONF-NEEDED peer=2 src=02:00:00:00:01:00 net_role=sta name="Test" opclass=81,82,83,84,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130 mud_url=N/A
(upper layer processing; potentially including user interaction)
CTRL: DPP_CONF_SET peer=2 conf=sta-sae ssid=736165 pass=70617373776f7264
<3>DPP-CONF-SENT
For example for an Initiator that can act both as a Configurator and an
Enrollee in a case where the Initiator becomes the Enrollee:
CTRL: DPP_AUTH_INIT peer=1 role=either conf=query
<3>DPP-CONF-RECEIVED
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-02 15:52:01 +01:00
|
|
|
* Copyright (c) 2022, Qualcomm Innovation Center, Inc.
|
2017-06-15 20:18:10 +02:00
|
|
|
*
|
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DPP_SUPPLICANT_H
|
|
|
|
#define DPP_SUPPLICANT_H
|
|
|
|
|
2019-09-15 15:19:45 +02:00
|
|
|
enum dpp_status_error;
|
|
|
|
|
2017-06-15 20:18:10 +02:00
|
|
|
int wpas_dpp_qr_code(struct wpa_supplicant *wpa_s, const char *cmd);
|
2019-12-03 17:22:36 +01:00
|
|
|
int wpas_dpp_nfc_uri(struct wpa_supplicant *wpa_s, const char *cmd);
|
2020-01-27 16:04:26 +01:00
|
|
|
int wpas_dpp_nfc_handover_req(struct wpa_supplicant *wpa_s, const char *cmd);
|
|
|
|
int wpas_dpp_nfc_handover_sel(struct wpa_supplicant *wpa_s, const char *cmd);
|
2017-06-15 20:18:12 +02:00
|
|
|
int wpas_dpp_auth_init(struct wpa_supplicant *wpa_s, const char *cmd);
|
|
|
|
int wpas_dpp_listen(struct wpa_supplicant *wpa_s, const char *cmd);
|
|
|
|
void wpas_dpp_listen_stop(struct wpa_supplicant *wpa_s);
|
2020-05-09 16:30:48 +02:00
|
|
|
void wpas_dpp_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
|
|
|
|
unsigned int freq, unsigned int duration);
|
2017-06-15 20:18:12 +02:00
|
|
|
void wpas_dpp_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
|
|
|
|
unsigned int freq);
|
2022-02-03 10:30:06 +01:00
|
|
|
void wpas_dpp_tx_wait_expire(struct wpa_supplicant *wpa_s);
|
2017-06-15 20:18:12 +02:00
|
|
|
void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src,
|
|
|
|
const u8 *buf, size_t len, unsigned int freq);
|
2017-07-04 16:48:44 +02:00
|
|
|
int wpas_dpp_configurator_sign(struct wpa_supplicant *wpa_s, const char *cmd);
|
2017-07-02 11:36:23 +02:00
|
|
|
int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd);
|
|
|
|
int wpas_dpp_pkex_remove(struct wpa_supplicant *wpa_s, const char *id);
|
2017-11-13 11:12:08 +01:00
|
|
|
void wpas_dpp_stop(struct wpa_supplicant *wpa_s);
|
2017-06-15 20:18:10 +02:00
|
|
|
int wpas_dpp_init(struct wpa_supplicant *wpa_s);
|
|
|
|
void wpas_dpp_deinit(struct wpa_supplicant *wpa_s);
|
2017-06-18 19:19:25 +02:00
|
|
|
int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
|
|
|
struct wpa_bss *bss);
|
2019-03-24 21:17:49 +01:00
|
|
|
int wpas_dpp_controller_start(struct wpa_supplicant *wpa_s, const char *cmd);
|
2019-09-15 15:19:45 +02:00
|
|
|
void wpas_dpp_connected(struct wpa_supplicant *wpa_s);
|
|
|
|
void wpas_dpp_send_conn_status_result(struct wpa_supplicant *wpa_s,
|
|
|
|
enum dpp_status_error result);
|
2020-03-27 11:42:00 +01:00
|
|
|
int wpas_dpp_chirp(struct wpa_supplicant *wpa_s, const char *cmd);
|
|
|
|
void wpas_dpp_chirp_stop(struct wpa_supplicant *wpa_s);
|
2020-08-07 22:22:31 +02:00
|
|
|
int wpas_dpp_reconfig(struct wpa_supplicant *wpa_s, const char *cmd);
|
2020-06-15 19:20:50 +02:00
|
|
|
int wpas_dpp_ca_set(struct wpa_supplicant *wpa_s, const char *cmd);
|
DPP: Allow Configurator parameters to be provided during config exchange
This provides an alternative mechanism for upper layer components to
control configuration parameters to be used by the local Configurator.
Instead of the previously used design where the Configurator parameters
had to be provided before initiating the DPP Authentication exchange,
the new alternative approach allows the DPP Authentication exchange to
be started before any Configurator parameters have been determined and
wpa_supplicant will then request the parameters once the DPP
Configuration Request has been received from the Enrollee. This allows
the Config Request information to be used at upper layers to determine
how the Enrollee should be configured.
For example for an Initiator:
CTRL: DPP_QR_CODE <URI from Responder/Enrollee>
CTRL: DPP_AUTH_INIT peer=1 conf=query
<3>DPP-CONF-NEEDED peer=1 src=02:00:00:00:00:00 net_role=sta name="Test" opclass=81,82,83,84,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130 mud_url=N/A
(upper layer processing; potentially including user interaction)
CTRL: DPP_CONF_SET peer=1 conf=sta-sae ssid=736165 pass=70617373776f7264
<3>DPP-CONF-SENT
For example for a Responder:
CTRL: SET dpp_configurator_params conf=query
CTRL: DPP_LISTEN 2412 role=configurator
<3>DPP-CONF-NEEDED peer=2 src=02:00:00:00:01:00 net_role=sta name="Test" opclass=81,82,83,84,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130 mud_url=N/A
(upper layer processing; potentially including user interaction)
CTRL: DPP_CONF_SET peer=2 conf=sta-sae ssid=736165 pass=70617373776f7264
<3>DPP-CONF-SENT
For example for an Initiator that can act both as a Configurator and an
Enrollee in a case where the Initiator becomes the Enrollee:
CTRL: DPP_AUTH_INIT peer=1 role=either conf=query
<3>DPP-CONF-RECEIVED
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
2022-02-02 15:52:01 +01:00
|
|
|
int wpas_dpp_conf_set(struct wpa_supplicant *wpa_s, const char *cmd);
|
2017-06-15 20:18:10 +02:00
|
|
|
|
|
|
|
#endif /* DPP_SUPPLICANT_H */
|