Copyright year updates
[openssl.git] / include / internal / quic_txpim.h
index 087d13363fb84588cd081b88958b36f245ef1bdf..ed6e3875c47b2def02a9c81ba3648a337f36377b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2022-2023 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -15,6 +15,8 @@
 # include "internal/quic_cfq.h"
 # include "internal/quic_ackm.h"
 
+# ifndef OPENSSL_NO_QUIC
+
 /*
  * QUIC Transmitted Packet Information Manager
  * ===========================================
@@ -38,6 +40,7 @@ typedef struct quic_txpim_pkt_st {
     unsigned int        had_max_streams_bidi_frame  : 1;
     unsigned int        had_max_streams_uni_frame   : 1;
     unsigned int        had_ack_frame               : 1;
+    unsigned int        had_conn_close              : 1;
 
     /* Private data follows. */
 } QUIC_TXPIM_PKT;
@@ -48,7 +51,9 @@ typedef struct quic_txpim_chunk_st {
     uint64_t        stream_id;
     /*
      * The inclusive range of bytes in the stream. Exceptionally, if end <
-     * start, designates a frame of zero length (used for FIN-only frames).
+     * start, designates a frame of zero length (used for FIN-only frames). In
+     * this case end is the number of the final byte (i.e., one less than the
+     * final size of the stream).
      */
     uint64_t        start, end;
     /*
@@ -56,6 +61,16 @@ typedef struct quic_txpim_chunk_st {
      * CRYPTO stream.
      */
     unsigned int    has_fin : 1;
+    /*
+     * If set, a STOP_SENDING frame was sent for this stream ID. (If no data was
+     * sent for the stream, set end < start.)
+     */
+    unsigned int    has_stop_sending : 1;
+    /*
+     * If set, a RESET_STREAM frame was sent for this stream ID. (If no data was
+     * sent for the stream, set end < start.)
+     */
+    unsigned int    has_reset_stream : 1;
 } QUIC_TXPIM_CHUNK;
 
 QUIC_TXPIM *ossl_quic_txpim_new(void);
@@ -99,18 +114,20 @@ void ossl_quic_txpim_pkt_add_cfq_item(QUIC_TXPIM_PKT *fpkt,
  *
  * The chunks are sorted by (stream_id, start) in ascending order.
  */
-const QUIC_TXPIM_CHUNK *ossl_quic_txpim_pkt_get_chunks(QUIC_TXPIM_PKT *fpkt);
+const QUIC_TXPIM_CHUNK *ossl_quic_txpim_pkt_get_chunks(const QUIC_TXPIM_PKT *fpkt);
 
 /*
  * Returns the number of entries in the array returned by
  * ossl_quic_txpim_pkt_get_chunks().
  */
-size_t ossl_quic_txpim_pkt_get_num_chunks(QUIC_TXPIM_PKT *fpkt);
+size_t ossl_quic_txpim_pkt_get_num_chunks(const QUIC_TXPIM_PKT *fpkt);
 
 /*
  * Returns the number of QUIC_TXPIM_PKTs allocated by the given TXPIM that have
  * yet to be returned to the TXPIM.
  */
-size_t ossl_quic_txpim_get_in_use(QUIC_TXPIM *txpim);
+size_t ossl_quic_txpim_get_in_use(const QUIC_TXPIM *txpim);
+
+# endif
 
 #endif