Mercurial > hg > nginx-quic
comparison src/event/quic/ngx_event_quic_connection.h @ 8412:e19723c40d28 quic
QUIC: separate files for tokens related processing.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Tue, 13 Apr 2021 14:41:52 +0300 |
parents | bc910a5ec737 |
children | 46161c610919 |
comparison
equal
deleted
inserted
replaced
8411:bc910a5ec737 | 8412:e19723c40d28 |
---|---|
19 | 19 |
20 #include <ngx_event_quic_frames.h> | 20 #include <ngx_event_quic_frames.h> |
21 #include <ngx_event_quic_migration.h> | 21 #include <ngx_event_quic_migration.h> |
22 #include <ngx_event_quic_connid.h> | 22 #include <ngx_event_quic_connid.h> |
23 #include <ngx_event_quic_streams.h> | 23 #include <ngx_event_quic_streams.h> |
24 #include <ngx_event_quic_tokens.h> | |
24 #include <ngx_event_quic_ack.h> | 25 #include <ngx_event_quic_ack.h> |
25 #include <ngx_event_quic_output.h> | 26 #include <ngx_event_quic_output.h> |
26 | 27 |
27 | |
28 #define NGX_QUIC_MAX_TOKEN_SIZE 64 | |
29 /* SHA-1(addr)=20 + sizeof(time_t) + retry(1) + odcid.len(1) + odcid */ | |
30 | 28 |
31 /* quic-recovery, section 6.2.2, kInitialRtt */ | 29 /* quic-recovery, section 6.2.2, kInitialRtt */ |
32 #define NGX_QUIC_INITIAL_RTT 333 /* ms */ | 30 #define NGX_QUIC_INITIAL_RTT 333 /* ms */ |
33 | 31 |
34 #define NGX_QUIC_UNSET_PN (uint64_t) -1 | 32 #define NGX_QUIC_UNSET_PN (uint64_t) -1 |
204 | 202 |
205 | 203 |
206 void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc); | 204 void ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc); |
207 void ngx_quic_shutdown_quic(ngx_connection_t *c); | 205 void ngx_quic_shutdown_quic(ngx_connection_t *c); |
208 | 206 |
209 ngx_int_t ngx_quic_new_sr_token(ngx_connection_t *c, ngx_str_t *cid, | |
210 u_char *secret, u_char *token); | |
211 ngx_int_t ngx_quic_new_token(ngx_connection_t *c, u_char *key, | |
212 ngx_str_t *token, ngx_str_t *odcid, time_t expires, ngx_uint_t is_retry); | |
213 | 207 |
214 /********************************* DEBUG *************************************/ | 208 /********************************* DEBUG *************************************/ |
215 | 209 |
216 #if (NGX_DEBUG) | 210 #if (NGX_DEBUG) |
217 void ngx_quic_connstate_dbg(ngx_connection_t *c); | 211 void ngx_quic_connstate_dbg(ngx_connection_t *c); |