comparison src/event/quic/ngx_event_quic_connection.h @ 8387:76f476ce4d31 quic

QUIC: distinct files for connection migration. The connection migration-related code from quic.c with dependencies is moved into separate file.
author Vladimir Homutov <vl@nginx.com>
date Wed, 31 Mar 2021 14:57:15 +0300
parents 714e9af983de
children c8bda5e1e662
comparison
equal deleted inserted replaced
8386:714e9af983de 8387:76f476ce4d31
16 16
17 #define NGX_QUIC_SEND_CTX_LAST (NGX_QUIC_ENCRYPTION_LAST - 1) 17 #define NGX_QUIC_SEND_CTX_LAST (NGX_QUIC_ENCRYPTION_LAST - 1)
18 18
19 19
20 typedef struct ngx_quic_connection_s ngx_quic_connection_t; 20 typedef struct ngx_quic_connection_s ngx_quic_connection_t;
21
22 /* 0-RTT and 1-RTT data exist in the same packet number space,
23 * so we have 3 packet number spaces:
24 *
25 * 0 - Initial
26 * 1 - Handshake
27 * 2 - 0-RTT and 1-RTT
28 */
29 #define ngx_quic_get_send_ctx(qc, level) \
30 ((level) == ssl_encryption_initial) ? &((qc)->send_ctx[0]) \
31 : (((level) == ssl_encryption_handshake) ? &((qc)->send_ctx[1]) \
32 : &((qc)->send_ctx[2]))
21 33
22 34
23 typedef struct { 35 typedef struct {
24 ngx_queue_t queue; 36 ngx_queue_t queue;
25 uint64_t seqnum; 37 uint64_t seqnum;
173 185
174 186
175 ngx_quic_frame_t *ngx_quic_alloc_frame(ngx_connection_t *c); 187 ngx_quic_frame_t *ngx_quic_alloc_frame(ngx_connection_t *c);
176 void ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame); 188 void ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame);
177 void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc); 189 void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc);
190 ngx_msec_t ngx_quic_pto(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx);
178 191
179 #endif 192 #endif