Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic_transport.h @ 8211:fe53def49945 quic
QUIC: refactored long header parsing.
The largely duplicate type-specific functions ngx_quic_parse_initial_header(),
ngx_quic_parse_handshake_header(), and a missing one for 0-RTT, were merged.
The new order of functions listed in ngx_event_quic_transport.c reflects this.
|_ ngx_quic_parse_long_header - version-invariant long header fields
\_ ngx_quic_supported_version - a helper to decide we can go further
\_ ngx_quic_parse_long_header_v1 - QUICv1-specific long header fields
0-RTT packets previously appeared as Handshake are now logged as appropriate:
*1 quic packet rx long flags:db version:ff00001d
*1 quic packet rx early len:870
Logging SCID/DCID is no longer duplicated as were seen with Initial packets.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 17 Nov 2020 21:32:04 +0000 |
parents | 9c3be23ddbe7 |
children | 05b1ee464350 |
comparison
equal
deleted
inserted
replaced
8210:46374c3fee3f | 8211:fe53def49945 |
---|---|
37 (((flags) & NGX_QUIC_PKT_TYPE) == NGX_QUIC_PKT_ZRTT) | 37 (((flags) & NGX_QUIC_PKT_TYPE) == NGX_QUIC_PKT_ZRTT) |
38 #define ngx_quic_pkt_hs(flags) \ | 38 #define ngx_quic_pkt_hs(flags) \ |
39 (((flags) & NGX_QUIC_PKT_TYPE) == NGX_QUIC_PKT_HANDSHAKE) | 39 (((flags) & NGX_QUIC_PKT_TYPE) == NGX_QUIC_PKT_HANDSHAKE) |
40 #define ngx_quic_pkt_retry(flags) \ | 40 #define ngx_quic_pkt_retry(flags) \ |
41 (((flags) & NGX_QUIC_PKT_TYPE) == NGX_QUIC_PKT_RETRY) | 41 (((flags) & NGX_QUIC_PKT_TYPE) == NGX_QUIC_PKT_RETRY) |
42 | |
43 #define ngx_quic_level_name(lvl) \ | |
44 (lvl == ssl_encryption_application) ? "app" \ | |
45 : (lvl == ssl_encryption_initial) ? "init" \ | |
46 : (lvl == ssl_encryption_handshake) ? "hs" : "early" | |
42 | 47 |
43 | 48 |
44 /* 12.4. Frames and Frame Types */ | 49 /* 12.4. Frames and Frame Types */ |
45 #define NGX_QUIC_FT_PADDING 0x00 | 50 #define NGX_QUIC_FT_PADDING 0x00 |
46 #define NGX_QUIC_FT_PING 0x01 | 51 #define NGX_QUIC_FT_PING 0x01 |