diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-04-18 20:30:54 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-05-12 15:47:11 +0200 |
commit | 26ad16ea84c58d91375491c0872e43dc27915b4a (patch) | |
tree | 4552b501ab015b9da6d258ceed06dae714865224 /include | |
parent | QUIC CHANNEL: Store TPs for initial flow control in TX direction (diff) | |
download | openssl-26ad16ea84c58d91375491c0872e43dc27915b4a.tar.xz openssl-26ad16ea84c58d91375491c0872e43dc27915b4a.zip |
QUIC CHANNEL: Handle any number of streams
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_stream_map.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/internal/quic_stream_map.h b/include/internal/quic_stream_map.h index b4e0993eb5..f9a04723c1 100644 --- a/include/internal/quic_stream_map.h +++ b/include/internal/quic_stream_map.h @@ -166,6 +166,16 @@ void ossl_quic_stream_map_cleanup(QUIC_STREAM_MAP *qsm); #define QUIC_STREAM_DIR_UNI 2 #define QUIC_STREAM_DIR_MASK 2 +static ossl_inline ossl_unused int ossl_quic_stream_is_server_init(QUIC_STREAM *s) +{ + return (s->type & QUIC_STREAM_INITIATOR_MASK) == QUIC_STREAM_INITIATOR_SERVER; +} + +static ossl_inline ossl_unused int ossl_quic_stream_is_bidi(QUIC_STREAM *s) +{ + return (s->type & QUIC_STREAM_DIR_MASK) == QUIC_STREAM_DIR_BIDI; +} + /* * Allocate a new stream. type is a combination of one QUIC_STREAM_INITIATOR_* * value and one QUIC_STREAM_DIR_* value. Note that clients can e.g. allocate |