FD.io VPP
v17.01.1-3-gc6833f8
Vector Packet Processing
|
dynamic tap interface hookup More...
Go to the source code of this file.
Data Structures | |
struct | tapcli_interface_t |
Struct for the tapcli interface. More... | |
struct | tapcli_rx_trace_t |
Struct for RX trace. More... | |
struct | tapcli_main_t |
TAPCLI main state struct. More... | |
Functions | |
static void | tapcli_nopunt_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
Free "no punt" frame. More... | |
u8 * | format_tapcli_rx_trace (u8 *s, va_list *va) |
Function to format TAP CLI trace. More... | |
static uword | tapcli_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
tapcli TX node function More... | |
static uword | tapcli_rx_iface (vlib_main_t *vm, vlib_node_runtime_t *node, tapcli_interface_t *ti) |
Dispatch tapcli RX node function for node tap_cli_rx. More... | |
static uword | tapcli_rx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
tapcli RX node function More... | |
static clib_error_t * | tapcli_read_ready (unix_file_t *uf) |
Gets called when file descriptor is ready from epoll. More... | |
static clib_error_t * | tapcli_config (vlib_main_t *vm, unformat_input_t *input) |
CLI function for TAPCLI configuration. More... | |
static int | tap_name_renumber (vnet_hw_interface_t *hi, u32 new_dev_instance) |
Renumber TAPCLI interface. More... | |
VNET_HW_INTERFACE_CLASS (tapcli_interface_class, static) | |
static u8 * | format_tapcli_interface_name (u8 *s, va_list *args) |
Formatter for TAPCLI interface name. More... | |
static u32 | tapcli_flag_change (vnet_main_t *vnm, vnet_hw_interface_t *hw, u32 flags) |
Modify interface flags for TAPCLI interface. More... | |
static void | tapcli_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index) |
Setting the TAP interface's next processing node. More... | |
static clib_error_t * | tapcli_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags) |
Set link_state == admin_state otherwise things like ip6 neighbor discovery breaks. More... | |
VNET_DEVICE_CLASS (tapcli_dev_class, static) | |
int | vnet_tap_dump_ifs (tapcli_interface_details_t **out_tapids) |
Dump TAP interfaces. More... | |
static tapcli_interface_t * | tapcli_get_new_tapif () |
Get tap interface from inactive interfaces or create new. More... | |
int | vnet_tap_connect (vlib_main_t *vm, u8 *intfc_name, u8 *hwaddr_arg, u32 *sw_if_indexp) |
Connect a TAP interface. More... | |
int | vnet_tap_connect_renumber (vlib_main_t *vm, u8 *intfc_name, u8 *hwaddr_arg, u32 *sw_if_indexp, u8 renumber, u32 custom_dev_instance) |
Renumber a TAP interface. More... | |
static int | tapcli_tap_disconnect (tapcli_interface_t *ti) |
Disconnect TAP CLI interface. More... | |
int | vnet_tap_delete (vlib_main_t *vm, u32 sw_if_index) |
Delete TAP interface. More... | |
static clib_error_t * | tap_delete_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI function to delete TAP interface. More... | |
int | vnet_tap_modify (vlib_main_t *vm, u32 orig_sw_if_index, u8 *intfc_name, u8 *hwaddr_arg, u32 *sw_if_indexp, u8 renumber, u32 custom_dev_instance) |
Modifies tap interface - can result in new interface being created. More... | |
static clib_error_t * | tap_modify_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI function to modify TAP interface. More... | |
static clib_error_t * | tap_connect_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
CLI function to connect TAP interface. More... | |
clib_error_t * | tapcli_init (vlib_main_t *vm) |
TAPCLI main init. More... | |
Variables | |
static vnet_device_class_t | tapcli_dev_class |
static vnet_hw_interface_class_t | tapcli_interface_class |
static vlib_node_registration_t | tapcli_rx_node |
(constructor) VLIB_REGISTER_NODE (tapcli_rx_node) More... | |
static tapcli_main_t | tapcli_main |
static vlib_node_registration_t | tapcli_tx_node |
(constructor) VLIB_REGISTER_NODE (tapcli_tx_node) More... | |
static char * | tapcli_rx_error_strings [] |
TAPCLI error strings. More... | |
static vlib_cli_command_t | tap_delete_command |
(constructor) VLIB_CLI_COMMAND (tap_delete_command) More... | |
static vlib_cli_command_t | tap_modify_command |
(constructor) VLIB_CLI_COMMAND (tap_modify_command) More... | |
static vlib_cli_command_t | tap_connect_command |
(constructor) VLIB_CLI_COMMAND (tap_connect_command) More... | |
dynamic tap interface hookup
Definition in file tapcli.c.
|
static |
CLI function to connect TAP interface.
*vm | - vlib_main_t |
*input | - unformat_input_t |
*cmd | - vlib_cli_command_t |
Definition at line 1214 of file tapcli.c.
|
static |
CLI function to delete TAP interface.
*vm | - vlib_main_t |
*input | - unformat_input_t |
*cmd | - vlib_cli_command_t |
Definition at line 1070 of file tapcli.c.
|
static |
CLI function to modify TAP interface.
*vm | - vlib_main_t |
*input | - unformat_input_t |
*cmd | - vlib_cli_command_t |
Definition at line 1148 of file tapcli.c.
|
static |
Renumber TAPCLI interface.
*hi | - vnet_hw_interface_t |
new_dev_instance | - u32 |
Definition at line 532 of file tapcli.c.
|
static |
CLI function for TAPCLI configuration.
*vm | - vlib_main_t |
*input | - unformat_input_t |
Definition at line 492 of file tapcli.c.
|
static |
Modify interface flags for TAPCLI interface.
*vnm | - vnet_main_t |
*hw | - vnet_hw_interface_t |
flags | - u32 |
Definition at line 607 of file tapcli.c.
|
static |
Get tap interface from inactive interfaces or create new.
Definition at line 758 of file tapcli.c.
clib_error_t* tapcli_init | ( | vlib_main_t * | vm | ) |
TAPCLI main init.
*vm | - vlib_main_t |
Definition at line 1311 of file tapcli.c.
|
static |
Set link_state == admin_state otherwise things like ip6 neighbor discovery breaks.
*vnm | - vnet_main_t |
hw_if_index | - u32 |
flags | - u32 |
Definition at line 698 of file tapcli.c.
|
static |
Free "no punt" frame.
*vm | - vlib_main_t |
*node | - vlib_node_runtime_t |
*frame | - vlib_frame_t |
Definition at line 557 of file tapcli.c.
|
static |
Gets called when file descriptor is ready from epoll.
*uf | - unix_file_t |
Schedule the rx node
Mark the specific tap interface ready-to-read
Definition at line 461 of file tapcli.c.
|
static |
tapcli RX node function
tap-cli-rx
Input node from the Kernel tun/tap device
*vm | - vlib_main_t |
*node | - vlib_node_runtime_t |
*frame | - vlib_frame_t |
Definition at line 402 of file tapcli.c.
|
static |
Dispatch tapcli RX node function for node tap_cli_rx.
*vm | - vlib_main_t |
*node | - vlib_node_runtime_t |
*ti | - tapcli_interface_t |
Definition at line 251 of file tapcli.c.
|
static |
Setting the TAP interface's next processing node.
*vnm | - vnet_main_t |
hw_if_index | - u32 |
node_index | - u32 |
Shut off redirection
Definition at line 667 of file tapcli.c.
|
static |
Disconnect TAP CLI interface.
*ti | - tapcli_interface_t |
Definition at line 995 of file tapcli.c.
|
static |
tapcli TX node function
tap-cli-tx
Output node, writes the buffers comprising the incoming frame to the tun/tap device, aka hands them to the Linux kernel stack.
*vm | - vlib_main_t |
*node | - vlib_node_runtime_t |
*frame | - vlib_frame_t |
Definition at line 160 of file tapcli.c.
VNET_DEVICE_CLASS | ( | tapcli_dev_class | , |
static | |||
) |
VNET_HW_INTERFACE_CLASS | ( | tapcli_interface_class | , |
static | |||
) |
int vnet_tap_connect | ( | vlib_main_t * | vm, |
u8 * | intfc_name, | ||
u8 * | hwaddr_arg, | ||
u32 * | sw_if_indexp | ||
) |
Connect a TAP interface.
vm | - vlib_main_t |
intfc_name | - u8 |
hwaddr_arg | - u8 |
sw_if_indexp | - u32 |
Definition at line 794 of file tapcli.c.
int vnet_tap_connect_renumber | ( | vlib_main_t * | vm, |
u8 * | intfc_name, | ||
u8 * | hwaddr_arg, | ||
u32 * | sw_if_indexp, | ||
u8 | renumber, | ||
u32 | custom_dev_instance | ||
) |
Renumber a TAP interface.
*vm | - vlib_main_t |
*intfc_name | - u8 |
*hwaddr_arg | - u8 |
*sw_if_indexp | - u32 |
renumber | - u8 |
custom_dev_instance | - u32 |
Definition at line 975 of file tapcli.c.
int vnet_tap_delete | ( | vlib_main_t * | vm, |
u32 | sw_if_index | ||
) |
Delete TAP interface.
*vm | - vlib_main_t |
sw_if_index | - u32 |
Definition at line 1030 of file tapcli.c.
int vnet_tap_dump_ifs | ( | tapcli_interface_details_t ** | out_tapids | ) |
Dump TAP interfaces.
**out_tapids | - tapcli_interface_details_t |
Definition at line 731 of file tapcli.c.
int vnet_tap_modify | ( | vlib_main_t * | vm, |
u32 | orig_sw_if_index, | ||
u8 * | intfc_name, | ||
u8 * | hwaddr_arg, | ||
u32 * | sw_if_indexp, | ||
u8 | renumber, | ||
u32 | custom_dev_instance | ||
) |
Modifies tap interface - can result in new interface being created.
*vm | - vlib_main_t |
orig_sw_if_index | - u32 |
*intfc_name | - u8 |
*hwaddr_arg | - u8 |
*sw_if_indexp | - u32 |
renumber | - u8 |
custom_dev_instance | - u32 |
Definition at line 1121 of file tapcli.c.
|
static |
(constructor) VLIB_CLI_COMMAND (tap_connect_command)
|
static |
(constructor) VLIB_CLI_COMMAND (tap_delete_command)
|
static |
(constructor) VLIB_CLI_COMMAND (tap_modify_command)
|
static |
|
static |
|
static |
|
static |
TAPCLI error strings.
|
static |
(constructor) VLIB_REGISTER_NODE (tapcli_rx_node)
|
static |
(constructor) VLIB_REGISTER_NODE (tapcli_tx_node)