diff options
| author | Vladimir Homutov <vl@nginx.com> | 2021-03-31 14:57:15 +0300 |
|---|---|---|
| committer | Vladimir Homutov <vl@nginx.com> | 2021-03-31 14:57:15 +0300 |
| commit | 79b66760a19599fa4b2cb3b9aa3c3e7e937df8ae (patch) | |
| tree | 325af26e1d57bbad96b52073c07360ba25d4fefe /src/event/quic/ngx_event_quic_migration.c | |
| parent | bd90c0ab796a3a321d17262c189bde334746acc3 (diff) | |
| download | nginx-79b66760a19599fa4b2cb3b9aa3c3e7e937df8ae.tar.gz nginx-79b66760a19599fa4b2cb3b9aa3c3e7e937df8ae.tar.bz2 | |
QUIC: distinct files for connection migration.
The connection migration-related code from quic.c with dependencies is moved
into separate file.
Diffstat (limited to 'src/event/quic/ngx_event_quic_migration.c')
| -rw-r--r-- | src/event/quic/ngx_event_quic_migration.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/event/quic/ngx_event_quic_migration.c b/src/event/quic/ngx_event_quic_migration.c new file mode 100644 index 000000000..de3d6885d --- /dev/null +++ b/src/event/quic/ngx_event_quic_migration.c @@ -0,0 +1,46 @@ + +/* + * Copyright (C) Nginx, Inc. + */ + + +#include <ngx_config.h> +#include <ngx_core.h> +#include <ngx_event.h> +#include <ngx_event_quic_transport.h> +#include <ngx_event_quic_connection.h> +#include <ngx_event_quic_migration.h> + + +ngx_int_t +ngx_quic_handle_path_challenge_frame(ngx_connection_t *c, + ngx_quic_header_t *pkt, ngx_quic_path_challenge_frame_t *f) +{ + ngx_quic_frame_t *frame; + ngx_quic_connection_t *qc; + + qc = ngx_quic_get_connection(c); + + frame = ngx_quic_alloc_frame(c); + if (frame == NULL) { + return NGX_ERROR; + } + + frame->level = pkt->level; + frame->type = NGX_QUIC_FT_PATH_RESPONSE; + frame->u.path_response = *f; + + ngx_quic_queue_frame(qc, frame); + + return NGX_OK; +} + + +ngx_int_t +ngx_quic_handle_path_response_frame(ngx_connection_t *c, + ngx_quic_header_t *pkt, ngx_quic_path_challenge_frame_t *f) +{ + /* TODO */ + return NGX_OK; +} + |
