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

Data types defined

Macros defined

Source code


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


  4. #ifndef _NGX_EVENT_QUIC_FRAMES_H_INCLUDED_
  5. #define _NGX_EVENT_QUIC_FRAMES_H_INCLUDED_


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


  8. typedef ngx_int_t (*ngx_quic_frame_handler_pt)(ngx_connection_t *c,
  9.     ngx_quic_frame_t *frame, void *data);


  10. ngx_quic_frame_t *ngx_quic_alloc_frame(ngx_connection_t *c);
  11. void ngx_quic_free_frame(ngx_connection_t *c, ngx_quic_frame_t *frame);
  12. void ngx_quic_free_frames(ngx_connection_t *c, ngx_queue_t *frames);
  13. void ngx_quic_queue_frame(ngx_quic_connection_t *qc, ngx_quic_frame_t *frame);
  14. ngx_int_t ngx_quic_split_frame(ngx_connection_t *c, ngx_quic_frame_t *f,
  15.     size_t len);

  16. ngx_chain_t *ngx_quic_alloc_chain(ngx_connection_t *c);
  17. void ngx_quic_free_chain(ngx_connection_t *c, ngx_chain_t *in);

  18. ngx_chain_t *ngx_quic_copy_buffer(ngx_connection_t *c, u_char *data,
  19.     size_t len);
  20. ngx_chain_t *ngx_quic_read_buffer(ngx_connection_t *c, ngx_quic_buffer_t *qb,
  21.     uint64_t limit);
  22. ngx_chain_t *ngx_quic_write_buffer(ngx_connection_t *c, ngx_quic_buffer_t *qb,
  23.     ngx_chain_t *in, uint64_t limit, uint64_t offset);
  24. void ngx_quic_skip_buffer(ngx_connection_t *c, ngx_quic_buffer_t *qb,
  25.     uint64_t offset);
  26. void ngx_quic_free_buffer(ngx_connection_t *c, ngx_quic_buffer_t *qb);

  27. #if (NGX_DEBUG)
  28. void ngx_quic_log_frame(ngx_log_t *log, ngx_quic_frame_t *f, ngx_uint_t tx);
  29. #else
  30. #define ngx_quic_log_frame(log, f, tx)
  31. #endif

  32. #endif /* _NGX_EVENT_QUIC_FRAMES_H_INCLUDED_ */