From 56cc61a168820c7cbbe23418388129ec11699a8c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 15 Sep 2023 16:10:07 +0100 Subject: [eap] Define a supplicant model for EAP and EAPoL Extend the EAP model to include a record of whether or not EAP authentication has completed (successfully or otherwise), and to provide a method for transmitting EAP responses. Signed-off-by: Michael Brown --- src/include/ipxe/eap.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/include/ipxe/eap.h') diff --git a/src/include/ipxe/eap.h b/src/include/ipxe/eap.h index 6fe70189b..e5f606553 100644 --- a/src/include/ipxe/eap.h +++ b/src/include/ipxe/eap.h @@ -64,6 +64,25 @@ union eap_packet { */ #define EAP_BLOCK_TIMEOUT ( 45 * TICKS_PER_SEC ) -extern int eap_rx ( struct net_device *netdev, const void *data, size_t len ); +/** An EAP supplicant */ +struct eap_supplicant { + /** Network device */ + struct net_device *netdev; + /** Authentication outcome is final */ + int done; + /** + * Transmit EAP response + * + * @v supplicant EAP supplicant + * @v data Response data + * @v len Length of response data + * @ret rc Return status code + */ + int ( * tx ) ( struct eap_supplicant *supplicant, + const void *data, size_t len ); +}; + +extern int eap_rx ( struct eap_supplicant *supplicant, + const void *data, size_t len ); #endif /* _IPXE_EAP_H */ -- cgit v1.2.3-55-g7522