QUIC DEMUX, QRX: Add deprecation notices for future handling
authorHugo Landau <hlandau@openssl.org>
Thu, 9 Nov 2023 10:27:14 +0000 (10:27 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 21 Dec 2023 08:12:00 +0000 (08:12 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

include/internal/quic_demux.h
include/internal/quic_record_rx.h

index 354d408c8543baa12ad09e1016580e971e90f2b2..0749fe90b757cd07564af3b69e3b5ed3861d64ca 100644 (file)
@@ -243,6 +243,9 @@ int ossl_quic_demux_set_mtu(QUIC_DEMUX *demux, unsigned int mtu);
  * Only one handler can be set for a given connection ID. If a handler is
  * already set for the given connection ID, returns 0.
  *
+ * TODO(QUIC SERVER): DEPRECATED in favour of explicit routing by QUIC_PORT with
+ * reference to QUIC_LCIDM. To be removed.
+ *
  * Returns 1 on success or 0 on failure.
  */
 int ossl_quic_demux_register(QUIC_DEMUX *demux,
@@ -254,6 +257,9 @@ int ossl_quic_demux_register(QUIC_DEMUX *demux,
  * Unregisters any datagram handler callback set for the given connection ID.
  * Fails if no handler is registered for the given connection ID.
  *
+ * TODO(QUIC SERVER): DEPRECATED in favour of explicit routing by QUIC_PORT with
+ * reference to QUIC_LCIDM. To be removed.
+ *
  * Returns 1 on success or 0 on failure.
  */
 int ossl_quic_demux_unregister(QUIC_DEMUX *demux,
@@ -263,6 +269,9 @@ int ossl_quic_demux_unregister(QUIC_DEMUX *demux,
  * Unregisters any datagram handler callback from all connection IDs it is used
  * for. cb and cb_arg must both match the values passed to
  * ossl_quic_demux_register.
+ *
+ * TODO(QUIC SERVER): DEPRECATED in favour of explicit routing by QUIC_PORT with
+ * reference to QUIC_LCIDM. To be removed.
  */
 void ossl_quic_demux_unregister_by_cb(QUIC_DEMUX *demux,
                                       ossl_quic_demux_cb_fn *cb,
@@ -277,6 +286,11 @@ void ossl_quic_demux_unregister_by_cb(QUIC_DEMUX *demux,
  * The handler is responsible for ensuring that ossl_quic_demux_reinject_urxe or
  * ossl_quic_demux_release_urxe is called on the passed packet at some point in
  * the future, which may or may not be before the handler returns.
+ *
+ * TODO(QUIC SERVER): In the future all RX handling will go via this function
+ * and the QUIC_PORT will be responsible for routing. DEMUX will then handle
+ * URXE memory management and datagram DCID parsing only. The MVP LCID routing
+ * functionality of the DEMUX will be removed in favour of LCIDM.
  */
 void ossl_quic_demux_set_default_handler(QUIC_DEMUX *demux,
                                          ossl_quic_demux_cb_fn *cb,
index e26fd35600d665ed6364fdd17e122e5fc7a5f556..c4ed5a71d380e75748fa5be86c4e06b9532dbc6f 100644 (file)
@@ -79,6 +79,9 @@ void ossl_qrx_set_msg_callback_arg(OSSL_QRX *qrx,
  * input to this function. This function fails if the DCID is already
  * registered.
  *
+ * TODO(QUIC SERVER): DEPRECATED in favour of explicit routing by QUIC_PORT with
+ * reference to QUIC_LCIDM. To be removed.
+ *
  * Returns 1 on success or 0 on error.
  */
 int ossl_qrx_add_dst_conn_id(OSSL_QRX *qrx,
@@ -89,6 +92,9 @@ int ossl_qrx_add_dst_conn_id(OSSL_QRX *qrx,
  * is unregistered from the demuxer. Fails if the DCID is not registered with
  * the demuxer.
  *
+ * TODO(QUIC SERVER): DEPRECATED in favour of explicit routing by QUIC_PORT with
+ * reference to QUIC_LCIDM. To be removed.
+ *
  * Returns 1 on success or 0 on error.
  */
 int ossl_qrx_remove_dst_conn_id(OSSL_QRX *qrx,