CLEANUP: quic: fix headers
Clean up quic sources by adjusting headers list included depending on the actual dependency of each source file. On some occasion, xprt_quic.h was removed from included list. This is useful to help reducing the dependency on this single file and cleaning up QUIC haproxy architecture. This should be backported up to 2.6.
This commit is contained in:
parent
f3c40f83fb
commit
5c25dc5bfd
@ -29,12 +29,12 @@
|
||||
|
||||
#include <haproxy/api-t.h>
|
||||
#include <haproxy/obj_type-t.h>
|
||||
#include <haproxy/quic_cc-t.h>
|
||||
#include <haproxy/quic_tp-t.h>
|
||||
#include <haproxy/receiver-t.h>
|
||||
#include <haproxy/stats-t.h>
|
||||
#include <haproxy/thread.h>
|
||||
|
||||
#include <haproxy/xprt_quic-t.h>
|
||||
|
||||
/* Some pointer types reference below */
|
||||
struct task;
|
||||
struct protocol;
|
||||
|
@ -6,13 +6,11 @@
|
||||
#error "Must define USE_OPENSSL"
|
||||
#endif
|
||||
|
||||
#include <import/eb64tree.h>
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/connection.h>
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/mux_quic-t.h>
|
||||
#include <haproxy/stream.h>
|
||||
#include <haproxy/xprt_quic-t.h>
|
||||
|
||||
struct qcs *qcc_init_stream_local(struct qcc *qcc, int bidi);
|
||||
struct buffer *qc_get_buf(struct qcs *qcs, struct buffer *bptr);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#endif
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/chunk.h>
|
||||
#include <haproxy/quic_cc-t.h>
|
||||
#include <haproxy/xprt_quic-t.h>
|
||||
|
@ -20,9 +20,11 @@
|
||||
#define TRACE_SOURCE &trace_quic
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#include <haproxy/dynbuf.h>
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/quic_tls-t.h>
|
||||
#include <haproxy/trace.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
@ -35,11 +35,11 @@
|
||||
#include <haproxy/listener-t.h>
|
||||
#include <haproxy/obj_type-t.h>
|
||||
#include <haproxy/queue-t.h>
|
||||
#include <haproxy/quic_tp-t.h>
|
||||
#include <haproxy/resolvers-t.h>
|
||||
#include <haproxy/stats-t.h>
|
||||
#include <haproxy/task-t.h>
|
||||
#include <haproxy/thread-t.h>
|
||||
#include <haproxy/xprt_quic-t.h>
|
||||
|
||||
|
||||
/* server states. Only SRV_ST_STOPPED indicates a down server. */
|
||||
|
@ -89,7 +89,6 @@
|
||||
#include <haproxy/thread.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <haproxy/uri_auth-t.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
||||
|
||||
/* Used to chain configuration sections definitions. This list
|
||||
|
7
src/h3.c
7
src/h3.c
@ -16,12 +16,17 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <import/ist.h>
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/chunk.h>
|
||||
#include <haproxy/connection.h>
|
||||
#include <haproxy/dynbuf.h>
|
||||
#include <haproxy/h3.h>
|
||||
#include <haproxy/h3_stats.h>
|
||||
#include <haproxy/http.h>
|
||||
#include <haproxy/http-hdr-t.h>
|
||||
#include <haproxy/http_htx.h>
|
||||
#include <haproxy/htx.h>
|
||||
#include <haproxy/intops.h>
|
||||
@ -31,6 +36,7 @@
|
||||
#include <haproxy/qpack-dec.h>
|
||||
#include <haproxy/qpack-enc.h>
|
||||
#include <haproxy/quic_enc.h>
|
||||
#include <haproxy/stats-t.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <haproxy/trace.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
@ -1175,6 +1181,7 @@ static int h3_init(struct qcc *qcc)
|
||||
h3c->id_goaway = 0;
|
||||
|
||||
qcc->ctx = h3c;
|
||||
/* TODO cleanup only ref to quic_conn */
|
||||
h3c->prx_counters =
|
||||
EXTRA_COUNTERS_GET(qc->li->bind_conf->frontend->extra_counters_fe,
|
||||
&h3_stats_module);
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <import/ebtree-t.h>
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/arg.h>
|
||||
#include <haproxy/cbuf.h>
|
||||
@ -40,9 +42,10 @@
|
||||
#include <haproxy/proto_quic.h>
|
||||
#include <haproxy/proto_udp.h>
|
||||
#include <haproxy/proxy-t.h>
|
||||
#include <haproxy/sock.h>
|
||||
#include <haproxy/quic_sock.h>
|
||||
#include <haproxy/sock.h>
|
||||
#include <haproxy/sock_inet.h>
|
||||
#include <haproxy/task.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <haproxy/connection.h>
|
||||
#include <haproxy/chunk.h>
|
||||
#include <haproxy/mux_quic.h>
|
||||
#include <haproxy/quic_frame-t.h>
|
||||
|
||||
/* trace source and events */
|
||||
static void qmux_trace(enum trace_level level, uint64_t mask,
|
||||
|
@ -20,10 +20,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/quic_cc-t.h>
|
||||
#include <haproxy/xprt_quic-t.h>
|
||||
|
||||
#include <haproxy/quic_cc.h>
|
||||
|
||||
struct quic_cc_algo *default_quic_cc_algo = &quic_cc_algo_cubic;
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <haproxy/api-t.h>
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/chunk.h>
|
||||
#include <haproxy/quic_cc.h>
|
||||
#include <haproxy/trace.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
@ -7,8 +7,12 @@
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <import/eb64tree.h>
|
||||
#include <haproxy/quic_enc.h>
|
||||
#include <haproxy/quic_frame.h>
|
||||
#include <haproxy/quic_tp-t.h>
|
||||
#include <haproxy/trace.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <haproxy/xprt_quic-t.h>
|
||||
|
||||
#include <haproxy/atomic.h>
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/ticks.h>
|
||||
#include <haproxy/trace.h>
|
||||
|
||||
|
@ -11,15 +11,28 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/connection.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <haproxy/freq_ctr.h>
|
||||
#include <haproxy/global-t.h>
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/listener.h>
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/proto_quic.h>
|
||||
#include <haproxy/proxy-t.h>
|
||||
#include <haproxy/quic_sock.h>
|
||||
#include <haproxy/quic_tp-t.h>
|
||||
#include <haproxy/session.h>
|
||||
#include <haproxy/stats-t.h>
|
||||
#include <haproxy/task.h>
|
||||
#include <haproxy/tools.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <haproxy/quic_frame-t.h>
|
||||
#include <haproxy/quic_stats-t.h>
|
||||
#include <haproxy/stats.h>
|
||||
|
||||
|
@ -4,9 +4,11 @@
|
||||
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/dynbuf.h>
|
||||
#include <haproxy/list.h>
|
||||
#include <haproxy/mux_quic-t.h>
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/task.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
||||
DECLARE_STATIC_POOL(pool_head_quic_stream_desc, "qc_stream_desc",
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/kdf.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
#include <haproxy/buf.h>
|
||||
#include <haproxy/chunk.h>
|
||||
#include <haproxy/pool.h>
|
||||
#include <haproxy/xprt_quic.h>
|
||||
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <haproxy/global.h>
|
||||
#include <haproxy/ncbuf-t.h>
|
||||
#include <haproxy/net_helper.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user