Lines Matching refs:msg
17 * @msg: EAP frame (starting with EAP header)
25 int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload)
30 if (msg == NULL)
33 hdr = wpabuf_head(msg);
35 if (wpabuf_len(msg) < sizeof(*hdr)) {
41 if (len < sizeof(*hdr) + min_payload || len > wpabuf_len(msg)) {
54 * @msg: EAP frame (starting with EAP header)
67 const struct wpabuf *msg, size_t *plen)
73 if (!eap_hdr_len_valid(msg, 1))
76 hdr = wpabuf_head(msg);
160 * @msg: EAP message from eap_msg_alloc
167 void eap_update_len(struct wpabuf *msg)
170 hdr = wpabuf_mhead(msg);
171 if (wpabuf_len(msg) < sizeof(*hdr))
173 hdr->length = host_to_be16(wpabuf_len(msg));
179 * @msg: Buffer starting with an EAP header
182 u8 eap_get_id(const struct wpabuf *msg)
186 if (wpabuf_len(msg) < sizeof(*eap))
189 eap = wpabuf_head(msg);
196 * @msg: Buffer starting with an EAP header
199 EapType eap_get_type(const struct wpabuf *msg)
201 if (wpabuf_len(msg) < sizeof(struct eap_hdr) + 1)
204 return ((const u8 *) wpabuf_head(msg))[sizeof(struct eap_hdr)];