|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
40 #ifndef included_vlib_cli_h
41 #define included_vlib_cli_h
162 #ifndef CLIB_MARCH_VARIANT
163 #define VLIB_CLI_COMMAND(x, ...) \
164 __VA_ARGS__ vlib_cli_command_t x; \
165 static void __vlib_cli_command_registration_##x (void) \
166 __attribute__ ((__constructor__)); \
167 static void __vlib_cli_command_registration_##x (void) \
169 vlib_global_main_t *vgm = vlib_get_global_main (); \
170 vlib_cli_main_t *cm = &vgm->cli_main; \
171 x.next_cli_command = cm->cli_command_registrations; \
172 cm->cli_command_registrations = &x; \
174 static void __vlib_cli_command_unregistration_##x (void) \
175 __attribute__ ((__destructor__)); \
176 static void __vlib_cli_command_unregistration_##x (void) \
178 vlib_global_main_t *vgm = vlib_get_global_main (); \
179 vlib_cli_main_t *cm = &vgm->cli_main; \
180 VLIB_REMOVE_FROM_LINKED_LIST (cm->cli_command_registrations, &x, \
183 __VA_ARGS__ vlib_cli_command_t x
187 #define VLIB_CLI_COMMAND(x,...) \
188 static __clib_unused vlib_cli_command_t __clib_unused_##x
191 #define VLIB_CLI_PARSE_RULE(x) \
192 vlib_cli_parse_rule_t x
vlib_cli_sub_rule_t * sub_rules
uword unformat_vlib_cli_sub_input(unformat_input_t *i, va_list *args)
vlib_cli_sub_command_t * sub_commands
clib_error_t * vlib_cli_register_parse_rule(struct vlib_main_t *vm, vlib_cli_parse_rule_t *c)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
int vlib_cli_input(struct vlib_main_t *vm, unformat_input_t *input, vlib_cli_output_function_t *function, uword function_arg)
struct vlib_cli_command_t * next_cli_command
vlib_cli_parse_position_t * sub_command_positions
struct vlib_cli_command_t vlib_cli_command_t
uword * sub_command_index_by_name
struct vlib_cli_main_t vlib_cli_main_t
clib_error_t * vlib_cli_register(struct vlib_main_t *vm, vlib_cli_command_t *c)
unformat_function_t * unformat_function
void() vlib_cli_output_function_t(uword arg, u8 *buffer, uword buffer_bytes)
void(** perf_counter_cbs)(struct vlib_cli_main_t *, u32 id, int before_or_after)
u8 ** vlib_cli_get_possible_completions(u8 *input_str)
vlib_cli_command_t * commands
void(** perf_counter_cbs_tmp)(struct vlib_cli_main_t *, u32 id, int before_or_after)
uword * sub_rule_index_by_name
void vlib_cli_output(struct vlib_main_t *vm, char *fmt,...)
clib_error_t *() vlib_cli_command_function_t(struct vlib_main_t *vm, unformat_input_t *input, struct vlib_cli_command_t *cmd)
vlib_cli_command_t * cli_command_registrations
uword * command_index_by_path