1 1.1 christos /* 2 1.1 christos * Copyright 2023 The OpenSSL Project Authors. All Rights Reserved. 3 1.1 christos * 4 1.1 christos * Licensed under the Apache License 2.0 (the "License"). You may not use 5 1.1 christos * this file except in compliance with the License. You can obtain a copy 6 1.1 christos * in the file LICENSE in the source distribution or at 7 1.1 christos * https://www.openssl.org/source/license.html 8 1.1 christos */ 9 1.1 christos 10 1.1 christos #ifndef OSSL_QUIC_ENGINE_LOCAL_H 11 1.1.1.2 christos #define OSSL_QUIC_ENGINE_LOCAL_H 12 1.1 christos 13 1.1.1.2 christos #include "internal/quic_engine.h" 14 1.1.1.2 christos #include "internal/quic_reactor.h" 15 1.1 christos 16 1.1.1.2 christos #ifndef OPENSSL_NO_QUIC 17 1.1 christos 18 1.1 christos /* 19 1.1 christos * QUIC Engine Structure 20 1.1 christos * ===================== 21 1.1 christos * 22 1.1 christos * QUIC engine internals. It is intended that only the QUIC_ENGINE, QUIC_PORT 23 1.1 christos * and QUIC_CHANNEL implementations be allowed to access this structure 24 1.1 christos * directly. 25 1.1 christos * 26 1.1 christos * Other components should not include this header. 27 1.1 christos */ 28 1.1 christos DECLARE_LIST_OF(port, QUIC_PORT); 29 1.1 christos 30 1.1 christos struct quic_engine_st { 31 1.1 christos /* All objects in a QUIC event domain share the same (libctx, propq). */ 32 1.1.1.2 christos OSSL_LIB_CTX *libctx; 33 1.1.1.2 christos const char *propq; 34 1.1 christos 35 1.1 christos /* 36 1.1 christos * Master synchronisation mutex for the entire QUIC event domain. Used for 37 1.1 christos * thread assisted mode synchronisation. We don't own this; the instantiator 38 1.1 christos * of the engine passes it to us and is responsible for freeing it after 39 1.1 christos * engine destruction. 40 1.1 christos */ 41 1.1.1.2 christos CRYPTO_MUTEX *mutex; 42 1.1 christos 43 1.1 christos /* Callback used to get the current time. */ 44 1.1.1.2 christos OSSL_TIME (*now_cb)(void *arg); 45 1.1.1.2 christos void *now_cb_arg; 46 1.1 christos 47 1.1 christos /* Asynchronous I/O reactor. */ 48 1.1.1.2 christos QUIC_REACTOR rtor; 49 1.1 christos 50 1.1 christos /* List of all child ports. */ 51 1.1.1.2 christos OSSL_LIST(port) 52 1.1.1.2 christos port_list; 53 1.1 christos 54 1.1 christos /* Inhibit tick for testing purposes? */ 55 1.1.1.2 christos unsigned int inhibit_tick : 1; 56 1.1 christos }; 57 1.1 christos 58 1.1.1.2 christos #endif 59 1.1 christos 60 1.1 christos #endif 61