FD.io VPP  v20.09-64-g4f7b92f0a
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
 

Macros

#define TCP_MSS   1460
 

Functions

static void proxy_cb_fn (void *data, u32 data_len)
 
static void proxy_call_main_thread (vnet_connect_args_t *a)
 
static proxy_session_tproxy_get_active_open (proxy_main_t *pm, session_handle_t handle)
 
static proxy_session_tproxy_get_passive_open (proxy_main_t *pm, session_handle_t handle)
 
static void proxy_try_close_session (session_t *s, int is_active_open)
 
static void proxy_session_free (proxy_session_t *ps)
 
static void proxy_try_delete_session (session_t *s, u8 is_active_open)
 
static int common_fifo_tuning_callback (session_t *s, svm_fifo_t *f, session_ft_action_t act, u32 bytes)
 
static int proxy_accept_callback (session_t *s)
 
static void proxy_disconnect_callback (session_t *s)
 
static void proxy_reset_callback (session_t *s)
 
static int proxy_connected_callback (u32 app_index, u32 api_context, session_t *s, session_error_t err)
 
static int proxy_add_segment_callback (u32 client_index, u64 segment_handle)
 
static int proxy_rx_callback (session_t *s)
 
static void proxy_force_ack (void *handlep)
 
static int proxy_tx_callback (session_t *proxy_s)
 
static void proxy_cleanup_callback (session_t *s, session_cleanup_ntf_t ntf)
 
static int active_open_connected_callback (u32 app_index, u32 opaque, session_t *s, session_error_t err)
 
static void active_open_reset_callback (session_t *s)
 
static int active_open_create_callback (session_t *s)
 
static void active_open_disconnect_callback (session_t *s)
 
static int active_open_rx_callback (session_t *s)
 
static int active_open_tx_callback (session_t *ao_s)
 
static void active_open_cleanup_callback (session_t *s, session_cleanup_ntf_t ntf)
 
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...
 

Macro Definition Documentation

◆ TCP_MSS

#define TCP_MSS   1460

Definition at line 25 of file proxy.c.

Function Documentation

◆ active_open_attach()

static int active_open_attach ( void  )
static

Definition at line 656 of file proxy.c.

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

◆ active_open_cleanup_callback()

static void active_open_cleanup_callback ( session_t s,
session_cleanup_ntf_t  ntf 
)
static

Definition at line 594 of file proxy.c.

+ Here is the call graph for this function:

◆ active_open_connected_callback()

static int active_open_connected_callback ( u32  app_index,
u32  opaque,
session_t s,
session_error_t  err 
)
static

Definition at line 430 of file proxy.c.

+ Here is the call graph for this function:

◆ active_open_create_callback()

static int active_open_create_callback ( session_t s)
static

Definition at line 514 of file proxy.c.

◆ active_open_disconnect_callback()

static void active_open_disconnect_callback ( session_t s)
static

Definition at line 520 of file proxy.c.

+ Here is the call graph for this function:

◆ active_open_reset_callback()

static void active_open_reset_callback ( session_t s)
static

Definition at line 508 of file proxy.c.

+ Here is the call graph for this function:

◆ active_open_rx_callback()

static int active_open_rx_callback ( session_t s)
static

Definition at line 526 of file proxy.c.

+ Here is the call graph for this function:

◆ active_open_tx_callback()

static int active_open_tx_callback ( session_t ao_s)
static

Definition at line 551 of file proxy.c.

+ Here is the call graph for this function:

◆ common_fifo_tuning_callback()

static int common_fifo_tuning_callback ( session_t s,
svm_fifo_t f,
session_ft_action_t  act,
u32  bytes 
)
static

Definition at line 193 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_accept_callback()

static int proxy_accept_callback ( session_t s)
static

Definition at line 237 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_add_segment_callback()

static int proxy_add_segment_callback ( u32  client_index,
u64  segment_handle 
)
static

Definition at line 279 of file proxy.c.

◆ proxy_call_main_thread()

static void proxy_call_main_thread ( vnet_connect_args_t a)
static

Definition at line 48 of file proxy.c.

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

◆ proxy_cb_fn()

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

Definition at line 35 of file proxy.c.

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

◆ proxy_cleanup_callback()

static void proxy_cleanup_callback ( session_t s,
session_cleanup_ntf_t  ntf 
)
static

Definition at line 409 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_connected_callback()

static int proxy_connected_callback ( u32  app_index,
u32  api_context,
session_t s,
session_error_t  err 
)
static

Definition at line 271 of file proxy.c.

◆ proxy_disconnect_callback()

static void proxy_disconnect_callback ( session_t s)
static

Definition at line 259 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_force_ack()

static void proxy_force_ack ( void *  handlep)
static

Definition at line 365 of file proxy.c.

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

◆ proxy_get_active_open()

static proxy_session_t* proxy_get_active_open ( proxy_main_t pm,
session_handle_t  handle 
)
static

Definition at line 65 of file proxy.c.

+ Here is the caller graph for this function:

◆ proxy_get_passive_open()

static proxy_session_t* proxy_get_passive_open ( proxy_main_t pm,
session_handle_t  handle 
)
static

Definition at line 77 of file proxy.c.

+ Here is the caller graph for this function:

◆ proxy_main_init()

clib_error_t* proxy_main_init ( vlib_main_t vm)

Definition at line 850 of file proxy.c.

◆ proxy_reset_callback()

static void proxy_reset_callback ( session_t s)
static

Definition at line 265 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_rx_callback()

static int proxy_rx_callback ( session_t s)
static

Definition at line 286 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_server_attach()

static int proxy_server_attach ( )
static

Definition at line 616 of file proxy.c.

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

◆ proxy_server_create()

static int proxy_server_create ( vlib_main_t vm)
static

Definition at line 707 of file proxy.c.

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

◆ proxy_server_create_command_fn()

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 751 of file proxy.c.

+ Here is the call graph for this function:

◆ proxy_server_listen()

static int proxy_server_listen ( )
static

Definition at line 696 of file proxy.c.

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

◆ proxy_session_free()

static void proxy_session_free ( proxy_session_t ps)
static

Definition at line 145 of file proxy.c.

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

◆ proxy_try_close_session()

static void proxy_try_close_session ( session_t s,
int  is_active_open 
)
static

Definition at line 89 of file proxy.c.

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

◆ proxy_try_delete_session()

static void proxy_try_delete_session ( session_t s,
u8  is_active_open 
)
static

Definition at line 154 of file proxy.c.

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

◆ proxy_tx_callback()

static int proxy_tx_callback ( session_t proxy_s)
static

Definition at line 376 of file proxy.c.

+ Here is the call graph for this function:

Variable Documentation

◆ active_open_clients

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,
.session_cleanup_callback = active_open_cleanup_callback,
.builtin_app_rx_callback = active_open_rx_callback,
.builtin_app_tx_callback = active_open_tx_callback,
.fifo_tuning_callback = common_fifo_tuning_callback
}
static int active_open_rx_callback(session_t *s)
Definition: proxy.c:526
static int active_open_create_callback(session_t *s)
Definition: proxy.c:514
static int common_fifo_tuning_callback(session_t *s, svm_fifo_t *f, session_ft_action_t act, u32 bytes)
Definition: proxy.c:193
static void active_open_disconnect_callback(session_t *s)
Definition: proxy.c:520
static int active_open_connected_callback(u32 app_index, u32 opaque, session_t *s, session_error_t err)
Definition: proxy.c:430
static void active_open_reset_callback(session_t *s)
Definition: proxy.c:508
static int active_open_tx_callback(session_t *ao_s)
Definition: proxy.c:551
static void active_open_cleanup_callback(session_t *s, session_cleanup_ntf_t ntf)
Definition: proxy.c:594

Definition at line 603 of file proxy.c.

◆ proxy_create_command

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>[k|m]]"
"[max-fifo-size <nn>[k|m]][high-watermark <nn>]"
"[low-watermark <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:751

(constructor) VLIB_CLI_COMMAND (proxy_create_command)

Definition at line 837 of file proxy.c.

◆ proxy_main

proxy_main_t proxy_main

Definition at line 23 of file proxy.c.

◆ proxy_session_cb_vft

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,
.builtin_app_tx_callback = proxy_tx_callback,
.session_reset_callback = proxy_reset_callback,
.session_cleanup_callback = proxy_cleanup_callback,
.fifo_tuning_callback = common_fifo_tuning_callback
}
static int proxy_accept_callback(session_t *s)
Definition: proxy.c:237
static void proxy_reset_callback(session_t *s)
Definition: proxy.c:265
static int proxy_connected_callback(u32 app_index, u32 api_context, session_t *s, session_error_t err)
Definition: proxy.c:271
static int proxy_tx_callback(session_t *proxy_s)
Definition: proxy.c:376
static int common_fifo_tuning_callback(session_t *s, svm_fifo_t *f, session_ft_action_t act, u32 bytes)
Definition: proxy.c:193
static int proxy_rx_callback(session_t *s)
Definition: proxy.c:286
static void proxy_disconnect_callback(session_t *s)
Definition: proxy.c:259
static int proxy_add_segment_callback(u32 client_index, u64 segment_handle)
Definition: proxy.c:279
static void proxy_cleanup_callback(session_t *s, session_cleanup_ntf_t ntf)
Definition: proxy.c:409

Definition at line 417 of file proxy.c.