aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp/eapol_supp_sm.c
diff options
context:
space:
mode:
authorPaul Stewart <pstew@google.com>2011-03-15 11:49:26 (GMT)
committerJouni Malinen <j@w1.fi>2011-03-15 11:49:26 (GMT)
commitc83e2e1c4504636ad2cdc0b7adcc41574cf2c1e8 (patch)
tree273679f1b26ab302a51a78fa3f92be3637c52c64 /src/eapol_supp/eapol_supp_sm.c
parent8813e4d57e2de675384ea025bbd5bb8598f1f10c (diff)
downloadhostap-c83e2e1c4504636ad2cdc0b7adcc41574cf2c1e8.zip
hostap-c83e2e1c4504636ad2cdc0b7adcc41574cf2c1e8.tar.gz
hostap-c83e2e1c4504636ad2cdc0b7adcc41574cf2c1e8.tar.bz2
eapol_supp: Request EAP method from EAP state machine
Signed-off-by: Paul Stewart <pstew@google.com>
Diffstat (limited to 'src/eapol_supp/eapol_supp_sm.c')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index 77cd564..18abb4e 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1029,6 +1029,21 @@ void eapol_sm_configure(struct eapol_sm *sm, int heldPeriod, int authPeriod,
}
+/**
+ * eapol_sm_get_method_name - Get EAPOL method name
+ * @sm: Pointer to EAPOL state machine allocated with eapol_sm_init()
+ * Returns: Static string containing name of current eap method or NULL
+ */
+const char * eapol_sm_get_method_name(struct eapol_sm *sm)
+{
+ if (sm->SUPP_PAE_state != SUPP_PAE_AUTHENTICATED ||
+ sm->suppPortStatus != Authorized)
+ return NULL;
+
+ return eap_sm_get_method_name(sm->eap);
+}
+
+
#ifdef CONFIG_CTRL_IFACE
/**
* eapol_sm_get_status - Get EAPOL state machine status