FD.io VPP  v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
proxy.c File Reference
+ Include dependency graph for proxy.c:

Go to the source code of this file.

Data Structures

struct  proxy_connect_args_t
 

Functions

static void proxy_cb_fn (void *data, u32 data_len)
 
static void proxy_call_main_thread (vnet_connect_args_t *a)
 
static void delete_proxy_session (stream_session_t *s, int is_active_open)
 
static int proxy_accept_callback (stream_session_t *s)
 
static void proxy_disconnect_callback (stream_session_t *s)
 
static void proxy_reset_callback (stream_session_t *s)
 
static int proxy_connected_callback (u32 app_index, u32 api_context, stream_session_t *s, u8 is_fail)
 
static int proxy_add_segment_callback (u32 client_index, const ssvm_private_t *sp)
 
static int proxy_rx_callback (stream_session_t *s)
 
static int active_open_connected_callback (u32 app_index, u32 opaque, stream_session_t *s, u8 is_fail)
 
static void active_open_reset_callback (stream_session_t *s)
 
static int active_open_create_callback (stream_session_t *s)
 
static void active_open_disconnect_callback (stream_session_t *s)
 
static int active_open_rx_callback (stream_session_t *s)
 
static void create_api_loopbacks (vlib_main_t *vm)
 
static int proxy_server_attach ()
 
static int active_open_attach (void)
 
static int proxy_server_listen ()
 
static int proxy_server_create (vlib_main_t *vm)
 
static clib_error_tproxy_server_create_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tproxy_main_init (vlib_main_t *vm)
 

Variables

proxy_main_t proxy_main
 
static session_cb_vft_t proxy_session_cb_vft
 
static session_cb_vft_t active_open_clients
 
static vlib_cli_command_t proxy_create_command
 (constructor) VLIB_CLI_COMMAND (proxy_create_command) More...
 

Function Documentation

static int active_open_attach ( void  )
static

Definition at line 428 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int active_open_connected_callback ( u32  app_index,
u32  opaque,
stream_session_t s,
u8  is_fail 
)
static

Definition at line 273 of file proxy.c.

+ Here is the call graph for this function:

static int active_open_create_callback ( stream_session_t s)
static

Definition at line 334 of file proxy.c.

static void active_open_disconnect_callback ( stream_session_t s)
static

Definition at line 340 of file proxy.c.

+ Here is the call graph for this function:

static void active_open_reset_callback ( stream_session_t s)
static

Definition at line 328 of file proxy.c.

+ Here is the call graph for this function:

static int active_open_rx_callback ( stream_session_t s)
static

Definition at line 346 of file proxy.c.

+ Here is the call graph for this function:

static void create_api_loopbacks ( vlib_main_t vm)
static

Definition at line 378 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void delete_proxy_session ( stream_session_t s,
int  is_active_open 
)
static

Definition at line 61 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int proxy_accept_callback ( stream_session_t s)
static

Definition at line 145 of file proxy.c.

+ Here is the call graph for this function:

static int proxy_add_segment_callback ( u32  client_index,
const ssvm_private_t sp 
)
static

Definition at line 178 of file proxy.c.

static void proxy_call_main_thread ( vnet_connect_args_t a)
static

Definition at line 44 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void proxy_cb_fn ( void *  data,
u32  data_len 
)
static

Definition at line 32 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int proxy_connected_callback ( u32  app_index,
u32  api_context,
stream_session_t s,
u8  is_fail 
)
static

Definition at line 170 of file proxy.c.

static void proxy_disconnect_callback ( stream_session_t s)
static

Definition at line 157 of file proxy.c.

+ Here is the call graph for this function:

clib_error_t* proxy_main_init ( vlib_main_t vm)

Definition at line 605 of file proxy.c.

static void proxy_reset_callback ( stream_session_t s)
static

Definition at line 163 of file proxy.c.

+ Here is the call graph for this function:

static int proxy_rx_callback ( stream_session_t s)
static

Definition at line 185 of file proxy.c.

+ Here is the call graph for this function:

static int proxy_server_attach ( )
static

Definition at line 393 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int proxy_server_create ( vlib_main_t vm)
static

Definition at line 473 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 521 of file proxy.c.

+ Here is the call graph for this function:

static int proxy_server_listen ( )
static

Definition at line 462 of file proxy.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

session_cb_vft_t active_open_clients
static
Initial value:
= {
.session_reset_callback = active_open_reset_callback,
.session_connected_callback = active_open_connected_callback,
.session_accept_callback = active_open_create_callback,
.session_disconnect_callback = active_open_disconnect_callback,
.builtin_app_rx_callback = active_open_rx_callback
}
static int active_open_connected_callback(u32 app_index, u32 opaque, stream_session_t *s, u8 is_fail)
Definition: proxy.c:273
static void active_open_reset_callback(stream_session_t *s)
Definition: proxy.c:328
static int active_open_create_callback(stream_session_t *s)
Definition: proxy.c:334
static void active_open_disconnect_callback(stream_session_t *s)
Definition: proxy.c:340
static int active_open_rx_callback(stream_session_t *s)
Definition: proxy.c:346

Definition at line 367 of file proxy.c.

vlib_cli_command_t proxy_create_command
static
Initial value:
=
{
.path = "test proxy server",
.short_help = "test proxy server [server-uri <tcp://ip/port>]"
"[client-uri <tcp://ip/port>][fifo-size <nn>][rcv-buf-size <nn>]"
"[prealloc-fifos <nn>][private-segment-size <mem>]"
"[private-segment-count <nn>]",
}
static clib_error_t * proxy_server_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: proxy.c:521

(constructor) VLIB_CLI_COMMAND (proxy_create_command)

Definition at line 593 of file proxy.c.

proxy_main_t proxy_main

Definition at line 22 of file proxy.c.

session_cb_vft_t proxy_session_cb_vft
static
Initial value:
= {
.session_accept_callback = proxy_accept_callback,
.session_disconnect_callback = proxy_disconnect_callback,
.session_connected_callback = proxy_connected_callback,
.add_segment_callback = proxy_add_segment_callback,
.builtin_app_rx_callback = proxy_rx_callback,
.session_reset_callback = proxy_reset_callback
}
static int proxy_add_segment_callback(u32 client_index, const ssvm_private_t *sp)
Definition: proxy.c:178
static void proxy_reset_callback(stream_session_t *s)
Definition: proxy.c:163
static int proxy_connected_callback(u32 app_index, u32 api_context, stream_session_t *s, u8 is_fail)
Definition: proxy.c:170
static int proxy_accept_callback(stream_session_t *s)
Definition: proxy.c:145
static void proxy_disconnect_callback(stream_session_t *s)
Definition: proxy.c:157
static int proxy_rx_callback(stream_session_t *s)
Definition: proxy.c:185

Definition at line 263 of file proxy.c.