From 9990c9353bb9da6ddac555c474cc7de681787934 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 19 Feb 2025 14:53:38 +0100 Subject: [PATCH] MINOR: quic: export TPs related functions --- include/haproxy/quic_tp.h | 7 +++++++ src/quic_tp.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/haproxy/quic_tp.h b/include/haproxy/quic_tp.h index d3bdd18c9..08de046ea 100644 --- a/include/haproxy/quic_tp.h +++ b/include/haproxy/quic_tp.h @@ -120,5 +120,12 @@ static inline void quic_transport_params_dump(struct buffer *b, quic_tp_version_info_dump(b, &p->version_information, local); } +int quic_transport_param_enc_int(unsigned char **buf, + const unsigned char *end, + uint64_t type, uint64_t val); +int quic_transport_params_decode(struct quic_transport_params *p, int server, + const unsigned char *buf, + const unsigned char *end); + #endif /* USE_QUIC */ #endif /* _HAPROXY_QUIC_TP_H */ diff --git a/src/quic_tp.c b/src/quic_tp.c index 03d5b12c3..19f1ad610 100644 --- a/src/quic_tp.c +++ b/src/quic_tp.c @@ -394,9 +394,9 @@ static int quic_transport_param_enc_mem(unsigned char **buf, const unsigned char /* Encode 64-bits value as variable length integer into . * Returns 1 if succeeded, 0 if not. */ -static int quic_transport_param_enc_int(unsigned char **buf, - const unsigned char *end, - uint64_t type, uint64_t val) +int quic_transport_param_enc_int(unsigned char **buf, + const unsigned char *end, + uint64_t type, uint64_t val) { size_t len; @@ -598,9 +598,9 @@ int quic_transport_params_encode(unsigned char *buf, * or 0 for a client (connection to a haproxy server). * Returns 1 if succeeded, 0 if not. */ -static int quic_transport_params_decode(struct quic_transport_params *p, int server, - const unsigned char *buf, - const unsigned char *end) +int quic_transport_params_decode(struct quic_transport_params *p, int server, + const unsigned char *buf, + const unsigned char *end) { const unsigned char *pos; uint64_t type, len = 0;