mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 06:41:32 +02:00
CLEANUP: h3: rename uni stream type constants
Cosmetic fix which reduce the name of unidirectional stream constants. No impact on the code.
This commit is contained in:
parent
8d1ecac5d9
commit
081479df92
@ -27,13 +27,15 @@
|
||||
#include <haproxy/buf-t.h>
|
||||
#include <haproxy/mux_quic-t.h>
|
||||
|
||||
/* H3 unidirectional stream types (does not exist for bidirectional streams) */
|
||||
#define H3_UNI_STRM_TP_CONTROL_STREAM 0x00
|
||||
#define H3_UNI_STRM_TP_PUSH_STREAM 0x01
|
||||
#define H3_UNI_STRM_TP_QPACK_ENCODER 0x02
|
||||
#define H3_UNI_STRM_TP_QPACK_DECODER 0x03
|
||||
/* H3 unidirecational stream types
|
||||
* Emitted as the first byte on the stream to differentiate it.
|
||||
*/
|
||||
#define H3_UNI_S_T_CTRL 0x00
|
||||
#define H3_UNI_S_T_PUSH 0x01
|
||||
#define H3_UNI_S_T_QPACK_ENC 0x02
|
||||
#define H3_UNI_S_T_QPACK_DEC 0x03
|
||||
/* Must be the last one */
|
||||
#define H3_UNI_STRM_TP_MAX H3_UNI_STRM_TP_QPACK_DECODER
|
||||
#define H3_UNI_S_T_MAX H3_UNI_S_T_QPACK_DEC
|
||||
|
||||
/* Settings */
|
||||
#define H3_SETTINGS_QPACK_MAX_TABLE_CAPACITY 0x01
|
||||
|
12
src/h3.c
12
src/h3.c
@ -480,7 +480,7 @@ static int h3_control_send(struct h3_uqs *h3_uqs, void *ctx)
|
||||
quic_int_getsize(h3_settings_max_field_section_size);
|
||||
}
|
||||
|
||||
b_quic_enc_int(&pos, H3_UNI_STRM_TP_CONTROL_STREAM);
|
||||
b_quic_enc_int(&pos, H3_UNI_S_T_CTRL);
|
||||
/* Build a SETTINGS frame */
|
||||
b_quic_enc_int(&pos, H3_FT_SETTINGS);
|
||||
b_quic_enc_int(&pos, frm_len);
|
||||
@ -790,7 +790,7 @@ static int h3_attach_ruqs(struct qcs *qcs, void *ctx)
|
||||
b = h3_b_dup(rxbuf);
|
||||
|
||||
/* First octets: the uni-stream type */
|
||||
if (!b_quic_dec_int(&strm_type, &b, &len) || strm_type > H3_UNI_STRM_TP_MAX)
|
||||
if (!b_quic_dec_int(&strm_type, &b, &len) || strm_type > H3_UNI_S_T_MAX)
|
||||
return 0;
|
||||
|
||||
qcs_consume(qcs, len);
|
||||
@ -799,7 +799,7 @@ static int h3_attach_ruqs(struct qcs *qcs, void *ctx)
|
||||
* same type of uni-stream (even for Push stream which is not supported at this time.
|
||||
*/
|
||||
switch (strm_type) {
|
||||
case H3_UNI_STRM_TP_CONTROL_STREAM:
|
||||
case H3_UNI_S_T_CTRL:
|
||||
if (h3c->rctrl.qcs) {
|
||||
h3c->err = H3_STREAM_CREATION_ERROR;
|
||||
return 0;
|
||||
@ -809,10 +809,10 @@ static int h3_attach_ruqs(struct qcs *qcs, void *ctx)
|
||||
h3c->rctrl.cb = h3_control_recv;
|
||||
qcs_subscribe(qcs, SUB_RETRY_RECV, &h3c->rctrl.wait_event);
|
||||
break;
|
||||
case H3_UNI_STRM_TP_PUSH_STREAM:
|
||||
case H3_UNI_S_T_PUSH:
|
||||
/* NOT SUPPORTED */
|
||||
break;
|
||||
case H3_UNI_STRM_TP_QPACK_ENCODER:
|
||||
case H3_UNI_S_T_QPACK_ENC:
|
||||
if (h3c->rqpack_enc.qcs) {
|
||||
h3c->err = H3_STREAM_CREATION_ERROR;
|
||||
return 0;
|
||||
@ -822,7 +822,7 @@ static int h3_attach_ruqs(struct qcs *qcs, void *ctx)
|
||||
h3c->rqpack_enc.cb = qpack_decode_enc;
|
||||
qcs_subscribe(qcs, SUB_RETRY_RECV, &h3c->rqpack_enc.wait_event);
|
||||
break;
|
||||
case H3_UNI_STRM_TP_QPACK_DECODER:
|
||||
case H3_UNI_S_T_QPACK_DEC:
|
||||
if (h3c->rqpack_dec.qcs) {
|
||||
h3c->err = H3_STREAM_CREATION_ERROR;
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user