FD.io VPP  v17.10-9-gd594711
Vector Packet Processing
cli.h File Reference
+ Include dependency graph for cli.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vlib_cli_parse_position_t
 
struct  vlib_cli_sub_command_t
 
struct  vlib_cli_sub_rule_t
 
struct  vlib_cli_parse_rule_t
 
struct  vlib_cli_command_t
 
struct  vlib_cli_main_t
 

Macros

#define VLIB_CLI_COMMAND(x, ...)
 
#define VLIB_CLI_PARSE_RULE(x)   vlib_cli_parse_rule_t x
 

Typedefs

typedef clib_error_t *( vlib_cli_command_function_t) (struct vlib_main_t *vm, unformat_input_t *input, struct vlib_cli_command_t *cmd)
 
typedef struct vlib_cli_command_t vlib_cli_command_t
 
typedef void( vlib_cli_output_function_t) (uword arg, u8 *buffer, uword buffer_bytes)
 

Functions

void vlib_cli_output (struct vlib_main_t *vm, char *fmt,...)
 
void vlib_cli_input (struct vlib_main_t *vm, unformat_input_t *input, vlib_cli_output_function_t *function, uword function_arg)
 
clib_error_tvlib_cli_register (struct vlib_main_t *vm, vlib_cli_command_t *c)
 
clib_error_tvlib_cli_register_parse_rule (struct vlib_main_t *vm, vlib_cli_parse_rule_t *c)
 
uword unformat_vlib_cli_sub_input (unformat_input_t *i, va_list *args)
 
u8 ** vlib_cli_get_possible_completions (u8 *input_str)
 

Macro Definition Documentation

#define VLIB_CLI_COMMAND (   x,
  ... 
)
Value:
__VA_ARGS__ vlib_cli_command_t x; \
static void __vlib_cli_command_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vlib_cli_command_registration_##x (void) \
{ \
vlib_cli_main_t *cm = &vm->cli_main; \
x.next_cli_command = cm->cli_command_registrations; \
cm->cli_command_registrations = &x; \
} \
__VA_ARGS__ vlib_cli_command_t x
struct vlib_main_t vlib_main_t
vlib_main_t * vm
Definition: buffer.c:283
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:23

Definition at line 154 of file cli.h.

#define VLIB_CLI_PARSE_RULE (   x)    vlib_cli_parse_rule_t x

Definition at line 166 of file cli.h.

Typedef Documentation

typedef clib_error_t*( vlib_cli_command_function_t) (struct vlib_main_t *vm, unformat_input_t *input, struct vlib_cli_command_t *cmd)

Definition at line 88 of file cli.h.

typedef void( vlib_cli_output_function_t) (uword arg, u8 *buffer, uword buffer_bytes)

Definition at line 131 of file cli.h.

Function Documentation

uword unformat_vlib_cli_sub_input ( unformat_input_t i,
va_list *  args 
)

Definition at line 152 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8** vlib_cli_get_possible_completions ( u8 input_str)

Definition at line 249 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vlib_cli_input ( struct vlib_main_t vm,
unformat_input_t input,
vlib_cli_output_function_t function,
uword  function_arg 
)

Definition at line 643 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vlib_cli_output ( struct vlib_main_t vm,
char *  fmt,
  ... 
)

Definition at line 680 of file cli.c.

+ Here is the call graph for this function:

clib_error_t* vlib_cli_register ( struct vlib_main_t vm,
vlib_cli_command_t c 
)

Definition at line 1126 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_cli_register_parse_rule ( struct vlib_main_t vm,
vlib_cli_parse_rule_t c 
)

Definition at line 1208 of file cli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: