# include "internal/quic_cc.h"
# include "internal/quic_types.h"
# include "internal/quic_wire.h"
+# include "internal/quic_predef.h"
# include "internal/time.h"
# include "internal/list.h"
# ifndef OPENSSL_NO_QUIC
-typedef struct ossl_ackm_st OSSL_ACKM;
-
OSSL_ACKM *ossl_ackm_new(OSSL_TIME (*now)(void *arg),
void *now_arg,
OSSL_STATM *statm,
#include "openssl/params.h"
#include "internal/time.h"
+#include "internal/quic_predef.h"
# ifndef OPENSSL_NO_QUIC
-typedef struct ossl_cc_data_st OSSL_CC_DATA;
-
typedef struct ossl_cc_ack_info_st {
/* The time the packet being acknowledged was originally sent. */
OSSL_TIME tx_time;
*/
#define OSSL_CC_LOST_FLAG_PERSISTENT_CONGESTION (1U << 0)
-typedef struct ossl_cc_method_st {
+struct ossl_cc_method_st {
/*
* Instantiation.
*/
*/
int (*on_ecn)(OSSL_CC_DATA *ccdata,
const OSSL_CC_ECN_INFO *info);
-} OSSL_CC_METHOD;
+};
extern const OSSL_CC_METHOD ossl_cc_dummy_method;
extern const OSSL_CC_METHOD ossl_cc_newreno_method;
# include <openssl/ssl.h>
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# ifndef OPENSSL_NO_QUIC
* QUIC Control Frame Queue
* ========================
*/
-typedef struct quic_cfq_st QUIC_CFQ;
QUIC_CFQ *ossl_quic_cfq_new(void);
void ossl_quic_cfq_free(QUIC_CFQ *cfq);
SSL *tls;
} QUIC_CHANNEL_ARGS;
-typedef struct quic_channel_st QUIC_CHANNEL;
-
/* Represents the cause for a connection's termination. */
typedef struct quic_terminate_cause_st {
/*
# include <openssl/ssl.h>
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# include "internal/bio_addr.h"
# include "internal/time.h"
# include "internal/list.h"
* same allocation.
*/
-typedef struct quic_urxe_st QUIC_URXE;
-
/* Maximum number of packets we allow to exist in one datagram. */
#define QUIC_MAX_PKT_PER_URXE (sizeof(uint64_t) * 8)
void ossl_quic_urxe_insert_head(QUIC_URXE_LIST *l, QUIC_URXE *e);
void ossl_quic_urxe_insert_tail(QUIC_URXE_LIST *l, QUIC_URXE *e);
-/* Opaque type representing a demuxer. */
-typedef struct quic_demux_st QUIC_DEMUX;
-
/*
* Called when a datagram is received for a given connection ID.
*
# include "internal/time.h"
# include "internal/quic_types.h"
# include "internal/quic_wire.h"
+# include "internal/quic_predef.h"
# ifndef OPENSSL_NO_QUIC
* An ODCID has no sequence number associated with it. It is the only CID to
* lack one.
*/
-typedef struct quic_lcidm_st QUIC_LCIDM;
/*
* Creates a new LCIDM. lcid_len is the length to use for LCIDs in bytes, which
int is_multi_conn;
} QUIC_PORT_ARGS;
-typedef struct quic_port_st QUIC_PORT;
-
QUIC_PORT *ossl_quic_port_new(const QUIC_PORT_ARGS *args);
void ossl_quic_port_free(QUIC_PORT *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_fifd_st QUIC_FIFD;
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;
# include "internal/time.h"
# include "internal/sockets.h"
+# include "internal/quic_predef.h"
# include <openssl/bio.h>
# ifndef OPENSSL_NO_QUIC
* adaptation layer on top of our internal asynchronous I/O API as exposed by
* the reactor interface.
*/
-typedef struct quic_tick_result_st {
+struct quic_tick_result_st {
char net_read_desired;
char net_write_desired;
OSSL_TIME tick_deadline;
-} QUIC_TICK_RESULT;
+};
static ossl_inline ossl_unused void
ossl_quic_tick_result_merge_into(QUIC_TICK_RESULT *r,
r->tick_deadline = ossl_time_min(r->tick_deadline, src->tick_deadline);
}
-typedef struct quic_reactor_st {
+struct quic_reactor_st {
/*
* BIO poll descriptors which can be polled. poll_r is a poll descriptor
* which becomes readable when the QUIC state machine can potentially do
*/
unsigned int can_poll_r : 1;
unsigned int can_poll_w : 1;
-} QUIC_REACTOR;
+};
void ossl_quic_reactor_init(QUIC_REACTOR *rtor,
void (*tick_cb)(QUIC_TICK_RESULT *res, void *arg,
# include <openssl/ssl.h>
# include "internal/quic_wire_pkt.h"
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# include "internal/quic_record_util.h"
# include "internal/quic_demux.h"
*/
/* Information about a received packet. */
-typedef struct ossl_qrx_pkt_st {
+struct ossl_qrx_pkt_st {
/*
* Points to a logical representation of the decoded QUIC packet header. The
* data and len fields point to the decrypted QUIC payload (i.e., to a
* packets.
*/
uint64_t key_epoch;
-} OSSL_QRX_PKT;
+};
/*
* Tries to read a new decrypted packet from the QRX.
# include <openssl/ssl.h>
# include "internal/quic_wire_pkt.h"
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# include "internal/quic_record_util.h"
# ifndef OPENSSL_NO_QUIC
* -------------------
*/
-typedef struct ossl_qtx_pkt_st {
+struct ossl_qtx_pkt_st {
/* Logical packet header to be serialized. */
QUIC_PKT_HDR *hdr;
/* Packet flags. Zero or more OSSL_QTX_PKT_FLAG_* values. */
uint32_t flags;
-} OSSL_QTX_PKT;
+};
/*
* More packets will be written which should be coalesced into a single
# include "internal/time.h"
# include "internal/quic_types.h"
# include "internal/quic_wire.h"
+# include "internal/quic_predef.h"
# ifndef OPENSSL_NO_QUIC
* The opaque pointer may be used for any purpose but is intended to represent a
* connection identity and must therefore be consistent (usefully comparable).
*/
-typedef struct quic_srtm_st QUIC_SRTM;
/* Creates a new empty SRTM instance. */
QUIC_SRTM *ossl_quic_srtm_new(OSSL_LIB_CTX *libctx, const char *propq);
# include <openssl/ssl.h>
# include "internal/time.h"
+# include "internal/quic_predef.h"
# ifndef OPENSSL_NO_QUIC
-typedef struct ossl_statm_st {
+struct ossl_statm_st {
OSSL_TIME smoothed_rtt, latest_rtt, min_rtt, rtt_variance;
char have_first_sample;
-} OSSL_STATM;
+};
typedef struct ossl_rtt_info_st {
/* As defined in RFC 9002. */
#include "internal/e_os.h"
#include "internal/time.h"
#include "internal/quic_types.h"
+#include "internal/quic_predef.h"
#include "internal/quic_wire.h"
#include "internal/quic_record_tx.h"
#include "internal/quic_record_rx.h"
* datagrams. The terms 'send' and 'receive' are used when referring to the
* stream abstraction. Applications send; we transmit.
*/
-typedef struct quic_sstream_st QUIC_SSTREAM;
/*
* Instantiates a new QUIC_SSTREAM. init_buf_size specifies the initial size of
* (i.e., for a unidirectional receiving stream or for the receiving component
* of a bidirectional stream).
*/
-typedef struct quic_rstream_st QUIC_RSTREAM;
/*
* Create a new instance of QUIC_RSTREAM with pointers to the flow
# include "internal/time.h"
# include "internal/common.h"
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# include "internal/quic_stream.h"
# include "internal/quic_fc.h"
# include <openssl/lhash.h>
*
* Logical QUIC stream composing all relevant send and receive components.
*/
-typedef struct quic_stream_st QUIC_STREAM;
typedef struct quic_stream_list_node_st QUIC_STREAM_LIST_NODE;
* - allows iteration over the active streams only.
*
*/
-typedef struct quic_stream_map_st {
+struct quic_stream_map_st {
LHASH_OF(QUIC_STREAM) *map;
QUIC_STREAM_LIST_NODE active_list;
QUIC_STREAM_LIST_NODE accept_list;
QUIC_RXFC *max_streams_bidi_rxfc;
QUIC_RXFC *max_streams_uni_rxfc;
int is_server;
-} QUIC_STREAM_MAP;
+};
/*
* get_stream_limit is a callback which is called to retrieve the current stream
# include <openssl/ssl.h>
# include "internal/quic_stream.h"
+# include "internal/quic_predef.h"
-
-typedef struct quic_tls_st QUIC_TLS;
+# ifndef OPENSSL_NO_QUIC
typedef struct quic_tls_args_st {
/*
int ossl_quic_tls_is_cert_request(QUIC_TLS *qtls);
int ossl_quic_tls_has_bad_max_early_data(QUIC_TLS *qtls);
+# endif
+
#endif
# include <openssl/ssl.h>
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# include "internal/quic_record_tx.h"
# include "internal/quic_cfq.h"
# include "internal/quic_txpim.h"
} OSSL_QUIC_TX_PACKETISER_ARGS;
-typedef struct ossl_quic_tx_packetiser_st OSSL_QUIC_TX_PACKETISER;
-
OSSL_QUIC_TX_PACKETISER *ossl_quic_tx_packetiser_new(const OSSL_QUIC_TX_PACKETISER_ARGS *args);
typedef void (ossl_quic_initial_token_free_fn)(const unsigned char *buf,
# include <openssl/ssl.h>
# include "internal/quic_types.h"
+# include "internal/quic_predef.h"
# include "internal/quic_cfq.h"
# include "internal/quic_ackm.h"
* QUIC Transmitted Packet Information Manager
* ===========================================
*/
-typedef struct quic_txpim_st QUIC_TXPIM;
-typedef struct quic_fifd_st QUIC_FIFD;
typedef struct quic_txpim_pkt_st {
/* ACKM-specific data. Caller should fill this. */