wire / wire-format / quic-packet
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.
aka: QUIC long/short header
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.
| field | size | meaning |
|---|---|---|
| Header Form | 1 bit | 1 = long header, 0 = short header. |
| Fixed Bit | 1 bit | Always 1 (distinguishes QUIC from other protocols sharing the port). |
| Long: Type | 2 bits | 00 initial, 01 0-RTT, 10 handshake, 11 retry. |
| Version | 4 bytes | QUIC version (0x00000001 for v1); 0x00000000 for version negotiation. |
| DCID/SCID Length + IDs | variable | Connection IDs (0-20 bytes each) with length prefixes (long header only). |
| Packet Number | 1-4 bytes | Encrypted/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
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/quic-packet
or /wire-format/quic-packet.json