19 #include <sys/ioctl.h> 25 #include <vnet/devices/netmap/net_netmap.h> 26 #include <vnet/devices/netmap/netmap.h> 33 u8 *host_if_name = NULL;
48 if (
unformat (line_input,
"name %s", &host_if_name))
54 else if (
unformat (line_input,
"pipe"))
56 else if (
unformat (line_input,
"master"))
58 else if (
unformat (line_input,
"slave"))
68 if (host_if_name == NULL)
78 if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
84 if (r == VNET_API_ERROR_INVALID_INTERFACE)
90 if (r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
153 .path =
"create netmap",
154 .short_help =
"create netmap name <ifname>|valeXXX:YYY " 155 "[hw-addr <mac-addr>] [pipe] [master|slave]",
165 u8 *host_if_name = NULL;
174 if (
unformat (line_input,
"name %s", &host_if_name))
184 if (host_if_name == NULL)
216 .path =
"delete netmap",
217 .short_help =
"delete netmap name <ifname>|valeXXX:YYY",
vnet_main_t * vnet_get_main(void)
format_function_t format_vnet_sw_if_index_name
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
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)
#define VLIB_CLI_COMMAND(x,...)
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
vl_api_interface_index_t sw_if_index
int netmap_delete_if(vlib_main_t *vm, u8 *host_if_name)