Mercurial > hg > nginx-quic
annotate src/http/v3/ngx_http_v3_parse.h @ 7870:e169cce912c7 quic
Avoid retransmitting of packets with discarded keys.
Sections 4.10.1 and 4.10.2 of quic transport describe discarding of initial
and handshake keys. Since the keys are discarded, we no longer need
to retransmit packets and corresponding queues should be emptied.
This patch removes previously added workaround that did not require
acknowledgement for initial packets, resulting in avoiding retransmission,
which is wrong because a packet could be lost and we have to retransmit it.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 18 May 2020 13:54:53 +0300 |
parents | 5649079a41f4 |
children | b0e81f49d7c0 |
rev | line source |
---|---|
7692 | 1 |
2 /* | |
3 * Copyright (C) Roman Arutyunyan | |
4 * Copyright (C) Nginx, Inc. | |
5 */ | |
6 | |
7 | |
8 #ifndef _NGX_HTTP_V3_PARSE_H_INCLUDED_ | |
9 #define _NGX_HTTP_V3_PARSE_H_INCLUDED_ | |
10 | |
11 | |
12 #include <ngx_config.h> | |
13 #include <ngx_core.h> | |
14 #include <ngx_http.h> | |
15 | |
16 | |
17 typedef struct { | |
18 ngx_uint_t state; | |
19 uint64_t value; | |
20 } ngx_http_v3_parse_varlen_int_t; | |
21 | |
22 | |
23 typedef struct { | |
24 ngx_uint_t state; | |
25 ngx_uint_t mask; | |
26 uint64_t value; | |
27 } ngx_http_v3_parse_prefix_int_t; | |
28 | |
29 | |
30 typedef struct { | |
31 ngx_uint_t state; | |
32 uint64_t id; | |
33 ngx_http_v3_parse_varlen_int_t vlint; | |
34 } ngx_http_v3_parse_settings_t; | |
35 | |
36 | |
37 typedef struct { | |
38 ngx_uint_t state; | |
39 ngx_uint_t insert_count; | |
40 ngx_uint_t delta_base; | |
41 ngx_uint_t sign; | |
42 ngx_uint_t base; | |
43 ngx_http_v3_parse_prefix_int_t pint; | |
44 } ngx_http_v3_parse_header_block_prefix_t; | |
45 | |
46 | |
47 typedef struct { | |
48 ngx_uint_t state; | |
49 ngx_uint_t length; | |
50 ngx_uint_t huffman; | |
51 ngx_str_t value; | |
52 u_char *last; | |
53 u_char huffstate; | |
54 } ngx_http_v3_parse_literal_t; | |
55 | |
56 | |
57 typedef struct { | |
58 ngx_uint_t state; | |
59 ngx_uint_t index; | |
60 ngx_uint_t base; | |
61 ngx_uint_t dynamic; | |
62 | |
63 ngx_str_t name; | |
64 ngx_str_t value; | |
65 | |
66 ngx_http_v3_parse_prefix_int_t pint; | |
67 ngx_http_v3_parse_literal_t literal; | |
68 } ngx_http_v3_parse_header_t; | |
69 | |
70 | |
71 typedef struct { | |
72 ngx_uint_t state; | |
73 ngx_http_v3_parse_header_t header; | |
74 } ngx_http_v3_parse_header_rep_t; | |
75 | |
76 | |
77 typedef struct { | |
78 ngx_uint_t state; | |
79 ngx_uint_t length; | |
80 ngx_http_v3_parse_varlen_int_t vlint; | |
81 ngx_http_v3_parse_header_block_prefix_t prefix; | |
82 ngx_http_v3_parse_header_rep_t header_rep; | |
83 } ngx_http_v3_parse_headers_t; | |
84 | |
85 | |
86 typedef struct { | |
87 ngx_uint_t state; | |
88 ngx_http_v3_parse_header_t header; | |
89 ngx_http_v3_parse_prefix_int_t pint; | |
90 } ngx_http_v3_parse_encoder_t; | |
91 | |
92 | |
93 typedef struct { | |
94 ngx_uint_t state; | |
95 ngx_http_v3_parse_prefix_int_t pint; | |
96 } ngx_http_v3_parse_decoder_t; | |
97 | |
98 | |
99 typedef struct { | |
100 ngx_uint_t state; | |
101 ngx_uint_t type; | |
102 ngx_uint_t length; | |
103 ngx_http_v3_parse_varlen_int_t vlint; | |
104 ngx_http_v3_parse_settings_t settings; | |
105 } ngx_http_v3_parse_control_t; | |
106 | |
107 | |
7761
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
108 typedef struct { |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
109 ngx_uint_t state; |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
110 ngx_uint_t length; |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
111 ngx_http_v3_parse_varlen_int_t vlint; |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
112 } ngx_http_v3_parse_data_t; |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
113 |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
114 |
7692 | 115 ngx_int_t ngx_http_v3_parse_varlen_int(ngx_connection_t *c, |
116 ngx_http_v3_parse_varlen_int_t *st, u_char ch); | |
117 ngx_int_t ngx_http_v3_parse_prefix_int(ngx_connection_t *c, | |
118 ngx_http_v3_parse_prefix_int_t *st, ngx_uint_t prefix, u_char ch); | |
119 | |
120 ngx_int_t ngx_http_v3_parse_headers(ngx_connection_t *c, | |
121 ngx_http_v3_parse_headers_t *st, u_char ch); | |
122 ngx_int_t ngx_http_v3_parse_header_block_prefix(ngx_connection_t *c, | |
123 ngx_http_v3_parse_header_block_prefix_t *st, u_char ch); | |
124 ngx_int_t ngx_http_v3_parse_header_rep(ngx_connection_t *c, | |
125 ngx_http_v3_parse_header_rep_t *st, ngx_uint_t base, u_char ch); | |
126 ngx_int_t ngx_http_v3_parse_literal(ngx_connection_t *c, | |
127 ngx_http_v3_parse_literal_t *st, u_char ch); | |
128 ngx_int_t ngx_http_v3_parse_header_ri(ngx_connection_t *c, | |
129 ngx_http_v3_parse_header_t *st, u_char ch); | |
130 ngx_int_t ngx_http_v3_parse_header_lri(ngx_connection_t *c, | |
131 ngx_http_v3_parse_header_t *st, u_char ch); | |
132 ngx_int_t ngx_http_v3_parse_header_l(ngx_connection_t *c, | |
133 ngx_http_v3_parse_header_t *st, u_char ch); | |
134 ngx_int_t ngx_http_v3_parse_header_pbi(ngx_connection_t *c, | |
135 ngx_http_v3_parse_header_t *st, u_char ch); | |
136 ngx_int_t ngx_http_v3_parse_header_lpbi(ngx_connection_t *c, | |
137 ngx_http_v3_parse_header_t *st, u_char ch); | |
138 | |
139 ngx_int_t ngx_http_v3_parse_control(ngx_connection_t *c, void *data, u_char ch); | |
140 ngx_int_t ngx_http_v3_parse_settings(ngx_connection_t *c, | |
141 ngx_http_v3_parse_settings_t *st, u_char ch); | |
142 | |
143 ngx_int_t ngx_http_v3_parse_encoder(ngx_connection_t *c, void *data, u_char ch); | |
144 ngx_int_t ngx_http_v3_parse_header_inr(ngx_connection_t *c, | |
145 ngx_http_v3_parse_header_t *st, u_char ch); | |
146 ngx_int_t ngx_http_v3_parse_header_iwnr(ngx_connection_t *c, | |
147 ngx_http_v3_parse_header_t *st, u_char ch); | |
148 | |
149 ngx_int_t ngx_http_v3_parse_decoder(ngx_connection_t *c, void *data, u_char ch); | |
150 | |
7761
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
151 ngx_int_t ngx_http_v3_parse_data(ngx_connection_t *c, |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
152 ngx_http_v3_parse_data_t *st, u_char ch); |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7692
diff
changeset
|
153 |
7692 | 154 |
155 #endif /* _NGX_HTTP_V3_PARSE_H_INCLUDED_ */ |