Lines Matching refs:hdr
82 struct ieee802_1x_hdr *hdr;
87 *msg_len = sizeof(*hdr) + data_len;
88 hdr = os_malloc(*msg_len);
89 if (hdr == NULL)
92 hdr->version = 2;
93 hdr->type = type;
94 hdr->length = host_to_be16(data_len);
97 os_memcpy(hdr + 1, data, data_len);
99 os_memset(hdr + 1, 0, data_len);
102 *data_pos = hdr + 1;
104 return (u8 *) hdr;
705 const struct ieee802_1x_hdr *hdr;
712 if (len < sizeof(*hdr) + sizeof(*key))
715 hdr = (const struct ieee802_1x_hdr *) buf;
716 key = (const struct wpa_eapol_key *) (hdr + 1);
717 plen = be_to_host16(hdr->length);
719 if (hdr->version < EAPOL_VERSION) {
722 if (hdr->type != IEEE802_1X_TYPE_EAPOL_KEY) {
724 "not a Key frame", hdr->type);
727 if (plen > len - sizeof(*hdr) || plen < sizeof(*key)) {