MINOR: xprt_qstrm: define callback for ALPN retrieval

Add get_alpn operation support for xprt_qstrm. This simply acts as a
passthrough method to the underlying XPRT layer.

This function is necessary for QMux when running above SSL, as mux-quic
will access ALPN during its initialization in order to instantiate the
proper application protocol layer.
This commit is contained in:
Amaury Denoyelle 2026-03-25 09:03:41 +01:00
parent 4dd224b5ef
commit 91ea5809e9

View File

@ -103,11 +103,19 @@ static void xprt_qstrm_close(struct connection *conn, void *xprt_ctx)
ABORT_NOW();
}
static int xprt_qstrm_get_alpn(const struct connection *conn, void *xprt_ctx,
const char **str, int *len)
{
struct xprt_qstrm_ctx *ctx = xprt_ctx;
return ctx->ops_lower->get_alpn(conn, ctx->ctx_lower, str, len);
}
struct xprt_ops xprt_qstrm = {
.add_xprt = xprt_qstrm_add_xprt,
.init = xprt_qstrm_init,
.start = xprt_qstrm_start,
.close = xprt_qstrm_close,
.get_alpn = xprt_qstrm_get_alpn,
.name = "qstrm",
};