Functions
eap_common.c File Reference
#include "includes.h"
#include "common.h"
#include "eap_defs.h"
#include "eap_common.h"
Include dependency graph for eap_common.c:

Go to the source code of this file.

Functions

const u8 * eap_hdr_validate (int vendor, EapType eap_type, const struct wpabuf *msg, size_t *plen)

Function Documentation

const u8* eap_hdr_validate ( int  vendor,
EapType  eap_type,
const struct wpabuf msg,
size_t *  plen 
)

eap_hdr_validate - Validate EAP header : Expected EAP Vendor-Id (0 = IETF) : Expected EAP type number : EAP frame (starting with EAP header) : Pointer to variable to contain the returned payload length Returns: Pointer to EAP payload (after type field), or NULL on failure

This is a helper function for EAP method implementations. This is usually called in the beginning of struct eap_method::process() function to verify that the received EAP request packet has a valid header. This function is able to process both legacy and expanded EAP headers and in most cases, the caller can just use the returned payload pointer (into *plen) for processing the payload regardless of whether the packet used the expanded EAP header or not.

Definition at line 37 of file eap_common.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:38