haproxy/include/haproxy/quic_fctl-t.h
Amaury Denoyelle 25493ca036 MINOR: mux-quic: define a flow control related type
Create a new module dedicated to flow control handling. It will be used
to implement earlier flow control update on snd_buf stream callback.

For the moment, only Tx part is implemented (i.e. limit set by the peer
that haproxy must respect for sending). A type quic_fctl is defined to
count emitted data bytes. Two offsets are used : a real one and a soft
one. The difference is that soft offset can be incremented beyond limit
unless it is already in excess.

Soft offset will be used for HTX to H3 parsing. As size of generated H3
is unknown before parsing, it allows to surpass the limit one time. Real
offset will be used during STREAM frame generation : this time the limit
must not be exceeded to prevent protocol violation.
2024-01-31 16:28:54 +01:00

16 lines
378 B
C

#ifndef _HAPROXY_QUIC_FCTL_T_H
#define _HAPROXY_QUIC_FCTL_T_H
#include <stdint.h>
struct quic_fctl {
/* Offset set by peer which must not be exceeded on send. */
uint64_t limit;
/* Offset which must never exceed limit. */
uint64_t off_real;
/* Offset which can go beyond limit one time before being blocked. */
uint64_t off_soft;
};
#endif /* _HAPROXY_QUIC_FCTL_T_H */