FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
cli.c File Reference
+ Include dependency graph for cli.c:

Go to the source code of this file.

Functions

void pg_enable_disable (u32 stream_index, int is_enable)
 
clib_error_tpg_capture (pg_capture_args_t *a)
 
static clib_error_tenable_disable_stream (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static u8format_pg_edit_group (u8 *s, va_list *va)
 
static u8format_pg_stream (u8 *s, va_list *va)
 
static clib_error_tshow_streams (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpg_pcap_read (pg_stream_t *s, char *file_name)
 
static uword unformat_pg_stream_parameter (unformat_input_t *input, va_list *args)
 
static clib_error_tvalidate_stream (pg_stream_t *s)
 
static clib_error_tnew_stream (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tdel_stream (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tchange_stream_parameters (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpg_capture_cmd_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tcreate_pg_if_cmd_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpg_cli_init (vlib_main_t *vm)
 

Variables

static vlib_cli_command_t vlib_cli_pg_command
 (constructor) VLIB_CLI_COMMAND (vlib_cli_pg_command) More...
 
static vlib_cli_command_t enable_streams_cli
 (constructor) VLIB_CLI_COMMAND (enable_streams_cli) More...
 
static vlib_cli_command_t disable_streams_cli
 (constructor) VLIB_CLI_COMMAND (disable_streams_cli) More...
 
static vlib_cli_command_t show_streams_cli
 (constructor) VLIB_CLI_COMMAND (show_streams_cli) More...
 
static vlib_cli_command_t new_stream_cli
 (constructor) VLIB_CLI_COMMAND (new_stream_cli) More...
 
static vlib_cli_command_t del_stream_cli
 (constructor) VLIB_CLI_COMMAND (del_stream_cli) More...
 
static vlib_cli_command_t change_stream_parameters_cli
 (constructor) VLIB_CLI_COMMAND (change_stream_parameters_cli) More...
 
static vlib_cli_command_t pg_capture_cmd
 (constructor) VLIB_CLI_COMMAND (pg_capture_cmd) More...
 
static vlib_cli_command_t create_pg_if_cmd
 (constructor) VLIB_CLI_COMMAND (create_pg_if_cmd) More...
 

Function Documentation

◆ change_stream_parameters()

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

Definition at line 529 of file cli.c.

+ Here is the call graph for this function:

◆ create_pg_if_cmd_fn()

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

Definition at line 659 of file cli.c.

+ Here is the call graph for this function:

◆ del_stream()

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

Definition at line 505 of file cli.c.

+ Here is the call graph for this function:

◆ enable_disable_stream()

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

Definition at line 113 of file cli.c.

+ Here is the call graph for this function:

◆ format_pg_edit_group()

static u8* format_pg_edit_group ( u8 s,
va_list *  va 
)
static

Definition at line 160 of file cli.c.

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

◆ format_pg_stream()

static u8* format_pg_stream ( u8 s,
va_list *  va 
)
static

Definition at line 185 of file cli.c.

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

◆ new_stream()

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

Definition at line 337 of file cli.c.

+ Here is the call graph for this function:

◆ pg_capture()

clib_error_t* pg_capture ( pg_capture_args_t a)

Definition at line 81 of file cli.c.

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

◆ pg_capture_cmd_fn()

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

Definition at line 576 of file cli.c.

+ Here is the call graph for this function:

◆ pg_cli_init()

static clib_error_t* pg_cli_init ( vlib_main_t vm)
static

Definition at line 715 of file cli.c.

+ Here is the caller graph for this function:

◆ pg_enable_disable()

void pg_enable_disable ( u32  stream_index,
int  is_enable 
)

Definition at line 58 of file cli.c.

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

◆ pg_pcap_read()

static clib_error_t* pg_pcap_read ( pg_stream_t s,
char *  file_name 
)
static

Definition at line 266 of file cli.c.

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

◆ show_streams()

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

Definition at line 225 of file cli.c.

+ Here is the call graph for this function:

◆ unformat_pg_stream_parameter()

static uword unformat_pg_stream_parameter ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 290 of file cli.c.

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

◆ validate_stream()

static clib_error_t* validate_stream ( pg_stream_t s)
static

Definition at line 319 of file cli.c.

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

Variable Documentation

◆ change_stream_parameters_cli

vlib_cli_command_t change_stream_parameters_cli
static
Initial value:
= {
.path = "packet-generator configure",
.short_help = "Change packet generator stream parameters",
}
static clib_error_t * change_stream_parameters(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:529

(constructor) VLIB_CLI_COMMAND (change_stream_parameters_cli)

Definition at line 568 of file cli.c.

◆ create_pg_if_cmd

vlib_cli_command_t create_pg_if_cmd
static
Initial value:
= {
.path = "create packet-generator",
.short_help = "create packet-generator interface <interface name>"
" [gso-enabled gso-size <size> [coalesce-enabled]]",
.function = create_pg_if_cmd_fn,
}
static clib_error_t * create_pg_if_cmd_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:659

(constructor) VLIB_CLI_COMMAND (create_pg_if_cmd)

Definition at line 705 of file cli.c.

◆ del_stream_cli

vlib_cli_command_t del_stream_cli
static
Initial value:
= {
.path = "packet-generator delete",
.function = del_stream,
.short_help = "Delete stream with given name",
}
static clib_error_t * del_stream(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:505

(constructor) VLIB_CLI_COMMAND (del_stream_cli)

Definition at line 521 of file cli.c.

◆ disable_streams_cli

vlib_cli_command_t disable_streams_cli
static
Initial value:
= {
.path = "packet-generator disable-stream",
.short_help = "Disable packet generator streams",
.function = enable_disable_stream,
.function_arg = 0,
}
static clib_error_t * enable_disable_stream(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:113

(constructor) VLIB_CLI_COMMAND (disable_streams_cli)

Definition at line 151 of file cli.c.

◆ enable_streams_cli

vlib_cli_command_t enable_streams_cli
static
Initial value:
= {
.path = "packet-generator enable-stream",
.short_help = "Enable packet generator streams",
.function = enable_disable_stream,
.function_arg = 1,
}
static clib_error_t * enable_disable_stream(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:113

(constructor) VLIB_CLI_COMMAND (enable_streams_cli)

Definition at line 142 of file cli.c.

◆ new_stream_cli

vlib_cli_command_t new_stream_cli
static
Initial value:
= {
.path = "packet-generator new",
.function = new_stream,
.short_help = "Create packet generator stream",
.long_help =
"Create packet generator stream\n"
"\n"
"Arguments:\n"
"\n"
"name STRING sets stream name\n"
"interface STRING interface for stream output \n"
"node NODE-NAME node for stream output\n"
"data STRING specifies packet data\n"
"pcap FILENAME read packet data from pcap file\n"
"rate PPS rate to transfer packet data\n"
"maxframe NPKTS maximum number of packets per frame\n",
}
static clib_error_t * new_stream(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:337

(constructor) VLIB_CLI_COMMAND (new_stream_cli)

Definition at line 485 of file cli.c.

◆ pg_capture_cmd

vlib_cli_command_t pg_capture_cmd
static
Initial value:
= {
.path = "packet-generator capture",
.short_help = "packet-generator capture <interface name> pcap <filename> [count <n>]",
.function = pg_capture_cmd_fn,
}
static clib_error_t * pg_capture_cmd_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:576

(constructor) VLIB_CLI_COMMAND (pg_capture_cmd)

Definition at line 651 of file cli.c.

◆ show_streams_cli

vlib_cli_command_t show_streams_cli
static
Initial value:
= {
.path = "show packet-generator ",
.short_help = "show packet-generator [verbose]",
.function = show_streams,
}
static clib_error_t * show_streams(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:225

(constructor) VLIB_CLI_COMMAND (show_streams_cli)

Definition at line 258 of file cli.c.

◆ vlib_cli_pg_command

vlib_cli_command_t vlib_cli_pg_command
static
Initial value:
= {
.path = "packet-generator",
.short_help = "Packet generator commands",
}

(constructor) VLIB_CLI_COMMAND (vlib_cli_pg_command)

Definition at line 51 of file cli.c.