42 if (
unformat (line_input,
"name %s", &host_if_name))
46 else if (
unformat (line_input,
"pipe"))
48 else if (
unformat (line_input,
"master"))
50 else if (
unformat (line_input,
"slave"))
57 if (host_if_name ==
NULL)
62 if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
65 if (r == VNET_API_ERROR_INVALID_INTERFACE)
68 if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
75 .path =
"create netmap",
76 .short_help =
"create netmap name [<intf name>|valeXXX:YYY] " 77 "[hw-addr <mac>] [pipe] [master|slave]",
94 if (
unformat (line_input,
"name %s", &host_if_name))
101 if (host_if_name ==
NULL)
110 .path =
"delete netmap",
111 .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)
#define VLIB_INIT_FUNCTION(x)
int netmap_create_if(vlib_main_t *vm, u8 *if_name, u8 *hw_addr_set, u8 is_pipe, u8 is_master)
#define VLIB_CLI_COMMAND(x,...)
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
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)