Lines Matching refs:f
104 const OSSL_QUIC_FRAME_RESET_STREAM *f) in ossl_quic_wire_encode_frame_reset_stream() argument
107 || !WPACKET_quic_write_vlint(pkt, f->stream_id) in ossl_quic_wire_encode_frame_reset_stream()
108 || !WPACKET_quic_write_vlint(pkt, f->app_error_code) in ossl_quic_wire_encode_frame_reset_stream()
109 || !WPACKET_quic_write_vlint(pkt, f->final_size)) in ossl_quic_wire_encode_frame_reset_stream()
116 const OSSL_QUIC_FRAME_STOP_SENDING *f) in ossl_quic_wire_encode_frame_stop_sending() argument
119 || !WPACKET_quic_write_vlint(pkt, f->stream_id) in ossl_quic_wire_encode_frame_stop_sending()
120 || !WPACKET_quic_write_vlint(pkt, f->app_error_code)) in ossl_quic_wire_encode_frame_stop_sending()
127 const OSSL_QUIC_FRAME_CRYPTO *f) in ossl_quic_wire_encode_frame_crypto_hdr() argument
130 || !WPACKET_quic_write_vlint(pkt, f->offset) in ossl_quic_wire_encode_frame_crypto_hdr()
131 || !WPACKET_quic_write_vlint(pkt, f->len)) in ossl_quic_wire_encode_frame_crypto_hdr()
137 size_t ossl_quic_wire_get_encoded_frame_len_crypto_hdr(const OSSL_QUIC_FRAME_CRYPTO *f) in ossl_quic_wire_get_encoded_frame_len_crypto_hdr() argument
142 b = ossl_quic_vlint_encode_len(f->offset); in ossl_quic_wire_get_encoded_frame_len_crypto_hdr()
143 c = ossl_quic_vlint_encode_len(f->len); in ossl_quic_wire_get_encoded_frame_len_crypto_hdr()
151 const OSSL_QUIC_FRAME_CRYPTO *f) in ossl_quic_wire_encode_frame_crypto() argument
155 if (!ossl_quic_wire_encode_frame_crypto_hdr(pkt, f) in ossl_quic_wire_encode_frame_crypto()
156 || f->len > SIZE_MAX /* sizeof(uint64_t) > sizeof(size_t)? */ in ossl_quic_wire_encode_frame_crypto()
157 || !WPACKET_allocate_bytes(pkt, (size_t)f->len, &p)) in ossl_quic_wire_encode_frame_crypto()
160 if (f->data != NULL) in ossl_quic_wire_encode_frame_crypto()
161 memcpy(p, f->data, (size_t)f->len); in ossl_quic_wire_encode_frame_crypto()
179 const OSSL_QUIC_FRAME_STREAM *f) in ossl_quic_wire_encode_frame_stream_hdr() argument
183 if (f->offset != 0) in ossl_quic_wire_encode_frame_stream_hdr()
185 if (f->has_explicit_len) in ossl_quic_wire_encode_frame_stream_hdr()
187 if (f->is_fin) in ossl_quic_wire_encode_frame_stream_hdr()
191 || !WPACKET_quic_write_vlint(pkt, f->stream_id)) in ossl_quic_wire_encode_frame_stream_hdr()
194 if (f->offset != 0 && !WPACKET_quic_write_vlint(pkt, f->offset)) in ossl_quic_wire_encode_frame_stream_hdr()
197 if (f->has_explicit_len && !WPACKET_quic_write_vlint(pkt, f->len)) in ossl_quic_wire_encode_frame_stream_hdr()
203 size_t ossl_quic_wire_get_encoded_frame_len_stream_hdr(const OSSL_QUIC_FRAME_STREAM *f) in ossl_quic_wire_get_encoded_frame_len_stream_hdr() argument
208 b = ossl_quic_vlint_encode_len(f->stream_id); in ossl_quic_wire_get_encoded_frame_len_stream_hdr()
212 if (f->offset > 0) { in ossl_quic_wire_get_encoded_frame_len_stream_hdr()
213 c = ossl_quic_vlint_encode_len(f->offset); in ossl_quic_wire_get_encoded_frame_len_stream_hdr()
220 if (f->has_explicit_len) { in ossl_quic_wire_get_encoded_frame_len_stream_hdr()
221 d = ossl_quic_vlint_encode_len(f->len); in ossl_quic_wire_get_encoded_frame_len_stream_hdr()
232 const OSSL_QUIC_FRAME_STREAM *f) in ossl_quic_wire_encode_frame_stream() argument
237 if (!ossl_quic_wire_encode_frame_stream_hdr(pkt, f) in ossl_quic_wire_encode_frame_stream()
238 || f->len > SIZE_MAX /* sizeof(uint64_t) > sizeof(size_t)? */) in ossl_quic_wire_encode_frame_stream()
241 if (!WPACKET_allocate_bytes(pkt, (size_t)f->len, &p)) in ossl_quic_wire_encode_frame_stream()
244 if (f->data != NULL) in ossl_quic_wire_encode_frame_stream()
245 memcpy(p, f->data, (size_t)f->len); in ossl_quic_wire_encode_frame_stream()
320 const OSSL_QUIC_FRAME_NEW_CONN_ID *f) in ossl_quic_wire_encode_frame_new_conn_id() argument
322 if (f->conn_id.id_len < 1 in ossl_quic_wire_encode_frame_new_conn_id()
323 || f->conn_id.id_len > QUIC_MAX_CONN_ID_LEN) in ossl_quic_wire_encode_frame_new_conn_id()
327 || !WPACKET_quic_write_vlint(pkt, f->seq_num) in ossl_quic_wire_encode_frame_new_conn_id()
328 || !WPACKET_quic_write_vlint(pkt, f->retire_prior_to) in ossl_quic_wire_encode_frame_new_conn_id()
329 || !WPACKET_put_bytes_u8(pkt, f->conn_id.id_len) in ossl_quic_wire_encode_frame_new_conn_id()
330 || !WPACKET_memcpy(pkt, f->conn_id.id, f->conn_id.id_len) in ossl_quic_wire_encode_frame_new_conn_id()
331 || !WPACKET_memcpy(pkt, f->stateless_reset.token, in ossl_quic_wire_encode_frame_new_conn_id()
332 sizeof(f->stateless_reset.token))) in ossl_quic_wire_encode_frame_new_conn_id()
369 const OSSL_QUIC_FRAME_CONN_CLOSE *f) in ossl_quic_wire_encode_frame_conn_close() argument
371 if (!encode_frame_hdr(pkt, f->is_app ? OSSL_QUIC_FRAME_TYPE_CONN_CLOSE_APP in ossl_quic_wire_encode_frame_conn_close()
373 || !WPACKET_quic_write_vlint(pkt, f->error_code)) in ossl_quic_wire_encode_frame_conn_close()
380 if (!f->is_app && !WPACKET_quic_write_vlint(pkt, f->frame_type)) in ossl_quic_wire_encode_frame_conn_close()
383 if (!WPACKET_quic_write_vlint(pkt, f->reason_len) in ossl_quic_wire_encode_frame_conn_close()
384 || !WPACKET_memcpy(pkt, f->reason, f->reason_len)) in ossl_quic_wire_encode_frame_conn_close()
602 OSSL_QUIC_FRAME_RESET_STREAM *f) in ossl_quic_wire_decode_frame_reset_stream() argument
605 || !PACKET_get_quic_vlint(pkt, &f->stream_id) in ossl_quic_wire_decode_frame_reset_stream()
606 || !PACKET_get_quic_vlint(pkt, &f->app_error_code) in ossl_quic_wire_decode_frame_reset_stream()
607 || !PACKET_get_quic_vlint(pkt, &f->final_size)) in ossl_quic_wire_decode_frame_reset_stream()
614 OSSL_QUIC_FRAME_STOP_SENDING *f) in ossl_quic_wire_decode_frame_stop_sending() argument
617 || !PACKET_get_quic_vlint(pkt, &f->stream_id) in ossl_quic_wire_decode_frame_stop_sending()
618 || !PACKET_get_quic_vlint(pkt, &f->app_error_code)) in ossl_quic_wire_decode_frame_stop_sending()
626 OSSL_QUIC_FRAME_CRYPTO *f) in ossl_quic_wire_decode_frame_crypto() argument
629 || !PACKET_get_quic_vlint(pkt, &f->offset) in ossl_quic_wire_decode_frame_crypto()
630 || !PACKET_get_quic_vlint(pkt, &f->len) in ossl_quic_wire_decode_frame_crypto()
631 || f->len > SIZE_MAX /* sizeof(uint64_t) > sizeof(size_t)? */) in ossl_quic_wire_decode_frame_crypto()
634 if (f->offset + f->len > (((uint64_t)1) << 62) - 1) in ossl_quic_wire_decode_frame_crypto()
639 f->data = NULL; in ossl_quic_wire_decode_frame_crypto()
641 if (PACKET_remaining(pkt) < f->len) in ossl_quic_wire_decode_frame_crypto()
644 f->data = PACKET_data(pkt); in ossl_quic_wire_decode_frame_crypto()
646 if (!PACKET_forward(pkt, (size_t)f->len)) in ossl_quic_wire_decode_frame_crypto()
677 OSSL_QUIC_FRAME_STREAM *f) in ossl_quic_wire_decode_frame_stream() argument
685 || !PACKET_get_quic_vlint(pkt, &f->stream_id)) in ossl_quic_wire_decode_frame_stream()
689 if (!PACKET_get_quic_vlint(pkt, &f->offset)) in ossl_quic_wire_decode_frame_stream()
692 f->offset = 0; in ossl_quic_wire_decode_frame_stream()
695 f->has_explicit_len = ((frame_type & OSSL_QUIC_FRAME_FLAG_STREAM_LEN) != 0); in ossl_quic_wire_decode_frame_stream()
696 f->is_fin = ((frame_type & OSSL_QUIC_FRAME_FLAG_STREAM_FIN) != 0); in ossl_quic_wire_decode_frame_stream()
698 if (f->has_explicit_len) { in ossl_quic_wire_decode_frame_stream()
699 if (!PACKET_get_quic_vlint(pkt, &f->len)) in ossl_quic_wire_decode_frame_stream()
703 f->len = 0; in ossl_quic_wire_decode_frame_stream()
705 f->len = PACKET_remaining(pkt); in ossl_quic_wire_decode_frame_stream()
713 if (f->offset + f->len > (((uint64_t)1) << 62) - 1) in ossl_quic_wire_decode_frame_stream()
717 f->data = NULL; in ossl_quic_wire_decode_frame_stream()
719 f->data = PACKET_data(pkt); in ossl_quic_wire_decode_frame_stream()
721 if (f->len > SIZE_MAX /* sizeof(uint64_t) > sizeof(size_t)? */ in ossl_quic_wire_decode_frame_stream()
722 || !PACKET_forward(pkt, (size_t)f->len)) in ossl_quic_wire_decode_frame_stream()
798 OSSL_QUIC_FRAME_NEW_CONN_ID *f) in ossl_quic_wire_decode_frame_new_conn_id() argument
803 || !PACKET_get_quic_vlint(pkt, &f->seq_num) in ossl_quic_wire_decode_frame_new_conn_id()
804 || !PACKET_get_quic_vlint(pkt, &f->retire_prior_to) in ossl_quic_wire_decode_frame_new_conn_id()
805 || f->seq_num < f->retire_prior_to in ossl_quic_wire_decode_frame_new_conn_id()
811 f->conn_id.id_len = (unsigned char)len; in ossl_quic_wire_decode_frame_new_conn_id()
812 if (!PACKET_copy_bytes(pkt, f->conn_id.id, len)) in ossl_quic_wire_decode_frame_new_conn_id()
817 memset(f->conn_id.id + len, 0, QUIC_MAX_CONN_ID_LEN - len); in ossl_quic_wire_decode_frame_new_conn_id()
819 if (!PACKET_copy_bytes(pkt, f->stateless_reset.token, in ossl_quic_wire_decode_frame_new_conn_id()
820 sizeof(f->stateless_reset.token))) in ossl_quic_wire_decode_frame_new_conn_id()
857 OSSL_QUIC_FRAME_CONN_CLOSE *f) in ossl_quic_wire_decode_frame_conn_close() argument
864 || !PACKET_get_quic_vlint(pkt, &f->error_code)) in ossl_quic_wire_decode_frame_conn_close()
867 f->is_app = ((frame_type & 1) != 0); in ossl_quic_wire_decode_frame_conn_close()
869 if (!f->is_app) { in ossl_quic_wire_decode_frame_conn_close()
870 if (!PACKET_get_quic_vlint(pkt, &f->frame_type)) in ossl_quic_wire_decode_frame_conn_close()
873 f->frame_type = 0; in ossl_quic_wire_decode_frame_conn_close()
880 if (!PACKET_get_bytes(pkt, (const unsigned char **)&f->reason, in ossl_quic_wire_decode_frame_conn_close()
884 f->reason_len = (size_t)reason_len; in ossl_quic_wire_decode_frame_conn_close()