xref: /freebsd/crypto/openssl/doc/designs/quic-design/demuxer.md (revision e7be843b4a162e68651d3911f0357ed464915629)
1*e7be843bSPierre ProncheryPacket Demuxer
2*e7be843bSPierre Pronchery==============
3*e7be843bSPierre Pronchery
4*e7be843bSPierre ProncheryThis is a QUIC specific module that parses headers of incoming packets and
5*e7be843bSPierre Proncherydecides what to do next.
6*e7be843bSPierre Pronchery
7*e7be843bSPierre ProncheryDemuxer requirements for MVP
8*e7be843bSPierre Pronchery----------------------------
9*e7be843bSPierre Pronchery
10*e7be843bSPierre ProncheryThese are the requirements that were identified for MVP:
11*e7be843bSPierre Pronchery
12*e7be843bSPierre Pronchery- multiple QUIC packets in an UDP packet handling as packet coalescing
13*e7be843bSPierre Pronchery  must be supported
14*e7be843bSPierre Pronchery- client must discard any packets that do not match existing connection ID
15*e7be843bSPierre Pronchery- client must discard any packets with version different from the one initially
16*e7be843bSPierre Pronchery  selected
17*e7be843bSPierre Pronchery
18*e7be843bSPierre ProncheryOptional demuxer requirements
19*e7be843bSPierre Pronchery-----------------------------
20*e7be843bSPierre Pronchery
21*e7be843bSPierre ProncheryThese are optional features of the client side demuxer, not required for MVP
22*e7be843bSPierre Proncherybut otherwise desirable:
23*e7be843bSPierre Pronchery
24*e7be843bSPierre Pronchery- optionally trigger sending stateless reset packets if a received packet
25*e7be843bSPierre Pronchery  on the client is well-formed but does not belong to a known connection
26*e7be843bSPierre Pronchery
27*e7be843bSPierre ProncheryDemuxer requirements for server
28*e7be843bSPierre Pronchery-------------------------------
29*e7be843bSPierre Pronchery
30*e7be843bSPierre ProncheryFurther requirements after MVP for server support:
31*e7be843bSPierre Pronchery
32*e7be843bSPierre Pronchery- on the server side packets can create a new connection potentially
33*e7be843bSPierre Pronchery- server side packet handling for unsupported version packets:
34*e7be843bSPierre Pronchery  - trigger sending version negotiation packets if the server receives a packet
35*e7be843bSPierre Pronchery    with an unsupported version and is large enough to initiate a new
36*e7be843bSPierre Pronchery    connection; limit the number of such packets with the same destination
37*e7be843bSPierre Pronchery  - discard smaller packets with unsupported versions
38*e7be843bSPierre Pronchery- packet handling on server for well-formed packets with supported versions
39*e7be843bSPierre Pronchery  but with unknown connection IDs:
40*e7be843bSPierre Pronchery  - if the packet is a well-formed Initial packet, trigger the creation of a
41*e7be843bSPierre Pronchery    new connection
42*e7be843bSPierre Pronchery  - if the packet is a well-formed 0RTT packet, mark the packet to be
43*e7be843bSPierre Pronchery    buffered for short period of time (as Initial packet might arrive late)
44*e7be843bSPierre Pronchery    - this is optional - enabled only if 0RTT support is enabled by the
45*e7be843bSPierre Pronchery      application
46*e7be843bSPierre Pronchery  - discard any other packet with unknown connection IDs
47*e7be843bSPierre Pronchery    - optionally trigger sending stateless reset packets as above for client
48