src/event/quic/ngx_event_quic_migration.h - nginx source code

Macros defined

Source code


  1. /*
  2. * Copyright (C) Nginx, Inc.
  3. */


  4. #ifndef _NGX_EVENT_QUIC_MIGRATION_H_INCLUDED_
  5. #define _NGX_EVENT_QUIC_MIGRATION_H_INCLUDED_


  6. #include <ngx_config.h>
  7. #include <ngx_core.h>

  8. #define NGX_QUIC_PATH_RETRIES   3

  9. #define NGX_QUIC_PATH_PROBE     0
  10. #define NGX_QUIC_PATH_ACTIVE    1
  11. #define NGX_QUIC_PATH_BACKUP    2

  12. #define ngx_quic_path_dbg(c, msg, path)                                       \
  13.     ngx_log_debug7(NGX_LOG_DEBUG_EVENT, c->log, 0,                            \
  14.                    "quic path seq:%uL %s tx:%O rx:%O valid:%d st:%d mtu:%uz", \
  15.                    path->seqnum, msg, path->sent, path->received,             \
  16.                    path->validated, path->state, path->mtu);

  17. ngx_int_t ngx_quic_handle_path_challenge_frame(ngx_connection_t *c,
  18.     ngx_quic_header_t *pkt, ngx_quic_path_challenge_frame_t *f);
  19. ngx_int_t ngx_quic_handle_path_response_frame(ngx_connection_t *c,
  20.     ngx_quic_path_challenge_frame_t *f);

  21. ngx_quic_path_t *ngx_quic_new_path(ngx_connection_t *c,
  22.     struct sockaddr *sockaddr, socklen_t socklen, ngx_quic_client_id_t *cid);
  23. ngx_int_t ngx_quic_free_path(ngx_connection_t *c, ngx_quic_path_t *path);

  24. ngx_int_t ngx_quic_set_path(ngx_connection_t *c, ngx_quic_header_t *pkt);
  25. ngx_int_t ngx_quic_handle_migration(ngx_connection_t *c,
  26.     ngx_quic_header_t *pkt);

  27. void ngx_quic_path_handler(ngx_event_t *ev);

  28. void ngx_quic_discover_path_mtu(ngx_connection_t *c, ngx_quic_path_t *path);
  29. ngx_int_t ngx_quic_handle_path_mtu(ngx_connection_t *c,
  30.     ngx_quic_path_t *path, uint64_t min, uint64_t max);

  31. #endif /* _NGX_EVENT_QUIC_MIGRATION_H_INCLUDED_ */