mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-04 01:01:00 +01:00
A major reorganization of QUIC settings is going to be performed. One of its objective is to clearly define options which can be separately configured on frontend and backend proxy sides. To implement this, quic_tune structure is extended to support fe and be options. A set of macros/functions is also defined : it allows to retrieve an option defined on both sides with unified code, based on proxy side of a quic_conn/connection instance.
39 lines
967 B
C
39 lines
967 B
C
#ifndef _HAPROXY_QUIC_TUNE_H
|
|
#define _HAPROXY_QUIC_TUNE_H
|
|
|
|
#ifdef USE_QUIC
|
|
#ifndef USE_OPENSSL
|
|
#error "Must define USE_OPENSSL"
|
|
#endif
|
|
|
|
#include <haproxy/quic_tune-t.h>
|
|
|
|
#include <haproxy/api.h>
|
|
#include <haproxy/connection.h>
|
|
#include <haproxy/obj_type.h>
|
|
#include <haproxy/quic_conn-t.h>
|
|
|
|
extern struct quic_tune quic_tune;
|
|
|
|
#define QUIC_TUNE_FB_GET(opt, qc) \
|
|
(!((qc)->flags & QUIC_FL_CONN_IS_BACK) ? quic_tune.fe. opt : quic_tune.be. opt)
|
|
|
|
static inline int quic_tune_test(int opt, const struct quic_conn *qc)
|
|
{
|
|
return !(qc->flags & QUIC_FL_CONN_IS_BACK) ?
|
|
quic_tune.fe.fb_opts & opt : quic_tune.be.fb_opts & opt;
|
|
}
|
|
|
|
#define QUIC_TUNE_FB_CONN_GET(opt, conn) \
|
|
(!(conn_is_back(conn)) ? quic_tune.fe. opt : quic_tune.be. opt)
|
|
|
|
static inline int quic_tune_conn_test(int opt, const struct connection *conn)
|
|
{
|
|
return !(conn_is_back(conn)) ?
|
|
quic_tune.fe.fb_opts & opt : quic_tune.be.fb_opts & opt;
|
|
}
|
|
|
|
#endif /* USE_QUIC */
|
|
|
|
#endif /* _HAPROXY_QUIC_TUNE_H */
|