Define a new enum h3s_t. This is used to differentiate between the
different stream types used in a HTTP/3 connection, including the QPACK
encoder/decoder streams.
For the moment, only bidirectional streams is positioned. This patch
will be useful to unify reception of uni streams with bidirectional
ones.
H3_FT_MAX_PUSH_ID = 0x07,
};
+/* Stream types */
+enum h3s_t {
+ /* unidirectional streams */
+ H3S_T_CTRL,
+ H3S_T_PUSH,
+ H3S_T_QPACK_DEC,
+ H3S_T_QPACK_ENC,
+
+ /* bidirectional streams */
+ H3S_T_REQ,
+
+ H3S_T_UNKNOWN
+};
+
/* H3 unidirectional QUIC stream */
struct h3_uqs {
/* Underlying incoming QUIC uni-stream */
DECLARE_STATIC_POOL(pool_head_h3c, "h3c", sizeof(struct h3c));
struct h3s {
+ enum h3s_t type;
int demux_frame_len;
int demux_frame_type;
};
h3s->demux_frame_len = 0;
h3s->demux_frame_type = 0;
+ if (quic_stream_is_bidi(qcs->id)) {
+ h3s->type = H3S_T_REQ;
+ }
+ else {
+ /* stream type must be decoded for unidirectional streams */
+ h3s->type = H3S_T_UNKNOWN;
+ }
+
return 0;
}
goto err;
}
+ qcs->id = qcs->by_id.key = id;
if (qcc->app_ops->attach) {
if (qcc->app_ops->attach(qcs))
goto err;
}
- qcs->id = qcs->by_id.key = id;
/* store transport layer stream descriptor in qcc tree */
eb64_insert(&qcc->streams_by_id, &qcs->by_id);