MINOR: quic: move function to check stream type in utils
Move general function to check if a stream is uni or bidirectional from QUIC MUX to quic_utils module. This should prevent unnecessary include of QUIC MUX header file in other sources.
This commit is contained in:
parent
cf45bf1ad8
commit
07d41a043c
@ -82,16 +82,6 @@ static inline int quic_stream_is_remote(struct qcc *qcc, uint64_t id)
|
||||
return !quic_stream_is_local(qcc, id);
|
||||
}
|
||||
|
||||
static inline int quic_stream_is_uni(uint64_t id)
|
||||
{
|
||||
return id & QCS_ID_DIR_BIT;
|
||||
}
|
||||
|
||||
static inline int quic_stream_is_bidi(uint64_t id)
|
||||
{
|
||||
return !quic_stream_is_uni(id);
|
||||
}
|
||||
|
||||
static inline char *qcs_st_to_str(enum qcs_state st)
|
||||
{
|
||||
switch (st) {
|
||||
|
@ -8,6 +8,16 @@
|
||||
#include <haproxy/buf-t.h>
|
||||
#include <haproxy/chunk.h>
|
||||
|
||||
static inline int quic_stream_is_uni(uint64_t id)
|
||||
{
|
||||
return id & QCS_ID_DIR_BIT;
|
||||
}
|
||||
|
||||
static inline int quic_stream_is_bidi(uint64_t id)
|
||||
{
|
||||
return !quic_stream_is_uni(id);
|
||||
}
|
||||
|
||||
static inline void bdata_ctr_init(struct bdata_ctr *ctr)
|
||||
{
|
||||
ctr->tot = 0;
|
||||
|
1
src/h3.c
1
src/h3.c
@ -39,6 +39,7 @@
|
||||
#include <haproxy/quic_enc.h>
|
||||
#include <haproxy/quic_fctl.h>
|
||||
#include <haproxy/quic_frame.h>
|
||||
#include <haproxy/quic_utils.h>
|
||||
#include <haproxy/stats-t.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <haproxy/trace.h>
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include <haproxy/mux_quic.h>
|
||||
#include <haproxy/qmux_http.h>
|
||||
#include <haproxy/qmux_trace.h>
|
||||
#include <haproxy/quic_utils.h>
|
||||
#include <haproxy/trace.h>
|
||||
|
||||
static ssize_t hq_interop_rcv_buf(struct qcs *qcs, struct buffer *b, int fin)
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include <haproxy/quic_trace.h>
|
||||
#include <haproxy/quic_tune.h>
|
||||
#include <haproxy/quic_tx.h>
|
||||
#include <haproxy/quic_utils.h>
|
||||
#include <haproxy/proto_quic.h>
|
||||
#include <haproxy/quic_tls.h>
|
||||
#include <haproxy/ssl_sock.h>
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <haproxy/quic_token.h>
|
||||
#include <haproxy/quic_trace.h>
|
||||
#include <haproxy/quic_tx.h>
|
||||
#include <haproxy/quic_utils.h>
|
||||
#include <haproxy/ssl_sock.h>
|
||||
#include <haproxy/trace.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user