|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
21 #include <sys/ioctl.h>
22 #include <sys/socket.h>
24 #include <sys/types.h>
26 #include <netinet/in.h>
47 u8 *host_if_name = NULL;
60 if (
unformat (line_input,
"name %s", &host_if_name))
74 if (host_if_name == NULL)
82 if (
r == VNET_API_ERROR_SYSCALL_ERROR_1)
88 if (
r == VNET_API_ERROR_INVALID_INTERFACE)
94 if (
r == VNET_API_ERROR_SUBIF_ALREADY_EXISTS)
134 .path =
"create host-interface",
135 .short_help =
"create host-interface name <ifname> [hw-addr <mac-addr>]",
145 u8 *host_if_name = NULL;
154 if (
unformat (line_input,
"name %s", &host_if_name))
164 if (host_if_name == NULL)
191 .path =
"delete host-interface",
192 .short_help =
"delete host-interface name <ifname>",
216 else if (
unformat (line_input,
"on"))
218 else if (
unformat (line_input,
"off"))
248 .path =
"set host-interface l4-cksum-offload",
249 .short_help =
"set host-interface l4-cksum-offload <host-if-name> <on|off>",
uword unformat_ethernet_address(unformat_input_t *input, va_list *args)
static vlib_cli_command_t af_packet_create_command
(constructor) VLIB_CLI_COMMAND (af_packet_create_command)
static clib_error_t * af_packet_create_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#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)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
vnet_hw_if_output_node_runtime_t * r
int af_packet_delete_if(vlib_main_t *vm, u8 *host_if_name)
vnet_main_t * vnet_get_main(void)
#define VLIB_CLI_COMMAND(x,...)
int af_packet_set_l4_cksum_offload(vlib_main_t *vm, u32 sw_if_index, u8 set)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * af_packet_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t af_packet_delete_command
(constructor) VLIB_CLI_COMMAND (af_packet_delete_command)
static clib_error_t * af_packet_set_l4_cksum_offload_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define vec_free(V)
Free vector's memory (no header).
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
#define VLIB_INIT_FUNCTION(x)
static vlib_cli_command_t af_packet_set_l4_cksum_offload_command
(constructor) VLIB_CLI_COMMAND (af_packet_set_l4_cksum_offload_command)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
vl_api_interface_index_t sw_if_index
clib_error_t * af_packet_cli_init(vlib_main_t *vm)