iPXE
|
Extensible Authentication Protocol. More...
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <byteswap.h>
#include <ipxe/netdevice.h>
#include <ipxe/eap.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | eap_tx_response (struct eap_supplicant *supplicant, const void *rsp, size_t rsp_len) |
Transmit EAP response. More... | |
static int | eap_tx_nak (struct eap_supplicant *supplicant) |
Transmit EAP NAK. More... | |
static int | eap_rx_identity (struct eap_supplicant *supplicant, const void *req, size_t req_len) |
Handle EAP Request-Identity. More... | |
static int | eap_rx_request (struct eap_supplicant *supplicant, const struct eap_message *msg, size_t len) |
Handle EAP Request. More... | |
static int | eap_rx_success (struct eap_supplicant *supplicant) |
Handle EAP Success. More... | |
static int | eap_rx_failure (struct eap_supplicant *supplicant) |
Handle EAP Failure. More... | |
int | eap_rx (struct eap_supplicant *supplicant, const void *data, size_t len) |
Handle EAP packet. More... | |
REQUIRING_SYMBOL (eap_rx) | |
REQUIRE_OBJECT (config_eap) | |
Variables | |
struct eap_method eap_identity_method | __eap_method |
EAP Request-Identity method. More... | |
Extensible Authentication Protocol.
Definition in file eap.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int eap_tx_response | ( | struct eap_supplicant * | supplicant, |
const void * | rsp, | ||
size_t | rsp_len | ||
) |
Transmit EAP response.
supplicant | EAP supplicant |
rsp | Response type data |
rsp_len | Length of response type data |
rc | Return status code |
Definition at line 47 of file eap.c.
References DBGC, EAP_CODE_RESPONSE, ENOMEM, free, htons, eap_supplicant::id, len, malloc(), memcpy(), msg(), net_device::name, netdev, eap_supplicant::netdev, rc, rsp, strerror(), eap_supplicant::tx, and eap_supplicant::type.
Referenced by eap_rx_identity(), eap_rx_md5(), eap_rx_mschapv2_request(), eap_rx_mschapv2_success(), and eap_tx_nak().
|
static |
Transmit EAP NAK.
supplicant | EAP supplicant |
rc | Return status code |
Definition at line 88 of file eap.c.
References assert(), count, DBGC, EAP_METHODS, eap_tx_response(), EAP_TYPE_NAK, EAP_TYPE_NONE, for_each_table_entry, max, method, net_device::name, netdev, eap_supplicant::netdev, table_num_entries, and eap_supplicant::type.
Referenced by eap_rx_request().
|
static |
Handle EAP Request-Identity.
supplicant | EAP supplicant |
req | Request type data |
req_len | Length of request type data |
rc | Return status code |
Definition at line 122 of file eap.c.
References DBGC, DBGC2, DBGC_HDA, EAP_BLOCK_TIMEOUT, EAP_FL_ONGOING, EAP_FL_PASSIVE, eap_tx_response(), fetch_raw_setting_copy(), eap_supplicant::flags, free, net_device::name, netdev, eap_supplicant::netdev, netdev_link_block(), netdev_settings(), rc, and rsp.
|
static |
Handle EAP Request.
supplicant | EAP supplicant |
msg | EAP request |
len | Length of EAP request |
rc | Return status code |
Definition at line 176 of file eap.c.
References DBGC, DBGC_HDA, EAP_METHODS, eap_tx_nak(), EAP_TYPE_NAK, EINVAL, ENOTSUP, for_each_table_entry, eap_supplicant::id, len, method, msg(), net_device::name, netdev, eap_supplicant::netdev, ntohs, and eap_supplicant::type.
Referenced by eap_rx().
|
static |
Handle EAP Success.
supplicant | EAP supplicant |
rc | Return status code |
Definition at line 225 of file eap.c.
References DBGC, EAP_FL_PASSIVE, eap_supplicant::flags, net_device::name, netdev, eap_supplicant::netdev, and netdev_link_unblock().
Referenced by eap_rx().
|
static |
Handle EAP Failure.
supplicant | EAP supplicant |
rc | Return status code |
Definition at line 244 of file eap.c.
References DBGC, EAP_FL_PASSIVE, EPERM, eap_supplicant::flags, net_device::name, netdev, and eap_supplicant::netdev.
Referenced by eap_rx().
int eap_rx | ( | struct eap_supplicant * | supplicant, |
const void * | data, | ||
size_t | len | ||
) |
Handle EAP packet.
supplicant | EAP supplicant |
data | EAP packet |
len | Length of EAP packet |
rc | Return status code |
Definition at line 263 of file eap.c.
References eap_header::code, data, DBGC, DBGC2, DBGC_HDA, EAP_CODE_FAILURE, EAP_CODE_REQUEST, EAP_CODE_RESPONSE, EAP_CODE_SUCCESS, eap_rx_failure(), eap_rx_request(), eap_rx_success(), EINVAL, ENOTSUP, eap_packet::hdr, len, eap_packet::msg, net_device::name, netdev, and eap_supplicant::netdev.
Referenced by eapol_eap_rx().
REQUIRING_SYMBOL | ( | eap_rx | ) |
REQUIRE_OBJECT | ( | config_eap | ) |
struct eap_method eap_identity_method __eap_method |
EAP Request-Identity method.