summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-04-18 19:30:55 +0100
committerHugo Landau <hlandau@openssl.org>2023-05-12 14:47:11 +0100
commit1bca3f1b2d139c2306fd65d23583e4d16bdc11f9 (patch)
treef05348068242a8440696a39863b9d5822035cd7f /include
parente1dee2e37971e068d6aff25dbfc92ef4db5adbd9 (diff)
downloadopenssl-new-1bca3f1b2d139c2306fd65d23583e4d16bdc11f9.tar.gz
QUIC DISPATCH/APL: Implement SSL_get_stream_type
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20765)
Diffstat (limited to 'include')
-rw-r--r--include/internal/quic_ssl.h1
-rw-r--r--include/openssl/ssl.h.in6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/internal/quic_ssl.h b/include/internal/quic_ssl.h
index 86dca6bb30..35873cd51d 100644
--- a/include/internal/quic_ssl.h
+++ b/include/internal/quic_ssl.h
@@ -67,6 +67,7 @@ __owur int ossl_quic_conn_set_initial_peer_addr(SSL *s,
const BIO_ADDR *peer_addr);
__owur SSL *ossl_quic_conn_stream_new(SSL *s, uint64_t flags);
__owur SSL *ossl_quic_get0_connection(SSL *s);
+__owur int ossl_quic_get_stream_type(SSL *s);
/*
* Used to override ossl_time_now() for debug purposes. Must be called before
diff --git a/include/openssl/ssl.h.in b/include/openssl/ssl.h.in
index 1c94f053fd..25208ca294 100644
--- a/include/openssl/ssl.h.in
+++ b/include/openssl/ssl.h.in
@@ -2269,6 +2269,12 @@ __owur int SSL_set_initial_peer_addr(SSL *s, const BIO_ADDR *peer_addr);
__owur SSL *SSL_get0_connection(SSL *s);
__owur int SSL_is_connection(SSL *s);
+#define SSL_STREAM_TYPE_NONE 0
+#define SSL_STREAM_TYPE_READ 1
+#define SSL_STREAM_TYPE_WRITE 2
+#define SSL_STREAM_TYPE_BIDI (SSL_STREAM_TYPE_READ | SSL_STREAM_TYPE_WRITE)
+__owur int SSL_get_stream_type(SSL *s);
+
#define SSL_STREAM_FLAG_UNI (1U << 0)
__owur SSL *SSL_new_stream(SSL *s, uint64_t flags);