Lines Matching refs:bio

41 static void put_str(BIO *bio, char *str, size_t slen)  in put_str()  argument
46 BIO_printf(bio, "%c", str[i]); in put_str()
49 static void put_data(BIO *bio, const uint8_t *data, size_t datalen) in put_data() argument
54 BIO_printf(bio, "%02x", data[i]); in put_data()
57 static void put_conn_id(BIO *bio, QUIC_CONN_ID *id) in put_conn_id() argument
60 BIO_puts(bio, "<zero length id>"); in put_conn_id()
64 BIO_puts(bio, "0x"); in put_conn_id()
65 put_data(bio, id->id, id->id_len); in put_conn_id()
68 static void put_token(BIO *bio, const uint8_t *token, size_t token_len) in put_token() argument
71 BIO_puts(bio, "<zero length token>"); in put_token()
73 put_data(bio, token, token_len); in put_token()
76 static int frame_ack(BIO *bio, PACKET *pkt) in frame_ack() argument
98 BIO_printf(bio, " Largest acked: %llu\n", in frame_ack()
100 BIO_printf(bio, " Ack delay (raw) %llu\n", in frame_ack()
102 BIO_printf(bio, " Ack range count: %llu\n", in frame_ack()
104 BIO_printf(bio, " First ack range: %llu\n", in frame_ack()
108 BIO_printf(bio, " Gap: %llu\n", in frame_ack()
111 BIO_printf(bio, " Ack range len: %llu\n", in frame_ack()
122 static int frame_reset_stream(BIO *bio, PACKET *pkt) in frame_reset_stream() argument
129 BIO_printf(bio, " Stream id: %llu\n", in frame_reset_stream()
131 BIO_printf(bio, " App Protocol Error Code: %llu\n", in frame_reset_stream()
133 BIO_printf(bio, " Final size: %llu\n", in frame_reset_stream()
139 static int frame_stop_sending(BIO *bio, PACKET *pkt) in frame_stop_sending() argument
146 BIO_printf(bio, " Stream id: %llu\n", in frame_stop_sending()
148 BIO_printf(bio, " App Protocol Error Code: %llu\n", in frame_stop_sending()
154 static int frame_crypto(BIO *bio, PACKET *pkt) in frame_crypto() argument
161 BIO_printf(bio, " Offset: %llu\n", (unsigned long long)frame_data.offset); in frame_crypto()
162 BIO_printf(bio, " Len: %llu\n", (unsigned long long)frame_data.len); in frame_crypto()
167 static int frame_new_token(BIO *bio, PACKET *pkt) in frame_new_token() argument
175 BIO_puts(bio, " Token: "); in frame_new_token()
176 put_token(bio, token, token_len); in frame_new_token()
177 BIO_puts(bio, "\n"); in frame_new_token()
182 static int frame_stream(BIO *bio, PACKET *pkt, uint64_t frame_type) in frame_stream() argument
187 BIO_puts(bio, "Stream"); in frame_stream()
190 BIO_puts(bio, "\n"); in frame_stream()
194 BIO_puts(bio, " (Fin)\n"); in frame_stream()
198 BIO_puts(bio, " (Len)\n"); in frame_stream()
202 BIO_puts(bio, " (Len, Fin)\n"); in frame_stream()
206 BIO_puts(bio, " (Off)\n"); in frame_stream()
210 BIO_puts(bio, " (Off, Fin)\n"); in frame_stream()
214 BIO_puts(bio, " (Off, Len)\n"); in frame_stream()
218 BIO_puts(bio, " (Off, Len, Fin)\n"); in frame_stream()
228 BIO_printf(bio, " Stream id: %llu\n", in frame_stream()
230 BIO_printf(bio, " Offset: %llu\n", in frame_stream()
237 BIO_printf(bio, " Len: %llu\n", (unsigned long long)frame_data.len); in frame_stream()
239 BIO_puts(bio, " Len: <implicit length>\n"); in frame_stream()
244 static int frame_max_data(BIO *bio, PACKET *pkt) in frame_max_data() argument
251 BIO_printf(bio, " Max Data: %llu\n", (unsigned long long)max_data); in frame_max_data()
256 static int frame_max_stream_data(BIO *bio, PACKET *pkt) in frame_max_stream_data() argument
265 BIO_printf(bio, " Max Stream Data: %llu\n", in frame_max_stream_data()
271 static int frame_max_streams(BIO *bio, PACKET *pkt) in frame_max_streams() argument
278 BIO_printf(bio, " Max Streams: %llu\n", (unsigned long long)max_streams); in frame_max_streams()
283 static int frame_data_blocked(BIO *bio, PACKET *pkt) in frame_data_blocked() argument
290 BIO_printf(bio, " Max Data: %llu\n", (unsigned long long)max_data); in frame_data_blocked()
295 static int frame_stream_data_blocked(BIO *bio, PACKET *pkt) in frame_stream_data_blocked() argument
304 BIO_printf(bio, " Stream id: %llu\n", (unsigned long long)stream_id); in frame_stream_data_blocked()
305 BIO_printf(bio, " Max Data: %llu\n", (unsigned long long)max_data); in frame_stream_data_blocked()
310 static int frame_streams_blocked(BIO *bio, PACKET *pkt) in frame_streams_blocked() argument
317 BIO_printf(bio, " Max Data: %llu\n", (unsigned long long)max_data); in frame_streams_blocked()
322 static int frame_new_conn_id(BIO *bio, PACKET *pkt) in frame_new_conn_id() argument
329 BIO_printf(bio, " Sequence Number: %llu\n", in frame_new_conn_id()
331 BIO_printf(bio, " Retire prior to: %llu\n", in frame_new_conn_id()
333 BIO_puts(bio, " Connection id: "); in frame_new_conn_id()
334 put_conn_id(bio, &frame_data.conn_id); in frame_new_conn_id()
335 BIO_puts(bio, "\n Stateless Reset Token: "); in frame_new_conn_id()
336 put_data(bio, frame_data.stateless_reset.token, in frame_new_conn_id()
338 BIO_puts(bio, "\n"); in frame_new_conn_id()
343 static int frame_retire_conn_id(BIO *bio, PACKET *pkt) in frame_retire_conn_id() argument
350 BIO_printf(bio, " Sequence Number: %llu\n", (unsigned long long)seq_num); in frame_retire_conn_id()
355 static int frame_path_challenge(BIO *bio, PACKET *pkt) in frame_path_challenge() argument
362 BIO_printf(bio, " Data: %016llx\n", (unsigned long long)data); in frame_path_challenge()
367 static int frame_path_response(BIO *bio, PACKET *pkt) in frame_path_response() argument
374 BIO_printf(bio, " Data: %016llx\n", (unsigned long long)data); in frame_path_response()
379 static int frame_conn_closed(BIO *bio, PACKET *pkt) in frame_conn_closed() argument
386 BIO_printf(bio, " Error Code: %llu\n", in frame_conn_closed()
388 BIO_puts(bio, " Reason: "); in frame_conn_closed()
389 put_str(bio, frame_data.reason, frame_data.reason_len); in frame_conn_closed()
390 BIO_puts(bio, "\n"); in frame_conn_closed()
395 static int trace_frame_data(BIO *bio, PACKET *pkt) in trace_frame_data() argument
404 BIO_puts(bio, "Ping\n"); in trace_frame_data()
410 BIO_puts(bio, "Padding\n"); in trace_frame_data()
416 BIO_puts(bio, "Ack "); in trace_frame_data()
418 BIO_puts(bio, " (with ECN)\n"); in trace_frame_data()
420 BIO_puts(bio, " (without ECN)\n"); in trace_frame_data()
421 if (!frame_ack(bio, pkt)) in trace_frame_data()
426 BIO_puts(bio, "Reset stream\n"); in trace_frame_data()
427 if (!frame_reset_stream(bio, pkt)) in trace_frame_data()
432 BIO_puts(bio, "Stop sending\n"); in trace_frame_data()
433 if (!frame_stop_sending(bio, pkt)) in trace_frame_data()
438 BIO_puts(bio, "Crypto\n"); in trace_frame_data()
439 if (!frame_crypto(bio, pkt)) in trace_frame_data()
444 BIO_puts(bio, "New token\n"); in trace_frame_data()
445 if (!frame_new_token(bio, pkt)) in trace_frame_data()
458 if (!frame_stream(bio, pkt, frame_type)) in trace_frame_data()
463 BIO_puts(bio, "Max data\n"); in trace_frame_data()
464 if (!frame_max_data(bio, pkt)) in trace_frame_data()
469 BIO_puts(bio, "Max stream data\n"); in trace_frame_data()
470 if (!frame_max_stream_data(bio, pkt)) in trace_frame_data()
476 BIO_puts(bio, "Max streams "); in trace_frame_data()
478 BIO_puts(bio, " (Bidi)\n"); in trace_frame_data()
480 BIO_puts(bio, " (Uni)\n"); in trace_frame_data()
481 if (!frame_max_streams(bio, pkt)) in trace_frame_data()
486 BIO_puts(bio, "Data blocked\n"); in trace_frame_data()
487 if (!frame_data_blocked(bio, pkt)) in trace_frame_data()
492 BIO_puts(bio, "Stream data blocked\n"); in trace_frame_data()
493 if (!frame_stream_data_blocked(bio, pkt)) in trace_frame_data()
499 BIO_puts(bio, "Streams blocked"); in trace_frame_data()
501 BIO_puts(bio, " (Bidi)\n"); in trace_frame_data()
503 BIO_puts(bio, " (Uni)\n"); in trace_frame_data()
504 if (!frame_streams_blocked(bio, pkt)) in trace_frame_data()
509 BIO_puts(bio, "New conn id\n"); in trace_frame_data()
510 if (!frame_new_conn_id(bio, pkt)) in trace_frame_data()
515 BIO_puts(bio, "Retire conn id\n"); in trace_frame_data()
516 if (!frame_retire_conn_id(bio, pkt)) in trace_frame_data()
521 BIO_puts(bio, "Path challenge\n"); in trace_frame_data()
522 if (!frame_path_challenge(bio, pkt)) in trace_frame_data()
527 BIO_puts(bio, "Path response\n"); in trace_frame_data()
528 if (!frame_path_response(bio, pkt)) in trace_frame_data()
534 BIO_puts(bio, "Connection close"); in trace_frame_data()
536 BIO_puts(bio, " (app)\n"); in trace_frame_data()
538 BIO_puts(bio, " (transport)\n"); in trace_frame_data()
539 if (!frame_conn_closed(bio, pkt)) in trace_frame_data()
544 BIO_puts(bio, "Handshake done\n"); in trace_frame_data()
554 BIO_puts(bio, " <unexpected trailing frame data skipped>\n"); in trace_frame_data()
562 BIO *bio = arg; in ossl_quic_trace() local
567 BIO_puts(bio, write_p ? "Sent" : "Received"); in ossl_quic_trace()
573 BIO_printf(bio, " Datagram\n Length: %zu\n", msglen); in ossl_quic_trace()
591 BIO_puts(bio, write_p ? "Sent" : "Received"); in ossl_quic_trace()
592 BIO_puts(bio, " Packet\n"); in ossl_quic_trace()
593 BIO_printf(bio, " Packet Type: %s\n", packet_type(hdr.type)); in ossl_quic_trace()
595 BIO_printf(bio, " Version: 0x%08lx\n", in ossl_quic_trace()
597 BIO_puts(bio, " Destination Conn Id: "); in ossl_quic_trace()
598 put_conn_id(bio, &hdr.dst_conn_id); in ossl_quic_trace()
599 BIO_puts(bio, "\n"); in ossl_quic_trace()
601 BIO_puts(bio, " Source Conn Id: "); in ossl_quic_trace()
602 put_conn_id(bio, &hdr.src_conn_id); in ossl_quic_trace()
603 BIO_puts(bio, "\n"); in ossl_quic_trace()
605 BIO_printf(bio, " Payload length: %zu\n", hdr.len); in ossl_quic_trace()
607 BIO_puts(bio, " Token: "); in ossl_quic_trace()
608 put_token(bio, hdr.token, hdr.token_len); in ossl_quic_trace()
609 BIO_puts(bio, "\n"); in ossl_quic_trace()
613 BIO_puts(bio, " Packet Number: 0x"); in ossl_quic_trace()
616 BIO_printf(bio, "%02x", hdr.pn[i]); in ossl_quic_trace()
617 BIO_puts(bio, "\n"); in ossl_quic_trace()
626 BIO_puts(bio, write_p ? "Sent" : "Received"); in ossl_quic_trace()
627 BIO_puts(bio, " Frame: "); in ossl_quic_trace()
631 if (!trace_frame_data(bio, &pkt)) { in ossl_quic_trace()
632 BIO_puts(bio, " <error processing frame data>\n"); in ossl_quic_trace()