Mercurial > hg > nginx-quic
annotate src/http/v3/ngx_http_v3.h @ 8009:6e1798a4a0d2 quic
HTTP/3: renamed ngx_http_v3.c to ngx_http_v3_encode.c.
The file contains only encoding functions.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 13 Jul 2020 12:38:08 +0300 |
parents | 79125ef2e39f |
children | 0596fe1aee16 |
rev | line source |
---|---|
7681 | 1 |
2 /* | |
3 * Copyright (C) Roman Arutyunyan | |
4 * Copyright (C) Nginx, Inc. | |
5 */ | |
6 | |
7 | |
8 #ifndef _NGX_HTTP_V3_H_INCLUDED_ | |
9 #define _NGX_HTTP_V3_H_INCLUDED_ | |
10 | |
11 | |
12 #include <ngx_config.h> | |
13 #include <ngx_core.h> | |
14 #include <ngx_http.h> | |
7692
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
15 #include <ngx_http_v3_parse.h> |
7681 | 16 |
17 | |
7735
c9c3a73df6e8
Support for HTTP/3 ALPN.
Roman Arutyunyan <arut@nginx.com>
parents:
7713
diff
changeset
|
18 #define NGX_HTTP_V3_ALPN(s) NGX_HTTP_V3_ALPN_DRAFT(s) |
c9c3a73df6e8
Support for HTTP/3 ALPN.
Roman Arutyunyan <arut@nginx.com>
parents:
7713
diff
changeset
|
19 #define NGX_HTTP_V3_ALPN_DRAFT(s) "\x05h3-" #s |
c9c3a73df6e8
Support for HTTP/3 ALPN.
Roman Arutyunyan <arut@nginx.com>
parents:
7713
diff
changeset
|
20 #define NGX_HTTP_V3_ALPN_ADVERTISE NGX_HTTP_V3_ALPN(NGX_QUIC_DRAFT_VERSION) |
7681 | 21 |
7692
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
22 #define NGX_HTTP_V3_VARLEN_INT_LEN 4 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
23 #define NGX_HTTP_V3_PREFIX_INT_LEN 11 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
24 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
25 #define NGX_HTTP_V3_STREAM_CONTROL 0x00 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
26 #define NGX_HTTP_V3_STREAM_PUSH 0x01 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
27 #define NGX_HTTP_V3_STREAM_ENCODER 0x02 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
28 #define NGX_HTTP_V3_STREAM_DECODER 0x03 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
29 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
30 #define NGX_HTTP_V3_FRAME_DATA 0x00 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
31 #define NGX_HTTP_V3_FRAME_HEADERS 0x01 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
32 #define NGX_HTTP_V3_FRAME_CANCEL_PUSH 0x03 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
33 #define NGX_HTTP_V3_FRAME_SETTINGS 0x04 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
34 #define NGX_HTTP_V3_FRAME_PUSH_PROMISE 0x05 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
35 #define NGX_HTTP_V3_FRAME_GOAWAY 0x07 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
36 #define NGX_HTTP_V3_FRAME_MAX_PUSH_ID 0x0d |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
37 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
38 #define NGX_HTTP_V3_PARAM_MAX_TABLE_CAPACITY 0x01 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
39 #define NGX_HTTP_V3_PARAM_MAX_HEADER_LIST_SIZE 0x06 |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
40 #define NGX_HTTP_V3_PARAM_BLOCKED_STREAMS 0x07 |
7681 | 41 |
7749
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
42 #define NGX_HTTP_V3_STREAM_CLIENT_CONTROL 0 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
43 #define NGX_HTTP_V3_STREAM_SERVER_CONTROL 1 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
44 #define NGX_HTTP_V3_STREAM_CLIENT_ENCODER 2 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
45 #define NGX_HTTP_V3_STREAM_SERVER_ENCODER 3 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
46 #define NGX_HTTP_V3_STREAM_CLIENT_DECODER 4 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
47 #define NGX_HTTP_V3_STREAM_SERVER_DECODER 5 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
48 #define NGX_HTTP_V3_MAX_KNOWN_STREAM 6 |
dadbc66e9fca
Simplifed handling HTTP/3 streams.
Roman Arutyunyan <arut@nginx.com>
parents:
7735
diff
changeset
|
49 |
7949
032cb35ce758
HTTP/3: http3_max_field_size directive to limit string size.
Roman Arutyunyan <arut@nginx.com>
parents:
7948
diff
changeset
|
50 #define NGX_HTTP_V3_DEFAULT_MAX_FIELD_SIZE 4096 |
7951
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
51 #define NGX_HTTP_V3_DEFAULT_MAX_TABLE_CAPACITY 16384 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
52 #define NGX_HTTP_V3_DEFAULT_MAX_BLOCKED_STREAMS 16 |
7681 | 53 |
7954
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
54 /* HTTP/3 errors */ |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
55 #define NGX_HTTP_V3_ERR_NO_ERROR 0x100 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
56 #define NGX_HTTP_V3_ERR_GENERAL_PROTOCOL_ERROR 0x101 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
57 #define NGX_HTTP_V3_ERR_INTERNAL_ERROR 0x102 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
58 #define NGX_HTTP_V3_ERR_STREAM_CREATION_ERROR 0x103 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
59 #define NGX_HTTP_V3_ERR_CLOSED_CRITICAL_STREAM 0x104 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
60 #define NGX_HTTP_V3_ERR_FRAME_UNEXPECTED 0x105 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
61 #define NGX_HTTP_V3_ERR_FRAME_ERROR 0x106 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
62 #define NGX_HTTP_V3_ERR_EXCESSIVE_LOAD 0x107 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
63 #define NGX_HTTP_V3_ERR_ID_ERROR 0x108 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
64 #define NGX_HTTP_V3_ERR_SETTINGS_ERROR 0x109 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
65 #define NGX_HTTP_V3_ERR_MISSING_SETTINGS 0x10a |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
66 #define NGX_HTTP_V3_ERR_REQUEST_REJECTED 0x10b |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
67 #define NGX_HTTP_V3_ERR_REQUEST_CANCELLED 0x10c |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
68 #define NGX_HTTP_V3_ERR_REQUEST_INCOMPLETE 0x10d |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
69 #define NGX_HTTP_V3_ERR_CONNECT_ERROR 0x10f |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
70 #define NGX_HTTP_V3_ERR_VERSION_FALLBACK 0x110 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
71 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
72 /* QPACK errors */ |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
73 #define NGX_HTTP_V3_ERR_DECOMPRESSION_FAILED 0x200 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
74 #define NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR 0x201 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
75 #define NGX_HTTP_V3_ERR_DECODER_STREAM_ERROR 0x202 |
1ed698947172
HTTP/3: error code definitions for HTTP/3 and QPACK.
Roman Arutyunyan <arut@nginx.com>
parents:
7951
diff
changeset
|
76 |
7681 | 77 |
7948
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
7883
diff
changeset
|
78 #define ngx_http_v3_get_module_srv_conf(c, module) \ |
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
7883
diff
changeset
|
79 ngx_http_get_module_srv_conf( \ |
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
7883
diff
changeset
|
80 ((ngx_http_v3_connection_t *) c->qs->parent->data)->hc.conf_ctx, \ |
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
7883
diff
changeset
|
81 module) |
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
7883
diff
changeset
|
82 |
7955
72f9ff4e0a88
HTTP/3: close QUIC connection with HTTP/QPACK errors when needed.
Roman Arutyunyan <arut@nginx.com>
parents:
7954
diff
changeset
|
83 #define ngx_http_v3_finalize_connection(c, code, reason) \ |
72f9ff4e0a88
HTTP/3: close QUIC connection with HTTP/QPACK errors when needed.
Roman Arutyunyan <arut@nginx.com>
parents:
7954
diff
changeset
|
84 ngx_quic_finalize_connection(c->qs->parent, code, reason) |
72f9ff4e0a88
HTTP/3: close QUIC connection with HTTP/QPACK errors when needed.
Roman Arutyunyan <arut@nginx.com>
parents:
7954
diff
changeset
|
85 |
7948
c8cabb5d45f5
HTTP/3: introduced ngx_http_v3_get_module_srv_conf() macro.
Roman Arutyunyan <arut@nginx.com>
parents:
7883
diff
changeset
|
86 |
7681 | 87 typedef struct { |
7951
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
88 ngx_quic_tp_t quic; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
89 size_t max_field_size; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
90 size_t max_table_capacity; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
91 ngx_uint_t max_blocked_streams; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
92 } ngx_http_v3_srv_conf_t; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
93 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
94 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
95 typedef struct { |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
96 ngx_str_t name; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
97 ngx_str_t value; |
7681 | 98 } ngx_http_v3_header_t; |
99 | |
100 | |
7951
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
101 typedef struct { |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
102 ngx_http_v3_header_t **elts; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
103 ngx_uint_t nelts; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
104 ngx_uint_t base; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
105 size_t size; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
106 size_t capacity; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
107 } ngx_http_v3_dynamic_table_t; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
108 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
109 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
110 typedef struct { |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
111 ngx_http_connection_t hc; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
112 ngx_http_v3_dynamic_table_t table; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
113 ngx_queue_t blocked; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
114 ngx_uint_t nblocked; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
115 ngx_uint_t settings_sent; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
116 /* unsigned settings_sent:1; */ |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
117 ngx_connection_t *known_streams[NGX_HTTP_V3_MAX_KNOWN_STREAM]; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
118 } ngx_http_v3_connection_t; |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
119 |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
120 |
7999
0d2b2664b41c
QUIC: added "quic" listen parameter.
Roman Arutyunyan <arut@nginx.com>
parents:
7955
diff
changeset
|
121 ngx_int_t ngx_http_v3_init_connection(ngx_connection_t *c); |
0d2b2664b41c
QUIC: added "quic" listen parameter.
Roman Arutyunyan <arut@nginx.com>
parents:
7955
diff
changeset
|
122 |
7882
d2759e4cc437
HTTP/3: split header parser in two functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7761
diff
changeset
|
123 ngx_int_t ngx_http_v3_parse_request(ngx_http_request_t *r, ngx_buf_t *b); |
7883
66feab03d9b7
HTTP/3: restricted symbols in header names.
Roman Arutyunyan <arut@nginx.com>
parents:
7882
diff
changeset
|
124 ngx_int_t ngx_http_v3_parse_header(ngx_http_request_t *r, ngx_buf_t *b, |
66feab03d9b7
HTTP/3: restricted symbols in header names.
Roman Arutyunyan <arut@nginx.com>
parents:
7882
diff
changeset
|
125 ngx_uint_t allow_underscores); |
7761
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7758
diff
changeset
|
126 ngx_int_t ngx_http_v3_parse_request_body(ngx_http_request_t *r, ngx_buf_t *b, |
5649079a41f4
Parsing HTTP/3 request body.
Roman Arutyunyan <arut@nginx.com>
parents:
7758
diff
changeset
|
127 ngx_http_chunked_t *ctx); |
7681 | 128 ngx_chain_t *ngx_http_v3_create_header(ngx_http_request_t *r); |
7758
46e3542d51b3
Chunked response body in HTTP/3.
Roman Arutyunyan <arut@nginx.com>
parents:
7749
diff
changeset
|
129 ngx_chain_t *ngx_http_v3_create_trailers(ngx_http_request_t *r); |
7681 | 130 |
131 uintptr_t ngx_http_v3_encode_varlen_int(u_char *p, uint64_t value); | |
132 uintptr_t ngx_http_v3_encode_prefix_int(u_char *p, uint64_t value, | |
133 ngx_uint_t prefix); | |
134 | |
8006
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
135 uintptr_t ngx_http_v3_encode_header_block_prefix(u_char *p, |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
136 ngx_uint_t insert_count, ngx_uint_t sign, ngx_uint_t delta_base); |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
137 uintptr_t ngx_http_v3_encode_header_ri(u_char *p, ngx_uint_t dynamic, |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
138 ngx_uint_t index); |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
139 uintptr_t ngx_http_v3_encode_header_lri(u_char *p, ngx_uint_t dynamic, |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
140 ngx_uint_t index, u_char *data, size_t len); |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
141 uintptr_t ngx_http_v3_encode_header_l(u_char *p, ngx_str_t *name, |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
142 ngx_str_t *value); |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
143 uintptr_t ngx_http_v3_encode_header_pbi(u_char *p, ngx_uint_t index); |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
144 uintptr_t ngx_http_v3_encode_header_lpbi(u_char *p, ngx_uint_t index, |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
145 u_char *data, size_t len); |
79125ef2e39f
HTTP/3: header encoding functions.
Roman Arutyunyan <arut@nginx.com>
parents:
7999
diff
changeset
|
146 |
7681 | 147 ngx_int_t ngx_http_v3_ref_insert(ngx_connection_t *c, ngx_uint_t dynamic, |
148 ngx_uint_t index, ngx_str_t *value); | |
149 ngx_int_t ngx_http_v3_insert(ngx_connection_t *c, ngx_str_t *name, | |
150 ngx_str_t *value); | |
151 ngx_int_t ngx_http_v3_set_capacity(ngx_connection_t *c, ngx_uint_t capacity); | |
152 ngx_int_t ngx_http_v3_duplicate(ngx_connection_t *c, ngx_uint_t index); | |
153 ngx_int_t ngx_http_v3_ack_header(ngx_connection_t *c, ngx_uint_t stream_id); | |
154 ngx_int_t ngx_http_v3_cancel_stream(ngx_connection_t *c, ngx_uint_t stream_id); | |
155 ngx_int_t ngx_http_v3_inc_insert_count(ngx_connection_t *c, ngx_uint_t inc); | |
7951
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
156 ngx_int_t ngx_http_v3_lookup_static(ngx_connection_t *c, ngx_uint_t index, |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
157 ngx_str_t *name, ngx_str_t *value); |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
158 ngx_int_t ngx_http_v3_lookup(ngx_connection_t *c, ngx_uint_t index, |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
159 ngx_str_t *name, ngx_str_t *value); |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
160 ngx_int_t ngx_http_v3_decode_insert_count(ngx_connection_t *c, |
c9538aef3211
HTTP/3: refactored dynamic table implementation.
Roman Arutyunyan <arut@nginx.com>
parents:
7949
diff
changeset
|
161 ngx_uint_t *insert_count); |
7681 | 162 ngx_int_t ngx_http_v3_check_insert_count(ngx_connection_t *c, |
163 ngx_uint_t insert_count); | |
7692
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
164 ngx_int_t ngx_http_v3_set_param(ngx_connection_t *c, uint64_t id, |
268f4389130d
Refactored HTTP/3 parser.
Roman Arutyunyan <arut@nginx.com>
parents:
7681
diff
changeset
|
165 uint64_t value); |
7681 | 166 |
167 ngx_int_t ngx_http_v3_client_ref_insert(ngx_connection_t *c, ngx_uint_t dynamic, | |
168 ngx_uint_t index, ngx_str_t *value); | |
169 ngx_int_t ngx_http_v3_client_insert(ngx_connection_t *c, ngx_str_t *name, | |
170 ngx_str_t *value); | |
171 ngx_int_t ngx_http_v3_client_set_capacity(ngx_connection_t *c, | |
172 ngx_uint_t capacity); | |
173 ngx_int_t ngx_http_v3_client_duplicate(ngx_connection_t *c, ngx_uint_t index); | |
174 ngx_int_t ngx_http_v3_client_ack_header(ngx_connection_t *c, | |
175 ngx_uint_t stream_id); | |
176 ngx_int_t ngx_http_v3_client_cancel_stream(ngx_connection_t *c, | |
177 ngx_uint_t stream_id); | |
178 ngx_int_t ngx_http_v3_client_inc_insert_count(ngx_connection_t *c, | |
179 ngx_uint_t inc); | |
180 | |
181 | |
182 extern ngx_module_t ngx_http_v3_module; | |
183 | |
184 | |
185 #endif /* _NGX_HTTP_V3_H_INCLUDED_ */ |