|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
13 s =
format (s,
"%s [idx:%d sz:%d fd:%d]",
i->name,
i->index,
i->shm_size,
26 u32 queue_size = 1024;
27 u8 drop_on_diconnect = 1;
35 if (
unformat (line_input,
"queue-size %u", &queue_size))
37 else if (
unformat (line_input,
"on-disconnect drop"))
38 drop_on_diconnect = 1;
39 else if (
unformat (line_input,
"on-disconnect pass"))
40 drop_on_diconnect = 0;
73 .path =
"snort create-instance",
74 .short_help =
"snort create-instaince name <name> [queue-size <size>] "
75 "[on-disconnect drop|pass]",
129 .path =
"snort attach",
130 .short_help =
"snort attach instance <name> interface <if-name>",
174 .path =
"snort detach",
175 .short_help =
"snort detach interface <if-name>",
193 .path =
"show snort instances",
194 .short_help =
"show snort instances",
221 .path =
"show snort interfaces",
222 .short_help =
"show snort interfaces",
236 .path =
"show snort clients",
237 .short_help =
"show snort clients",
256 .path =
"snort mode polling",
257 .short_help =
"snort mode polling|interrupt",
262 .path =
"snort mode interrupt",
263 .short_help =
"snort mode polling|interrupt",
273 sm->
input_mode == VLIB_NODE_STATE_POLLING ?
"polling" :
"interrupt";
279 .path =
"show snort mode",
280 .short_help =
"show snort mode",
static clib_error_t * snort_show_interfaces_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
clib_error_t * snort_set_node_mode(vlib_main_t *vm, u32 mode)
static clib_error_t * snort_show_instances_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
vl_api_tunnel_mode_t mode
static clib_error_t * snort_show_mode_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t snort_create_instance_command
(constructor) VLIB_CLI_COMMAND (snort_create_instance_command)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static vlib_cli_command_t snort_show_clients_command
(constructor) VLIB_CLI_COMMAND (snort_show_clients_command)
static clib_error_t * snort_mode_polling_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define pool_foreach(VAR, POOL)
Iterate through pool.
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
static vlib_cli_command_t snort_show_instances_command
(constructor) VLIB_CLI_COMMAND (snort_show_instances_command)
vnet_main_t * vnet_get_main(void)
snort_instance_t * instances
static clib_error_t * snort_create_instance_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * snort_detach_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t snort_detach_command
(constructor) VLIB_CLI_COMMAND (snort_detach_command)
static vlib_cli_command_t snort_show_mode_command
(constructor) VLIB_CLI_COMMAND (snort_show_mode_command)
static vlib_cli_command_t snort_mode_polling_command
(constructor) VLIB_CLI_COMMAND (snort_mode_polling_command)
static clib_error_t * snort_show_clients_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_CLI_COMMAND(x,...)
static vlib_cli_command_t snort_mode_interrupt_command
(constructor) VLIB_CLI_COMMAND (snort_mode_interrupt_command)
u32 * instance_by_sw_if_index
static clib_error_t * snort_mode_interrupt_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
clib_error_t * snort_instance_create(vlib_main_t *vm, char *name, u8 log2_queue_sz, u8 drop_on_disconnect)
static vlib_cli_command_t snort_show_interfaces_command
(constructor) VLIB_CLI_COMMAND (snort_show_interfaces_command)
#define vec_free(V)
Free vector's memory (no header).
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
#define vec_foreach(var, vec)
Vector iterator.
static uword pool_elts(void *v)
Number of active elements in a pool.
clib_error_t * snort_interface_enable_disable(vlib_main_t *vm, char *instance_name, u32 sw_if_index, int is_enable)
static clib_error_t * snort_attach_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t snort_attach_command
(constructor) VLIB_CLI_COMMAND (snort_attach_command)
static u8 * format_snort_instance(u8 *s, va_list *args)
static uword min_log2(uword x)
static uword is_pow2(uword x)
vl_api_interface_index_t sw_if_index