static clib_error_t *
punt_cli (vlib_main_t * vm,
- unformat_input_t * input, vlib_cli_command_t * cmd)
+ unformat_input_t * input__, vlib_cli_command_t * cmd)
{
+ unformat_input_t line_input, *input = &line_input;
clib_error_t *error = NULL;
bool is_add = true;
/* *INDENT-OFF* */
u32 port;
/* *INDENT-ON* */
+ if (!unformat_user (input__, unformat_line_input, input))
+ return 0;
+
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "del"))
}
done:
+ unformat_free (input);
return error;
}
static clib_error_t *
punt_socket_register_cmd (vlib_main_t * vm,
- unformat_input_t * input, vlib_cli_command_t * cmd)
+ unformat_input_t * input__,
+ vlib_cli_command_t * cmd)
{
+ unformat_input_t line_input, *input = &line_input;
u8 *socket_name = 0;
clib_error_t *error = NULL;
/* *INDENT-OFF* */
};
/* *INDENT-ON* */
+ if (!unformat_user (input__, unformat_line_input, input))
+ return 0;
+
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "ipv4"))
error = vnet_punt_socket_add (vm, 1, &pr, (char *) socket_name);
done:
+ unformat_free (input);
return error;
}
static clib_error_t *
punt_socket_deregister_cmd (vlib_main_t * vm,
- unformat_input_t * input,
+ unformat_input_t * input__,
vlib_cli_command_t * cmd)
{
+ unformat_input_t line_input, *input = &line_input;
clib_error_t *error = NULL;
/* *INDENT-OFF* */
punt_reg_t pr = {
};
/* *INDENT-ON* */
+ if (!unformat_user (input__, unformat_line_input, input))
+ return 0;
+
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "ipv4"))
error = vnet_punt_socket_del (vm, &pr);
done:
+ unformat_free (input);
return error;
}
static clib_error_t *
punt_socket_show_cmd (vlib_main_t * vm,
- unformat_input_t * input, vlib_cli_command_t * cmd)
+ unformat_input_t * input__, vlib_cli_command_t * cmd)
{
+ unformat_input_t line_input, *input = &line_input;
clib_error_t *error = NULL;
punt_type_t pt;
pt = PUNT_TYPE_L4;
+ if (!unformat_user (input__, unformat_line_input, input))
+ return 0;
+
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "exception"))
punt_client_walk (pt, punt_client_show_one, vm);
done:
+ unformat_free (input);
return (error);
}