21 #include <sys/ioctl.h> 22 #include <sys/socket.h> 24 #include <sys/types.h> 26 #include <netinet/in.h> 52 if (
unformat (line_input,
"name %s", &host_if_name))
64 if (host_if_name ==
NULL)
70 if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
73 if (r == VNET_API_ERROR_INVALID_INTERFACE)
76 if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
86 .path =
"create host-interface",
87 .short_help =
"create host-interface name <interface name> [hw-addr <mac>]",
105 if (
unformat (line_input,
"name %s", &host_if_name))
113 if (host_if_name ==
NULL)
124 .path =
"delete host-interface",
125 .short_help =
"delete host-interface name <interface name>",
static clib_error_t * af_packet_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vnet_sw_if_index_name
vnet_main_t * vnet_get_main(void)
#define VLIB_INIT_FUNCTION(x)
clib_error_t * af_packet_cli_init(vlib_main_t *vm)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
static clib_error_t * af_packet_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
int af_packet_create_if(vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set, u32 *sw_if_index)
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)