Module capture
quic and std only.Expand description
Reading a first flight back from the wire: what any observer sees, and what one that can open the Initial packets sees.
The pipeline here needs no cryptography of its own: it splits datagrams, and — given a
KeyProvider — removes Initial protection, reassembles the ClientHello and reads the
transport parameters. Initial keys derive from the destination connection ID and version salt
(RFC 9001 §5.2), so both a passive observer and the destination server can supply them; the
keys themselves come from the engine’s TLS backend behind that seam.
Most callers hand a client’s first datagrams (the ones sent before it hears from the server)
and a KeyProvider to first_flight, which runs the whole pipeline and returns a
FirstFlight summary to fingerprint or turn into a crate::profile::QuicProfile. The
steps are also public for finer control: observe splits one datagram with no keys;
ObservedDatagram::unprotect_initials opens that datagram’s Initial packets into
InitialPackets; client_hello takes those InitialPackets from across the whole flight
and reassembles the ClientHello from their CRYPTO frames; transport_parameters reads it,
and version_information pulls the negotiated/available versions out of those. So the
packets client_hello wants are simply the InitialPackets unprotect_initials returned.
Structs§
- First
Flight - What a client’s first flight looks like, as the profile tests compare it.
- Initial
Keys - The Initial keys that open one direction of a captured flight.
- Initial
Packet - An Initial packet after its protection is removed.
- Observed
Datagram - A datagram split into its packets.
- Observed
Packet - One packet of a datagram as an observer without keys sees it.
- RawParameter
- A transport parameter as it was sent: identifier and raw value, in wire order.
Enums§
- Capture
Error - Why a datagram or packet could not be read.
- Observed
Frame - A frame as an observer with Initial keys sees it; consecutive PADDING bytes are one run.
- Packet
Kind - What kind of packet a header announces (RFC 8999 §5, RFC 9000 §17).
Traits§
- KeyProvider
- Supplies the Initial keys needed to open a captured first flight.
Functions§
- client_
hello - The ClientHello reassembled from Initial packets, when the CRYPTO data covers it from offset zero through its length.
- first_
flight - Read a client’s first flight: the datagrams it sent before hearing from the server.
- observe
- Split a datagram into packets using only the invariant layout (RFC 8999 §5) and each version’s type bits and Length fields. A short header takes the rest of the datagram; bytes after a packet that cannot start another one are reported as trailing.
- transport_
parameters - The transport parameters of a ClientHello handshake message, in the order they were sent.
- version_
information - The
version_informationparameter amongparameters, decoded as a client’s.