Lines Matching refs:eap
2 * EAP common peer/server definitions
16 * eap_hdr_len_valid - Validate EAP header length field
17 * @msg: EAP frame (starting with EAP header)
21 * This is a helper function that does minimal validation of EAP messages. The
36 wpa_printf(MSG_INFO, "EAP: Too short EAP frame");
42 wpa_printf(MSG_INFO, "EAP: Invalid EAP length");
51 * eap_hdr_validate - Validate EAP header
52 * @vendor: Expected EAP Vendor-Id (0 = IETF)
53 * @eap_type: Expected EAP type number
54 * @msg: EAP frame (starting with EAP header)
56 * Returns: Pointer to EAP payload (after type field), or %NULL on failure
58 * This is a helper function for EAP method implementations. This is usually
60 * that the received EAP request packet has a valid header. This function is
61 * able to process both legacy and expanded EAP headers and in most cases, the
63 * the payload regardless of whether the packet used the expanded EAP header or
84 wpa_printf(MSG_INFO, "EAP: Invalid expanded EAP "
94 wpa_printf(MSG_INFO, "EAP: Invalid expanded frame "
103 wpa_printf(MSG_INFO, "EAP: Invalid frame type");
113 * eap_msg_alloc - Allocate a buffer for an EAP message
115 * @type: EAP type
121 * This function can be used to allocate a buffer for an EAP message and fill
122 * in the EAP header. This function is automatically using expanded EAP header
123 * if the selected Vendor-Id is not IETF. In other words, most EAP methods do
126 * payload_len bytes and has the EAP header and Type field already filled in.
159 * eap_update_len - Update EAP header length
160 * @msg: EAP message from eap_msg_alloc
162 * This function updates the length field in the EAP header to match with the
178 * eap_get_id - Get EAP Identifier from wpabuf
179 * @msg: Buffer starting with an EAP header
180 * Returns: The Identifier field from the EAP header
184 const struct eap_hdr *eap;
186 if (wpabuf_len(msg) < sizeof(*eap))
189 eap = wpabuf_head(msg);
190 return eap->identifier;
195 * eap_get_id - Get EAP Type from wpabuf
196 * @msg: Buffer starting with an EAP header
197 * Returns: The EAP Type after the EAP header