]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: add function to identify a QUIC connection
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 26 Mar 2026 13:57:19 +0000 (14:57 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 Apr 2026 12:02:04 +0000 (14:02 +0200)
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

index 03c3306ae37138eee85afa455defef3df3767dfb..c6e11273388b28a7acc14e663de1db5ed2da4b3e 100644 (file)
@@ -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)
 {