From: Frédéric Lécaille Date: Wed, 26 Jan 2022 14:47:33 +0000 (+0100) Subject: MINOR: quic: Add new defintion about DCIDs offsets X-Git-Tag: v2.6-dev1~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce521e4f15c5b2366b4979346636a62c01e41d82;p=thirdparty%2Fhaproxy.git MINOR: quic: Add new defintion about DCIDs offsets Define the offsets of the DCIDs from the beginning of a QUIC packets. Note that they must always be present. As QUIC servers, QUIC haproxy listeners always use a CID, source CID on the haproxy side, which is a destination ID on the peer side. --- diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h index 2ae067f116..0ed818a9a3 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -67,11 +67,16 @@ typedef unsigned long long ull; * flags(1), version(4), DCID length(1), DCID(0..20), SCID length(1), SCID(0..20) */ #define QUIC_LONG_PACKET_MINLEN 7 +/* DCID offset from beginning of a long packet */ +#define QUIC_LONG_PACKET_DCID_OFF (1 + sizeof(uint32_t)) /* * All QUIC packets with short headers are made of at least (in bytes): * flags(1), DCID(0..20) */ #define QUIC_SHORT_PACKET_MINLEN 1 +/* DCID offset from beginning of a short packet */ +#define QUIC_SHORT_PACKET_DCID_OFF 1 + /* Byte 0 of QUIC packets. */ #define QUIC_PACKET_LONG_HEADER_BIT 0x80 /* Long header format if set, short if not. */ #define QUIC_PACKET_FIXED_BIT 0x40 /* Must always be set for all the headers. */