From 1e08247961e482b68ecbfd384d3f74792047cfbe Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 26 Mar 2026 14:57:19 +0100 Subject: [PATCH] MINOR: connection: add function to identify a QUIC connection Add a simple helper conn_is_quic() function which tells if a connection runs over QUIC protocol. It will be useful when implementing QMux alternative. --- include/haproxy/connection.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/haproxy/connection.h b/include/haproxy/connection.h index 03c3306ae..c6e112733 100644 --- a/include/haproxy/connection.h +++ b/include/haproxy/connection.h @@ -691,6 +691,12 @@ static inline int conn_is_ssl(struct connection *conn) return !!conn_get_ssl_sock_ctx(conn); } +/* Returns true if connection runs over QUIC. */ +static inline int conn_is_quic(const struct connection *conn) +{ + return conn->flags & CO_FL_FDLESS; +} + /* Returns true if connection must be reversed. */ static inline int conn_is_reverse(const struct connection *conn) {