FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
quic.c File Reference
+ Include dependency graph for quic.c:

Go to the source code of this file.

Data Structures

struct  st_quic_event_log_t
 
struct  quicly_ctx_data_
 
struct  quic_rx_packet_ctx_
 

Macros

#define quic_error(n, s)   s,
 

Typedefs

typedef struct quicly_ctx_data_ quicly_ctx_data_t
 
typedef struct quic_rx_packet_ctx_ quic_rx_packet_ctx_t
 

Functions

static void quic_update_timer (quic_ctx_t *ctx)
 
static int quic_on_client_connected (quic_ctx_t *ctx)
 
static u32 quic_ctx_alloc (u32 thread_index)
 
static void quic_ctx_free (quic_ctx_t *ctx)
 
static quic_ctx_tquic_ctx_get (u32 ctx_index, u32 thread_index)
 
static quic_ctx_tquic_ctx_get_if_valid (u32 ctx_index, u32 thread_index)
 
static quic_ctx_tquic_get_conn_ctx (quicly_conn_t *conn)
 
static void quic_store_conn_ctx (quicly_conn_t *conn, quic_ctx_t *ctx)
 
static int quic_ctx_is_stream (quic_ctx_t *ctx)
 
static int quic_ctx_is_listener (quic_ctx_t *ctx)
 
static session_tget_stream_session_from_stream (quicly_stream_t *stream)
 
static void quic_make_connection_key (clib_bihash_kv_16_8_t *kv, const quicly_cid_plaintext_t *id)
 
static int quic_sendable_packet_count (session_t *udp_session)
 
static quicly_context_t * quic_get_quicly_ctx_from_ctx (quic_ctx_t *ctx)
 
static quicly_context_t * quic_get_quicly_ctx_from_udp (u64 udp_session_handle)
 
static void quic_ack_rx_data (session_t *stream_session)
 
static void quic_disconnect_transport (quic_ctx_t *ctx)
 
static void quic_connection_delete (quic_ctx_t *ctx)
 
void quic_increment_counter (u8 evt, u8 val)
 
void quic_event_log (quicly_event_logger_t *_self, quicly_event_type_t type, const quicly_event_attribute_t *attributes, size_t num_attributes)
 
quicly_event_logger_t * quic_new_event_logger ()
 
void quic_free_event_logger (quicly_event_logger_t *_self)
 
static void quic_connection_closed (quic_ctx_t *ctx)
 Called when quicly return an error This function interacts tightly with quic_proto_on_close. More...
 
static int quic_send_datagram (session_t *udp_session, quicly_datagram_t *packet)
 
static int quic_send_packets (quic_ctx_t *ctx)
 
static void quic_on_stream_destroy (quicly_stream_t *stream, int err)
 
static int quic_on_stop_sending (quicly_stream_t *stream, int err)
 
static int quic_on_receive_reset (quicly_stream_t *stream, int err)
 
static int quic_on_receive (quicly_stream_t *stream, size_t off, const void *src, size_t len)
 
void quic_fifo_egress_shift (quicly_stream_t *stream, size_t delta)
 
int quic_fifo_egress_emit (quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all)
 
static void quic_accept_stream (void *s)
 
static int quic_on_stream_open (quicly_stream_open_t *self, quicly_stream_t *stream)
 
static void quic_on_closed_by_peer (quicly_closed_by_peer_t *self, quicly_conn_t *conn, int code, uint64_t frame_type, const char *reason, size_t reason_len)
 
static int64_t quic_get_thread_time (u8 thread_index)
 
static int64_t quic_get_time (quicly_now_t *self)
 
static u32 quic_set_time_now (u32 thread_index)
 
static void quic_update_time (f64 now, u8 thread_index)
 
static void quic_timer_expired (u32 conn_index)
 
static void quic_expired_timers_dispatch (u32 *expired_timers)
 
static int quic_encrypt_ticket_cb (ptls_encrypt_ticket_t *_self, ptls_t *tls, int is_encrypt, ptls_buffer_t *dst, ptls_iovec_t src)
 
static void quic_store_quicly_ctx (application_t *app, u8 is_client)
 
static int quic_connect_new_stream (session_t *quic_session, u32 opaque)
 
static int quic_connect_new_connection (session_endpoint_cfg_t *sep)
 
static int quic_connect (transport_endpoint_cfg_t *tep)
 
static void quic_proto_on_close (u32 ctx_index, u32 thread_index)
 
static u32 quic_start_listen (u32 quic_listen_session_index, transport_endpoint_t *tep)
 
static u32 quic_stop_listen (u32 lctx_index)
 
static transport_connection_tquic_connection_get (u32 ctx_index, u32 thread_index)
 
static transport_connection_tquic_listener_get (u32 listener_index)
 
static u8format_quic_ctx (u8 *s, va_list *args)
 
static u8format_quic_connection (u8 *s, va_list *args)
 
static u8format_quic_half_open (u8 *s, va_list *args)
 
static u8format_quic_listener (u8 *s, va_list *args)
 
static void quic_build_sockaddr (struct sockaddr *sa, socklen_t *salen, ip46_address_t *addr, u16 port, u8 is_ip4)
 
static void quic_update_conn_ctx (quicly_conn_t *conn, quicly_context_t *quicly_context)
 
static void quic_receive_connection (void *arg)
 
static void quic_transfer_connection (u32 ctx_index, u32 dest_thread)
 
static int quic_session_connected_callback (u32 quic_app_index, u32 ctx_index, session_t *udp_session, u8 is_fail)
 
static void quic_session_disconnect_callback (session_t *s)
 
static void quic_session_reset_callback (session_t *s)
 
static void quic_session_migrate_callback (session_t *s, session_handle_t new_sh)
 
int quic_session_accepted_callback (session_t *udp_session)
 
static int quic_add_segment_callback (u32 client_index, u64 seg_handle)
 
static int quic_del_segment_callback (u32 client_index, u64 seg_handle)
 
static int quic_custom_app_rx_callback (transport_connection_t *tc)
 
static int quic_custom_tx_callback (void *s, u32 max_burst_size)
 
static int quic_find_packet_ctx (u32 *ctx_thread, u32 *ctx_index, struct sockaddr *sa, socklen_t salen, quicly_decoded_packet_t *packet, u32 caller_thread_index)
 
static int quic_create_quic_session (quic_ctx_t *ctx)
 
static int quic_create_connection (u32 ctx_index, struct sockaddr *sa, socklen_t salen, quicly_decoded_packet_t packet)
 
static int quic_reset_connection (u64 udp_session_handle, struct sockaddr *sa, socklen_t salen, quicly_decoded_packet_t packet)
 
static void check_quic_client_connected (struct quic_rx_packet_ctx_ *quic_rx_ctx)
 
static int quic_process_one_rx_packet (u64 udp_session_handle, quicly_context_t *quicly_ctx, svm_fifo_t *f, u32 *fifo_offset, u32 *max_packet, u32 packet_n, quic_rx_packet_ctx_t *packet_ctx)
 
static int quic_app_rx_callback (session_t *udp_session)
 
static void quic_common_get_transport_endpoint (quic_ctx_t *ctx, transport_endpoint_t *tep, u8 is_lcl)
 
static void quic_get_transport_listener_endpoint (u32 listener_index, transport_endpoint_t *tep, u8 is_lcl)
 
static void quic_get_transport_endpoint (u32 ctx_index, u32 thread_index, transport_endpoint_t *tep, u8 is_lcl)
 
static void quic_register_cipher_suite (quic_crypto_engine_t type, ptls_cipher_suite_t **ciphers)
 
static void quic_update_fifo_size ()
 
static clib_error_tquic_init (vlib_main_t *vm)
 
static clib_error_tquic_plugin_crypto_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tquic_plugin_set_fifo_size_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8quic_format_ctx_stat (u8 *s, va_list *args)
 
static clib_error_tquic_plugin_showstats_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
 VLIB_PLUGIN_REGISTER ()
 
static clib_error_tquic_config_fn (vlib_main_t *vm, unformat_input_t *input)
 
static uword quic_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

static char * quic_error_strings []
 
static quic_main_t quic_main
 
static const quicly_stream_callbacks_t quic_stream_callbacks
 
static quicly_stream_open_t on_stream_open = { &quic_on_stream_open }
 
static quicly_closed_by_peer_t on_closed_by_peer
 
static quicly_now_t quicly_vpp_now_cb = { quic_get_time }
 
static session_cb_vft_t quic_app_cb_vft
 
static const transport_proto_vft_t quic_proto
 
u64 quic_fifosize = 0
 
static vlib_cli_command_t quic_plugin_crypto_command
 (constructor) VLIB_CLI_COMMAND (quic_plugin_crypto_command) More...
 
static vlib_cli_command_t quic_plugin_set_fifo_size_command
 (constructor) VLIB_CLI_COMMAND (quic_plugin_set_fifo_size_command) More...
 
static vlib_cli_command_t quic_plugin_stats_command
 (constructor) VLIB_CLI_COMMAND (quic_plugin_stats_command) More...
 
vlib_node_registration_t quic_input_node
 (constructor) VLIB_REGISTER_NODE (quic_input_node) More...
 

Macro Definition Documentation

◆ quic_error

#define quic_error (   n,
 
)    s,

Typedef Documentation

◆ quic_rx_packet_ctx_t

◆ quicly_ctx_data_t

Function Documentation

◆ check_quic_client_connected()

static void check_quic_client_connected ( struct quic_rx_packet_ctx_ quic_rx_ctx)
static

Definition at line 1953 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_quic_connection()

static u8* format_quic_connection ( u8 s,
va_list *  args 
)
static

Definition at line 1351 of file quic.c.

+ Here is the call graph for this function:

◆ format_quic_ctx()

static u8* format_quic_ctx ( u8 s,
va_list *  args 
)
static

Definition at line 1320 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_quic_half_open()

static u8* format_quic_half_open ( u8 s,
va_list *  args 
)
static

Definition at line 1362 of file quic.c.

+ Here is the call graph for this function:

◆ format_quic_listener()

static u8* format_quic_listener ( u8 s,
va_list *  args 
)
static

Definition at line 1374 of file quic.c.

+ Here is the call graph for this function:

◆ get_stream_session_from_stream()

static session_t* get_stream_session_from_stream ( quicly_stream_t *  stream)
static

Definition at line 110 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_accept_stream()

static void quic_accept_stream ( void *  s)
static

Definition at line 635 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_ack_rx_data()

static void quic_ack_rx_data ( session_t stream_session)
static

Definition at line 160 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_add_segment_callback()

static int quic_add_segment_callback ( u32  client_index,
u64  seg_handle 
)
static

Definition at line 1709 of file quic.c.

◆ quic_app_rx_callback()

static int quic_app_rx_callback ( session_t udp_session)
static

Definition at line 2094 of file quic.c.

+ Here is the call graph for this function:

◆ quic_build_sockaddr()

static void quic_build_sockaddr ( struct sockaddr *  sa,
socklen_t *  salen,
ip46_address_t *  addr,
u16  port,
u8  is_ip4 
)
inlinestatic

Definition at line 1392 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_common_get_transport_endpoint()

static void quic_common_get_transport_endpoint ( quic_ctx_t ctx,
transport_endpoint_t tep,
u8  is_lcl 
)
inlinestatic

Definition at line 2153 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_config_fn()

static clib_error_t* quic_config_fn ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 2436 of file quic.c.

+ Here is the call graph for this function:

◆ quic_connect()

static int quic_connect ( transport_endpoint_cfg_t tep)
static

Definition at line 1164 of file quic.c.

+ Here is the call graph for this function:

◆ quic_connect_new_connection()

static int quic_connect_new_connection ( session_endpoint_cfg_t sep)
static

Definition at line 1117 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_connect_new_stream()

static int quic_connect_new_stream ( session_t quic_session,
u32  opaque 
)
static

Definition at line 1014 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_connection_closed()

static void quic_connection_closed ( quic_ctx_t ctx)
static

Called when quicly return an error This function interacts tightly with quic_proto_on_close.

Definition at line 282 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_connection_delete()

static void quic_connection_delete ( quic_ctx_t ctx)
static

Definition at line 199 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_connection_get()

static transport_connection_t* quic_connection_get ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 1303 of file quic.c.

+ Here is the call graph for this function:

◆ quic_create_connection()

static int quic_create_connection ( u32  ctx_index,
struct sockaddr *  sa,
socklen_t  salen,
quicly_decoded_packet_t  packet 
)
static

Definition at line 1871 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_create_quic_session()

static int quic_create_quic_session ( quic_ctx_t ctx)
static

Definition at line 1832 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_ctx_alloc()

static u32 quic_ctx_alloc ( u32  thread_index)
static

Definition at line 44 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_free()

static void quic_ctx_free ( quic_ctx_t ctx)
static

Definition at line 59 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_get()

static quic_ctx_t* quic_ctx_get ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 69 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_get_if_valid()

static quic_ctx_t* quic_ctx_get_if_valid ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 75 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_is_listener()

static int quic_ctx_is_listener ( quic_ctx_t ctx)
inlinestatic

Definition at line 104 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_ctx_is_stream()

static int quic_ctx_is_stream ( quic_ctx_t ctx)
inlinestatic

Definition at line 98 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_custom_app_rx_callback()

static int quic_custom_app_rx_callback ( transport_connection_t tc)
static

Definition at line 1727 of file quic.c.

+ Here is the call graph for this function:

◆ quic_custom_tx_callback()

static int quic_custom_tx_callback ( void *  s,
u32  max_burst_size 
)
static

Definition at line 1743 of file quic.c.

+ Here is the call graph for this function:

◆ quic_del_segment_callback()

static int quic_del_segment_callback ( u32  client_index,
u64  seg_handle 
)
static

Definition at line 1718 of file quic.c.

◆ quic_disconnect_transport()

static void quic_disconnect_transport ( quic_ctx_t ctx)
static

Definition at line 185 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_encrypt_ticket_cb()

static int quic_encrypt_ticket_cb ( ptls_encrypt_ticket_t *  _self,
ptls_t *  tls,
int  is_encrypt,
ptls_buffer_t *  dst,
ptls_iovec_t  src 
)
static

Definition at line 881 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_event_log()

void quic_event_log ( quicly_event_logger_t *  _self,
quicly_event_type_t  type,
const quicly_event_attribute_t *  attributes,
size_t  num_attributes 
)

Definition at line 246 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_expired_timers_dispatch()

static void quic_expired_timers_dispatch ( u32 expired_timers)
static

Definition at line 864 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_fifo_egress_emit()

int quic_fifo_egress_emit ( quicly_stream_t *  stream,
size_t  off,
void *  dst,
size_t *  len,
int *  wrote_all 
)

Definition at line 580 of file quic.c.

+ Here is the call graph for this function:

◆ quic_fifo_egress_shift()

void quic_fifo_egress_shift ( quicly_stream_t *  stream,
size_t  delta 
)

Definition at line 565 of file quic.c.

+ Here is the call graph for this function:

◆ quic_find_packet_ctx()

static int quic_find_packet_ctx ( u32 ctx_thread,
u32 ctx_index,
struct sockaddr *  sa,
socklen_t  salen,
quicly_decoded_packet_t *  packet,
u32  caller_thread_index 
)
inlinestatic

Definition at line 1789 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_format_ctx_stat()

static u8* quic_format_ctx_stat ( u8 s,
va_list *  args 
)
static

Definition at line 2368 of file quic.c.

+ Here is the call graph for this function:

◆ quic_free_event_logger()

void quic_free_event_logger ( quicly_event_logger_t *  _self)

Definition at line 271 of file quic.c.

+ Here is the call graph for this function:

◆ quic_get_conn_ctx()

static quic_ctx_t* quic_get_conn_ctx ( quicly_conn_t *  conn)
static

Definition at line 83 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_get_quicly_ctx_from_ctx()

static quicly_context_t* quic_get_quicly_ctx_from_ctx ( quic_ctx_t ctx)
static

Definition at line 138 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_get_quicly_ctx_from_udp()

static quicly_context_t* quic_get_quicly_ctx_from_udp ( u64  udp_session_handle)
static

Definition at line 150 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_get_thread_time()

static int64_t quic_get_thread_time ( u8  thread_index)
static

Definition at line 760 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_get_time()

static int64_t quic_get_time ( quicly_now_t *  self)
static

Definition at line 766 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_get_transport_endpoint()

static void quic_get_transport_endpoint ( u32  ctx_index,
u32  thread_index,
transport_endpoint_t tep,
u8  is_lcl 
)
static

Definition at line 2182 of file quic.c.

+ Here is the call graph for this function:

◆ quic_get_transport_listener_endpoint()

static void quic_get_transport_listener_endpoint ( u32  listener_index,
transport_endpoint_t tep,
u8  is_lcl 
)
static

Definition at line 2165 of file quic.c.

+ Here is the call graph for this function:

◆ quic_increment_counter()

void quic_increment_counter ( u8  evt,
u8  val 
)

Definition at line 234 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_init()

static clib_error_t* quic_init ( vlib_main_t vm)
static

Definition at line 2256 of file quic.c.

+ Here is the call graph for this function:

◆ quic_listener_get()

static transport_connection_t* quic_listener_get ( u32  listener_index)
static

Definition at line 1311 of file quic.c.

+ Here is the call graph for this function:

◆ quic_make_connection_key()

static void quic_make_connection_key ( clib_bihash_kv_16_8_t kv,
const quicly_cid_plaintext_t *  id 
)
inlinestatic

Definition at line 121 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_new_event_logger()

quicly_event_logger_t* quic_new_event_logger ( )

Definition at line 258 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_node_fn()

static uword quic_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 2462 of file quic.c.

◆ quic_on_client_connected()

static int quic_on_client_connected ( quic_ctx_t ctx)
static

Definition at line 1414 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_on_closed_by_peer()

static void quic_on_closed_by_peer ( quicly_closed_by_peer_t *  self,
quicly_conn_t *  conn,
int  code,
uint64_t  frame_type,
const char *  reason,
size_t  reason_len 
)
static

Definition at line 727 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_receive()

static int quic_on_receive ( quicly_stream_t *  stream,
size_t  off,
const void *  src,
size_t  len 
)
static

Definition at line 518 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_receive_reset()

static int quic_on_receive_reset ( quicly_stream_t *  stream,
int  err 
)
static

Definition at line 502 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_stop_sending()

static int quic_on_stop_sending ( quicly_stream_t *  stream,
int  err 
)
static

Definition at line 486 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_stream_destroy()

static void quic_on_stream_destroy ( quicly_stream_t *  stream,
int  err 
)
static

Definition at line 468 of file quic.c.

+ Here is the call graph for this function:

◆ quic_on_stream_open()

static int quic_on_stream_open ( quicly_stream_open_t *  self,
quicly_stream_t *  stream 
)
static

Definition at line 714 of file quic.c.

+ Here is the call graph for this function:

◆ quic_plugin_crypto_command_fn()

static clib_error_t* quic_plugin_crypto_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2326 of file quic.c.

+ Here is the call graph for this function:

◆ quic_plugin_set_fifo_size_command_fn()

static clib_error_t* quic_plugin_set_fifo_size_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2346 of file quic.c.

+ Here is the call graph for this function:

◆ quic_plugin_showstats_command_fn()

static clib_error_t* quic_plugin_showstats_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 2387 of file quic.c.

+ Here is the call graph for this function:

◆ quic_process_one_rx_packet()

static int quic_process_one_rx_packet ( u64  udp_session_handle,
quicly_context_t *  quicly_ctx,
svm_fifo_t f,
u32 fifo_offset,
u32 max_packet,
u32  packet_n,
quic_rx_packet_ctx_t packet_ctx 
)
static

Definition at line 1974 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_proto_on_close()

static void quic_proto_on_close ( u32  ctx_index,
u32  thread_index 
)
static

Definition at line 1179 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_receive_connection()

static void quic_receive_connection ( void *  arg)
static

Definition at line 1481 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_register_cipher_suite()

static void quic_register_cipher_suite ( quic_crypto_engine_t  type,
ptls_cipher_suite_t **  ciphers 
)
static

Definition at line 2229 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_reset_connection()

static int quic_reset_connection ( u64  udp_session_handle,
struct sockaddr *  sa,
socklen_t  salen,
quicly_decoded_packet_t  packet 
)
static

Definition at line 1915 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_send_datagram()

static int quic_send_datagram ( session_t udp_session,
quicly_datagram_t *  packet 
)
static

Definition at line 322 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_send_packets()

static int quic_send_packets ( quic_ctx_t ctx)
static

Definition at line 383 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_sendable_packet_count()

static int quic_sendable_packet_count ( session_t udp_session)
static

Definition at line 129 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_session_accepted_callback()

int quic_session_accepted_callback ( session_t udp_session)

Definition at line 1668 of file quic.c.

+ Here is the call graph for this function:

◆ quic_session_connected_callback()

static int quic_session_connected_callback ( u32  quic_app_index,
u32  ctx_index,
session_t udp_session,
u8  is_fail 
)
static

Definition at line 1553 of file quic.c.

+ Here is the call graph for this function:

◆ quic_session_disconnect_callback()

static void quic_session_disconnect_callback ( session_t s)
static

Definition at line 1626 of file quic.c.

◆ quic_session_migrate_callback()

static void quic_session_migrate_callback ( session_t s,
session_handle_t  new_sh 
)
static

Definition at line 1638 of file quic.c.

+ Here is the call graph for this function:

◆ quic_session_reset_callback()

static void quic_session_reset_callback ( session_t s)
static

Definition at line 1632 of file quic.c.

◆ quic_set_time_now()

static u32 quic_set_time_now ( u32  thread_index)
static

Definition at line 775 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_start_listen()

static u32 quic_start_listen ( u32  quic_listen_session_index,
transport_endpoint_t tep 
)
static

Definition at line 1223 of file quic.c.

+ Here is the call graph for this function:

◆ quic_stop_listen()

static u32 quic_stop_listen ( u32  lctx_index)
static

Definition at line 1282 of file quic.c.

+ Here is the call graph for this function:

◆ quic_store_conn_ctx()

static void quic_store_conn_ctx ( quicly_conn_t *  conn,
quic_ctx_t ctx 
)
static

Definition at line 91 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_store_quicly_ctx()

static void quic_store_quicly_ctx ( application_t app,
u8  is_client 
)
static

Definition at line 933 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_timer_expired()

static void quic_timer_expired ( u32  conn_index)
static

Definition at line 795 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_transfer_connection()

static void quic_transfer_connection ( u32  ctx_index,
u32  dest_thread 
)
static

Definition at line 1525 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_update_conn_ctx()

static void quic_update_conn_ctx ( quicly_conn_t *  conn,
quicly_context_t *  quicly_context 
)
inlinestatic

Definition at line 1468 of file quic.c.

+ Here is the caller graph for this function:

◆ quic_update_fifo_size()

static void quic_update_fifo_size ( )
static

Definition at line 2238 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quic_update_time()

static void quic_update_time ( f64  now,
u8  thread_index 
)
static

Definition at line 785 of file quic.c.

+ Here is the call graph for this function:

◆ quic_update_timer()

static void quic_update_timer ( quic_ctx_t ctx)
static

Definition at line 806 of file quic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ on_closed_by_peer

quicly_closed_by_peer_t on_closed_by_peer
static
Initial value:
=
static void quic_on_closed_by_peer(quicly_closed_by_peer_t *self, quicly_conn_t *conn, int code, uint64_t frame_type, const char *reason, size_t reason_len)
Definition: quic.c:727

Definition at line 743 of file quic.c.

◆ on_stream_open

quicly_stream_open_t on_stream_open = { &quic_on_stream_open }
static

Definition at line 742 of file quic.c.

◆ quic_app_cb_vft

session_cb_vft_t quic_app_cb_vft
static
Initial value:
= {
.session_accept_callback = quic_session_accepted_callback,
.session_disconnect_callback = quic_session_disconnect_callback,
.session_connected_callback = quic_session_connected_callback,
.session_reset_callback = quic_session_reset_callback,
.session_migrate_callback = quic_session_migrate_callback,
.add_segment_callback = quic_add_segment_callback,
.del_segment_callback = quic_del_segment_callback,
.builtin_app_rx_callback = quic_app_rx_callback,
}
static void quic_session_migrate_callback(session_t *s, session_handle_t new_sh)
Definition: quic.c:1638
static int quic_app_rx_callback(session_t *udp_session)
Definition: quic.c:2094
static int quic_add_segment_callback(u32 client_index, u64 seg_handle)
Definition: quic.c:1709
static void quic_session_disconnect_callback(session_t *s)
Definition: quic.c:1626
static int quic_del_segment_callback(u32 client_index, u64 seg_handle)
Definition: quic.c:1718
static int quic_session_connected_callback(u32 quic_app_index, u32 ctx_index, session_t *udp_session, u8 is_fail)
Definition: quic.c:1553
int quic_session_accepted_callback(session_t *udp_session)
Definition: quic.c:1668
static void quic_session_reset_callback(session_t *s)
Definition: quic.c:1632

Definition at line 2195 of file quic.c.

◆ quic_error_strings

char* quic_error_strings[]
static
Initial value:
= {
#define quic_error(n,s)
quic_error (NONE, "no error")
quic_error (TX_PACKETS, "quic TX packets")
quic_error (RX_PACKETS, "quic RX packets")
quic_error (PACKET_DROP, "quic packet drops")
}
#define quic_error(n, s)

Definition at line 33 of file quic.c.

◆ quic_fifosize

u64 quic_fifosize = 0

Definition at line 2344 of file quic.c.

◆ quic_input_node

vlib_node_registration_t quic_input_node
Initial value:
=
{
.function = quic_node_fn,
.name = "quic-input",
.vector_size = sizeof (u32),
.error_strings = quic_error_strings,
}
static uword quic_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: quic.c:2462
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * quic_error_strings[]
Definition: quic.c:33
#define ARRAY_LEN(x)
Definition: clib.h:63

(constructor) VLIB_REGISTER_NODE (quic_input_node)

Definition at line 2469 of file quic.c.

◆ quic_main

quic_main_t quic_main
static

Definition at line 39 of file quic.c.

◆ quic_plugin_crypto_command

vlib_cli_command_t quic_plugin_crypto_command
static
Initial value:
=
{
.path = "quic set crypto api",
.short_help = "quic set crypto api [picotls, vpp]",
}
static clib_error_t * quic_plugin_crypto_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:2326

(constructor) VLIB_CLI_COMMAND (quic_plugin_crypto_command)

Definition at line 2409 of file quic.c.

◆ quic_plugin_set_fifo_size_command

vlib_cli_command_t quic_plugin_set_fifo_size_command
static
Initial value:
=
{
.path = "quic set fifo-size",
.short_help = "quic set fifo-size N[Kb|Mb|GB] (default 64K)",
}
static clib_error_t * quic_plugin_set_fifo_size_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:2346

(constructor) VLIB_CLI_COMMAND (quic_plugin_set_fifo_size_command)

Definition at line 2415 of file quic.c.

◆ quic_plugin_stats_command

vlib_cli_command_t quic_plugin_stats_command
static
Initial value:
=
{
.path = "show quic stats",
.short_help = "show quic stats",
}
static clib_error_t * quic_plugin_showstats_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: quic.c:2387

(constructor) VLIB_CLI_COMMAND (quic_plugin_stats_command)

Definition at line 2421 of file quic.c.

◆ quic_proto

const transport_proto_vft_t quic_proto
static
Initial value:
= {
.connect = quic_connect,
.start_listen = quic_start_listen,
.stop_listen = quic_stop_listen,
.get_connection = quic_connection_get,
.get_listener = quic_listener_get,
.update_time = quic_update_time,
.format_connection = format_quic_connection,
.format_half_open = format_quic_half_open,
.format_listener = format_quic_listener,
.get_transport_endpoint = quic_get_transport_endpoint,
.get_transport_listener_endpoint = quic_get_transport_listener_endpoint,
.transport_options = {
.service_type = TRANSPORT_SERVICE_APP,
},
}
static u32 quic_stop_listen(u32 lctx_index)
Definition: quic.c:1282
static int quic_custom_app_rx_callback(transport_connection_t *tc)
Definition: quic.c:1727
static int quic_connect(transport_endpoint_cfg_t *tep)
Definition: quic.c:1164
static void quic_proto_on_close(u32 ctx_index, u32 thread_index)
Definition: quic.c:1179
static transport_connection_t * quic_connection_get(u32 ctx_index, u32 thread_index)
Definition: quic.c:1303
static u32 quic_start_listen(u32 quic_listen_session_index, transport_endpoint_t *tep)
Definition: quic.c:1223
static u8 * format_quic_connection(u8 *s, va_list *args)
Definition: quic.c:1351
app transport service
static void quic_get_transport_listener_endpoint(u32 listener_index, transport_endpoint_t *tep, u8 is_lcl)
Definition: quic.c:2165
static void quic_update_time(f64 now, u8 thread_index)
Definition: quic.c:785
static int quic_custom_tx_callback(void *s, u32 max_burst_size)
Definition: quic.c:1743
static transport_connection_t * quic_listener_get(u32 listener_index)
Definition: quic.c:1311
apps acting as transports
static u8 * format_quic_listener(u8 *s, va_list *args)
Definition: quic.c:1374
static void quic_get_transport_endpoint(u32 ctx_index, u32 thread_index, transport_endpoint_t *tep, u8 is_lcl)
Definition: quic.c:2182
static u8 * format_quic_half_open(u8 *s, va_list *args)
Definition: quic.c:1362

Definition at line 2206 of file quic.c.

◆ quic_stream_callbacks

const quicly_stream_callbacks_t quic_stream_callbacks
static
Initial value:
= {
.on_destroy = quic_on_stream_destroy,
.on_send_shift = quic_fifo_egress_shift,
.on_send_emit = quic_fifo_egress_emit,
.on_send_stop = quic_on_stop_sending,
.on_receive = quic_on_receive,
.on_receive_reset = quic_on_receive_reset
}
static int quic_on_receive(quicly_stream_t *stream, size_t off, const void *src, size_t len)
Definition: quic.c:518
int quic_fifo_egress_emit(quicly_stream_t *stream, size_t off, void *dst, size_t *len, int *wrote_all)
Definition: quic.c:580
static int quic_on_receive_reset(quicly_stream_t *stream, int err)
Definition: quic.c:502
void quic_fifo_egress_shift(quicly_stream_t *stream, size_t delta)
Definition: quic.c:565
static int quic_on_stop_sending(quicly_stream_t *stream, int err)
Definition: quic.c:486
static void quic_on_stream_destroy(quicly_stream_t *stream, int err)
Definition: quic.c:468

Definition at line 625 of file quic.c.

◆ quicly_vpp_now_cb

quicly_now_t quicly_vpp_now_cb = { quic_get_time }
static

Definition at line 772 of file quic.c.