2 * Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 #ifndef OSSL_QUIC_FIFD_H
11 # define OSSL_QUIC_FIFD_H
13 # include <openssl/ssl.h>
14 # include "internal/quic_types.h"
15 # include "internal/quic_cfq.h"
16 # include "internal/quic_ackm.h"
17 # include "internal/quic_txpim.h"
18 # include "internal/quic_stream.h"
19 # include "internal/qlog.h"
21 # ifndef OPENSSL_NO_QUIC
24 * QUIC Frame-in-Flight Dispatcher (FIFD)
25 * ======================================
28 /* Internal data; use the ossl_quic_fifd functions. */
32 QUIC_SSTREAM *(*get_sstream_by_id)(uint64_t stream_id,
35 void *get_sstream_by_id_arg;
36 void (*regen_frame)(uint64_t frame_type,
40 void *regen_frame_arg;
41 void (*confirm_frame)(uint64_t frame_type,
45 void *confirm_frame_arg;
46 void (*sstream_updated)(uint64_t stream_id,
48 void *sstream_updated_arg;
52 int ossl_quic_fifd_init(QUIC_FIFD *fifd,
56 /* stream_id is UINT64_MAX for the crypto stream */
57 QUIC_SSTREAM *(*get_sstream_by_id)(uint64_t stream_id,
60 void *get_sstream_by_id_arg,
61 /* stream_id is UINT64_MAX if not applicable */
62 void (*regen_frame)(uint64_t frame_type,
66 void *regen_frame_arg,
67 void (*confirm_frame)(uint64_t frame_type,
71 void *confirm_frame_arg,
72 void (*sstream_updated)(uint64_t stream_id,
74 void *sstream_updated_arg,
77 void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */
79 int ossl_quic_fifd_pkt_commit(QUIC_FIFD *fifd, QUIC_TXPIM_PKT *pkt);
81 void ossl_quic_fifd_set0_qlog(QUIC_FIFD *fifd, QLOG *qlog);