aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-07-04 12:45:03 (GMT)
committerJouni Malinen <j@w1.fi>2017-07-04 12:45:03 (GMT)
commit484788b875a130359c21b5b8ed59b7a10f56e322 (patch)
tree0f1dbab4d173a193aaf7fa9bc09fde4c92966495 /src
parent623f95685d5eacc5a36a2bf14029dfd4da5611d4 (diff)
downloadhostap-484788b875a130359c21b5b8ed59b7a10f56e322.zip
hostap-484788b875a130359c21b5b8ed59b7a10f56e322.tar.gz
hostap-484788b875a130359c21b5b8ed59b7a10f56e322.tar.bz2
DPP: Share bootstrap type to string helper function
This can be used in hostapd as well. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src')
-rw-r--r--src/common/dpp.c12
-rw-r--r--src/common/dpp.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/common/dpp.c b/src/common/dpp.c
index 06e70a1..528bdb4 100644
--- a/src/common/dpp.c
+++ b/src/common/dpp.c
@@ -564,6 +564,18 @@ void dpp_bootstrap_info_free(struct dpp_bootstrap_info *info)
}
+const char * dpp_bootstrap_type_txt(enum dpp_bootstrap_type type)
+{
+ switch (type) {
+ case DPP_BOOTSTRAP_QR_CODE:
+ return "QRCODE";
+ case DPP_BOOTSTRAP_PKEX:
+ return "PKEX";
+ }
+ return "??";
+}
+
+
static int dpp_uri_valid_info(const char *info)
{
while (*info) {
diff --git a/src/common/dpp.h b/src/common/dpp.h
index d68cd76..8aa78c5 100644
--- a/src/common/dpp.h
+++ b/src/common/dpp.h
@@ -210,6 +210,7 @@ struct dpp_introduction {
};
void dpp_bootstrap_info_free(struct dpp_bootstrap_info *info);
+const char * dpp_bootstrap_type_txt(enum dpp_bootstrap_type type);
int dpp_bootstrap_key_hash(struct dpp_bootstrap_info *bi);
int dpp_parse_uri_chan_list(struct dpp_bootstrap_info *bi,
const char *chan_list);