clib_warning (_fmt, ##_args); \
}
-#define ECHO_REGISTER_PROTO(proto, vft) \
- static void __clib_constructor \
- vpp_echo_init_##proto () \
- { \
- echo_main_t *em = &echo_main; \
- em->available_proto_cb_vft[proto] = &vft; \
+#define ECHO_REGISTER_PROTO(proto, vft) \
+ static void __clib_constructor \
+ vpp_echo_init_##proto () \
+ { \
+ echo_main_t *em = &echo_main; \
+ vec_validate (em->available_proto_cb_vft, proto); \
+ em->available_proto_cb_vft[proto] = &vft; \
}
typedef struct
typedef union session_connected_bundled_msg_
{
session_connected_msg_t *mp;
- vl_api_connect_uri_reply_t *bmp;
} session_connected_bundled_msg_t;
typedef struct echo_proto_cb_vft_
u32 prealloc_fifo_pairs;
u64 rx_buf_size;
u64 tx_buf_size;
- data_source_t data_source; /* Use no/dummy/mirrored data */
+ data_source_t data_source; /* Use no/placeholder/mirrored data */
u8 send_stream_disconnects; /* actively send disconnect */
u8 output_json; /* Output stats as JSON */
volatile u8 wait_for_gdb; /* Wait for gdb to attach */
/* VNET_API_ERROR_FOO -> "Foo" hash table */
uword *error_string_by_error_number;
- echo_proto_cb_vft_t *available_proto_cb_vft[TRANSPORT_N_PROTO];
+ echo_proto_cb_vft_t **available_proto_cb_vft;
echo_stats_t stats;
echo_stats_t last_stat_sampling; /* copy of stats at last sampling */
echo_session_t *echo_session_new (echo_main_t * em);
int echo_send_rpc (echo_main_t * em, void *fp, echo_rpc_args_t * args);
echo_session_t *echo_get_session_from_handle (echo_main_t * em, u64 handle);
-int wait_for_segment_allocation (u64 segment_handle);
int wait_for_state_change (echo_main_t * em, connection_state_t state,
f64 timeout);
void echo_notify_event (echo_main_t * em, echo_test_evt_t e);
u8 *echo_format_crypto_engine (u8 * s, va_list * args);
uword echo_unformat_crypto_engine (unformat_input_t * input, va_list * args);
u8 *echo_format_bytes_per_sec (u8 * s, va_list * args);
+int echo_segment_attach (u64 segment_handle, char *name,
+ ssvm_segment_type_t type, int fd);
+u32 echo_segment_lookup (u64 segment_handle);
+void echo_segment_detach (u64 segment_handle);
/* Binary API */