Lines Matching refs:d1
122 if (s->d1->mtu < dtls1_min_mtu(s)) in dtls1_do_write()
128 s->d1->w_msg_hdr.msg_len + DTLS1_HM_HEADER_LENGTH)) in dtls1_do_write()
169 frag_off = s->d1->w_msg_hdr.frag_off; in dtls1_do_write()
174 if (s->d1->mtu > used_len) in dtls1_do_write()
175 curr_mtu = s->d1->mtu - used_len; in dtls1_do_write()
188 if (s->d1->mtu > overhead + DTLS1_HM_HEADER_LENGTH) { in dtls1_do_write()
189 curr_mtu = s->d1->mtu - overhead; in dtls1_do_write()
263 || BIO_wpending(s->wbio) <= (int)s->d1->mtu); in dtls1_do_write()
265 if (type == SSL3_RT_HANDSHAKE && !s->d1->retransmitting) { in dtls1_do_write()
272 const struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_do_write()
332 msg_hdr = &s->d1->r_msg_hdr; in dtls_get_message()
372 s->d1->handshake_read_seq++; in dtls_get_message()
449 if (s->d1->r_msg_hdr.frag_off == 0) { /* first fragment */ in dtls1_preprocess_fragment()
460 s->d1->r_msg_hdr.msg_len = msg_len; 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()
464 } else if (msg_len != s->d1->r_msg_hdr.msg_len) { in dtls1_preprocess_fragment()
494 iter = pqueue_iterator(s->d1->buffered_messages); in dtls1_retrieve_buffered_fragment()
502 if (frag->msg_header.seq < s->d1->handshake_read_seq) { in dtls1_retrieve_buffered_fragment()
508 || s->d1->handshake_read_seq != 1 in dtls1_retrieve_buffered_fragment()
515 pqueue_pop(s->d1->buffered_messages); in dtls1_retrieve_buffered_fragment()
530 if (nextfrag->msg_header.seq == s->d1->handshake_read_seq) { in dtls1_retrieve_buffered_fragment()
535 pqueue_pop(s->d1->buffered_messages); in dtls1_retrieve_buffered_fragment()
554 if (s->d1->handshake_read_seq == frag->msg_header.seq || chretran) { in dtls1_retrieve_buffered_fragment()
556 pqueue_pop(s->d1->buffered_messages); in dtls1_retrieve_buffered_fragment()
579 s->d1->handshake_read_seq = 0; in dtls1_retrieve_buffered_fragment()
580 s->d1->next_handshake_write_seq = 0; in dtls1_retrieve_buffered_fragment()
617 item = pqueue_find(s->d1->buffered_messages, seq64be); in dtls1_reassemble_fragment()
685 item = pqueue_insert(s->d1->buffered_messages, item); in dtls1_reassemble_fragment()
722 item = pqueue_find(s->d1->buffered_messages, seq64be); 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()
782 item = pqueue_insert(s->d1->buffered_messages, item); in dtls1_process_out_of_seq_message()
884 if (msg_hdr.seq != s->d1->handshake_read_seq) { in dtls_get_reassembled_message()
887 || s->d1->handshake_read_seq != 1 in dtls_get_reassembled_message()
907 && s->d1->r_msg_hdr.frag_off == 0 in dtls_get_reassembled_message()
970 s->d1->handshake_read_seq = 0; in dtls_get_reassembled_message()
971 s->d1->next_handshake_write_seq = 0; in dtls_get_reassembled_message()
999 s->d1->next_handshake_write_seq++; in dtls_construct_change_cipher_spec()
1001 if (!WPACKET_put_bytes_u16(pkt, s->d1->handshake_write_seq)) { in dtls_construct_change_cipher_spec()
1093 pqueue *sent = s->d1->sent_messages; in dtls1_retransmit_buffered_messages()
1134 if (!ossl_assert(s->d1->w_msg_hdr.msg_len + in dtls1_buffer_message()
1142 if (!ossl_assert(s->d1->w_msg_hdr.msg_len + in dtls1_buffer_message()
1149 frag->msg_header.msg_len = s->d1->w_msg_hdr.msg_len; in dtls1_buffer_message()
1150 frag->msg_header.seq = s->d1->w_msg_hdr.seq; in dtls1_buffer_message()
1151 frag->msg_header.type = s->d1->w_msg_hdr.type; in dtls1_buffer_message()
1153 frag->msg_header.frag_len = s->d1->w_msg_hdr.msg_len; in dtls1_buffer_message()
1177 pqueue_insert(s->d1->sent_messages, item); in dtls1_buffer_message()
1196 item = pqueue_find(s->d1->sent_messages, seq64be); in dtls1_retransmit_message()
1224 s->d1->retransmitting = 1; in dtls1_retransmit_message()
1243 s->d1->retransmitting = 0; in dtls1_retransmit_message()
1254 s->d1->handshake_write_seq = s->d1->next_handshake_write_seq; in dtls1_set_message_header()
1255 s->d1->next_handshake_write_seq++; in dtls1_set_message_header()
1258 dtls1_set_message_header_int(s, mt, len, s->d1->handshake_write_seq, in dtls1_set_message_header()
1268 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_set_message_header_int()
1280 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_fix_message_header()
1289 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; in dtls1_write_message_header()
1318 s->d1->handshake_write_seq = s->d1->next_handshake_write_seq; in dtls1_set_handshake_header()
1320 s->d1->handshake_write_seq, 0, 0); in dtls1_set_handshake_header()
1347 s->d1->w_msg_hdr.msg_len = msglen - DTLS1_HM_HEADER_LENGTH; in dtls1_close_construct_packet()
1348 s->d1->w_msg_hdr.frag_len = msglen - DTLS1_HM_HEADER_LENGTH; in dtls1_close_construct_packet()