FD.io VPP  v17.04.2-2-ga8f93f8
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_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

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

Definition at line 473 of file cli.c.

+ Here is the call graph for this function:

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 600 of file cli.c.

+ Here is the call graph for this function:

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

Definition at line 449 of file cli.c.

+ Here is the call graph for this function:

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

Definition at line 109 of file cli.c.

+ Here is the call graph for this function:

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

Definition at line 149 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 291 of file cli.c.

+ Here is the call graph for this function:

clib_error_t* pg_capture ( pg_capture_args_t a)

Definition at line 81 of file cli.c.

+ Here is the caller graph for this function:

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 517 of file cli.c.

+ Here is the call graph for this function:

static clib_error_t* pg_cli_init ( vlib_main_t vm)
static

Definition at line 642 of file cli.c.

+ Here is the caller graph for this function:

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:

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

Definition at line 220 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 188 of file cli.c.

+ Here is the call graph for this function:

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

Definition at line 245 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* validate_stream ( pg_stream_t s)
static

Definition at line 274 of file cli.c.

+ Here is the caller graph for this function:

Variable Documentation

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:473

(constructor) VLIB_CLI_COMMAND (change_stream_parameters_cli)

Definition at line 509 of file cli.c.

vlib_cli_command_t create_pg_if_cmd
static
Initial value:
= {
.path = "create packet-generator",
.short_help = "create packet-generator interface <interface name>",
.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:600

(constructor) VLIB_CLI_COMMAND (create_pg_if_cmd)

Definition at line 633 of file cli.c.

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:449

(constructor) VLIB_CLI_COMMAND (del_stream_cli)

Definition at line 465 of file cli.c.

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:109

(constructor) VLIB_CLI_COMMAND (disable_streams_cli)

Definition at line 140 of file cli.c.

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:109

(constructor) VLIB_CLI_COMMAND (enable_streams_cli)

Definition at line 131 of file cli.c.

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",
}
static clib_error_t * new_stream(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cli.c:291

(constructor) VLIB_CLI_COMMAND (new_stream_cli)

Definition at line 431 of file cli.c.

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:517

(constructor) VLIB_CLI_COMMAND (pg_capture_cmd)

Definition at line 592 of file cli.c.

vlib_cli_command_t show_streams_cli
static
Initial value:
= {
.path = "show packet-generator",
.short_help = "Show packet generator streams",
.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:188

(constructor) VLIB_CLI_COMMAND (show_streams_cli)

Definition at line 212 of file cli.c.

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.