Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/openssl/ssl/quic/quic_engine_local.h
48261 views
1
/*
2
* Copyright 2023 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_ENGINE_LOCAL_H
11
# define OSSL_QUIC_ENGINE_LOCAL_H
12
13
# include "internal/quic_engine.h"
14
# include "internal/quic_reactor.h"
15
16
# ifndef OPENSSL_NO_QUIC
17
18
/*
19
* QUIC Engine Structure
20
* =====================
21
*
22
* QUIC engine internals. It is intended that only the QUIC_ENGINE, QUIC_PORT
23
* and QUIC_CHANNEL implementations be allowed to access this structure
24
* directly.
25
*
26
* Other components should not include this header.
27
*/
28
DECLARE_LIST_OF(port, QUIC_PORT);
29
30
struct quic_engine_st {
31
/* All objects in a QUIC event domain share the same (libctx, propq). */
32
OSSL_LIB_CTX *libctx;
33
const char *propq;
34
35
/*
36
* Master synchronisation mutex for the entire QUIC event domain. Used for
37
* thread assisted mode synchronisation. We don't own this; the instantiator
38
* of the engine passes it to us and is responsible for freeing it after
39
* engine destruction.
40
*/
41
CRYPTO_MUTEX *mutex;
42
43
/* Callback used to get the current time. */
44
OSSL_TIME (*now_cb)(void *arg);
45
void *now_cb_arg;
46
47
/* Asynchronous I/O reactor. */
48
QUIC_REACTOR rtor;
49
50
/* List of all child ports. */
51
OSSL_LIST(port) port_list;
52
53
/* Inhibit tick for testing purposes? */
54
unsigned int inhibit_tick : 1;
55
};
56
57
# endif
58
59
#endif
60
61