Starting EAP sequence

Michel Verhagen mike at
Thu Mar 11 21:10:19 GMT 2021

Thanks Alan!

That does make sense indeed. I'll try to use eapol_supp for better 
handling of the EAPOL layer on top of EAP. I hope this code can be used 
with just the code I ported for the EAP library to compile.

Is there any documentation explaining what all the context parameters do 
(see test_eapol function in eapol_test.c), which are required and for 
which functionality etc? All I need is to implement an EAPOL client with 
certificates, so no WPA/WEP or any of the wireless stuff.

I'll come back with more questions probably, thanks for pointing me in 
the right direction!

On 12/03/2021 01:23, Alan DeKok wrote:
> On Mar 10, 2021, at 11:56 PM, Michel Verhagen <mike at> wrote:
>> I'm using the EAP library to implement EAPOL on an embedded device. Got it to go, with EAP-MD5 and EAP-TTLS and certificates, so all good. However, I'm trying to get the library to prepare me an EAPOL START packet. I'd like to initiate the start of the EAP handshake, because depending on the settings of the authenticator, it can take a long time before the EAP handshake sequence is initiated.
>    I haven't used the library myself, but the problem, here is likely layering.
>    i.e. you're using an EAP library.  EAP runs on EAPoL, PPP, PANA, RADIUS, Diameter, ..., where the library just does EAP.
>    EAPoL is managed by the IEEE 802.1X state machine.  Which uses EAP, but isn't part of the EAP library.
>> I thought setting _eap_ctx.eapRestart to 1 (true) or even eapTriggerStart to 1 and calling eap_peer_step would get me the packet data to send, but I can't see eapTriggerStart used anywhere in the code.
>    See src/eapol_supp/eapol_supp_sm.c, which runs the EAPoL supplicant state machine.  It checks eapTriggerStart, and ends up calling eapol_sm_txStart().
>> Does anybody know how to get the EAP library to prepare an EAP Start packet?
>    You can't.  EAP isn't the same as the Ethernet layer EAPoL state machine.
>> I can of course prepare and send that packet myself, but it looks like the EAP library should be able to do this as well...
>    No.  The EAP library does EAP.  The 802.1X / supplicant state machine does Ethernet, and EAPoL.
>    Alan DeKok.

More information about the Hostap mailing list