Lines Matching refs:hdr
53 msg->hdr = (struct radius_hdr *) msg->buf;
54 msg->buf_used = sizeof(*msg->hdr);
61 msg->hdr = NULL;
74 msg->hdr->code = code;
75 msg->hdr->identifier = identifier;
84 msg->hdr = NULL;
207 static void radius_msg_dump_attr(struct radius_attr_hdr *hdr)
213 attr = radius_get_attr_type(hdr->type);
216 hdr->type, attr ? attr->name : "?Unknown?", hdr->length);
221 len = hdr->length - sizeof(struct radius_attr_hdr);
222 pos = (unsigned char *) (hdr + 1);
280 msg->hdr->code, radius_code_string(msg->hdr->code),
281 msg->hdr->identifier, ntohs(msg->hdr->length));
304 msg->hdr->length = htons(msg->buf_used);
308 msg->hdr->length = htons(msg->buf_used);
334 msg->hdr->length = htons(msg->buf_used);
335 os_memcpy(msg->hdr->authenticator, req_authenticator,
336 sizeof(msg->hdr->authenticator));
341 addr[0] = (u8 *) msg->hdr;
345 addr[2] = (u8 *) (msg->hdr + 1);
346 len[2] = msg->buf_used - sizeof(*msg->hdr);
349 md5_vector(4, addr, len, msg->hdr->authenticator);
366 msg->hdr->length = htons(msg->buf_used);
367 os_memset(msg->hdr->authenticator, 0, MD5_MAC_LEN);
372 md5_vector(2, addr, len, msg->hdr->authenticator);
429 msg->hdr = (struct radius_hdr *) msg->buf;
456 struct radius_hdr *hdr;
461 if (data == NULL || len < sizeof(*hdr))
464 hdr = (struct radius_hdr *) data;
466 msg_len = ntohs(hdr->length);
467 if (msg_len < sizeof(*hdr) || msg_len > len) {
490 pos = (unsigned char *) (msg->hdr + 1);
608 os_memcpy(orig_authenticator, msg->hdr->authenticator,
610 os_memcpy(msg->hdr->authenticator, req_auth,
611 sizeof(msg->hdr->authenticator));
616 os_memcpy(msg->hdr->authenticator, orig_authenticator,
643 sent_msg->hdr->authenticator)) {
648 addr[0] = (u8 *) msg->hdr;
650 addr[1] = sent_msg->hdr->authenticator;
652 addr[2] = (u8 *) (msg->hdr + 1);
653 len[2] = msg->buf_used - sizeof(*msg->hdr);
657 if (os_memcmp(hash, msg->hdr
707 md5_vector(3, addr, elen, msg->hdr->authenticator);
917 sent_msg->hdr->authenticator,
928 sent_msg->hdr->authenticator,
958 sent_msg->hdr->authenticator,
1068 addr[1] = msg->hdr->authenticator;