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)
69 if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
72 if (r == VNET_API_ERROR_INVALID_INTERFACE)
75 if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
85 .path =
"create host-interface",
86 .short_help =
"create host-interface name <interface name> [hw-addr <mac>]",
104 if (
unformat (line_input,
"name %s", &host_if_name))
112 if (host_if_name ==
NULL)
122 .path =
"delete host-interface",
123 .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,...)
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)
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
#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)