+/* Make sure our custom fields don't overlap with the fields we use in
+ .connection
+*/
+STATIC_ASSERT (offsetof (quic_ctx_t, _qctx_end_marker) <=
+ TRANSPORT_CONN_ID_LEN,
+ "connection data must be less than TRANSPORT_CONN_ID_LEN bytes");
+STATIC_ASSERT (offsetof (quic_ctx_t, _sctx_end_marker) <=
+ TRANSPORT_CONN_ID_LEN,
+ "connection data must be less than TRANSPORT_CONN_ID_LEN bytes");
+
+/* single-entry session cache */
+typedef struct quic_session_cache_
+{
+ ptls_encrypt_ticket_t super;
+ uint8_t id[32];
+ ptls_iovec_t data;
+} quic_session_cache_t;
+
+typedef struct quic_stream_data_
+{
+ u32 ctx_id;
+ u32 thread_index;
+ u32 app_rx_data_len; /**< bytes received, to be read by external app */
+ u32 app_tx_data_len; /**< bytes sent */
+} quic_stream_data_t;
+
+typedef struct quic_crypto_context_data_
+{
+ quicly_context_t quicly_ctx;
+ char cid_key[QUIC_IV_LEN];
+ ptls_context_t ptls_ctx;
+} quic_crypto_context_data_t;
+
+typedef struct quic_encrypt_cb_ctx_
+{
+ quicly_datagram_t *packet;
+ struct quic_finalize_send_packet_cb_ctx_
+ {
+ size_t payload_from;
+ size_t first_byte_at;
+ ptls_cipher_context_t *hp;
+ } snd_ctx[QUIC_MAX_COALESCED_PACKET];
+ size_t snd_ctx_count;
+} quic_encrypt_cb_ctx;
+
+typedef struct quic_crypto_batch_ctx_
+{
+ vnet_crypto_op_t aead_crypto_tx_packets_ops[QUIC_SEND_MAX_BATCH_PACKETS],
+ aead_crypto_rx_packets_ops[QUIC_RCV_MAX_BATCH_PACKETS];
+ size_t nb_tx_packets, nb_rx_packets;
+} quic_crypto_batch_ctx_t;
+