transport/xqc_conn.h
Classes
Name | |
---|---|
struct | xqc_trans_settings_t |
struct | xqc_conn_flow_ctl_t |
struct | xqc_hs_buffer_t |
struct | xqc_key_update_ctx_t |
struct | xqc_ping_record_s |
struct | xqc_connection_s |
Types
Name | |
---|---|
enum | xqc_conn_state_t |
enum | xqc_conn_flag_shift_t |
enum | xqc_conn_flag_t |
typedef struct xqc_ping_record_s | xqc_ping_record_t |
Functions
Name | |
---|---|
const char * | xqc_conn_flag_2_str(xqc_connection_t * conn, xqc_conn_flag_t conn_flag) |
const char * | xqc_conn_state_2_str(xqc_conn_state_t state) |
void | xqc_conn_init_flow_ctl(xqc_connection_t * conn) |
xqc_connection_t * | xqc_conn_create(xqc_engine_t * engine, xqc_cid_t * dcid, xqc_cid_t * scid, const xqc_conn_settings_t * settings, void * user_data, xqc_conn_type_t type) |
xqc_connection_t * | xqc_conn_server_create(xqc_engine_t * engine, const struct sockaddr * local_addr, socklen_t local_addrlen, const struct sockaddr * peer_addr, socklen_t peer_addrlen, xqc_cid_t * dcid, xqc_cid_t * scid, xqc_conn_settings_t * settings, void * user_data) |
void | xqc_conn_destroy(xqc_connection_t * xc) |
xqc_int_t | xqc_conn_client_on_alpn(xqc_connection_t * conn, const unsigned char * alpn, size_t alpn_len) |
xqc_int_t | xqc_conn_server_on_alpn(xqc_connection_t * conn, const unsigned char * alpn, size_t alpn_len) |
ssize_t | xqc_path_send_one_packet(xqc_connection_t * conn, xqc_path_ctx_t * path, xqc_packet_out_t * packet_out) |
void | xqc_conn_send_packets(xqc_connection_t * conn) |
void | xqc_conn_send_packets_batch(xqc_connection_t * conn) |
void | xqc_conn_check_path_utilization(xqc_connection_t * conn) |
uint64_t | xqc_conn_get_unscheduled_bytes(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_enc_packet(xqc_connection_t * conn, xqc_path_ctx_t * path, xqc_packet_out_t * packet_out, char * enc_pkt, size_t enc_pkt_cap, size_t * enc_pkt_len, xqc_usec_t current_time) |
void | xqc_conn_transmit_pto_probe_packets(xqc_connection_t * conn) |
void | xqc_conn_transmit_pto_probe_packets_batch(xqc_connection_t * conn) |
void | xqc_conn_retransmit_lost_packets(xqc_connection_t * conn) |
void | xqc_conn_retransmit_lost_packets_batch(xqc_connection_t * conn) |
xqc_int_t | xqc_path_send_ping_to_probe(xqc_path_ctx_t * path, xqc_pkt_num_space_t pns, xqc_path_specified_flag_t flag) |
void | xqc_path_send_one_or_two_ack_elicit_pkts(xqc_path_ctx_t * path, xqc_pkt_num_space_t pns) |
void | xqc_conn_send_one_ack_eliciting_pkt(xqc_connection_t * conn, xqc_pkt_num_space_t pns) |
xqc_int_t | xqc_conn_check_handshake_completed(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_is_handshake_confirmed(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_immediate_close(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_send_retry(xqc_connection_t * conn, unsigned char * token, unsigned token_len) |
xqc_int_t | xqc_conn_version_check(xqc_connection_t * c, uint32_t version) |
xqc_int_t | xqc_conn_send_version_negotiation(xqc_connection_t * c) |
xqc_int_t | xqc_conn_check_token(xqc_connection_t * conn, const unsigned char * token, unsigned token_len) |
void | xqc_conn_gen_token(xqc_connection_t * conn, unsigned char * token, unsigned * token_len) |
xqc_int_t | xqc_conn_early_data_reject(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_early_data_accept(xqc_connection_t * conn) |
xqc_bool_t | xqc_conn_is_ready_to_send_early_data(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_handshake_complete(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_buff_undecrypt_packet_in(xqc_packet_in_t * packet_in, xqc_connection_t * conn, xqc_encrypt_level_t encrypt_level) |
xqc_int_t | xqc_conn_process_undecrypt_packet_in(xqc_connection_t * conn, xqc_encrypt_level_t encrypt_level) |
void | xqc_conn_buff_1rtt_packet(xqc_connection_t * conn, xqc_packet_out_t * po) |
void | xqc_conn_buff_1rtt_packets(xqc_connection_t * conn) |
void | xqc_conn_write_buffed_1rtt_packets(xqc_connection_t * conn) |
xqc_usec_t | xqc_conn_next_wakeup_time(xqc_connection_t * conn) |
char * | xqc_local_addr_str(xqc_engine_t * engine, const struct sockaddr * local_addr, socklen_t local_addrlen) |
char * | xqc_peer_addr_str(xqc_engine_t * engine, const struct sockaddr * peer_addr, socklen_t peer_addrlen) |
char * | xqc_conn_addr_str(xqc_connection_t * conn) |
char * | xqc_path_addr_str(xqc_path_ctx_t * path) |
void | xqc_conn_process_undecrypt_packets(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_has_undecrypt_packets(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_process_packet(xqc_connection_t * c, const unsigned char * packet_in_buf, size_t packet_in_size, xqc_usec_t recv_time) |
void | xqc_conn_process_packet_recved_path(xqc_connection_t * conn, xqc_cid_t * scid, size_t packet_in_size, xqc_usec_t recv_time) |
xqc_int_t | xqc_conn_check_handshake_complete(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_get_available_path_id(xqc_connection_t * conn, uint64_t * path_id) |
xqc_int_t | xqc_conn_try_add_new_conn_id(xqc_connection_t * conn, uint64_t retire_prior_to) |
xqc_int_t | xqc_conn_check_dcid(xqc_connection_t * conn, xqc_cid_t * dcid) |
void | xqc_conn_destroy_cids(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_update_user_scid(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_set_cid_retired_ts(xqc_connection_t * conn, xqc_cid_inner_t * inner_cid) |
xqc_bool_t | xqc_conn_peer_complete_address_validation(xqc_connection_t * c) |
xqc_bool_t | xqc_conn_has_hsk_keys(xqc_connection_t * c) |
void * | xqc_conn_get_user_data(xqc_connection_t * c) |
xqc_int_t | xqc_conn_get_local_transport_params(xqc_connection_t * conn, xqc_transport_params_t * params) |
xqc_int_t | xqc_conn_set_early_remote_transport_params(xqc_connection_t * conn, const xqc_transport_params_t * params) |
xqc_int_t | xqc_conn_encode_local_tp(xqc_connection_t * conn, uint8_t * dst, size_t dst_cap, size_t * dst_len) |
xqc_int_t | xqc_conn_on_recv_retry(xqc_connection_t * conn, xqc_cid_t * retry_scid) |
xqc_msec_t | xqc_conn_get_idle_timeout(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_confirm_key_update(xqc_connection_t * conn) |
void | xqc_conn_decrease_unacked_stream_ref(xqc_connection_t * conn, xqc_packet_out_t * packet_out) |
void | xqc_conn_increase_unacked_stream_ref(xqc_connection_t * conn, xqc_packet_out_t * packet_out) |
void | xqc_conn_update_stream_stats_on_sent(xqc_connection_t * conn, xqc_send_ctl_t * ctl, xqc_packet_out_t * packet_out, xqc_usec_t now) |
xqc_usec_t | xqc_conn_get_max_pto(xqc_connection_t * conn) |
uint32_t | xqc_conn_get_max_pto_backoff(xqc_connection_t * conn, uint8_t available_only) |
void | xqc_conn_ptmud_probing(xqc_connection_t * conn) |
xqc_usec_t | xqc_conn_get_min_srtt(xqc_connection_t * conn, xqc_bool_t available_only) |
xqc_usec_t | xqc_conn_get_max_srtt(xqc_connection_t * conn) |
void | xqc_conn_check_app_limit(xqc_connection_t * conn) |
void | xqc_conn_timer_expire(xqc_connection_t * conn, xqc_usec_t now) |
void | xqc_conn_closing(xqc_connection_t * conn) |
void | xqc_conn_closing_notify(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_send_path_challenge(xqc_connection_t * conn, xqc_path_ctx_t * path) |
int | xqc_conn_buff_0rtt_datagram(xqc_connection_t * conn, void * data, size_t data_len, uint64_t dgram_id, xqc_data_qos_level_t qos_level) |
void | xqc_conn_destroy_0rtt_datagram_buffer_list(xqc_connection_t * conn) |
void | xqc_conn_resend_0rtt_datagram(xqc_connection_t * conn) |
xqc_gp_timer_id_t | xqc_conn_register_gp_timer(xqc_connection_t * conn, char * timer_name, xqc_gp_timer_timeout_pt cb, void * user_data) |
void | xqc_conn_unregister_gp_timer(xqc_connection_t * conn, xqc_gp_timer_id_t gp_timer_id) |
xqc_int_t | xqc_conn_gp_timer_set(xqc_connection_t * conn, xqc_gp_timer_id_t gp_timer_id, xqc_usec_t expire_time) |
xqc_int_t | xqc_conn_gp_timer_unset(xqc_connection_t * conn, xqc_gp_timer_id_t gp_timer_id) |
xqc_int_t | xqc_conn_gp_timer_get_info(xqc_connection_t * conn, xqc_gp_timer_id_t gp_timer_id, xqc_bool_t * is_set, xqc_usec_t * expire_time) |
void | xqc_conn_schedule_packets_to_paths(xqc_connection_t * conn) |
void | xqc_conn_encode_transport_state(xqc_connection_t * conn, char * buf, size_t buf_sz) |
xqc_uint_t | xqc_conn_get_mss(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_handle_stateless_reset(xqc_connection_t * conn, const uint8_t * sr_token) |
xqc_int_t | xqc_conn_handle_deprecated_stateless_reset(xqc_connection_t * conn, const xqc_cid_t * scid) |
void | xqc_conn_try_to_update_mss(xqc_connection_t * conn) |
void | xqc_conn_get_stats_internal(xqc_connection_t * conn, xqc_conn_stats_t * stats) |
xqc_ping_record_t * | xqc_conn_create_ping_record(xqc_connection_t * conn) |
void | xqc_conn_destroy_ping_record(xqc_ping_record_t * pr) |
void | xqc_conn_destroy_ping_notification_list(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_send_ping_internal(xqc_connection_t * conn, void * ping_user_data, xqc_bool_t notify) |
void | xqc_conn_encode_mp_settings(xqc_connection_t * conn, char * buf, size_t buf_sz) |
void | xqc_path_send_packets(xqc_connection_t * conn, xqc_path_ctx_t * path, xqc_list_head_t * head, int congest, xqc_send_type_t send_type) |
xqc_int_t | xqc_conn_try_to_enable_multipath(xqc_connection_t * conn) |
xqc_int_t | xqc_conn_add_path_cid_sets(xqc_connection_t * conn, uint32_t start, uint32_t end) |
Attributes
Name | |
---|---|
const uint32_t | MAX_RSP_CONN_CLOSE_CNT |
xqc_conn_settings_t | internal_default_conn_settings |
const xqc_tls_callbacks_t | xqc_conn_tls_cbs |
const xqc_h3_conn_settings_t | default_local_h3_conn_settings |
Defines
Types Documentation
enum xqc_conn_state_t
Enumerator | Value | Description |
---|---|---|
XQC_CONN_STATE_SERVER_INIT | 0 | |
XQC_CONN_STATE_SERVER_INITIAL_RECVD | 1 | |
XQC_CONN_STATE_SERVER_INITIAL_SENT | 2 | |
XQC_CONN_STATE_SERVER_HANDSHAKE_SENT | 3 | |
XQC_CONN_STATE_SERVER_HANDSHAKE_RECVD | 4 | |
XQC_CONN_STATE_CLIENT_INIT | 5 | |
XQC_CONN_STATE_CLIENT_INITIAL_SENT | 6 | |
XQC_CONN_STATE_CLIENT_INITIAL_RECVD | 7 | |
XQC_CONN_STATE_CLIENT_HANDSHAKE_RECVD | 8 | |
XQC_CONN_STATE_CLIENT_HANDSHAKE_SENT | 9 | |
XQC_CONN_STATE_ESTABED | 10 | |
XQC_CONN_STATE_CLOSING | 11 | |
XQC_CONN_STATE_DRAINING | 12 | |
XQC_CONN_STATE_CLOSED | 13 | |
XQC_CONN_STATE_N | 14 |
enum xqc_conn_flag_shift_t
Enumerator | Value | Description |
---|---|---|
XQC_CONN_FLAG_WAIT_WAKEUP_SHIFT | 0 | |
XQC_CONN_FLAG_HANDSHAKE_COMPLETED_SHIFT | 1 | |
XQC_CONN_FLAG_CAN_SEND_1RTT_SHIFT | 2 | |
XQC_CONN_FLAG_TICKING_SHIFT | 3 | |
XQC_CONN_FLAG_ACK_HAS_GAP_SHIFT | 4 | |
XQC_CONN_FLAG_TIME_OUT_SHIFT | 5 | |
XQC_CONN_FLAG_ERROR_SHIFT | 6 | |
XQC_CONN_FLAG_DATA_BLOCKED_SHIFT | 7 | |
XQC_CONN_FLAG_DCID_OK_SHIFT | 8 | |
XQC_CONN_FLAG_TOKEN_OK_SHIFT | 9 | |
XQC_CONN_FLAG_HAS_0RTT_SHIFT | 10 | |
XQC_CONN_FLAG_0RTT_OK_SHIFT | 11 | |
XQC_CONN_FLAG_0RTT_REJ_SHIFT | 12 | |
XQC_CONN_FLAG_UPPER_CONN_EXIST_SHIFT | 13 | |
XQC_CONN_FLAG_INIT_RECVD_SHIFT | 14 | |
XQC_CONN_FLAG_NEED_RUN_SHIFT | 15 | |
XQC_CONN_FLAG_PING_SHIFT | 16 | |
XQC_CONN_FLAG_HSK_ACKED_SHIFT | 17 | |
XQC_CONN_FLAG_RESERVE_SHIFT | 18 | |
XQC_CONN_FLAG_HANDSHAKE_DONE_RECVD_SHIFT | 19 | |
XQC_CONN_FLAG_UPDATE_NEW_TOKEN_SHIFT | 20 | |
XQC_CONN_FLAG_VERSION_NEGOTIATION_SHIFT | 21 | |
XQC_CONN_FLAG_HANDSHAKE_CONFIRMED_SHIFT | 22 | |
XQC_CONN_FLAG_HANDSHAKE_DONE_ACKED_SHIFT | 23 | |
XQC_CONN_FLAG_ADDR_VALIDATED_SHIFT | 24 | |
XQC_CONN_FLAG_NEW_CID_ACKED_SHIFT | 25 | |
XQC_CONN_FLAG_LINGER_CLOSING_SHIFT | 26 | |
XQC_CONN_FLAG_RETRY_RECVD_SHIFT | 27 | |
XQC_CONN_FLAG_TLS_CH_SHIFT | 28 | |
XQC_CONN_FLAG_TLS_HSK_COMPLETED_SHIFT | 29 | |
XQC_CONN_FLAG_RECV_NEW_PATH_SHIFT | 30 | |
XQC_CONN_FLAG_VALIDATE_REBINDING_SHIFT | 31 | |
XQC_CONN_FLAG_CONN_CLOSING_NOTIFY_SHIFT | 32 | |
XQC_CONN_FLAG_CONN_CLOSING_NOTIFIED_SHIFT | 33 | |
XQC_CONN_FLAG_DGRAM_WAIT_FOR_1RTT_SHIFT | 34 | |
XQC_CONN_FLAG_LOCAL_TP_UPDATED_SHIFT | 35 | |
XQC_CONN_FLAG_PMTUD_PROBING_SHIFT | 36 | |
XQC_CONN_FLAG_NO_DGRAM_NOTIFIED_SHIFT | 37 | |
XQC_CONN_FLAG_DGRAM_MSS_NOTIFY_SHIFT | 38 | |
XQC_CONN_FLAG_MP_WAIT_SCID_SHIFT | 39 | |
XQC_CONN_FLAG_MP_WAIT_DCID_SHIFT | 40 | |
XQC_CONN_FLAG_MP_READY_NOTIFY_SHIFT | 41 | |
XQC_CONN_FLAG_HANDSHAKE_DONE_SENT_SHIFT | 42 | |
XQC_CONN_FLAG_SHIFT_NUM | 43 |
enum xqc_conn_flag_t
Enumerator | Value | Description |
---|---|---|
XQC_CONN_FLAG_WAIT_WAKEUP | 1ULL << XQC_CONN_FLAG_WAIT_WAKEUP_SHIFT | |
XQC_CONN_FLAG_HANDSHAKE_COMPLETED | 1ULL << XQC_CONN_FLAG_HANDSHAKE_COMPLETED_SHIFT | |
XQC_CONN_FLAG_CAN_SEND_1RTT | 1ULL << XQC_CONN_FLAG_CAN_SEND_1RTT_SHIFT | |
XQC_CONN_FLAG_TICKING | 1ULL << XQC_CONN_FLAG_TICKING_SHIFT | |
XQC_CONN_FLAG_ACK_HAS_GAP | 1ULL << XQC_CONN_FLAG_ACK_HAS_GAP_SHIFT | |
XQC_CONN_FLAG_TIME_OUT | 1ULL << XQC_CONN_FLAG_TIME_OUT_SHIFT | |
XQC_CONN_FLAG_ERROR | 1ULL << XQC_CONN_FLAG_ERROR_SHIFT | |
XQC_CONN_FLAG_DATA_BLOCKED | 1ULL << XQC_CONN_FLAG_DATA_BLOCKED_SHIFT | |
XQC_CONN_FLAG_DCID_OK | 1ULL << XQC_CONN_FLAG_DCID_OK_SHIFT | |
XQC_CONN_FLAG_TOKEN_OK | 1ULL << XQC_CONN_FLAG_TOKEN_OK_SHIFT | |
XQC_CONN_FLAG_HAS_0RTT | 1ULL << XQC_CONN_FLAG_HAS_0RTT_SHIFT | |
XQC_CONN_FLAG_0RTT_OK | 1ULL << XQC_CONN_FLAG_0RTT_OK_SHIFT | |
XQC_CONN_FLAG_0RTT_REJ | 1ULL << XQC_CONN_FLAG_0RTT_REJ_SHIFT | |
XQC_CONN_FLAG_UPPER_CONN_EXIST | 1ULL << XQC_CONN_FLAG_UPPER_CONN_EXIST_SHIFT | |
XQC_CONN_FLAG_INIT_RECVD | 1ULL << XQC_CONN_FLAG_INIT_RECVD_SHIFT | |
XQC_CONN_FLAG_NEED_RUN | 1ULL << XQC_CONN_FLAG_NEED_RUN_SHIFT | |
XQC_CONN_FLAG_PING | 1ULL << XQC_CONN_FLAG_PING_SHIFT | |
XQC_CONN_FLAG_HSK_ACKED | 1ULL << XQC_CONN_FLAG_HSK_ACKED_SHIFT | |
XQC_CONN_FLAG_RESERVE | 1ULL << XQC_CONN_FLAG_RESERVE_SHIFT | |
XQC_CONN_FLAG_HANDSHAKE_DONE_RECVD | 1ULL << XQC_CONN_FLAG_HANDSHAKE_DONE_RECVD_SHIFT | |
XQC_CONN_FLAG_UPDATE_NEW_TOKEN | 1ULL << XQC_CONN_FLAG_UPDATE_NEW_TOKEN_SHIFT | |
XQC_CONN_FLAG_VERSION_NEGOTIATION | 1ULL << XQC_CONN_FLAG_VERSION_NEGOTIATION_SHIFT | |
XQC_CONN_FLAG_HANDSHAKE_CONFIRMED | 1ULL << XQC_CONN_FLAG_HANDSHAKE_CONFIRMED_SHIFT | |
XQC_CONN_FLAG_HANDSHAKE_DONE_ACKED | 1ULL << XQC_CONN_FLAG_HANDSHAKE_DONE_ACKED_SHIFT | |
XQC_CONN_FLAG_ADDR_VALIDATED | 1ULL << XQC_CONN_FLAG_ADDR_VALIDATED_SHIFT | |
XQC_CONN_FLAG_LINGER_CLOSING | 1ULL << XQC_CONN_FLAG_LINGER_CLOSING_SHIFT | |
XQC_CONN_FLAG_RETRY_RECVD | 1ULL << XQC_CONN_FLAG_RETRY_RECVD_SHIFT | |
XQC_CONN_FLAG_TLS_CH_RECVD | 1ULL << XQC_CONN_FLAG_TLS_CH_SHIFT | |
XQC_CONN_FLAG_TLS_HSK_COMPLETED | 1ULL << XQC_CONN_FLAG_TLS_HSK_COMPLETED_SHIFT | |
XQC_CONN_FLAG_RECV_NEW_PATH | 1ULL << XQC_CONN_FLAG_RECV_NEW_PATH_SHIFT | |
XQC_CONN_FLAG_VALIDATE_REBINDING | 1ULL << XQC_CONN_FLAG_VALIDATE_REBINDING_SHIFT | |
XQC_CONN_FLAG_CLOSING_NOTIFY | 1ULL << XQC_CONN_FLAG_CONN_CLOSING_NOTIFY_SHIFT | |
XQC_CONN_FLAG_CLOSING_NOTIFIED | 1ULL << XQC_CONN_FLAG_CONN_CLOSING_NOTIFIED_SHIFT | |
XQC_CONN_FLAG_DGRAM_WAIT_FOR_1RTT | 1ULL << XQC_CONN_FLAG_DGRAM_WAIT_FOR_1RTT_SHIFT | |
XQC_CONN_FLAG_LOCAL_TP_UPDATED | 1ULL << XQC_CONN_FLAG_LOCAL_TP_UPDATED_SHIFT | |
XQC_CONN_FLAG_PMTUD_PROBING | 1ULL << XQC_CONN_FLAG_PMTUD_PROBING_SHIFT | |
XQC_CONN_FLAG_NO_DGRAM_NOTIFIED | 1ULL << XQC_CONN_FLAG_NO_DGRAM_NOTIFIED_SHIFT | |
XQC_CONN_FLAG_DGRAM_MSS_NOTIFY | 1ULL << XQC_CONN_FLAG_DGRAM_MSS_NOTIFY_SHIFT | |
XQC_CONN_FLAG_MP_WAIT_MP_READY | 1ULL << XQC_CONN_FLAG_MP_WAIT_MP_READY_SHIFT | |
XQC_CONN_FLAG_MP_READY_NOTIFY | 1ULL << XQC_CONN_FLAG_MP_READY_NOTIFY_SHIFT | |
XQC_CONN_FLAG_HANDSHAKE_DONE_SENT | 1ULL << XQC_CONN_FLAG_HANDSHAKE_DONE_SENT_SHIFT |
typedef xqc_ping_record_t
cpp
typedef struct xqc_ping_record_s xqc_ping_record_t;
Functions Documentation
function xqc_conn_flag_2_str
cpp
const char * xqc_conn_flag_2_str(
xqc_connection_t * conn,
xqc_conn_flag_t conn_flag
)
function xqc_conn_state_2_str
cpp
const char * xqc_conn_state_2_str(
xqc_conn_state_t state
)
function xqc_conn_init_flow_ctl
cpp
void xqc_conn_init_flow_ctl(
xqc_connection_t * conn
)
function xqc_conn_create
cpp
xqc_connection_t * xqc_conn_create(
xqc_engine_t * engine,
xqc_cid_t * dcid,
xqc_cid_t * scid,
const xqc_conn_settings_t * settings,
void * user_data,
xqc_conn_type_t type
)
function xqc_conn_server_create
cpp
xqc_connection_t * xqc_conn_server_create(
xqc_engine_t * engine,
const struct sockaddr * local_addr,
socklen_t local_addrlen,
const struct sockaddr * peer_addr,
socklen_t peer_addrlen,
xqc_cid_t * dcid,
xqc_cid_t * scid,
xqc_conn_settings_t * settings,
void * user_data
)
function xqc_conn_destroy
cpp
void xqc_conn_destroy(
xqc_connection_t * xc
)
function xqc_conn_client_on_alpn
cpp
xqc_int_t xqc_conn_client_on_alpn(
xqc_connection_t * conn,
const unsigned char * alpn,
size_t alpn_len
)
function xqc_conn_server_on_alpn
cpp
xqc_int_t xqc_conn_server_on_alpn(
xqc_connection_t * conn,
const unsigned char * alpn,
size_t alpn_len
)
function xqc_path_send_one_packet
cpp
ssize_t xqc_path_send_one_packet(
xqc_connection_t * conn,
xqc_path_ctx_t * path,
xqc_packet_out_t * packet_out
)
function xqc_conn_send_packets
cpp
void xqc_conn_send_packets(
xqc_connection_t * conn
)
function xqc_conn_send_packets_batch
cpp
void xqc_conn_send_packets_batch(
xqc_connection_t * conn
)
function xqc_conn_check_path_utilization
cpp
void xqc_conn_check_path_utilization(
xqc_connection_t * conn
)
function xqc_conn_get_unscheduled_bytes
cpp
uint64_t xqc_conn_get_unscheduled_bytes(
xqc_connection_t * conn
)
function xqc_conn_enc_packet
cpp
xqc_int_t xqc_conn_enc_packet(
xqc_connection_t * conn,
xqc_path_ctx_t * path,
xqc_packet_out_t * packet_out,
char * enc_pkt,
size_t enc_pkt_cap,
size_t * enc_pkt_len,
xqc_usec_t current_time
)
function xqc_conn_transmit_pto_probe_packets
cpp
void xqc_conn_transmit_pto_probe_packets(
xqc_connection_t * conn
)
function xqc_conn_transmit_pto_probe_packets_batch
cpp
void xqc_conn_transmit_pto_probe_packets_batch(
xqc_connection_t * conn
)
function xqc_conn_retransmit_lost_packets
cpp
void xqc_conn_retransmit_lost_packets(
xqc_connection_t * conn
)
function xqc_conn_retransmit_lost_packets_batch
cpp
void xqc_conn_retransmit_lost_packets_batch(
xqc_connection_t * conn
)
function xqc_path_send_ping_to_probe
cpp
xqc_int_t xqc_path_send_ping_to_probe(
xqc_path_ctx_t * path,
xqc_pkt_num_space_t pns,
xqc_path_specified_flag_t flag
)
function xqc_path_send_one_or_two_ack_elicit_pkts
cpp
void xqc_path_send_one_or_two_ack_elicit_pkts(
xqc_path_ctx_t * path,
xqc_pkt_num_space_t pns
)
function xqc_conn_send_one_ack_eliciting_pkt
cpp
void xqc_conn_send_one_ack_eliciting_pkt(
xqc_connection_t * conn,
xqc_pkt_num_space_t pns
)
function xqc_conn_check_handshake_completed
cpp
xqc_int_t xqc_conn_check_handshake_completed(
xqc_connection_t * conn
)
function xqc_conn_is_handshake_confirmed
cpp
xqc_int_t xqc_conn_is_handshake_confirmed(
xqc_connection_t * conn
)
function xqc_conn_immediate_close
cpp
xqc_int_t xqc_conn_immediate_close(
xqc_connection_t * conn
)
function xqc_conn_send_retry
cpp
xqc_int_t xqc_conn_send_retry(
xqc_connection_t * conn,
unsigned char * token,
unsigned token_len
)
function xqc_conn_version_check
cpp
xqc_int_t xqc_conn_version_check(
xqc_connection_t * c,
uint32_t version
)
function xqc_conn_send_version_negotiation
cpp
xqc_int_t xqc_conn_send_version_negotiation(
xqc_connection_t * c
)
function xqc_conn_check_token
cpp
xqc_int_t xqc_conn_check_token(
xqc_connection_t * conn,
const unsigned char * token,
unsigned token_len
)
function xqc_conn_gen_token
cpp
void xqc_conn_gen_token(
xqc_connection_t * conn,
unsigned char * token,
unsigned * token_len
)
function xqc_conn_early_data_reject
cpp
xqc_int_t xqc_conn_early_data_reject(
xqc_connection_t * conn
)
function xqc_conn_early_data_accept
cpp
xqc_int_t xqc_conn_early_data_accept(
xqc_connection_t * conn
)
function xqc_conn_is_ready_to_send_early_data
cpp
xqc_bool_t xqc_conn_is_ready_to_send_early_data(
xqc_connection_t * conn
)
function xqc_conn_handshake_complete
cpp
xqc_int_t xqc_conn_handshake_complete(
xqc_connection_t * conn
)
function xqc_conn_buff_undecrypt_packet_in
cpp
xqc_int_t xqc_conn_buff_undecrypt_packet_in(
xqc_packet_in_t * packet_in,
xqc_connection_t * conn,
xqc_encrypt_level_t encrypt_level
)
function xqc_conn_process_undecrypt_packet_in
cpp
xqc_int_t xqc_conn_process_undecrypt_packet_in(
xqc_connection_t * conn,
xqc_encrypt_level_t encrypt_level
)
function xqc_conn_buff_1rtt_packet
cpp
void xqc_conn_buff_1rtt_packet(
xqc_connection_t * conn,
xqc_packet_out_t * po
)
function xqc_conn_buff_1rtt_packets
cpp
void xqc_conn_buff_1rtt_packets(
xqc_connection_t * conn
)
function xqc_conn_write_buffed_1rtt_packets
cpp
void xqc_conn_write_buffed_1rtt_packets(
xqc_connection_t * conn
)
function xqc_conn_next_wakeup_time
cpp
xqc_usec_t xqc_conn_next_wakeup_time(
xqc_connection_t * conn
)
function xqc_local_addr_str
cpp
char * xqc_local_addr_str(
xqc_engine_t * engine,
const struct sockaddr * local_addr,
socklen_t local_addrlen
)
function xqc_peer_addr_str
cpp
char * xqc_peer_addr_str(
xqc_engine_t * engine,
const struct sockaddr * peer_addr,
socklen_t peer_addrlen
)
function xqc_conn_addr_str
cpp
char * xqc_conn_addr_str(
xqc_connection_t * conn
)
function xqc_path_addr_str
cpp
char * xqc_path_addr_str(
xqc_path_ctx_t * path
)
function xqc_conn_process_undecrypt_packets
cpp
static inline void xqc_conn_process_undecrypt_packets(
xqc_connection_t * conn
)
function xqc_conn_has_undecrypt_packets
cpp
static inline xqc_int_t xqc_conn_has_undecrypt_packets(
xqc_connection_t * conn
)
function xqc_conn_process_packet
cpp
xqc_int_t xqc_conn_process_packet(
xqc_connection_t * c,
const unsigned char * packet_in_buf,
size_t packet_in_size,
xqc_usec_t recv_time
)
function xqc_conn_process_packet_recved_path
cpp
void xqc_conn_process_packet_recved_path(
xqc_connection_t * conn,
xqc_cid_t * scid,
size_t packet_in_size,
xqc_usec_t recv_time
)
function xqc_conn_check_handshake_complete
cpp
xqc_int_t xqc_conn_check_handshake_complete(
xqc_connection_t * conn
)
function xqc_conn_get_available_path_id
cpp
xqc_int_t xqc_conn_get_available_path_id(
xqc_connection_t * conn,
uint64_t * path_id
)
function xqc_conn_try_add_new_conn_id
cpp
xqc_int_t xqc_conn_try_add_new_conn_id(
xqc_connection_t * conn,
uint64_t retire_prior_to
)
function xqc_conn_check_dcid
cpp
xqc_int_t xqc_conn_check_dcid(
xqc_connection_t * conn,
xqc_cid_t * dcid
)
function xqc_conn_destroy_cids
cpp
void xqc_conn_destroy_cids(
xqc_connection_t * conn
)
function xqc_conn_update_user_scid
cpp
xqc_int_t xqc_conn_update_user_scid(
xqc_connection_t * conn
)
function xqc_conn_set_cid_retired_ts
cpp
xqc_int_t xqc_conn_set_cid_retired_ts(
xqc_connection_t * conn,
xqc_cid_inner_t * inner_cid
)
function xqc_conn_peer_complete_address_validation
cpp
xqc_bool_t xqc_conn_peer_complete_address_validation(
xqc_connection_t * c
)
function xqc_conn_has_hsk_keys
cpp
xqc_bool_t xqc_conn_has_hsk_keys(
xqc_connection_t * c
)
function xqc_conn_get_user_data
cpp
void * xqc_conn_get_user_data(
xqc_connection_t * c
)
function xqc_conn_get_local_transport_params
cpp
xqc_int_t xqc_conn_get_local_transport_params(
xqc_connection_t * conn,
xqc_transport_params_t * params
)
function xqc_conn_set_early_remote_transport_params
cpp
xqc_int_t xqc_conn_set_early_remote_transport_params(
xqc_connection_t * conn,
const xqc_transport_params_t * params
)
function xqc_conn_encode_local_tp
cpp
xqc_int_t xqc_conn_encode_local_tp(
xqc_connection_t * conn,
uint8_t * dst,
size_t dst_cap,
size_t * dst_len
)
function xqc_conn_on_recv_retry
cpp
xqc_int_t xqc_conn_on_recv_retry(
xqc_connection_t * conn,
xqc_cid_t * retry_scid
)
function xqc_conn_get_idle_timeout
cpp
xqc_msec_t xqc_conn_get_idle_timeout(
xqc_connection_t * conn
)
function xqc_conn_confirm_key_update
cpp
xqc_int_t xqc_conn_confirm_key_update(
xqc_connection_t * conn
)
function xqc_conn_decrease_unacked_stream_ref
cpp
void xqc_conn_decrease_unacked_stream_ref(
xqc_connection_t * conn,
xqc_packet_out_t * packet_out
)
function xqc_conn_increase_unacked_stream_ref
cpp
void xqc_conn_increase_unacked_stream_ref(
xqc_connection_t * conn,
xqc_packet_out_t * packet_out
)
function xqc_conn_update_stream_stats_on_sent
cpp
void xqc_conn_update_stream_stats_on_sent(
xqc_connection_t * conn,
xqc_send_ctl_t * ctl,
xqc_packet_out_t * packet_out,
xqc_usec_t now
)
function xqc_conn_get_max_pto
cpp
xqc_usec_t xqc_conn_get_max_pto(
xqc_connection_t * conn
)
function xqc_conn_get_max_pto_backoff
cpp
uint32_t xqc_conn_get_max_pto_backoff(
xqc_connection_t * conn,
uint8_t available_only
)
function xqc_conn_ptmud_probing
cpp
void xqc_conn_ptmud_probing(
xqc_connection_t * conn
)
function xqc_conn_get_min_srtt
cpp
xqc_usec_t xqc_conn_get_min_srtt(
xqc_connection_t * conn,
xqc_bool_t available_only
)
function xqc_conn_get_max_srtt
cpp
xqc_usec_t xqc_conn_get_max_srtt(
xqc_connection_t * conn
)
function xqc_conn_check_app_limit
cpp
void xqc_conn_check_app_limit(
xqc_connection_t * conn
)
function xqc_conn_timer_expire
cpp
void xqc_conn_timer_expire(
xqc_connection_t * conn,
xqc_usec_t now
)
function xqc_conn_closing
cpp
void xqc_conn_closing(
xqc_connection_t * conn
)
function xqc_conn_closing_notify
cpp
void xqc_conn_closing_notify(
xqc_connection_t * conn
)
function xqc_conn_send_path_challenge
cpp
xqc_int_t xqc_conn_send_path_challenge(
xqc_connection_t * conn,
xqc_path_ctx_t * path
)
function xqc_conn_buff_0rtt_datagram
cpp
int xqc_conn_buff_0rtt_datagram(
xqc_connection_t * conn,
void * data,
size_t data_len,
uint64_t dgram_id,
xqc_data_qos_level_t qos_level
)
function xqc_conn_destroy_0rtt_datagram_buffer_list
cpp
void xqc_conn_destroy_0rtt_datagram_buffer_list(
xqc_connection_t * conn
)
function xqc_conn_resend_0rtt_datagram
cpp
void xqc_conn_resend_0rtt_datagram(
xqc_connection_t * conn
)
function xqc_conn_register_gp_timer
cpp
xqc_gp_timer_id_t xqc_conn_register_gp_timer(
xqc_connection_t * conn,
char * timer_name,
xqc_gp_timer_timeout_pt cb,
void * user_data
)
function xqc_conn_unregister_gp_timer
cpp
void xqc_conn_unregister_gp_timer(
xqc_connection_t * conn,
xqc_gp_timer_id_t gp_timer_id
)
function xqc_conn_gp_timer_set
cpp
xqc_int_t xqc_conn_gp_timer_set(
xqc_connection_t * conn,
xqc_gp_timer_id_t gp_timer_id,
xqc_usec_t expire_time
)
function xqc_conn_gp_timer_unset
cpp
xqc_int_t xqc_conn_gp_timer_unset(
xqc_connection_t * conn,
xqc_gp_timer_id_t gp_timer_id
)
function xqc_conn_gp_timer_get_info
cpp
xqc_int_t xqc_conn_gp_timer_get_info(
xqc_connection_t * conn,
xqc_gp_timer_id_t gp_timer_id,
xqc_bool_t * is_set,
xqc_usec_t * expire_time
)
function xqc_conn_schedule_packets_to_paths
cpp
void xqc_conn_schedule_packets_to_paths(
xqc_connection_t * conn
)
function xqc_conn_encode_transport_state
cpp
void xqc_conn_encode_transport_state(
xqc_connection_t * conn,
char * buf,
size_t buf_sz
)
function xqc_conn_get_mss
cpp
static inline xqc_uint_t xqc_conn_get_mss(
xqc_connection_t * conn
)
function xqc_conn_handle_stateless_reset
cpp
xqc_int_t xqc_conn_handle_stateless_reset(
xqc_connection_t * conn,
const uint8_t * sr_token
)
function xqc_conn_handle_deprecated_stateless_reset
cpp
xqc_int_t xqc_conn_handle_deprecated_stateless_reset(
xqc_connection_t * conn,
const xqc_cid_t * scid
)
function xqc_conn_try_to_update_mss
cpp
void xqc_conn_try_to_update_mss(
xqc_connection_t * conn
)
function xqc_conn_get_stats_internal
cpp
void xqc_conn_get_stats_internal(
xqc_connection_t * conn,
xqc_conn_stats_t * stats
)
function xqc_conn_create_ping_record
cpp
xqc_ping_record_t * xqc_conn_create_ping_record(
xqc_connection_t * conn
)
function xqc_conn_destroy_ping_record
cpp
void xqc_conn_destroy_ping_record(
xqc_ping_record_t * pr
)
function xqc_conn_destroy_ping_notification_list
cpp
void xqc_conn_destroy_ping_notification_list(
xqc_connection_t * conn
)
function xqc_conn_send_ping_internal
cpp
xqc_int_t xqc_conn_send_ping_internal(
xqc_connection_t * conn,
void * ping_user_data,
xqc_bool_t notify
)
function xqc_conn_encode_mp_settings
cpp
void xqc_conn_encode_mp_settings(
xqc_connection_t * conn,
char * buf,
size_t buf_sz
)
function xqc_path_send_packets
cpp
void xqc_path_send_packets(
xqc_connection_t * conn,
xqc_path_ctx_t * path,
xqc_list_head_t * head,
int congest,
xqc_send_type_t send_type
)
function xqc_conn_try_to_enable_multipath
cpp
xqc_int_t xqc_conn_try_to_enable_multipath(
xqc_connection_t * conn
)
function xqc_conn_add_path_cid_sets
cpp
xqc_int_t xqc_conn_add_path_cid_sets(
xqc_connection_t * conn,
uint32_t start,
uint32_t end
)
Attributes Documentation
variable MAX_RSP_CONN_CLOSE_CNT
cpp
static const uint32_t MAX_RSP_CONN_CLOSE_CNT = 3;
variable internal_default_conn_settings
cpp
xqc_conn_settings_t internal_default_conn_settings;
variable xqc_conn_tls_cbs
cpp
const xqc_tls_callbacks_t xqc_conn_tls_cbs;
variable default_local_h3_conn_settings
cpp
const xqc_h3_conn_settings_t default_local_h3_conn_settings;
Macros Documentation
define XQC_MAX_DATAGRAM_REDUNDANCY
cpp
#define XQC_MAX_DATAGRAM_REDUNDANCY 2
Copyright: Copyright (c) 2022, Alibaba Group Holding Limited
define XQC_MIN_DATAGRAM_REDUNDANT_PROBE_INTERVAL
cpp
#define XQC_MIN_DATAGRAM_REDUNDANT_PROBE_INTERVAL 30000 /* 30ms min probing interval */
define XQC_FC_INIT_RTT
cpp
#define XQC_FC_INIT_RTT 60000
define XQC_MIN_RECV_WINDOW
cpp
#define XQC_MIN_RECV_WINDOW (63000) /* ~ 1MBps when RTT = 60ms */
define XQC_MIN_STANDBY_RPOBE_TIMEOUT
cpp
#define XQC_MIN_STANDBY_RPOBE_TIMEOUT 500 /* 500ms */
define XQC_TOKEN_EXPIRE_DELTA
cpp
#define XQC_TOKEN_EXPIRE_DELTA (7 * 24 * 60 * 60) /* expire in N seconds */
define XQC_TOKEN_UPDATE_DELTA
cpp
#define XQC_TOKEN_UPDATE_DELTA (XQC_TOKEN_EXPIRE_DELTA / 2) /* early update */
define XQC_MAX_PACKET_PROCESS_BATCH
cpp
#define XQC_MAX_PACKET_PROCESS_BATCH 100
define XQC_MAX_RECV_WINDOW
cpp
#define XQC_MAX_RECV_WINDOW (16 * 1024 * 1024)
define XQC_MP_SETTINGS_STR_LEN
cpp
#define XQC_MP_SETTINGS_STR_LEN (30)
define XQC_DEBUG_PRINT
cpp
#define XQC_DEBUG_PRINT
define XQC_CONN_CLOSE_MSG
cpp
#define XQC_CONN_CLOSE_MSG(
conn,
msg
)
do { \
if ((conn)->conn_close_msg == NULL) { \
(conn)->conn_close_msg = (msg); \
} \
} while(0) \
define XQC_CONN_ERR
cpp
#define XQC_CONN_ERR(
conn,
err
)
do { \
if ((conn)->conn_err == 0) { \
(conn)->conn_err = (err); \
XQC_CONN_CLOSE_MSG(conn, "local error"); \
(conn)->conn_flag |= XQC_CONN_FLAG_ERROR; \
xqc_conn_closing(conn); \
xqc_log((conn)->log, XQC_LOG_ERROR, "|conn:%p|err:0x%xi|%s|", (conn), (uint64_t)(err), xqc_conn_addr_str(conn)); \
} \
} while(0) \
define XQC_CONN_IMMEDIATE_CLOSE_FLAGS
cpp
#define XQC_CONN_IMMEDIATE_CLOSE_FLAGS (XQC_CONN_FLAG_ERROR)
Updated on 2024-11-19 at 20:49:45 +0800