The QUIC mux will need to pass some stream controls to the application
layer, which holds information that the mux doesn't know about (e.g. the
HTTP hardening results of the H3 stream). This adds a new sctl() callback
to qcc_app_ops, which takes the qcs, the mux_sctl_type and an output
pointer, and works like mux->sctl(), returning -1 when not supported.
For now, h3_sctl() doesn't implement anything and the mux doesn't call it
yet.
/* Free function to close a stream after MUX layer shutdown. */
int (*strm_reject)(struct list *out, uint64_t id);
+
+ /* Application-specific stream controls, called by the mux for the
+ * mux_sctl_type values it doesn't handle itself. Works like
+ * mux->sctl(): returns -1 if not supported.
+ */
+ int (*sctl)(struct qcs *qcs, enum mux_sctl_type mux_sctl, void *output);
};
#endif /* USE_QUIC */
h3_inc_err_cnt(h3c->prx_counters, err_code);
}
+/* Application-specific stream controls for <qcs>, called by the QUIC mux for
+ * the mux_sctl_type values it does not handle itself. <output> depends on the
+ * request. Returns -1 when not supported.
+ */
+static int h3_sctl(struct qcs *qcs, enum mux_sctl_type mux_sctl, void *output)
+{
+ switch (mux_sctl) {
+ default:
+ return -1;
+ }
+}
+
static void h3_report_susp(void *ctx)
{
struct h3c *h3c = ctx;
.report_susp = h3_report_susp,
.release = h3_release,
.strm_reject = h3_reject,
+ .sctl = h3_sctl,
};