OSSL_LIB_CTX *libctx;
const char *propq;
- /* Demux to receive datagrams from. */
+ /* Demux which owns the URXEs passed to us. */
QUIC_DEMUX *demux;
/* Length of connection IDs used in short-header packets in bytes. */
void ossl_qrx_set_msg_callback_arg(OSSL_QRX *qrx,
void *msg_callback_arg);
-/*
- * DCID Management
- * ===============
- */
-
-/*
- * Adds a given DCID to the QRX. The QRX will register the DCID with the demuxer
- * so that incoming packets with that DCID are passed to the given QRX. Multiple
- * DCIDs may be associated with a QRX at any one time. You will need to add at
- * least one DCID after instantiating the QRX. A zero-length DCID is a valid
- * 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,
- const QUIC_CONN_ID *dst_conn_id);
-
-/*
- * Remove a DCID previously registered with ossl_qrx_add_dst_conn_id. The DCID
- * 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,
- const QUIC_CONN_ID *dst_conn_id);
-
/*
* Secret Management
* =================
SSL *msg_callback_ssl;
};
-static void qrx_on_rx(QUIC_URXE *urxe, void *arg, const QUIC_CONN_ID *dcid);
-
OSSL_QRX *ossl_qrx_new(const OSSL_QRX_ARGS *args)
{
OSSL_QRX *qrx;
if (qrx == NULL)
return;
- /* Unregister from the RX DEMUX. */
- ossl_quic_demux_unregister_by_cb(qrx->demux, qrx_on_rx, qrx);
-
/* Free RXE queue data. */
qrx_cleanup_rxl(&qrx->rx_free);
qrx_cleanup_rxl(&qrx->rx_pending);
qrx->msg_callback_arg);
}
-static void qrx_on_rx(QUIC_URXE *urxe, void *arg, const QUIC_CONN_ID *dcid)
-{
- OSSL_QRX *qrx = arg;
-
- ossl_qrx_inject_urxe(qrx, urxe);
-}
-
-int ossl_qrx_add_dst_conn_id(OSSL_QRX *qrx,
- const QUIC_CONN_ID *dst_conn_id)
-{
- return ossl_quic_demux_register(qrx->demux,
- dst_conn_id,
- qrx_on_rx,
- qrx);
-}
-
-int ossl_qrx_remove_dst_conn_id(OSSL_QRX *qrx,
- const QUIC_CONN_ID *dst_conn_id)
-{
- return ossl_quic_demux_unregister(qrx->demux, dst_conn_id);
-}
-
static void qrx_requeue_deferred(OSSL_QRX *qrx)
{
QUIC_URXE *e;