diff options
Diffstat (limited to 'ssl/quic/quic_local.h')
-rw-r--r-- | ssl/quic/quic_local.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/ssl/quic/quic_local.h b/ssl/quic/quic_local.h index 3305b03aec..33301c9a13 100644 --- a/ssl/quic/quic_local.h +++ b/ssl/quic/quic_local.h @@ -12,16 +12,32 @@ # include <openssl/ssl.h> # include "internal/quic_ssl.h" /* QUIC_CONNECTION */ +# include "internal/quic_fc.h" +# include "internal/quic_stream.h" # include "../ssl_local.h" -struct quic_conn_st { - /* type identifier and common data */ +struct quic_stream_st { + /* type identifier and common data for the public SSL object */ struct ssl_st ssl; + + /* QUIC_CONNECTION that this stream belongs to */ + QUIC_CONNECTION *conn; + /* receive flow controller */ + QUIC_RXFC *rxfc; + /* receive and send stream objects */ + QUIC_RSTREAM *rstream; + QUIC_SSTREAM *sstream; +}; + +struct quic_conn_st { + /* QUIC connection is always a stream (the stream id 0) */ + struct quic_stream_st stream; /* the associated tls-1.3 connection data */ SSL *tls; - /* For QUIC, diverse handlers */ + /* QUIC ack manager */ OSSL_ACKM *ackm; + /* QUIC receive record layer */ OSSL_QRX *qrx; }; @@ -31,6 +47,13 @@ struct quic_conn_st { ? (c QUIC_CONNECTION *)(ssl) \ : NULL)) +# define QUIC_STREAM_FROM_SSL_int(ssl, c) \ + ((ssl) == NULL ? NULL \ + : ((ssl)->type == SSL_TYPE_QUIC_CONNECTION \ + || (ssl)->type == SSL_TYPE_QUIC_STREAM \ + ? (c QUIC_STREAM *)(ssl) \ + : NULL)) + # define SSL_CONNECTION_FROM_QUIC_SSL_int(ssl, c) \ ((ssl) == NULL ? NULL \ : ((ssl)->type == SSL_TYPE_QUIC_CONNECTION \ @@ -41,6 +64,10 @@ struct quic_conn_st { QUIC_CONNECTION_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST) # define QUIC_CONNECTION_FROM_CONST_SSL(ssl) \ QUIC_CONNECTION_FROM_SSL_int(ssl, const) +# define QUIC_STREAM_FROM_SSL(ssl) \ + QUIC_STREAM_FROM_SSL_int(ssl, SSL_CONNECTION_NO_CONST) +# define QUIC_STREAM_FROM_CONST_SSL(ssl) \ + QUIC_STREAM_FROM_SSL_int(ssl, const) # define SSL_CONNECTION_FROM_QUIC_SSL(ssl) \ SSL_CONNECTION_FROM_QUIC_SSL_int(ssl, SSL_CONNECTION_NO_CONST) # define SSL_CONNECTION_FROM_CONST_QUIC_SSL(ssl) \ |