hostapd/wpa_supplicant/dpp_supplicant.h

48 lines
2.2 KiB
C
Raw Normal View History

/*
* wpa_supplicant - DPP
* Copyright (c) 2017, Qualcomm Atheros, Inc.
* 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.
*
* 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
enum dpp_status_error;
int wpas_dpp_qr_code(struct wpa_supplicant *wpa_s, const char *cmd);
int wpas_dpp_nfc_uri(struct wpa_supplicant *wpa_s, const char *cmd);
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);
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);
void wpas_dpp_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
unsigned int freq, unsigned int duration);
void wpas_dpp_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
unsigned int freq);
void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src,
const u8 *buf, size_t len, unsigned int freq);
int wpas_dpp_configurator_sign(struct wpa_supplicant *wpa_s, const char *cmd);
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);
void wpas_dpp_stop(struct wpa_supplicant *wpa_s);
int wpas_dpp_init(struct wpa_supplicant *wpa_s);
void wpas_dpp_deinit(struct wpa_supplicant *wpa_s);
int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
struct wpa_bss *bss);
int wpas_dpp_controller_start(struct wpa_supplicant *wpa_s, const char *cmd);
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);
int wpas_dpp_chirp(struct wpa_supplicant *wpa_s, const char *cmd);
void wpas_dpp_chirp_stop(struct wpa_supplicant *wpa_s);
int wpas_dpp_reconfig(struct wpa_supplicant *wpa_s, const char *cmd);
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);
#endif /* DPP_SUPPLICANT_H */