Mercurial > hg > nginx
diff 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 |
line wrap: on
line diff
--- a/src/event/ngx_event_quic_transport.h Thu Mar 19 21:46:28 2020 +0300 +++ b/src/event/ngx_event_quic_transport.h Fri Mar 20 13:47:44 2020 +0300 @@ -65,10 +65,28 @@ #define NGX_QUIC_ERR_INVALID_TOKEN 0x0B /* 0xC is not defined */ #define NGX_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D +/* 0xE is not defined */ #define NGX_QUIC_ERR_CRYPTO_ERROR 0x10 #define NGX_QUIC_ERR_LAST NGX_QUIC_ERR_CRYPTO_ERROR +/* Transport parameters */ +#define NGX_QUIC_TP_ORIGINAL_CONNECTION_ID 0x00 +#define NGX_QUIC_TP_MAX_IDLE_TIMEOUT 0x01 +#define NGX_QUIC_TP_STATELESS_RESET_TOKEN 0x02 +#define NGX_QUIC_TP_MAX_PACKET_SIZE 0x03 +#define NGX_QUIC_TP_INITIAL_MAX_DATA 0x04 +#define NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL 0x05 +#define NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE 0x06 +#define NGX_QUIC_TP_INITIAL_MAX_STREAM_DATA_UNI 0x07 +#define NGX_QUIC_TP_INITIAL_MAX_STREAMS_BIDI 0x08 +#define NGX_QUIC_TP_INITIAL_MAX_STREAMS_UNI 0x09 +#define NGX_QUIC_TP_ACK_DELAY_EXPONENT 0x0a +#define NGX_QUIC_TP_MAX_ACK_DELAY 0x0b +#define NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION 0x0c +#define NGX_QUIC_TP_PREFERRED_ADDRESS 0x0d +#define NGX_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT 0x0e + typedef struct { ngx_uint_t pn; @@ -208,4 +226,7 @@ ngx_quic_frame_t *frame); ssize_t ngx_quic_create_frame(u_char *p, u_char *end, ngx_quic_frame_t *f); +ssize_t ngx_quic_create_transport_params(u_char *p, u_char *end, + ngx_quic_tp_t *tp); + #endif /* _NGX_EVENT_QUIC_WIRE_H_INCLUDED_ */