52 const void *ll_dest
__unused,
const void *ll_source,
61 if (
iob_len ( iobuf ) <
sizeof ( *eapol ) ) {
62 DBGC (
netdev,
"EAPOL %s underlength header:\n",
69 remaining = (
iob_len ( iobuf ) -
sizeof ( *eapol ) );
71 if (
len > remaining ) {
72 DBGC (
netdev,
"EAPOL %s v%d type %d len %zd underlength " 85 if ( handler->
type == eapol->
type ) {
91 DBGC (
netdev,
"EAPOL %s v%d type %d unsupported\n",
123 eapol =
iob_pull ( iobuf,
sizeof ( *eapol ) );
127 DBGC (
netdev,
"EAPOL %s v%d EAP failed: %s\n",
#define iob_pull(iobuf, len)
#define EINVAL
Invalid argument.
struct arbelprm_rc_send_wqe rc
const char * name
Protocol name.
int eap_rx(struct net_device *netdev, const void *data, size_t len)
Handle EAP packet.
struct net_protocol eapol_protocol __net_protocol
EAPoL protocol.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
static int eapol_rx(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_dest __unused, const void *ll_source, unsigned int flags __unused)
Process EAPoL packet.
#define EAPOL_HANDLERS
EAPoL handler table.
#define ENOTSUP
Operation not supported.
#define iob_disown(iobuf)
Disown an I/O buffer.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static struct net_device * netdev
Extensible Authentication Protocol over LAN (EAPoL)
#define iob_unput(iobuf, len)
char * strerror(int errno)
Retrieve string representation of error number.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
int(* rx)(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_source)
Process received packet.
#define EAPOL_TYPE_EAP
EAPoL-encapsulated EAP packets.
A network-layer protocol.
Network device management.
#define __unused
Declare a variable or data structure as unused.
static int eapol_eap_rx(struct io_buffer *iobuf, struct net_device *netdev, const void *ll_source __unused)
Process EAPoL-encapsulated EAP packet.
char name[NETDEV_NAME_LEN]
Name of this network device.
void * data
Start of data.
struct eapol_handler eapol_eap __eapol_handler
EAPoL handler for EAP packets.
Extensible Authentication Protocol.