/*
- * 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
# include "internal/quic_cfq.h"
# include "internal/quic_ackm.h"
+# ifndef OPENSSL_NO_QUIC
+
/*
* QUIC Transmitted Packet Information Manager
* ===========================================
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;
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;
/*
* 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);
*
* 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