QUIC TXP: Allow QLOG instance to be changed after instantiation
authorHugo Landau <hlandau@openssl.org>
Mon, 29 Jan 2024 12:36:11 +0000 (12:36 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 2 Feb 2024 11:50:29 +0000 (11:50 +0000)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)

include/internal/quic_txp.h
ssl/quic/quic_txp.c

index 6f1debb1d996270ffee0a2ce40edfc97fd0b3127..b1769b15e48c0e25ac2bc067afb16d836bea3ebd 100644 (file)
@@ -138,6 +138,12 @@ int ossl_quic_tx_packetiser_set_cur_scid(OSSL_QUIC_TX_PACKETISER *txp,
 int ossl_quic_tx_packetiser_set_peer(OSSL_QUIC_TX_PACKETISER *txp,
                                      const BIO_ADDR *peer);
 
+/*
+ * Change the QLOG instance in use after instantiation.
+ */
+void ossl_quic_tx_packetiser_set_qlog(OSSL_QUIC_TX_PACKETISER *txp,
+                                      QLOG *qlog);
+
 /*
  * Inform the TX packetiser that an EL has been discarded. Idempotent.
  *
index c23ec346681ae60ac1bec21215b878a263697b59..9ed1858e0fb034265aff035d6fde417b05eed2a4 100644 (file)
@@ -626,6 +626,12 @@ void ossl_quic_tx_packetiser_set_ack_tx_cb(OSSL_QUIC_TX_PACKETISER *txp,
     txp->ack_tx_cb_arg  = cb_arg;
 }
 
+void ossl_quic_tx_packetiser_set_qlog(OSSL_QUIC_TX_PACKETISER *txp,
+                                      QLOG *qlog)
+{
+    ossl_quic_fifd_set_qlog(&txp->fifd, qlog);
+}
+
 int ossl_quic_tx_packetiser_discard_enc_level(OSSL_QUIC_TX_PACKETISER *txp,
                                               uint32_t enc_level)
 {