Home | History | Annotate | Download | only in ssl

Lines Matching refs:msg_hdr

358 				const struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
365 *p++ = msg_hdr->type;
366 l2n3(msg_hdr->msg_len,p);
367 s2n (msg_hdr->seq,p);
369 l2n3(msg_hdr->msg_len,p);
411 struct hm_header_st *msg_hdr;
432 msg_hdr = &s->d1->r_msg_hdr;
433 memset(msg_hdr, 0x00, sizeof(struct hm_header_st));
444 msg_len = msg_hdr->msg_len;
447 *(p++) = msg_hdr->type;
449 s2n (msg_hdr->seq,p);
463 memset(msg_hdr, 0x00, sizeof(struct hm_header_st));
479 static int dtls1_preprocess_fragment(SSL *s,struct hm_header_st *msg_hdr,int max)
483 msg_len = msg_hdr->msg_len;
484 frag_off = msg_hdr->frag_off;
485 frag_len = msg_hdr->frag_len;
512 s->s3->tmp.message_type = msg_hdr->type;
513 s->d1->r_msg_hdr.type = msg_hdr->type;
514 s->d1->r_msg_hdr.seq = msg_hdr->seq;
585 dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok)
591 unsigned long frag_len = msg_hdr->frag_len, max_len;
593 if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
604 if ((msg_hdr->frag_off+frag_len) > max_len)
609 seq64be[6] = (unsigned char) (msg_hdr->seq>>8);
610 seq64be[7] = (unsigned char) msg_hdr->seq;
615 frag = dtls1_hm_fragment_new(msg_hdr->msg_len, 1);
618 memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
645 frag->fragment + msg_hdr->frag_off,frag_len,0);
649 RSMBLY_BITMASK_MARK(frag->reassembly, (long)msg_hdr->frag_off,
650 (long)(msg_hdr->frag_off + frag_len));
652 RSMBLY_BITMASK_IS_COMPLETE(frag->reassembly, (long)msg_hdr->msg_len,
664 seq64be[6] = (unsigned char)(msg_hdr->seq>>8);
665 seq64be[7] = (unsigned char)(msg_hdr->seq);
688 dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
694 unsigned long frag_len = msg_hdr->frag_len;
696 if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
701 seq64be[6] = (unsigned char) (msg_hdr->seq>>8);
702 seq64be[7] = (unsigned char) msg_hdr->seq;
708 if (item != NULL && frag_len < msg_hdr->msg_len)
716 if (msg_hdr->seq <= s->d1->handshake_read_seq ||
717 msg_hdr->seq > s->d1->handshake_read_seq + 10 || item != NULL ||
718 (s->d1->handshake_read_seq == 0 && msg_hdr->type == SSL3_MT_FINISHED))
733 if (frag_len && frag_len < msg_hdr->msg_len)
734 return dtls1_reassemble_fragment(s, msg_hdr, ok);
740 memcpy(&(frag->msg_header), msg_hdr, sizeof(*msg_hdr));
752 seq64be[6] = (unsigned char)(msg_hdr->seq>>8);
753 seq64be[7] = (unsigned char)(msg_hdr->seq);
778 struct hm_header_st msg_hdr;
805 dtls1_get_message_header(wire, &msg_hdr);
813 if (msg_hdr.seq != s->d1->handshake_read_seq && !(s->d1->listen && msg_hdr.seq == 1))
814 return dtls1_process_out_of_seq_message(s, &msg_hdr, ok);
816 len = msg_hdr.msg_len;
817 frag_off = msg_hdr.frag_off;
818 frag_len = msg_hdr.frag_len;
821 return dtls1_reassemble_fragment(s, &msg_hdr, ok);
849 if ((al=dtls1_preprocess_fragment(s,&msg_hdr,max)))
1349 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
1351 msg_hdr->type = mt;
1352 msg_hdr->msg_len = len;
1353 msg_hdr->seq = seq_num;
1354 msg_hdr->frag_off = frag_off;
1355 msg_hdr->frag_len = frag_len;
1362 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
1364 msg_hdr->frag_off = frag_off;
1365 msg_hdr->frag_len = frag_len;
1371 struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr;
1373 *p++ = msg_hdr->type;
1374 l2n3(msg_hdr->msg_len, p);
1376 s2n(msg_hdr->seq, p);
1377 l2n3(msg_hdr->frag_off, p);
1378 l2n3(msg_hdr->frag_len, p);
1406 dtls1_get_message_header(unsigned char *data, struct hm_header_st *msg_hdr)
1408 memset(msg_hdr, 0x00, sizeof(struct hm_header_st));
1409 msg_hdr->type = *(data++);
1410 n2l3(data, msg_hdr->msg_len);
1412 n2s(data, msg_hdr->seq);
1413 n2l3(data, msg_hdr->frag_off);
1414 n2l3(data, msg_hdr->frag_len);