19 #include <sys/ioctl.h> 47 if (
unformat (line_input,
"name %s", &host_if_name))
53 else if (
unformat (line_input,
"pipe"))
55 else if (
unformat (line_input,
"master"))
57 else if (
unformat (line_input,
"slave"))
65 if (host_if_name ==
NULL)
72 if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
75 if (r == VNET_API_ERROR_INVALID_INTERFACE)
78 if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
88 .path =
"create netmap",
89 .short_help =
"create netmap name [<intf name>|valeXXX:YYY] " 90 "[hw-addr <mac>] [pipe] [master|slave]",
108 if (
unformat (line_input,
"name %s", &host_if_name))
116 if (host_if_name ==
NULL)
126 .path =
"delete netmap",
127 .short_help =
"delete netmap name <interface name>",
static clib_error_t * netmap_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
clib_error_t * netmap_cli_init(vlib_main_t *vm)
format_function_t format_vnet_sw_if_index_name
vnet_main_t * vnet_get_main(void)
#define VLIB_INIT_FUNCTION(x)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
int netmap_create_if(vlib_main_t *vm, u8 *if_name, u8 *hw_addr_set, u8 is_pipe, u8 is_master, u32 *sw_if_index)
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
static clib_error_t * netmap_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
int netmap_delete_if(vlib_main_t *vm, u8 *host_if_name)