Lines Matching defs:eap
2 * EAP common peer/server definitions
16 * eap_hdr_validate - Validate EAP header
17 * @vendor: Expected EAP Vendor-Id (0 = IETF)
18 * @eap_type: Expected EAP type number
19 * @msg: EAP frame (starting with EAP header)
21 * Returns: Pointer to EAP payload (after type field), or %NULL on failure
23 * This is a helper function for EAP method implementations. This is usually
25 * that the received EAP request packet has a valid header. This function is
26 * able to process both legacy and expanded EAP headers and in most cases, the
28 * the payload regardless of whether the packet used the expanded EAP header or
41 wpa_printf(MSG_INFO, "EAP: Too short EAP frame");
47 wpa_printf(MSG_INFO, "EAP: Invalid EAP length");
57 wpa_printf(MSG_INFO, "EAP: Invalid expanded EAP "
67 wpa_printf(MSG_INFO, "EAP: Invalid expanded frame "
76 wpa_printf(MSG_INFO, "EAP: Invalid frame type");
86 * eap_msg_alloc - Allocate a buffer for an EAP message
88 * @type: EAP type
94 * This function can be used to allocate a buffer for an EAP message and fill
95 * in the EAP header. This function is automatically using expanded EAP header
96 * if the selected Vendor-Id is not IETF. In other words, most EAP methods do
99 * payload_len bytes and has the EAP header and Type field already filled in.
132 * eap_update_len - Update EAP header length
133 * @msg: EAP message from eap_msg_alloc
135 * This function updates the length field in the EAP header to match with the
151 * eap_get_id - Get EAP Identifier from wpabuf
152 * @msg: Buffer starting with an EAP header
153 * Returns: The Identifier field from the EAP header
157 const struct eap_hdr *eap;
159 if (wpabuf_len(msg) < sizeof(*eap))
162 eap = wpabuf_head(msg);
163 return eap->identifier;
168 * eap_get_id - Get EAP Type from wpabuf
169 * @msg: Buffer starting with an EAP header
170 * Returns: The EAP Type after the EAP header