comparison src/event/quic/ngx_event_quic_connection.h @ 8749:660c4a2f95f3 quic

QUIC: separate files for frames related processing.
author Vladimir Homutov <vl@nginx.com>
date Tue, 13 Apr 2021 14:38:46 +0300
parents e0cb1e58ca13
children 41807e581de9
comparison
equal deleted inserted replaced
8748:e0cb1e58ca13 8749:660c4a2f95f3
14 #include <ngx_event_quic_transport.h> 14 #include <ngx_event_quic_transport.h>
15 #include <ngx_event_quic_protection.h> 15 #include <ngx_event_quic_protection.h>
16 16
17 typedef struct ngx_quic_connection_s ngx_quic_connection_t; 17 typedef struct ngx_quic_connection_s ngx_quic_connection_t;
18 18
19 #include <ngx_event_quic_frames.h>
19 #include <ngx_event_quic_migration.h> 20 #include <ngx_event_quic_migration.h>
20 #include <ngx_event_quic_connid.h> 21 #include <ngx_event_quic_connid.h>
21 22
22 23
23 #define NGX_QUIC_MAX_SHORT_HEADER 25 /* 1 flags + 20 dcid + 4 pn */ 24 #define NGX_QUIC_MAX_SHORT_HEADER 25 /* 1 flags + 20 dcid + 4 pn */
43 #define NGX_QUIC_TIME_THR 1.125 44 #define NGX_QUIC_TIME_THR 1.125
44 #define NGX_QUIC_TIME_GRANULARITY 1 /* ms */ 45 #define NGX_QUIC_TIME_GRANULARITY 1 /* ms */
45 46
46 #define NGX_QUIC_CC_MIN_INTERVAL 1000 /* 1s */ 47 #define NGX_QUIC_CC_MIN_INTERVAL 1000 /* 1s */
47 48
48 #define NGX_QUIC_BUFFER_SIZE 4096
49 49
50 #define NGX_QUIC_UNSET_PN (uint64_t) -1 50 #define NGX_QUIC_UNSET_PN (uint64_t) -1
51 51
52 #define NGX_QUIC_SEND_CTX_LAST (NGX_QUIC_ENCRYPTION_LAST - 1) 52 #define NGX_QUIC_SEND_CTX_LAST (NGX_QUIC_ENCRYPTION_LAST - 1)
53 53
217 unsigned key_phase:1; 217 unsigned key_phase:1;
218 unsigned validated:1; 218 unsigned validated:1;
219 }; 219 };
220 220
221 221
222 ngx_quic_frame_t *ngx_quic_alloc_frame(ngx_connection_t *c);
223 void ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame);
224 void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc); 222 void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc);
225 ngx_msec_t ngx_quic_pto(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx); 223 ngx_msec_t ngx_quic_pto(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx);
226 224
227 ngx_int_t ngx_quic_new_sr_token(ngx_connection_t *c, ngx_str_t *cid, 225 ngx_int_t ngx_quic_new_sr_token(ngx_connection_t *c, ngx_str_t *cid,
228 u_char *secret, u_char *token); 226 u_char *secret, u_char *token);