Lines Matching refs:hdr
34 * hdr - Pointer to the RADIUS header in buf
36 struct radius_hdr *hdr;
60 return msg->hdr;
80 msg->hdr->code = code;
81 msg->hdr->identifier = identifier;
121 msg->hdr = wpabuf_put(msg->buf, sizeof(struct radius_hdr));
258 static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
264 attr = radius_get_attr_type(hdr->type);
267 hdr->type, attr ? attr->name : "?Unknown?", hdr->length);
272 len = hdr->length - sizeof(struct radius_attr_hdr);
273 pos = (unsigned char *) (hdr + 1);
331 msg->hdr->code, radius_code_string(msg->hdr->code),
332 msg->hdr->identifier, ntohs(msg->hdr->length));
357 msg->hdr->length = htons(wpabuf_len(msg->buf));
361 msg->hdr->length = htons(wpabuf_len(msg->buf));
387 msg->hdr->length = htons(wpabuf_len(msg->buf));
388 os_memcpy(msg->hdr->authenticator, req_authenticator,
389 sizeof(msg->hdr->authenticator));
394 addr[0] = (u8 *) msg->hdr;
402 md5_vector(4, addr, len, msg->hdr->authenticator);
419 msg->hdr->length = htons(wpabuf_len(msg->buf));
420 os_memset(msg->hdr->authenticator, 0, MD5_MAC_LEN);
425 md5_vector(2, addr, len, msg->hdr->authenticator);
475 msg->hdr = wpabuf_mhead(msg->buf);
502 struct radius_hdr *hdr;
507 if (data == NULL || len < sizeof(*hdr))
510 hdr = (struct radius_hdr *) data;
512 msg_len = ntohs(hdr->length);
513 if (msg_len < sizeof(*hdr) || msg_len > len) {
532 msg->hdr = wpabuf_mhead(msg->buf);
654 os_memcpy(orig_authenticator, msg->hdr->authenticator,
656 os_memcpy(msg->hdr->authenticator, req_auth,
657 sizeof(msg->hdr->authenticator));
663 os_memcpy(msg->hdr->authenticator, orig_authenticator,
690 sent_msg->hdr->authenticator)) {
695 addr[0] = (u8 *) msg->hdr;
697 addr[1] = sent_msg->hdr->authenticator;
704 if (os_memcmp(hash, msg->hdr->authenticator, MD5_MAC_LEN) != 0) {
754 md5_vector(3, addr, elen, msg->hdr->authenticator);
963 sent_msg->hdr->authenticator,
974 sent_msg->hdr->authenticator,
1004 sent_msg->hdr->authenticator,
1114 addr[1] = msg->hdr->authenticator;