Sending multiple EAP fragments (wpa_supplicant as a library)

Christian Scheid cxscheid
Wed May 19 10:19:24 PDT 2010


I'm using wpa_supplicant-0.6.9 as a library and used the eap_example_peer.c
as a basis for the EAP-TLS authentication I'm trying to complete. My
question is if I have an EAP message with multiple fragments, how would I
request those from the wpa_supplicant?

In the code below I'm running eap_get_eapRespData in a loop while
Is that the correct way of doing it?

Any assistance greatly appreciated!


// Run EAP Peer Step
    iRet = eap_peer_sm_step(eap_ctx.eap);
    if (iRet < 0){
        DPRINT_COMMONAPI(DEBUG_ERROR,"\n*******ERROR: Running EAP SM Step");
        return WIMAX_API_RET_FAILED;

    while (eap_ctx.eapResp) {
        struct wpabuf *resp;
        eap_ctx.eapResp = FALSE;
        resp = eap_get_eapRespData(eap_ctx.eap);
        if (resp) {
            // Evaluate EAP State
            wpa_hexdump(MSG_DEBUG, "FROM SUPPLICANT MSG:

            /* Send EAP response to the Authenticator */
            if (!
SendMessageFromSupplicantToBs(wpabuf_head(resp),wpabuf_len(resp))) {
                DPRINT_COMMONAPI(DEBUG_ERROR,"\n*******ERROR: In
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Hostap mailing list