Mercurial > hg > nginx
comparison src/event/ngx_event_quic_transport.h @ 8247:e9891e8ee975 quic
Configurable transport parameters.
- integer parameters can be configured using the following directives:
quic_max_idle_timeout
quic_max_ack_delay
quic_max_packet_size
quic_initial_max_data
quic_initial_max_stream_data_bidi_local
quic_initial_max_stream_data_bidi_remote
quic_initial_max_stream_data_uni
quic_initial_max_streams_bidi
quic_initial_max_streams_uni
quic_ack_delay_exponent
quic_active_migration
quic_active_connection_id_limit
- only following parameters are actually sent:
active_connection_id_limit
initial_max_streams_uni
initial_max_streams_bidi
initial_max_stream_data_bidi_local
initial_max_stream_data_bidi_remote
initial_max_stream_data_uni
(other parameters are to be added into ngx_quic_create_transport_params()
function as needed, should be easy now)
- draft 24 and draft 27 are now supported
(at compile-time using quic_version macro)
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 20 Mar 2020 13:47:44 +0300 |
parents | a14afe21e692 |
children | 3f4b407fa0b8 |
comparison
equal
deleted
inserted
replaced
8246:0d9bc77ae30d | 8247:e9891e8ee975 |
---|---|
63 #define NGX_QUIC_ERR_CONNECTION_ID_LIMIT_ERROR 0x09 | 63 #define NGX_QUIC_ERR_CONNECTION_ID_LIMIT_ERROR 0x09 |
64 #define NGX_QUIC_ERR_PROTOCOL_VIOLATION 0x0A | 64 #define NGX_QUIC_ERR_PROTOCOL_VIOLATION 0x0A |
65 #define NGX_QUIC_ERR_INVALID_TOKEN 0x0B | 65 #define NGX_QUIC_ERR_INVALID_TOKEN 0x0B |
66 /* 0xC is not defined */ | 66 /* 0xC is not defined */ |
67 #define NGX_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D | 67 #define NGX_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D |
68 /* 0xE is not defined */ | |
68 #define NGX_QUIC_ERR_CRYPTO_ERROR 0x10 | 69 #define NGX_QUIC_ERR_CRYPTO_ERROR 0x10 |
69 | 70 |
70 #define NGX_QUIC_ERR_LAST NGX_QUIC_ERR_CRYPTO_ERROR | 71 #define NGX_QUIC_ERR_LAST NGX_QUIC_ERR_CRYPTO_ERROR |
72 | |
73 /* Transport parameters */ | |
74 #define NGX_QUIC_TP_ORIGINAL_CONNECTION_ID 0x00 | |
75 #define NGX_QUIC_TP_MAX_IDLE_TIMEOUT 0x01 | |
76 #define NGX_QUIC_TP_STATELESS_RESET_TOKEN 0x02 | |
77 #define NGX_QUIC_TP_MAX_PACKET_SIZE 0x03 | |
78 #define NGX_QUIC_TP_INITIAL_MAX_DATA 0x04 | |
79 #define NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL 0x05 | |
80 #define NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE 0x06 | |
81 #define NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI 0x07 | |
82 #define NGX_QUIC_TP_INITIAL_MAX_STREAMS_BIDI 0x08 | |
83 #define NGX_QUIC_TP_INITIAL_MAX_STREAMS_UNI 0x09 | |
84 #define NGX_QUIC_TP_ACK_DELAY_EXPONENT 0x0a | |
85 #define NGX_QUIC_TP_MAX_ACK_DELAY 0x0b | |
86 #define NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION 0x0c | |
87 #define NGX_QUIC_TP_PREFERRED_ADDRESS 0x0d | |
88 #define NGX_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT 0x0e | |
71 | 89 |
72 | 90 |
73 typedef struct { | 91 typedef struct { |
74 ngx_uint_t pn; | 92 ngx_uint_t pn; |
75 uint64_t largest; | 93 uint64_t largest; |
206 | 224 |
207 ssize_t ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end, | 225 ssize_t ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end, |
208 ngx_quic_frame_t *frame); | 226 ngx_quic_frame_t *frame); |
209 ssize_t ngx_quic_create_frame(u_char *p, u_char *end, ngx_quic_frame_t *f); | 227 ssize_t ngx_quic_create_frame(u_char *p, u_char *end, ngx_quic_frame_t *f); |
210 | 228 |
229 ssize_t ngx_quic_create_transport_params(u_char *p, u_char *end, | |
230 ngx_quic_tp_t *tp); | |
231 | |
211 #endif /* _NGX_EVENT_QUIC_WIRE_H_INCLUDED_ */ | 232 #endif /* _NGX_EVENT_QUIC_WIRE_H_INCLUDED_ */ |