]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
QUIC: Add transport parameter and other constants
authorHugo Landau <hlandau@openssl.org>
Mon, 31 Oct 2022 15:54:14 +0000 (15:54 +0000)
committerHugo Landau <hlandau@openssl.org>
Fri, 13 Jan 2023 13:20:12 +0000 (13:20 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)

include/internal/quic_stream_map.h
include/internal/quic_types.h
include/internal/quic_wire.h
ssl/quic/quic_stream_map.c

index 71583342196f170289f13d3c0d31bb4105ce30d7..5f0e0347e4f70733def8bcde97e13aa9be97c432 100644 (file)
@@ -61,7 +61,7 @@ struct quic_stream_st {
     uint64_t        txp_txfc_new_credit_consumed;
 
     QUIC_SSTREAM    *sstream;   /* NULL if RX-only */
-    void            *rstream;   /* NULL if TX only (placeholder) */
+    QUIC_RSTREAM    *rstream;   /* NULL if TX only */
     QUIC_TXFC       txfc;       /* NULL if RX-only */
     QUIC_RXFC       rxfc;       /* NULL if TX-only */
     unsigned int    type   : 8; /* QUIC_STREAM_INITIATOR_*, QUIC_STREAM_DIR_* */
index f288853a944c3a6d288c877e61318acb3b4e964d..95c0508624c4408ab7926ac08ea4484d38e8cf83 100644 (file)
@@ -81,4 +81,7 @@ static ossl_unused ossl_inline int ossl_quic_conn_id_eq(const QUIC_CONN_ID *a,
 
 #define QUIC_MIN_INITIAL_DGRAM_LEN  1200
 
+#define QUIC_DEFAULT_ACK_DELAY_EXP  3
+#define QUIC_MAX_ACK_DELAY_EXP      20
+
 #endif
index dec7aeddc1e0235781e70b14a1d7e834482bdef9..e1d001c4e367c0b5768cef3d1cf0133011225a2f 100644 (file)
@@ -100,6 +100,25 @@ ossl_quic_frame_type_is_ack_eliciting(uint64_t frame_type)
     }
 }
 
+/* QUIC Transport Parameter Types */
+#define QUIC_TPARAM_ORIG_DCID                           0x00
+#define QUIC_TPARAM_MAX_IDLE_TIMEOUT                    0x01
+#define QUIC_TPARAM_STATELESS_RESET_TOKEN               0x02
+#define QUIC_TPARAM_MAX_UDP_PAYLOAD_SIZE                0x03
+#define QUIC_TPARAM_INITIAL_MAX_DATA                    0x04
+#define QUIC_TPARAM_INITIAL_MAX_STREAM_DATA_BIDI_LOCAL  0x05
+#define QUIC_TPARAM_INITIAL_MAX_STREAM_DATA_BIDI_REMOTE 0x06
+#define QUIC_TPARAM_INITIAL_MAX_STREAM_DATA_UNI         0x07
+#define QUIC_TPARAM_INITIAL_MAX_STREAMS_BIDI            0x08
+#define QUIC_TPARAM_INITIAL_MAX_STREAMS_UNI             0x09
+#define QUIC_TPARAM_ACK_DELAY_EXP                       0x0A
+#define QUIC_TPARAM_MAX_ACK_DELAY                       0x0B
+#define QUIC_TPARAM_DISABLE_ACTIVE_MIGRATION            0x0C
+#define QUIC_TPARAM_PREFERRED_ADDR                      0x0D
+#define QUIC_TPARAM_ACTIVE_CONN_ID_LIMIT                0x0E
+#define QUIC_TPARAM_INITIAL_SCID                        0x0F
+#define QUIC_TPARAM_RETRY_SCID                          0x10
+
 /*
  * QUIC Frame Logical Representations
  * ==================================
index 043a631fec071c529212e505e68fab70cf56e056..d080bac2339477fa3812746f3b221a3c17a24625 100644 (file)
@@ -154,6 +154,9 @@ void ossl_quic_stream_map_release(QUIC_STREAM_MAP *qsm, QUIC_STREAM *stream)
     ossl_quic_sstream_free(stream->sstream);
     stream->sstream = NULL;
 
+    ossl_quic_rstream_free(stream->rstream);
+    stream->rstream = NULL;
+
     lh_QUIC_STREAM_delete(qsm->map, stream);
     OPENSSL_free(stream);
 }