comparison src/event/ngx_event_quic.c @ 8335:76839f55bc48 quic

Sorted functions and functions declarations.
author Vladimir Homutov <vl@nginx.com>
date Tue, 14 Apr 2020 16:30:41 +0300
parents 72d20158c814
children 739f018225af
comparison
equal deleted inserted replaced
8334:72d20158c814 8335:76839f55bc48
104 104
105 unsigned send_timer_set:1; 105 unsigned send_timer_set:1;
106 unsigned closing:1; 106 unsigned closing:1;
107 unsigned key_phase:1; 107 unsigned key_phase:1;
108 }; 108 };
109
110
111 typedef ngx_int_t (*ngx_quic_frame_handler_pt)(ngx_connection_t *c,
112 ngx_quic_frame_t *frame);
109 113
110 114
111 #if BORINGSSL_API_VERSION >= 10 115 #if BORINGSSL_API_VERSION >= 10
112 static int ngx_quic_set_read_secret(ngx_ssl_conn_t *ssl_conn, 116 static int ngx_quic_set_read_secret(ngx_ssl_conn_t *ssl_conn,
113 enum ssl_encryption_level_t level, const SSL_CIPHER *cipher, 117 enum ssl_encryption_level_t level, const SSL_CIPHER *cipher,
149 153
150 static ngx_int_t ngx_quic_handle_ack_frame(ngx_connection_t *c, 154 static ngx_int_t ngx_quic_handle_ack_frame(ngx_connection_t *c,
151 ngx_quic_header_t *pkt, ngx_quic_ack_frame_t *f); 155 ngx_quic_header_t *pkt, ngx_quic_ack_frame_t *f);
152 static ngx_int_t ngx_quic_handle_ack_frame_range(ngx_connection_t *c, 156 static ngx_int_t ngx_quic_handle_ack_frame_range(ngx_connection_t *c,
153 ngx_quic_send_ctx_t *ctx, uint64_t min, uint64_t max); 157 ngx_quic_send_ctx_t *ctx, uint64_t min, uint64_t max);
154 static ngx_int_t ngx_quic_handle_crypto_frame(ngx_connection_t *c, 158
155 ngx_quic_header_t *pkt, ngx_quic_frame_t *frame); 159 static ngx_int_t ngx_quic_handle_ordered_frame(ngx_connection_t *c,
160 ngx_quic_frames_stream_t *fs, ngx_quic_frame_t *frame,
161 ngx_quic_frame_handler_pt handler);
156 static ngx_int_t ngx_quic_adjust_frame_offset(ngx_connection_t *c, 162 static ngx_int_t ngx_quic_adjust_frame_offset(ngx_connection_t *c,
157 ngx_quic_frame_t *f, uint64_t offset_in); 163 ngx_quic_frame_t *f, uint64_t offset_in);
158 static ngx_int_t ngx_quic_buffer_frame(ngx_connection_t *c, 164 static ngx_int_t ngx_quic_buffer_frame(ngx_connection_t *c,
159 ngx_quic_frames_stream_t *stream, ngx_quic_frame_t *f); 165 ngx_quic_frames_stream_t *stream, ngx_quic_frame_t *f);
160 166
161 typedef ngx_int_t (*ngx_quic_frame_handler_pt)(ngx_connection_t *c, 167 static ngx_int_t ngx_quic_handle_crypto_frame(ngx_connection_t *c,
162 ngx_quic_frame_t *frame); 168 ngx_quic_header_t *pkt, ngx_quic_frame_t *frame);
163
164 static ngx_int_t ngx_quic_handle_ordered_frame(ngx_connection_t *c,
165 ngx_quic_frames_stream_t *fs, ngx_quic_frame_t *frame,
166 ngx_quic_frame_handler_pt handler);
167
168 static ngx_int_t ngx_quic_crypto_input(ngx_connection_t *c, 169 static ngx_int_t ngx_quic_crypto_input(ngx_connection_t *c,
169 ngx_quic_frame_t *frame); 170 ngx_quic_frame_t *frame);
170 static ngx_int_t ngx_quic_handle_stream_frame(ngx_connection_t *c, 171 static ngx_int_t ngx_quic_handle_stream_frame(ngx_connection_t *c,
171 ngx_quic_header_t *pkt, ngx_quic_frame_t *frame); 172 ngx_quic_header_t *pkt, ngx_quic_frame_t *frame);
172 static ngx_int_t ngx_quic_stream_input(ngx_connection_t *c, 173 static ngx_int_t ngx_quic_stream_input(ngx_connection_t *c,
1419 return NGX_OK; 1420 return NGX_OK;
1420 } 1421 }
1421 1422
1422 1423
1423 static ngx_int_t 1424 static ngx_int_t
1424 ngx_quic_handle_crypto_frame(ngx_connection_t *c, ngx_quic_header_t *pkt,
1425 ngx_quic_frame_t *frame)
1426 {
1427 ngx_quic_connection_t *qc;
1428 ngx_quic_frames_stream_t *fs;
1429
1430 qc = c->quic;
1431 fs = &qc->crypto[pkt->level];
1432
1433 return ngx_quic_handle_ordered_frame(c, fs, frame, ngx_quic_crypto_input);
1434 }
1435
1436
1437 static ngx_int_t
1438 ngx_quic_handle_ordered_frame(ngx_connection_t *c, ngx_quic_frames_stream_t *fs, 1425 ngx_quic_handle_ordered_frame(ngx_connection_t *c, ngx_quic_frames_stream_t *fs,
1439 ngx_quic_frame_t *frame, ngx_quic_frame_handler_pt handler) 1426 ngx_quic_frame_t *frame, ngx_quic_frame_handler_pt handler)
1440 { 1427 {
1441 size_t full_len; 1428 size_t full_len;
1442 ngx_int_t rc; 1429 ngx_int_t rc;
1639 } 1626 }
1640 1627
1641 ngx_queue_insert_after(&fs->frames, &dst->queue); 1628 ngx_queue_insert_after(&fs->frames, &dst->queue);
1642 1629
1643 return NGX_OK; 1630 return NGX_OK;
1631 }
1632
1633
1634 static ngx_int_t
1635 ngx_quic_handle_crypto_frame(ngx_connection_t *c, ngx_quic_header_t *pkt,
1636 ngx_quic_frame_t *frame)
1637 {
1638 ngx_quic_connection_t *qc;
1639 ngx_quic_frames_stream_t *fs;
1640
1641 qc = c->quic;
1642 fs = &qc->crypto[pkt->level];
1643
1644 return ngx_quic_handle_ordered_frame(c, fs, frame, ngx_quic_crypto_input);
1644 } 1645 }
1645 1646
1646 1647
1647 static ngx_int_t 1648 static ngx_int_t
1648 ngx_quic_crypto_input(ngx_connection_t *c, ngx_quic_frame_t *frame) 1649 ngx_quic_crypto_input(ngx_connection_t *c, ngx_quic_frame_t *frame)