comparison src/http/v3/ngx_http_v3_parse.h @ 8772:345370fdd32d quic

HTTP/3: moved parsing uni stream type to ngx_http_v3_parse.c. Previously it was parsed in ngx_http_v3_streams.c, while the streams were parsed in ngx_http_v3_parse.c. Now all parsing is done in one file. This simplifies parsing API and cleans up ngx_http_v3_streams.c.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 05 May 2021 15:00:17 +0300
parents ab6aaa8e86b0
children 0ac25efb2da3
comparison
equal deleted inserted replaced
8771:0981329169ea 8772:345370fdd32d
106 } ngx_http_v3_parse_control_t; 106 } ngx_http_v3_parse_control_t;
107 107
108 108
109 typedef struct { 109 typedef struct {
110 ngx_uint_t state; 110 ngx_uint_t state;
111 ngx_http_v3_parse_varlen_int_t vlint;
112 union {
113 ngx_http_v3_parse_encoder_t encoder;
114 ngx_http_v3_parse_decoder_t decoder;
115 ngx_http_v3_parse_control_t control;
116 } u;
117 } ngx_http_v3_parse_uni_t;
118
119
120 typedef struct {
121 ngx_uint_t state;
111 ngx_uint_t type; 122 ngx_uint_t type;
112 ngx_uint_t length; 123 ngx_uint_t length;
113 ngx_http_v3_parse_varlen_int_t vlint; 124 ngx_http_v3_parse_varlen_int_t vlint;
114 } ngx_http_v3_parse_data_t; 125 } ngx_http_v3_parse_data_t;
115 126
126 137
127 ngx_int_t ngx_http_v3_parse_headers(ngx_connection_t *c, 138 ngx_int_t ngx_http_v3_parse_headers(ngx_connection_t *c,
128 ngx_http_v3_parse_headers_t *st, u_char ch); 139 ngx_http_v3_parse_headers_t *st, u_char ch);
129 ngx_int_t ngx_http_v3_parse_data(ngx_connection_t *c, 140 ngx_int_t ngx_http_v3_parse_data(ngx_connection_t *c,
130 ngx_http_v3_parse_data_t *st, u_char ch); 141 ngx_http_v3_parse_data_t *st, u_char ch);
131 142 ngx_int_t ngx_http_v3_parse_uni(ngx_connection_t *c,
132 ngx_int_t ngx_http_v3_parse_control(ngx_connection_t *c, void *data, u_char ch); 143 ngx_http_v3_parse_uni_t *st, u_char ch);
133 ngx_int_t ngx_http_v3_parse_encoder(ngx_connection_t *c, void *data, u_char ch);
134 ngx_int_t ngx_http_v3_parse_decoder(ngx_connection_t *c, void *data, u_char ch);
135 144
136 145
137 #endif /* _NGX_HTTP_V3_PARSE_H_INCLUDED_ */ 146 #endif /* _NGX_HTTP_V3_PARSE_H_INCLUDED_ */