Lines Matching refs:hdr
69 struct ieee802_1x_hdr *hdr;
74 *msg_len = sizeof(*hdr) + data_len;
75 hdr = os_malloc(*msg_len);
76 if (hdr == NULL)
79 hdr->version = 2;
80 hdr->type = type;
81 hdr->length = host_to_be16(data_len);
84 os_memcpy(hdr + 1, data, data_len);
86 os_memset(hdr + 1, 0, data_len);
89 *data_pos = hdr + 1;
91 return (u8 *) hdr;
501 const struct ieee802_1x_hdr *hdr;
508 if (len < sizeof(*hdr) + sizeof(*key))
511 hdr = (const struct ieee802_1x_hdr *) buf;
512 key = (const struct wpa_eapol_key *) (hdr + 1);
513 plen = be_to_host16(hdr->length);
515 if (hdr->version < EAPOL_VERSION) {
518 if (hdr->type != IEEE802_1X_TYPE_EAPOL_KEY) {
520 "not a Key frame", hdr->type);
523 if (plen > len - sizeof(*hdr) || plen < sizeof(*key)) {