Skip to content

Commit

Permalink
QUIC CHANNEL: Consolidate forward object declarations in a single header
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #22674)
  • Loading branch information
hlandau committed Dec 21, 2023
1 parent 26624ca commit e801455
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
6 changes: 3 additions & 3 deletions include/internal/quic_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
41 changes: 41 additions & 0 deletions include/internal/quic_predef.h
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions ssl/quic/quic_channel_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions test/quic_multistream_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions util/quicserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e801455

Please sign in to comment.