Functions
eap_common.h File Reference
#include "wpabuf.h"
Include dependency graph for eap_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

u8 eap_get_id (const struct wpabuf *msg)
EapType eap_get_type (const struct wpabuf *msg)
const u8 * eap_hdr_validate (int vendor, EapType eap_type, const struct wpabuf *msg, size_t *plen)
struct wpabufeap_msg_alloc (int vendor, EapType type, size_t payload_len, u8 code, u8 identifier)
void eap_update_len (struct wpabuf *msg)

Function Documentation

u8 eap_get_id ( const struct wpabuf msg)
EapType eap_get_type ( const struct wpabuf msg)
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.

struct wpabuf* eap_msg_alloc ( int  vendor,
EapType  type,
size_t  payload_len,
u8  code,
u8  identifier 
) [read]
void eap_update_len ( struct wpabuf msg)


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:16