wire / wire-format / quic-packet

QUIC long/short header

QUIC packets use a variable-length header. Long headers (initial/handshake/0-RTT/retry) carry version and connection IDs; short headers (1-RTT) carry only the destination connection ID and packet number.

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: QUIC long/short header

wire format

spec: RFC 9000

QUIC packets use a variable-length header. Long headers (initial/handshake/0-RTT/retry) carry version and connection IDs; short headers (1-RTT) carry only the destination connection ID and packet number.

fieldsizemeaning
Header Form1 bit1 = long header, 0 = short header.
Fixed Bit1 bitAlways 1 (distinguishes QUIC from other protocols sharing the port).
Long: Type2 bits00 initial, 01 0-RTT, 10 handshake, 11 retry.
Version4 bytesQUIC version (0x00000001 for v1); 0x00000000 for version negotiation.
DCID/SCID Length + IDsvariableConnection IDs (0-20 bytes each) with length prefixes (long header only).
Packet Number1-4 bytesEncrypted/protected packet number; length signalled in flags (short) or derived (long).

example:

c0 00 00 00 01 08 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00

Long header, initial, version 1, empty DCID/SCID, token length 0


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/quic-packet or /wire-format/quic-packet.json