Lines Matching defs:eap
2 * EAP common peer/server definitions
22 * eap_hdr_validate - Validate EAP header
23 * @vendor: Expected EAP Vendor-Id (0 = IETF)
24 * @eap_type: Expected EAP type number
25 * @msg: EAP frame (starting with EAP header)
27 * Returns: Pointer to EAP payload (after type field), or %NULL on failure
29 * This is a helper function for EAP method implementations. This is usually
31 * that the received EAP request packet has a valid header. This function is
32 * able to process both legacy and expanded EAP headers and in most cases, the
34 * the payload regardless of whether the packet used the expanded EAP header or
47 wpa_printf(MSG_INFO, "EAP: Too short EAP frame");
53 wpa_printf(MSG_INFO, "EAP: Invalid EAP length");
63 wpa_printf(MSG_INFO, "EAP: Invalid expanded EAP "
73 wpa_printf(MSG_INFO, "EAP: Invalid expanded frame "
82 wpa_printf(MSG_INFO, "EAP: Invalid frame type");
92 * eap_msg_alloc - Allocate a buffer for an EAP message
94 * @type: EAP type
100 * This function can be used to allocate a buffer for an EAP message and fill
101 * in the EAP header. This function is automatically using expanded EAP header
102 * if the selected Vendor-Id is not IETF. In other words, most EAP methods do
105 * payload_len bytes and has the EAP header and Type field already filled in.
138 * eap_update_len - Update EAP header length
139 * @msg: EAP message from eap_msg_alloc
141 * This function updates the length field in the EAP header to match with the
157 * eap_get_id - Get EAP Identifier from wpabuf
158 * @msg: Buffer starting with an EAP header
159 * Returns: The Identifier field from the EAP header
163 const struct eap_hdr *eap;
165 if (wpabuf_len(msg) < sizeof(*eap))
168 eap = wpabuf_head(msg);
169 return eap->identifier;
174 * eap_get_id - Get EAP Type from wpabuf
175 * @msg: Buffer starting with an EAP header
176 * Returns: The EAP Type after the EAP header