From: Frédéric Lécaille Date: Mon, 27 Nov 2023 08:07:12 +0000 (+0100) Subject: REORG: quic: QUIC connection types header cleaning X-Git-Tag: v2.9-dev12~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f949f7df8319ee76c1a9726af42562c341d8b749;p=thirdparty%2Fhaproxy.git REORG: quic: QUIC connection types header cleaning Move UDP datagram definitions from quic_conn-t.h to quic_sock-t.h Move debug quic_rx_crypto_frm struct from quic_conn-t.h to quic_trace-t.h --- diff --git a/include/haproxy/quic_conn-t.h b/include/haproxy/quic_conn-t.h index edf2e304ec..fb129f8b2b 100644 --- a/include/haproxy/quic_conn-t.h +++ b/include/haproxy/quic_conn-t.h @@ -231,38 +231,9 @@ extern const struct quic_version *preferred_version; /* The maximum number of dgrams which may be sent upon PTO expirations. */ #define QUIC_MAX_NB_PTO_DGRAMS 2 -/* QUIC datagram */ -struct quic_dgram { - void *owner; - unsigned char *buf; - size_t len; - unsigned char *dcid; - size_t dcid_len; - struct sockaddr_storage saddr; - struct sockaddr_storage daddr; - struct quic_conn *qc; - - struct list recv_list; /* elemt to quic_receiver_buf . */ - struct mt_list handler_list; /* elem to quic_dghdlr . */ -}; - /* The QUIC packet numbers are 62-bits integers */ #define QUIC_MAX_PACKET_NUM ((1ULL << 62) - 1) -/* QUIC datagram handler */ -struct quic_dghdlr { - struct mt_list dgrams; - struct tasklet *task; -}; - -/* Structure to store enough information about the RX CRYPTO frames. */ -struct quic_rx_crypto_frm { - struct eb64_node offset_node; - uint64_t len; - const unsigned char *data; - struct quic_rx_packet *pkt; -}; - #define QUIC_CRYPTO_BUF_SHIFT 10 #define QUIC_CRYPTO_BUF_MASK ((1UL << QUIC_CRYPTO_BUF_SHIFT) - 1) /* The maximum allowed size of CRYPTO data buffer provided by the TLS stack. */ diff --git a/include/haproxy/quic_sock-t.h b/include/haproxy/quic_sock-t.h index 364fdd1bf5..e2992c834a 100644 --- a/include/haproxy/quic_sock-t.h +++ b/include/haproxy/quic_sock-t.h @@ -23,5 +23,26 @@ struct quic_receiver_buf { struct mt_list rxbuf_el; /* list element into receiver.rxbuf_list. */ }; +/* QUIC datagram */ +struct quic_dgram { + void *owner; + unsigned char *buf; + size_t len; + unsigned char *dcid; + size_t dcid_len; + struct sockaddr_storage saddr; + struct sockaddr_storage daddr; + struct quic_conn *qc; + + struct list recv_list; /* elemt to quic_receiver_buf . */ + struct mt_list handler_list; /* elem to quic_dghdlr . */ +}; + +/* QUIC datagram handler */ +struct quic_dghdlr { + struct mt_list dgrams; + struct tasklet *task; +}; + #endif /* USE_QUIC */ #endif /* _HAPROXY_QUIC_SOCK_T_H */ diff --git a/include/haproxy/quic_trace-t.h b/include/haproxy/quic_trace-t.h index 8577a87acc..7ebc8a7f3d 100644 --- a/include/haproxy/quic_trace-t.h +++ b/include/haproxy/quic_trace-t.h @@ -38,6 +38,14 @@ struct enc_debug_info { uint64_t pn; }; +/* Structure to store enough information about the RX CRYPTO frames. */ +struct quic_rx_crypto_frm { + struct eb64_node offset_node; + uint64_t len; + const unsigned char *data; + struct quic_rx_packet *pkt; +}; + #define QUIC_EV_CONN_NEW (1ULL << 0) #define QUIC_EV_CONN_INIT (1ULL << 1) #define QUIC_EV_CONN_ISEC (1ULL << 2)