]>
Commit | Line | Data |
---|---|---|
0ede517c HL |
1 | /* |
2 | * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. | |
3 | * | |
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 | |
8 | */ | |
9 | ||
10 | #ifndef OSSL_QUIC_FIFD_H | |
11 | # define OSSL_QUIC_FIFD_H | |
12 | ||
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 | ||
20 | /* | |
21 | * QUIC Frame-in-Flight Dispatcher (FIFD) | |
22 | * ====================================== | |
23 | */ | |
24 | struct quic_fifd_st { | |
25 | /* Internal data; use the ossl_quic_fifd functions. */ | |
26 | QUIC_CFQ *cfq; | |
27 | OSSL_ACKM *ackm; | |
28 | QUIC_TXPIM *txpim; | |
29 | QUIC_SSTREAM *(*get_sstream_by_id)(uint64_t stream_id, | |
a73078b7 | 30 | uint32_t pn_space, |
0ede517c HL |
31 | void *arg); |
32 | void *get_sstream_by_id_arg; | |
33 | void (*regen_frame)(uint64_t frame_type, | |
34 | uint64_t stream_id, | |
a73078b7 | 35 | QUIC_TXPIM_PKT *pkt, |
0ede517c HL |
36 | void *arg); |
37 | void *regen_frame_arg; | |
38 | }; | |
39 | ||
40 | int ossl_quic_fifd_init(QUIC_FIFD *fifd, | |
41 | QUIC_CFQ *cfq, | |
42 | OSSL_ACKM *ackm, | |
43 | QUIC_TXPIM *txpim, | |
44 | /* stream_id is UINT64_MAX for the crypto stream */ | |
45 | QUIC_SSTREAM *(*get_sstream_by_id)(uint64_t stream_id, | |
a73078b7 | 46 | uint32_t pn_space, |
0ede517c HL |
47 | void *arg), |
48 | void *get_sstream_by_id_arg, | |
49 | /* stream_id is UINT64_MAX if not applicable */ | |
50 | void (*regen_frame)(uint64_t frame_type, | |
51 | uint64_t stream_id, | |
a73078b7 | 52 | QUIC_TXPIM_PKT *pkt, |
0ede517c HL |
53 | void *arg), |
54 | void *regen_frame_arg); | |
55 | ||
56 | void ossl_quic_fifd_cleanup(QUIC_FIFD *fifd); /* (no-op) */ | |
57 | ||
58 | int ossl_quic_fifd_pkt_commit(QUIC_FIFD *fifd, QUIC_TXPIM_PKT *pkt); | |
59 | ||
60 | #endif |