mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
QLOG: Wiring: QUIC FIFD
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22037)
This commit is contained in:
parent
285a76bda0
commit
3e52878039
@ -16,6 +16,7 @@
|
||||
# include "internal/quic_ackm.h"
|
||||
# include "internal/quic_txpim.h"
|
||||
# include "internal/quic_stream.h"
|
||||
# include "internal/qlog.h"
|
||||
|
||||
# ifndef OPENSSL_NO_QUIC
|
||||
|
||||
@ -45,6 +46,7 @@ struct quic_fifd_st {
|
||||
void (*sstream_updated)(uint64_t stream_id,
|
||||
void *arg);
|
||||
void *sstream_updated_arg;
|
||||
QLOG *qlog;
|
||||
};
|
||||
|
||||
int ossl_quic_fifd_init(QUIC_FIFD *fifd,
|
||||
@ -69,7 +71,8 @@ int ossl_quic_fifd_init(QUIC_FIFD *fifd,
|
||||
void *confirm_frame_arg,
|
||||
void (*sstream_updated)(uint64_t stream_id,
|
||||
void *arg),
|
||||
void *sstream_updated_arg);
|
||||
void *sstream_updated_arg,
|
||||
QLOG *qlog);
|
||||
|
||||
void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
# include "internal/quic_fc.h"
|
||||
# include "internal/bio_addr.h"
|
||||
# include "internal/time.h"
|
||||
# include "internal/qlog.h"
|
||||
|
||||
# ifndef OPENSSL_NO_QUIC
|
||||
|
||||
@ -49,6 +50,7 @@ typedef struct ossl_quic_tx_packetiser_args_st {
|
||||
OSSL_CC_DATA *cc_data; /* QUIC Congestion Controller Instance */
|
||||
OSSL_TIME (*now)(void *arg); /* Callback to get current time. */
|
||||
void *now_arg;
|
||||
QLOG *qlog; /* Optional QLOG instance */
|
||||
|
||||
/*
|
||||
* Injected dependencies - crypto streams.
|
||||
|
@ -262,6 +262,7 @@ static int ch_init(QUIC_CHANNEL *ch)
|
||||
txp_args.cc_data = ch->cc_data;
|
||||
txp_args.now = get_time;
|
||||
txp_args.now_arg = ch;
|
||||
txp_args.qlog = ch_get_qlog(ch);
|
||||
|
||||
for (pn_space = QUIC_PN_SPACE_INITIAL; pn_space < QUIC_PN_SPACE_NUM; ++pn_space) {
|
||||
ch->crypto_send[pn_space] = ossl_quic_sstream_new(INIT_CRYPTO_SEND_BUF_LEN);
|
||||
|
@ -34,7 +34,8 @@ int ossl_quic_fifd_init(QUIC_FIFD *fifd,
|
||||
void *confirm_frame_arg,
|
||||
void (*sstream_updated)(uint64_t stream_id,
|
||||
void *arg),
|
||||
void *sstream_updated_arg)
|
||||
void *sstream_updated_arg,
|
||||
QLOG *qlog)
|
||||
{
|
||||
if (cfq == NULL || ackm == NULL || txpim == NULL
|
||||
|| get_sstream_by_id == NULL || regen_frame == NULL)
|
||||
@ -51,6 +52,7 @@ int ossl_quic_fifd_init(QUIC_FIFD *fifd,
|
||||
fifd->confirm_frame_arg = confirm_frame_arg;
|
||||
fifd->sstream_updated = sstream_updated;
|
||||
fifd->sstream_updated_arg = sstream_updated_arg;
|
||||
fifd->qlog = qlog;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -481,7 +481,8 @@ OSSL_QUIC_TX_PACKETISER *ossl_quic_tx_packetiser_new(const OSSL_QUIC_TX_PACKETIS
|
||||
get_sstream_by_id, txp,
|
||||
on_regen_notify, txp,
|
||||
on_confirm_notify, txp,
|
||||
on_sstream_updated, txp)) {
|
||||
on_sstream_updated, txp,
|
||||
args->qlog)) {
|
||||
OPENSSL_free(txp);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -338,7 +338,8 @@ static int test_fifd(int idx)
|
||||
get_sstream_by_id, NULL,
|
||||
regen_frame, NULL,
|
||||
confirm_frame, NULL,
|
||||
sstream_updated, NULL)))
|
||||
sstream_updated, NULL,
|
||||
NULL)))
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < OSSL_NELEM(info.sstream); ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user