Lines Matching refs:msg_hdr
272 const struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_do_write() local
280 *p++ = msg_hdr->type; in dtls1_do_write()
281 l2n3(msg_hdr->msg_len, p); in dtls1_do_write()
282 s2n(msg_hdr->seq, p); in dtls1_do_write()
284 l2n3(msg_hdr->msg_len, p); in dtls1_do_write()
326 struct hm_header_st *msg_hdr; in dtls_get_message() local
332 msg_hdr = &s->d1->r_msg_hdr; in dtls_get_message()
333 memset(msg_hdr, 0, sizeof(*msg_hdr)); in dtls_get_message()
361 msg_len = msg_hdr->msg_len; in dtls_get_message()
364 *(p++) = msg_hdr->type; in dtls_get_message()
366 s2n(msg_hdr->seq, p); in dtls_get_message()
370 memset(msg_hdr, 0, sizeof(*msg_hdr)); in dtls_get_message()
434 struct hm_header_st *msg_hdr) in dtls1_preprocess_fragment() argument
438 msg_len = msg_hdr->msg_len; in dtls1_preprocess_fragment()
439 frag_off = msg_hdr->frag_off; in dtls1_preprocess_fragment()
440 frag_len = msg_hdr->frag_len; in dtls1_preprocess_fragment()
461 s->s3.tmp.message_type = msg_hdr->type; in dtls1_preprocess_fragment()
462 s->d1->r_msg_hdr.type = msg_hdr->type; in dtls1_preprocess_fragment()
463 s->d1->r_msg_hdr.seq = msg_hdr->seq; in dtls1_preprocess_fragment()
595 const struct hm_header_st *msg_hdr) in dtls1_reassemble_fragment() argument
601 size_t frag_len = msg_hdr->frag_len; in dtls1_reassemble_fragment()
605 if ((msg_hdr->frag_off + frag_len) > msg_hdr->msg_len || in dtls1_reassemble_fragment()
606 msg_hdr->msg_len > dtls1_max_handshake_message_len(s)) in dtls1_reassemble_fragment()
615 seq64be[6] = (unsigned char)(msg_hdr->seq >> 8); in dtls1_reassemble_fragment()
616 seq64be[7] = (unsigned char)msg_hdr->seq; in dtls1_reassemble_fragment()
620 frag = dtls1_hm_fragment_new(msg_hdr->msg_len, 1); in dtls1_reassemble_fragment()
623 memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr)); in dtls1_reassemble_fragment()
628 if (frag->msg_header.msg_len != msg_hdr->msg_len) { in dtls1_reassemble_fragment()
658 frag->fragment + msg_hdr->frag_off, in dtls1_reassemble_fragment()
665 RSMBLY_BITMASK_MARK(frag->reassembly, (long)msg_hdr->frag_off, in dtls1_reassemble_fragment()
666 (long)(msg_hdr->frag_off + frag_len)); in dtls1_reassemble_fragment()
668 if (!ossl_assert(msg_hdr->msg_len > 0)) in dtls1_reassemble_fragment()
670 RSMBLY_BITMASK_IS_COMPLETE(frag->reassembly, (long)msg_hdr->msg_len, in dtls1_reassemble_fragment()
705 const struct hm_header_st *msg_hdr) in dtls1_process_out_of_seq_message() argument
711 size_t frag_len = msg_hdr->frag_len; in dtls1_process_out_of_seq_message()
715 if ((msg_hdr->frag_off + frag_len) > msg_hdr->msg_len) in dtls1_process_out_of_seq_message()
720 seq64be[6] = (unsigned char)(msg_hdr->seq >> 8); in dtls1_process_out_of_seq_message()
721 seq64be[7] = (unsigned char)msg_hdr->seq; in dtls1_process_out_of_seq_message()
728 if (item != NULL && frag_len != msg_hdr->msg_len) in dtls1_process_out_of_seq_message()
736 if (msg_hdr->seq <= s->d1->handshake_read_seq || in dtls1_process_out_of_seq_message()
737 msg_hdr->seq > s->d1->handshake_read_seq + 10 || item != NULL || in dtls1_process_out_of_seq_message()
738 (s->d1->handshake_read_seq == 0 && msg_hdr->type == SSL3_MT_FINISHED)) { in dtls1_process_out_of_seq_message()
752 if (frag_len != msg_hdr->msg_len) { in dtls1_process_out_of_seq_message()
753 return dtls1_reassemble_fragment(s, msg_hdr); in dtls1_process_out_of_seq_message()
763 memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr)); in dtls1_process_out_of_seq_message()
809 struct hm_header_st msg_hdr; in dtls_get_reassembled_message() local
863 dtls1_get_message_header(p, &msg_hdr); in dtls_get_reassembled_message()
865 mlen = msg_hdr.msg_len; in dtls_get_reassembled_message()
866 frag_off = msg_hdr.frag_off; in dtls_get_reassembled_message()
867 frag_len = msg_hdr.frag_len; in dtls_get_reassembled_message()
884 if (msg_hdr.seq != s->d1->handshake_read_seq) { in dtls_get_reassembled_message()
886 || msg_hdr.seq != 0 in dtls_get_reassembled_message()
890 *errtype = dtls1_process_out_of_seq_message(s, &msg_hdr); in dtls_get_reassembled_message()
902 *errtype = dtls1_reassemble_fragment(s, &msg_hdr); in dtls_get_reassembled_message()
930 if (!dtls1_preprocess_fragment(s, &msg_hdr)) { in dtls_get_reassembled_message()
1268 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_set_message_header_int() local
1270 msg_hdr->type = mt; in dtls1_set_message_header_int()
1271 msg_hdr->msg_len = len; in dtls1_set_message_header_int()
1272 msg_hdr->seq = seq_num; in dtls1_set_message_header_int()
1273 msg_hdr->frag_off = frag_off; in dtls1_set_message_header_int()
1274 msg_hdr->frag_len = frag_len; in dtls1_set_message_header_int()
1280 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_fix_message_header() local
1282 msg_hdr->frag_off = frag_off; in dtls1_fix_message_header()
1283 msg_hdr->frag_len = frag_len; in dtls1_fix_message_header()
1289 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_write_message_header() local
1291 *p++ = msg_hdr->type; in dtls1_write_message_header()
1292 l2n3(msg_hdr->msg_len, p); in dtls1_write_message_header()
1294 s2n(msg_hdr->seq, p); in dtls1_write_message_header()
1295 l2n3(msg_hdr->frag_off, p); in dtls1_write_message_header()
1296 l2n3(msg_hdr->frag_len, p); in dtls1_write_message_header()
1302 hm_header_st *msg_hdr) in dtls1_get_message_header() argument
1304 memset(msg_hdr, 0, sizeof(*msg_hdr)); in dtls1_get_message_header()
1305 msg_hdr->type = *(data++); in dtls1_get_message_header()
1306 n2l3(data, msg_hdr->msg_len); in dtls1_get_message_header()
1308 n2s(data, msg_hdr->seq); in dtls1_get_message_header()
1309 n2l3(data, msg_hdr->frag_off); in dtls1_get_message_header()
1310 n2l3(data, msg_hdr->frag_len); in dtls1_get_message_header()