mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
QUIC QRX: Remove legacy DEMUX-QRX routing code
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22674)
This commit is contained in:
parent
56f9828382
commit
ef95d8ddca
@ -28,7 +28,7 @@ typedef struct ossl_qrx_args_st {
|
||||
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. */
|
||||
@ -66,40 +66,6 @@ void ossl_qrx_set_msg_callback(OSSL_QRX *qrx, ossl_msg_cb msg_callback,
|
||||
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
|
||||
* =================
|
||||
|
@ -167,8 +167,6 @@ struct ossl_qrx_st {
|
||||
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;
|
||||
@ -222,9 +220,6 @@ void ossl_qrx_free(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);
|
||||
@ -252,28 +247,6 @@ void ossl_qrx_inject_urxe(OSSL_QRX *qrx, QUIC_URXE *urxe)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user