48 session_fifo_event_t evt;
52 rx_fifo = s->server_rx_fifo;
53 tx_fifo = s->server_tx_fifo;
60 _vec_len (my_copy_buffer) = this_transfer;
64 ASSERT (actual_transfer == this_transfer);
74 evt.enqueue_length = actual_transfer;
94 char segment_name[128];
95 u32 segment_name_length;
99 segment_name_length =
ARRAY_LEN (segment_name);
101 memset (a, 0,
sizeof (*a));
102 memset (options, 0,
sizeof (options));
104 a->uri = (
char *) uri;
105 a->api_client_index = ~0;
106 a->segment_name = segment_name;
107 a->segment_name_length = segment_name_length;
112 a->options = options;
153 if (
unformat (input,
"uri %s", &uri))
182 .path =
"builtin uri bind",
183 .short_help =
"builtin uri bind",
198 if (
unformat (input,
"uri %s", &uri))
227 .path =
"builtin uri unbind",
228 .short_help =
"builtin uri unbind",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
int svm_fifo_enqueue_nowait(svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_from_here)
static int builtin_session_create_callback(stream_session_t *s)
int vnet_bind_uri(vnet_bind_args_t *a)
int vnet_unbind_uri(char *uri, u32 api_client_index)
static session_cb_vft_t builtin_server
static u32 svm_fifo_max_enqueue(svm_fifo_t *f)
struct _stream_session_t stream_session_t
#define VLIB_INIT_FUNCTION(x)
static u32 svm_fifo_max_dequeue(svm_fifo_t *f)
struct _stream_session_cb_vft session_cb_vft_t
#define clib_error_return(e, args...)
int unix_shared_memory_queue_add(unix_shared_memory_queue_t *q, u8 *elem, int nowait)
void builtin_session_disconnect_callback(stream_session_t *s)
static unix_shared_memory_queue_t * session_manager_get_vpp_event_queue(u32 thread_index)
#define vec_free(V)
Free vector's memory (no header).
static int unbind_builtin_uri_server(u8 *uri)
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * builtin_server_init(vlib_main_t *vm)
u8 ** copy_buffers
per-worker built-in server copy buffers
void stream_session_disconnect(stream_session_t *s)
Disconnect session and propagate to transport.
int builtin_server_rx_callback(stream_session_t *s, session_fifo_event_t *e)
static int bind_builtin_uri_server(u8 *uri)
static vlib_thread_main_t * vlib_get_thread_main()
int svm_fifo_dequeue_nowait(svm_fifo_t *f, int pid, u32 max_bytes, u8 *copy_here)
static clib_error_t * builtin_uri_bind_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
struct _vnet_bind_args_t vnet_bind_args_t
static clib_error_t * builtin_uri_unbind_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
struct _unix_shared_memory_queue unix_shared_memory_queue_t