if (is_set)
{
vnet_sw_interface_t *sw_if =
- vnet_get_sw_interface_safe (&vnet_main, sw_if_index);
+ vnet_get_sw_interface_or_null (&vnet_main, sw_if_index);
vnet_hw_interface_t *hw_if =
vnet_get_hw_interface (&vnet_main, sw_if->hw_if_index);
u8 *s = format (NULL, "UDP echo source is: %v\n", hw_if->name);
};
/* *INDENT-ON* */
-static u8 *
-format_vnet_api_errno (u8 * s, va_list * args)
-{
- vnet_api_error_t api_error = va_arg (*args, vnet_api_error_t);
-#define _(a, b, c) \
- case b: \
- s = format (s, "%s", c); \
- break;
- switch (api_error)
- {
- foreach_vnet_api_error default:s = format (s, "UNKNOWN");
- break;
- }
- return s;
-}
-
static clib_error_t *
bfd_cli_key_add (vlib_main_t * vm, unformat_input_t * input,
CLIB_UNUSED (vlib_cli_command_t * lmd))