aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-10-24 16:00:19 (GMT)
committerJouni Malinen <j@w1.fi>2011-10-30 10:04:24 (GMT)
commit9ef1aaae24f5587830248cb2b03abf5f3c491123 (patch)
tree692396f55fbadaf8d4458f507fe4d2438d5036b6 /src/eapol_supp
parentaf72d17e72fe77001ade5aaea694ff7b851b2946 (diff)
downloadhostap-9ef1aaae24f5587830248cb2b03abf5f3c491123.zip
hostap-9ef1aaae24f5587830248cb2b03abf5f3c491123.tar.gz
hostap-9ef1aaae24f5587830248cb2b03abf5f3c491123.tar.bz2
Use an enum for EAP SM requests
Control requests will be extended for non-EAP uses later, so it makes sense to have them be generic. Furthermore, having them defined as an enum is easier for processing internally, and more generic for control interfaces that may not use field names. The public ctrl_req_type / field_name conversion function will be used later by the D-Bus control interface too. Signed-off-by: Dan Williams <dcbw@redhat.com>
Diffstat (limited to 'src/eapol_supp')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c2
-rw-r--r--src/eapol_supp/eapol_supp_sm.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index 88ba123..ffc6619 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1813,7 +1813,7 @@ static void eapol_sm_notify_pending(void *ctx)
#if defined(CONFIG_CTRL_IFACE) || !defined(CONFIG_NO_STDOUT_DEBUG)
-static void eapol_sm_eap_param_needed(void *ctx, const char *field,
+static void eapol_sm_eap_param_needed(void *ctx, enum wpa_ctrl_req_type field,
const char *txt)
{
struct eapol_sm *sm = ctx;
diff --git a/src/eapol_supp/eapol_supp_sm.h b/src/eapol_supp/eapol_supp_sm.h
index 48813a9..bcb00b5 100644
--- a/src/eapol_supp/eapol_supp_sm.h
+++ b/src/eapol_supp/eapol_supp_sm.h
@@ -208,10 +208,10 @@ struct eapol_ctx {
/**
* eap_param_needed - Notify that EAP parameter is needed
* @ctx: Callback context (ctx)
- * @field: Field name (e.g., "IDENTITY")
+ * @field: Field indicator (e.g., WPA_CTRL_REQ_EAP_IDENTITY)
* @txt: User readable text describing the required parameter
*/
- void (*eap_param_needed)(void *ctx, const char *field,
+ void (*eap_param_needed)(void *ctx, enum wpa_ctrl_req_type field,
const char *txt);
/**