21 #include <sys/ioctl.h> 22 #include <sys/socket.h> 24 #include <sys/types.h> 26 #include <netinet/in.h> 51 if (
unformat (line_input,
"name %s", &host_if_name))
60 if (host_if_name ==
NULL)
65 if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
68 if (r == VNET_API_ERROR_INVALID_INTERFACE)
71 if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
78 .path =
"create host-interface",
79 .short_help =
"create host-interface name <interface name> [hw-addr <mac>]",
96 if (
unformat (line_input,
"name %s", &host_if_name))
103 if (host_if_name ==
NULL)
112 .path =
"delete host-interface",
113 .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)
int af_packet_create_if(vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set)
#define VLIB_INIT_FUNCTION(x)
clib_error_t * af_packet_cli_init(vlib_main_t *vm)
#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_delete_if(vlib_main_t *vm, u8 *host_if_name)