aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-07-04 12:45:37 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-04 12:56:38 (GMT)
commita86fb43ca3a93da89e82e0aa307520baf2060004 (patch)
treece3f2830965251a13a0d124de6e760e847a04743 /src
parent484788b875a130359c21b5b8ed59b7a10f56e322 (diff)
downloadhostap-a86fb43ca3a93da89e82e0aa307520baf2060004.zip
hostap-a86fb43ca3a93da89e82e0aa307520baf2060004.tar.gz
hostap-a86fb43ca3a93da89e82e0aa307520baf2060004.tar.bz2
DPP: DPP_BOOTSTRAP_INFO for hostapd
This extends the hostapd control interface to support the DPP_BOOTSTRAP_INFO command that was recently added for wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src')
-rw-r--r--src/ap/dpp_hostapd.c21
-rw-r--r--src/ap/dpp_hostapd.h2
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index b5980d4..c8b4f87 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -262,6 +262,27 @@ const char * hostapd_dpp_bootstrap_get_uri(struct hostapd_data *hapd,
}
+int hostapd_dpp_bootstrap_info(struct hostapd_data *hapd, int id,
+ char *reply, int reply_size)
+{
+ struct dpp_bootstrap_info *bi;
+
+ bi = dpp_bootstrap_get_id(hapd, id);
+ if (!bi)
+ return -1;
+ return os_snprintf(reply, reply_size, "type=%s\n"
+ "mac_addr=" MACSTR "\n"
+ "info=%s\n"
+ "num_freq=%u\n"
+ "curve=%s\n",
+ dpp_bootstrap_type_txt(bi->type),
+ MAC2STR(bi->mac_addr),
+ bi->info ? bi->info : "",
+ bi->num_freq,
+ bi->curve->name);
+}
+
+
void hostapd_dpp_tx_status(struct hostapd_data *hapd, const u8 *dst,
const u8 *data, size_t data_len, int ok)
{
diff --git a/src/ap/dpp_hostapd.h b/src/ap/dpp_hostapd.h
index 9aa0830..d870b20 100644
--- a/src/ap/dpp_hostapd.h
+++ b/src/ap/dpp_hostapd.h
@@ -14,6 +14,8 @@ int hostapd_dpp_bootstrap_gen(struct hostapd_data *hapd, const char *cmd);
int hostapd_dpp_bootstrap_remove(struct hostapd_data *hapd, const char *id);
const char * hostapd_dpp_bootstrap_get_uri(struct hostapd_data *hapd,
unsigned int id);
+int hostapd_dpp_bootstrap_info(struct hostapd_data *hapd, int id,
+ char *reply, int reply_size);
int hostapd_dpp_auth_init(struct hostapd_data *hapd, const char *cmd);
void hostapd_dpp_rx_action(struct hostapd_data *hapd, const u8 *src,
const u8 *buf, size_t len, unsigned int freq);