QUIC CHANNEL: Consolidate forward object declarations in a single header
authorHugo Landau <hlandau@openssl.org>
Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 21 Dec 2023 08:11:59 +0000 (08:11 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

include/internal/quic_channel.h
include/internal/quic_predef.h [new file with mode: 0644]
ssl/quic/quic_channel_local.h
test/quic_multistream_test.c
util/quicserver.c

index f46db0637e91c6a34745f56b6822cd164035c7c5..6f883faf76d702038a8b05e88f7eaba1bdf658f2 100644 (file)
@@ -12,9 +12,9 @@
 
 # include <openssl/ssl.h>
 # include "internal/quic_types.h"
-# include "internal/quic_stream_map.h"
-# include "internal/quic_reactor.h"
-# include "internal/quic_statm.h"
+# include "internal/quic_record_tx.h"
+# include "internal/quic_wire.h"
+# include "internal/quic_predef.h"
 # include "internal/time.h"
 # include "internal/thread.h"
 
diff --git a/include/internal/quic_predef.h b/include/internal/quic_predef.h
new file mode 100644 (file)
index 0000000..2512810
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifndef OSSL_QUIC_PREDEF_H
+# define OSSL_QUIC_PREDEF_H
+
+# ifndef OPENSSL_NO_QUIC
+
+typedef struct quic_port_st QUIC_PORT;
+typedef struct quic_channel_st QUIC_CHANNEL;
+typedef struct quic_tls_st QUIC_TLS;
+typedef struct quic_txpim_st QUIC_TXPIM;
+typedef struct quic_cfq_st QUIC_CFQ;
+typedef struct ossl_quic_tx_packetiser_st OSSL_QUIC_TX_PACKETISER;
+typedef struct ossl_ackm_st OSSL_ACKM;
+typedef struct quic_srt_elem_st QUIC_SRT_ELEM;
+typedef struct ossl_cc_data_st OSSL_CC_DATA;
+typedef struct ossl_cc_method_st OSSL_CC_METHOD;
+typedef struct quic_stream_map_st QUIC_STREAM_MAP;
+typedef struct quic_stream_st QUIC_STREAM;
+typedef struct quic_sstream_st QUIC_SSTREAM;
+typedef struct quic_rstream_st QUIC_RSTREAM;
+typedef struct quic_reactor_st QUIC_REACTOR;
+typedef struct ossl_statm_st OSSL_STATM;
+typedef struct quic_demux_st QUIC_DEMUX;
+typedef struct ossl_qrx_pkt_st OSSL_QRX_PKT;
+typedef struct ossl_qtx_pkt_st OSSL_QTX_PKT;
+typedef struct quic_tick_result_st QUIC_TICK_RESULT;
+typedef struct quic_srtm_st QUIC_SRTM;
+typedef struct quic_lcidm_st QUIC_LCIDM;
+typedef struct quic_urxe_st QUIC_URXE;
+
+# endif
+
+#endif
index f0ac74242087ab683cdf86c7f14016e4e5370d85..f4a02559c6480f70462606ff0460311c010696c1 100644 (file)
@@ -7,9 +7,9 @@
 
 #  include <openssl/lhash.h>
 #  include "internal/list.h"
-
-
-typedef struct quic_srt_elem_st QUIC_SRT_ELEM;
+#  include "internal/quic_predef.h"
+#  include "internal/quic_fc.h"
+#  include "internal/quic_stream_map.h"
 
 struct quic_srt_elem_st {
     OSSL_LIST_MEMBER(stateless_reset_tokens, QUIC_SRT_ELEM);
index 22a753ad673b309b5fd6daea2e7d809481597759..d0560bb04186ece2b50bf6143bb3ef9213dbf3ab 100644 (file)
@@ -13,6 +13,7 @@
 #include "internal/quic_tserver.h"
 #include "internal/quic_ssl.h"
 #include "internal/quic_error.h"
+#include "internal/quic_stream_map.h"
 #include "testutil.h"
 #include "helpers/quictestlib.h"
 #if defined(OPENSSL_THREADS)
index b5c15806a34bba6a3d596ddde09fc11fb1f55c93..d752340882ca5f3923407703e9d657d28e52ca2f 100644 (file)
@@ -19,6 +19,7 @@
 #include "internal/e_os.h"
 #include "internal/sockets.h"
 #include "internal/quic_tserver.h"
+#include "internal/quic_stream_map.h"
 #include "internal/time.h"
 
 static BIO *bio_err = NULL;