Skip to content

Commit 2dc5db8

Browse files
split up PacketHeader.flags (#478)
1 parent fa28fd1 commit 2dc5db8

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

draft-ietf-quic-qlog-quic-events.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,36 +1837,56 @@ $PacketNumberSpace /= "initial" /
18371837

18381838
## PacketHeader
18391839

1840-
If the packet_type numerical value does not map to a known packet_type string,
1841-
the packet_type value of "unknown" can be used and the raw value captured in the
1842-
packet_type_bytes field; a numerical value without variable-length integer
1843-
encoding.
1840+
If the `packet_type` numerical value does not map to a known `$PacketType`
1841+
string, the `packet_type` value of "unknown" can be used and the raw value
1842+
captured in the `packet_type_bytes` field; a numerical value without
1843+
variable-length integer encoding.
1844+
1845+
The fixed and reserved bits are omitted here because they must be 0; see
1846+
{{QUIC-TRANSPORT}}. If these bits have an invalid value, the raw values can be
1847+
captured in the `raw.data` field of the event logging the PacketHeader.
1848+
1849+
QUIC extensions that do utilize these bits are expected to create new events
1850+
(analogous to `spin_bit_updated`) or use qlog extension mechanisms to reflect
1851+
that usage.
18441852

18451853
For long header packets of type initial, handshake, and 0RTT, the length field
18461854
of the packet header is logged in the qlog `raw.length` field, and the value
18471855
signifies the length of the packet number plus the payload.
18481856

18491857
~~~ cddl
18501858
PacketHeader = {
1851-
? quic_bit: bool .default true
18521859
packet_type: $PacketType
18531860

18541861
; only if packet_type === "unknown"
18551862
? packet_type_bytes: uint64
18561863

1864+
; only if packet_type === "1RTT"
1865+
? spin_bit: bool
1866+
1867+
; only if packet_type === "1RTT", and if the key phase was
1868+
; determined from the key_phase_bit
1869+
? key_phase: uint64
1870+
1871+
; only if packet_type === "1RTT", and if key_phase is not set
1872+
? key_phase_bit: bool
1873+
18571874
; only if packet_type === "initial" || "handshake" || "0RTT" ||
18581875
; "1RTT"
1859-
? packet_number: uint64
1876+
? packet_number_length: uint8
18601877

1861-
; the bit flags of the packet headers (spin bit, key update bit,
1862-
; etc. up to and including the packet number length bits
1863-
; if present
1864-
? flags: uint8
1878+
; only if packet_type === "initial" || "handshake" || "0RTT" ||
1879+
; "1RTT"
1880+
? packet_number: uint64
18651881

18661882
; only if packet_type === "initial" || "retry"
18671883
? token: Token
18681884

1869-
; only if present in the header
1885+
; only if packet_type === "initial" || "handshake" || "0RTT"
1886+
; Signifies length of the packet_number plus the payload
1887+
? length: uint16
1888+
1889+
; only if present in the header.
18701890
; if correctly using transport:connection_id_updated events,
18711891
; dcid can be skipped for 1RTT packets
18721892
? version: QuicVersion

0 commit comments

Comments
 (0)