FD.io VPP  v16.06
Vector Packet Processing
tapcli.c File Reference
+ Include dependency graph for tapcli.c:

Go to the source code of this file.

Data Structures

struct  tapcli_interface_t
 
struct  tapcli_rx_trace_t
 
struct  tapcli_main_t
 

Enumerations

enum  {
  TAPCLI_RX_NEXT_IP4_INPUT, TAPCLI_RX_NEXT_IP6_INPUT, TAPCLI_RX_NEXT_ETHERNET_INPUT, TAPCLI_RX_NEXT_DROP,
  TAPCLI_RX_N_NEXT
}
 

Functions

static void tapcli_nopunt_frame (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
u8format_tapcli_rx_trace (u8 *s, va_list *va)
 
static uword tapcli_tx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword tapcli_rx_iface (vlib_main_t *vm, vlib_node_runtime_t *node, tapcli_interface_t *ti)
 
static uword tapcli_rx (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_ttapcli_read_ready (unix_file_t *uf)
 
static clib_error_ttapcli_config (vlib_main_t *vm, unformat_input_t *input)
 
static int tap_name_renumber (vnet_hw_interface_t *hi, u32 new_dev_instance)
 
 VNET_HW_INTERFACE_CLASS (tapcli_interface_class, static)
 
static u8format_tapcli_interface_name (u8 *s, va_list *args)
 
static u32 tapcli_flag_change (vnet_main_t *vnm, vnet_hw_interface_t *hw, u32 flags)
 
static void tapcli_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 
static clib_error_ttapcli_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
 VNET_DEVICE_CLASS (tapcli_dev_class, static)
 
int vnet_tap_dump_ifs (tapcli_interface_details_t **out_tapids)
 
static tapcli_interface_ttapcli_get_new_tapif ()
 
int vnet_tap_connect (vlib_main_t *vm, u8 *intfc_name, u8 *hwaddr_arg, u32 *sw_if_indexp)
 
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)
 
static int tapcli_tap_disconnect (tapcli_interface_t *ti)
 
int vnet_tap_delete (vlib_main_t *vm, u32 sw_if_index)
 
static clib_error_ttap_delete_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
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)
 
static clib_error_ttap_modify_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_ttap_connect_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_ttapcli_init (vlib_main_t *vm)
 

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
 
vlib_node_registration_t tapcli_tx_node
 (constructor) VLIB_REGISTER_NODE (tapcli_tx_node) More...
 
static char * tapcli_rx_error_strings []
 
vlib_cli_command_t tap_delete_command
 (constructor) VLIB_CLI_COMMAND (tap_delete_command) More...
 
vlib_cli_command_t tap_modify_command
 (constructor) VLIB_CLI_COMMAND (tap_modify_command) More...
 
vlib_cli_command_t tap_connect_command
 (constructor) VLIB_CLI_COMMAND (tap_connect_command) More...
 

Enumeration Type Documentation

anonymous enum
Enumerator
TAPCLI_RX_NEXT_IP4_INPUT 
TAPCLI_RX_NEXT_IP6_INPUT 
TAPCLI_RX_NEXT_ETHERNET_INPUT 
TAPCLI_RX_NEXT_DROP 
TAPCLI_RX_N_NEXT 

Definition at line 208 of file tapcli.c.

Function Documentation

static u8* format_tapcli_interface_name ( u8 s,
va_list *  args 
)
static

Definition at line 496 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_tapcli_rx_trace ( u8 s,
va_list *  va 
)

Definition at line 67 of file tapcli.c.

+ Here is the call graph for this function:

static clib_error_t* tap_connect_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1004 of file tapcli.c.

+ Here is the call graph for this function:

static clib_error_t* tap_delete_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 893 of file tapcli.c.

+ Here is the call graph for this function:

static clib_error_t* tap_modify_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 948 of file tapcli.c.

+ Here is the call graph for this function:

static int tap_name_renumber ( vnet_hw_interface_t hi,
u32  new_dev_instance 
)
static

Definition at line 465 of file tapcli.c.

+ Here is the caller graph for this function:

static clib_error_t* tapcli_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 434 of file tapcli.c.

+ Here is the call graph for this function:

static u32 tapcli_flag_change ( vnet_main_t vnm,
vnet_hw_interface_t hw,
u32  flags 
)
static

Definition at line 512 of file tapcli.c.

+ Here is the caller graph for this function:

static tapcli_interface_t* tapcli_get_new_tapif ( )
static

Definition at line 638 of file tapcli.c.

+ Here is the caller graph for this function:

clib_error_t* tapcli_init ( vlib_main_t vm)

Definition at line 1108 of file tapcli.c.

+ Here is the call graph for this function:

static clib_error_t* tapcli_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 590 of file tapcli.c.

+ Here is the call graph for this function:

static void tapcli_nopunt_frame ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 482 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* tapcli_read_ready ( unix_file_t uf)
static

Definition at line 412 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword tapcli_rx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 355 of file tapcli.c.

+ Here is the call graph for this function:

static uword tapcli_rx_iface ( vlib_main_t vm,
vlib_node_runtime_t node,
tapcli_interface_t ti 
)
static

Definition at line 218 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void tapcli_set_interface_next_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)
static

Definition at line 564 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int tapcli_tap_disconnect ( tapcli_interface_t ti)
static

Definition at line 838 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword tapcli_tx ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 128 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( tapcli_dev_class  ,
static   
)

+ Here is the caller graph for this function:

VNET_HW_INTERFACE_CLASS ( tapcli_interface_class  ,
static   
)

+ Here is the caller graph for this function:

int vnet_tap_connect ( vlib_main_t vm,
u8 intfc_name,
u8 hwaddr_arg,
u32 sw_if_indexp 
)

Definition at line 663 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 826 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_tap_delete ( vlib_main_t vm,
u32  sw_if_index 
)

Definition at line 863 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_tap_dump_ifs ( tapcli_interface_details_t **  out_tapids)

Definition at line 616 of file tapcli.c.

+ Here is the caller graph for this function:

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 
)

Definition at line 931 of file tapcli.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t tap_connect_command
Initial value:
= {
.path = "tap connect",
.short_help = "tap connect <intfc-name> [hwaddr [<addr> | random]]",
}
static clib_error_t * tap_connect_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: tapcli.c:1004

(constructor) VLIB_CLI_COMMAND (tap_connect_command)

Definition at line 1101 of file tapcli.c.

vlib_cli_command_t tap_delete_command
Initial value:
= {
.path = "tap delete",
.short_help = "tap delete <vpp-tap-intfc-name>",
.function = tap_delete_command_fn,
}
static clib_error_t * tap_delete_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: tapcli.c:893

(constructor) VLIB_CLI_COMMAND (tap_delete_command)

Definition at line 924 of file tapcli.c.

vlib_cli_command_t tap_modify_command
Initial value:
= {
.path = "tap modify",
.short_help = "tap modify <vpp-tap-intfc-name> <linux-intfc-name> [hwaddr [<addr> | random]]",
.function = tap_modify_command_fn,
}
static clib_error_t * tap_modify_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: tapcli.c:948

(constructor) VLIB_CLI_COMMAND (tap_modify_command)

Definition at line 997 of file tapcli.c.

vnet_device_class_t tapcli_dev_class
static

Definition at line 44 of file tapcli.c.

vnet_hw_interface_class_t tapcli_interface_class
static

Definition at line 45 of file tapcli.c.

tapcli_main_t tapcli_main
static

Definition at line 119 of file tapcli.c.

char* tapcli_rx_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_tapcli_error
Definition: tapcli.h:21

Definition at line 386 of file tapcli.c.

vlib_node_registration_t tapcli_rx_node
static
Initial value:
= {
.function = tapcli_rx,
.name = "tapcli-rx",
.state = VLIB_NODE_STATE_INTERRUPT,
.vector_size = 4,
.n_errors = TAPCLI_N_ERROR,
.error_strings = tapcli_rx_error_strings,
.format_trace = format_tapcli_rx_trace,
.n_next_nodes = TAPCLI_RX_N_NEXT,
.next_nodes = {
[TAPCLI_RX_NEXT_IP4_INPUT] = "ip4-input-no-checksum",
[TAPCLI_RX_NEXT_IP6_INPUT] = "ip6-input",
[TAPCLI_RX_NEXT_DROP] = "error-drop",
[TAPCLI_RX_NEXT_ETHERNET_INPUT] = "ethernet-input",
},
}
static char * tapcli_rx_error_strings[]
Definition: tapcli.c:386
static uword tapcli_rx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: tapcli.c:355
u8 * format_tapcli_rx_trace(u8 *s, va_list *va)
Definition: tapcli.c:67

(constructor) VLIB_REGISTER_NODE (tapcli_rx_node)

Definition at line 46 of file tapcli.c.

vlib_node_registration_t tapcli_tx_node
Initial value:
= {
.function = tapcli_tx,
.name = "tapcli-tx",
.vector_size = 4,
}
static uword tapcli_tx(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: tapcli.c:128

(constructor) VLIB_REGISTER_NODE (tapcli_tx_node)

Definition at line 201 of file tapcli.c.