21 typedef struct _quic_echo_cb_vft
69 ECHO_LOG (1,
"Qsession 0x%llx S[%d] connected to %U:%d",
71 mp->
lcl.is_ip4, clib_net_to_host_u16 (mp->
lcl.port));
77 static u32 client_index = 0;
92 "Got a wrong connected on session %u [%lx]", session_index,
99 static u32 client_index = 0;
115 ECHO_LOG (2,
"Accept on QSession 0x%lx S[%u]", mp->
handle, session_index);
133 "Got a wrong accept on session 0x%lx S[%u]", mp->
handle,
142 ECHO_LOG (1,
"Accepted session from: %s:%d", ip_str,
143 clib_net_to_host_u16 (mp->
rmt.port));
162 .quic_connected_cb = NULL,
181 ECHO_LOG (2,
"%U: Invalid listener session type",
229 ECHO_LOG (2,
"Cleanup sessions (still %uQ %uS): app %U",
281 if (eqm->
cb_vft.quic_connected_cb)
282 eqm->
cb_vft.quic_connected_cb (mp, session->session_index);
299 eqm->
cb_vft.server_stream_connected_cb (mp, session->session_index);
301 eqm->
cb_vft.client_stream_connected_cb (mp, session->session_index);
326 u32 session_index,
u8 is_failed)
330 ECHO_FAIL (ECHO_FAIL_QUIC_WRONG_CONNECT,
"Echo connect failed");
350 if (eqm->
cb_vft.quic_accepted_cb)
351 eqm->
cb_vft.quic_accepted_cb (mp, session->session_index);
365 eqm->
cb_vft.server_stream_accepted_cb (mp, session->session_index);
367 eqm->
cb_vft.client_stream_accepted_cb (mp, session->session_index);
377 "expected unidirectional streams");
445 if (
unformat (input,
"serverstream"))
447 else if (
unformat (input,
"default"))
509 "-- QUIC specific options -- \n" 510 " quic-setup OPT OPT=serverstream : Client open N connections. \n" 511 " On each one server opens M streams\n" 512 " OPT=default : Client open N connections.\n" 513 " On each one client opens M streams\n" 514 " qclose=[Y|N|W] When connection is done send[Y]|nop[N]|wait[W] for close\n" 515 " uni Use unidirectional streams\n" 517 " quic-streams N Open N QUIC streams (defaults to 1)\n");
volatile u64 accepted_session_count
static void quic_echo_on_accept_connect(session_accepted_msg_t *mp, u32 session_index)
static void quic_echo_on_connected(session_connected_msg_t *mp, u32 session_index)
teardown_stat_t clean_count
u8 * echo_format_session(u8 *s, va_list *args)
echo_session_t * sessions
#define pool_foreach(VAR, POOL)
Iterate through pool.
static void quic_echo_set_defaults_after_opts_cb()
static const quic_echo_cb_vft_t server_stream_cb_vft
#define clib_memcpy_fast(a, b, c)
static void quic_echo_disconnected_cb(session_disconnected_msg_t *mp, echo_session_t *s)
static void quic_echo_connected_cb(session_connected_bundled_msg_t *mp, u32 session_index, u8 is_failed)
volatile connection_state_t state
quic_echo_cb_vft_t cb_vft
ECHO_REGISTER_PROTO(TRANSPORT_PROTO_QUIC, quic_echo_proto_cb_vft)
foreach_app_session_field u64 vpp_session_handle
volatile u32 n_clients_connected
description fragment has unexpected format
quic_echo_proto_main_t quic_echo_proto_main
void echo_send_disconnect_session(echo_main_t *em, void *args)
#define ECHO_FAIL(fail, _fmt, _args...)
static void quic_echo_reset_cb(session_reset_msg_t *mp, echo_session_t *s)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static const quic_echo_cb_vft_t default_cb_vft
static void quic_echo_accepted_cb(session_accepted_msg_t *mp, echo_session_t *session)
teardown_stat_t accepted_count
static uword quic_echo_unformat_setup_vft(unformat_input_t *input, va_list *args)
static void quic_echo_initiate_qsession_close_no_stream(echo_main_t *em)
u8 * echo_format_app_state(u8 *s, va_list *args)
volatile u32 n_quic_clients_connected
static void quic_echo_on_accept_error(session_accepted_msg_t *mp, u32 session_index)
#define SESSION_INVALID_INDEX
format_function_t format_ip46_address
#define clib_atomic_sub_fetch(a, b)
static void quic_echo_on_connected_error(session_connected_msg_t *mp, u32 session_index)
static void quic_echo_cleanup_cb(echo_session_t *s, u8 parent_died)
sll srl srl sll sra u16x4 i
static void quic_echo_print_usage_cb()
#define ECHO_LOG(lvl, _fmt, _args...)
void echo_notify_event(echo_main_t *em, echo_test_evt_t e)
u32 *volatile data_thread_args
struct _quic_echo_cb_vft quic_echo_cb_vft_t
u64 parent_session_handle
int echo_send_rpc(echo_main_t *em, void *fp, echo_rpc_args_t *args)
struct echo_main_t::@665 uri_elts
static void quic_echo_on_connected_connect(session_connected_msg_t *mp, u32 session_index)
static int quic_echo_process_opts_cb(unformat_input_t *a)
teardown_stat_t close_count
#define clib_atomic_fetch_add(a, b)
static void quic_echo_on_accept_log_ip(session_accepted_msg_t *mp, u32 session_index)
volatile u64 bytes_to_receive
teardown_stat_t active_count
static void quic_echo_set_defaults_before_opts_cb()
teardown_stat_t connected_count
static void quic_echo_on_accept_recv(session_accepted_msg_t *mp, u32 session_index)
void echo_send_connect(echo_main_t *em, void *args)
void echo_session_print_stats(echo_main_t *em, echo_session_t *session)
teardown_stat_t reset_count
static void quic_echo_sent_disconnect_cb(echo_session_t *s)
static void quic_echo_cleanup_listener(u32 listener_index, echo_main_t *em, quic_echo_proto_main_t *eqm)
uword echo_unformat_close(unformat_input_t *input, va_list *args)
static void quic_echo_on_connected_send(session_connected_msg_t *mp, u32 session_index)
void(* disconnected_cb)(session_disconnected_msg_t *mp, echo_session_t *s)