QUIC packets come in two flavours:
- Long header (§17.2) — used during the handshake (Initial,
0-RTT, Handshake, Retry). Carries the QUIC version and both
Destination + Source Connection IDs explicitly.
- Short header (§17.3) — used after the handshake (1-RTT).
Carries only the Destination Connection ID; the receiver
already knows the SCID by virtue of the prior handshake.
This module parses the public (unprotected) parts of these
headers: the first byte's flag bits, the version, and the
connection IDs. The packet number and the length-prefixed
payload live inside header-protection-protected bytes that
require key material to access; that decryption layer is the
job of a later cycle's TLS adapter.
Connection IDs are 0..20 octet identifiers (§5.1.1). The long
header explicitly carries a length byte for each CID; the short
header relies on the receiver knowing the DCID length out of
band (typically pinned at handshake time).
References:
- RFC 9000 §17 "Packet Formats".
- RFC 9000 §5.1 "Connection IDs".
- aioquic
packet.PullQuicHeader / packet.encode_quic_header.