Home | History | Annotate | Download | only in radius

Lines Matching refs:hdr

28 	 * hdr - Pointer to the RADIUS header in buf
30 struct radius_hdr *hdr;
54 return msg->hdr;
74 msg->hdr->code = code;
75 msg->hdr->identifier = identifier;
115 msg->hdr = wpabuf_put(msg->buf, sizeof(struct radius_hdr));
278 static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
285 attr = radius_get_attr_type(hdr->type);
288 hdr->type, attr ? attr->name : "?Unknown?", hdr->length);
290 if (attr == NULL || hdr->length < sizeof(struct radius_attr_hdr))
293 len = hdr->length - sizeof(struct radius_attr_hdr);
294 pos = (unsigned char *) (hdr + 1);
355 msg->hdr->code, radius_code_string(msg->hdr->code),
356 msg->hdr->identifier, be_to_host16(msg->hdr->length));
381 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf));
385 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf));
411 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf));
412 os_memcpy(msg->hdr->authenticator, req_authenticator,
413 sizeof(msg->hdr->authenticator));
418 addr[0] = (u8 *) msg->hdr;
426 md5_vector(4, addr, len, msg->hdr->authenticator);
454 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf));
455 os_memcpy(msg->hdr->authenticator, req_hdr->authenticator, 16);
464 if (md5_vector(2, addr, len, msg->hdr->authenticator) < 0)
482 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf));
483 os_memset(msg->hdr->authenticator, 0, MD5_MAC_LEN);
488 md5_vector(2, addr, len, msg->hdr->authenticator);
503 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf));
504 os_memcpy(msg->hdr->authenticator, req_authenticator, MD5_MAC_LEN);
509 md5_vector(2, addr, len, msg->hdr->authenticator);
527 addr[0] = (u8 *) msg->hdr;
531 addr[2] = (u8 *) (msg->hdr + 1);
536 return os_memcmp_const(msg->hdr->authenticator, hash, MD5_MAC_LEN) != 0;
555 addr[0] = (u8 *) msg->hdr;
559 addr[2] = (u8 *) (msg->hdr + 1);
564 if (os_memcmp_const(msg->hdr->authenticator, hash, MD5_MAC_LEN) != 0)
591 os_memcpy(orig_authenticator, msg->hdr->authenticator,
593 os_memset(msg->hdr->authenticator, 0,
594 sizeof(msg->hdr->authenticator));
598 os_memcpy(msg->hdr->authenticator, orig_authenticator,
646 msg->hdr = wpabuf_mhead(msg->buf);
673 struct radius_hdr *hdr;
678 if (data == NULL || len < sizeof(*hdr))
681 hdr = (struct radius_hdr *) data;
683 msg_len = be_to_host16(hdr->length);
684 if (msg_len < sizeof(*hdr) || msg_len > len) {
703 msg->hdr = wpabuf_mhead(msg->buf);
821 os_memcpy(orig_authenticator, msg->hdr->authenticator,
823 os_memcpy(msg->hdr->authenticator, req_auth,
824 sizeof(msg->hdr->authenticator));
831 os_memcpy(msg->hdr->authenticator, orig_authenticator,
858 sent_msg->hdr->authenticator)) {
863 addr[0] = (u8 *) msg->hdr;
865 addr[1] = sent_msg->hdr->authenticator;
872 os_memcmp_const(hash, msg->hdr->authenticator, MD5_MAC_LEN) != 0) {
907 return os_get_random((u8 *) &msg->hdr->authenticator,
908 sizeof(msg->hdr->authenticator));
1124 sent_msg->hdr->authenticator,
1139 sent_msg->hdr->authenticator,
1173 sent_msg->hdr->authenticator,
1311 addr[1] = msg->hdr->authenticator;
1627 addr[1] = sent_msg->hdr->authenticator;