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) |
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.