123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- #ifndef OSSL_QUIC_TXP_H
- # define OSSL_QUIC_TXP_H
- # include <openssl/ssl.h>
- # include "internal/quic_types.h"
- # include "internal/quic_predef.h"
- # include "internal/quic_record_tx.h"
- # include "internal/quic_cfq.h"
- # include "internal/quic_txpim.h"
- # include "internal/quic_stream.h"
- # include "internal/quic_stream_map.h"
- # include "internal/quic_fc.h"
- # include "internal/bio_addr.h"
- # include "internal/time.h"
- # include "internal/qlog.h"
- # ifndef OPENSSL_NO_QUIC
- typedef struct ossl_quic_tx_packetiser_args_st {
-
- QUIC_CONN_ID cur_scid;
- QUIC_CONN_ID cur_dcid;
- BIO_ADDR peer;
- uint32_t ack_delay_exponent;
-
- OSSL_QTX *qtx;
- QUIC_TXPIM *txpim;
- QUIC_CFQ *cfq;
- OSSL_ACKM *ackm;
- QUIC_STREAM_MAP *qsm;
- QUIC_TXFC *conn_txfc;
- QUIC_RXFC *conn_rxfc;
- QUIC_RXFC *max_streams_bidi_rxfc;
- QUIC_RXFC *max_streams_uni_rxfc;
- const OSSL_CC_METHOD *cc_method;
- OSSL_CC_DATA *cc_data;
- OSSL_TIME (*now)(void *arg);
- void *now_arg;
- QLOG *(*get_qlog_cb)(void *arg);
- void *get_qlog_cb_arg;
-
- QUIC_SSTREAM *crypto[QUIC_PN_SPACE_NUM];
- } OSSL_QUIC_TX_PACKETISER_ARGS;
- OSSL_QUIC_TX_PACKETISER *ossl_quic_tx_packetiser_new(const OSSL_QUIC_TX_PACKETISER_ARGS *args);
- typedef void (ossl_quic_initial_token_free_fn)(const unsigned char *buf,
- size_t buf_len, void *arg);
- void ossl_quic_tx_packetiser_free(OSSL_QUIC_TX_PACKETISER *txp);
- void ossl_quic_tx_packetiser_record_received_closing_bytes(
- OSSL_QUIC_TX_PACKETISER *txp, size_t n);
- typedef struct quic_txp_status_st {
- int sent_ack_eliciting;
- int sent_handshake;
- size_t sent_pkt;
- } QUIC_TXP_STATUS;
- int ossl_quic_tx_packetiser_generate(OSSL_QUIC_TX_PACKETISER *txp,
- QUIC_TXP_STATUS *status);
- OSSL_TIME ossl_quic_tx_packetiser_get_deadline(OSSL_QUIC_TX_PACKETISER *txp);
- int ossl_quic_tx_packetiser_set_initial_token(OSSL_QUIC_TX_PACKETISER *txp,
- const unsigned char *token,
- size_t token_len,
- ossl_quic_initial_token_free_fn *free_cb,
- void *free_cb_arg);
- int ossl_quic_tx_packetiser_set_cur_dcid(OSSL_QUIC_TX_PACKETISER *txp,
- const QUIC_CONN_ID *dcid);
- int ossl_quic_tx_packetiser_set_cur_scid(OSSL_QUIC_TX_PACKETISER *txp,
- const QUIC_CONN_ID *scid);
- int ossl_quic_tx_packetiser_set_peer(OSSL_QUIC_TX_PACKETISER *txp,
- const BIO_ADDR *peer);
- void ossl_quic_tx_packetiser_set_qlog_cb(OSSL_QUIC_TX_PACKETISER *txp,
- QLOG *(*get_qlog_cb)(void *arg),
- void *get_qlog_cb_arg);
- int ossl_quic_tx_packetiser_discard_enc_level(OSSL_QUIC_TX_PACKETISER *txp,
- uint32_t enc_level);
- void ossl_quic_tx_packetiser_notify_handshake_complete(OSSL_QUIC_TX_PACKETISER *txp);
- void ossl_quic_tx_packetiser_schedule_handshake_done(OSSL_QUIC_TX_PACKETISER *txp);
- void ossl_quic_tx_packetiser_schedule_ack_eliciting(OSSL_QUIC_TX_PACKETISER *txp,
- uint32_t pn_space);
- void ossl_quic_tx_packetiser_schedule_ack(OSSL_QUIC_TX_PACKETISER *txp,
- uint32_t pn_space);
- int ossl_quic_tx_packetiser_schedule_conn_close(OSSL_QUIC_TX_PACKETISER *txp,
- const OSSL_QUIC_FRAME_CONN_CLOSE *f);
- void ossl_quic_tx_packetiser_set_msg_callback(OSSL_QUIC_TX_PACKETISER *txp,
- ossl_msg_cb msg_callback,
- SSL *msg_callback_ssl);
- void ossl_quic_tx_packetiser_set_msg_callback_arg(OSSL_QUIC_TX_PACKETISER *txp,
- void *msg_callback_arg);
- QUIC_PN ossl_quic_tx_packetiser_get_next_pn(OSSL_QUIC_TX_PACKETISER *txp,
- uint32_t pn_space);
- void ossl_quic_tx_packetiser_set_ack_tx_cb(OSSL_QUIC_TX_PACKETISER *txp,
- void (*cb)(const OSSL_QUIC_FRAME_ACK *ack,
- uint32_t pn_space,
- void *arg),
- void *cb_arg);
- # endif
- #endif
|