FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
span.c File Reference
+ Include dependency graph for span.c:

Go to the source code of this file.

Enumerations

enum  span_state_t { SPAN_DISABLE = 0, SPAN_RX = 1, SPAN_TX = 2, SPAN_BOTH = SPAN_RX | SPAN_TX }
 

Functions

static_always_inline u32 span_dst_set (span_mirror_t *sm, u32 dst_sw_if_index, int enable)
 
int span_add_delete_entry (vlib_main_t *vm, u32 src_sw_if_index, u32 dst_sw_if_index, u8 state, span_feat_t sf)
 
static uword unformat_span_state (unformat_input_t *input, va_list *args)
 
static clib_error_tset_interface_span_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_interfaces_span_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

span_main_t span_main
 
static vlib_cli_command_t set_interface_span_command
 (constructor) VLIB_CLI_COMMAND (set_interface_span_command) More...
 
static vlib_cli_command_t show_interfaces_span_command
 (constructor) VLIB_CLI_COMMAND (show_interfaces_span_command) More...
 

Enumeration Type Documentation

◆ span_state_t

Enumerator
SPAN_DISABLE 
SPAN_RX 
SPAN_TX 
SPAN_BOTH 

Definition at line 26 of file span.c.

Function Documentation

◆ set_interface_span_command_fn()

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

Definition at line 128 of file span.c.

+ Here is the call graph for this function:

◆ show_interfaces_span_command_fn()

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

Definition at line 175 of file span.c.

+ Here is the call graph for this function:

◆ span_add_delete_entry()

int span_add_delete_entry ( vlib_main_t vm,
u32  src_sw_if_index,
u32  dst_sw_if_index,
u8  state,
span_feat_t  sf 
)

Definition at line 52 of file span.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ span_dst_set()

static_always_inline u32 span_dst_set ( span_mirror_t sm,
u32  dst_sw_if_index,
int  enable 
)

Definition at line 35 of file span.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unformat_span_state()

static uword unformat_span_state ( unformat_input_t input,
va_list *  args 
)
static

Definition at line 111 of file span.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ set_interface_span_command

vlib_cli_command_t set_interface_span_command
static
Initial value:
= {
.path = "set interface span",
.short_help = "set interface span <if-name> [l2] {disable | destination <if-name> [both|rx|tx]}",
}
static clib_error_t * set_interface_span_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: span.c:128

(constructor) VLIB_CLI_COMMAND (set_interface_span_command)

Definition at line 167 of file span.c.

◆ show_interfaces_span_command

vlib_cli_command_t show_interfaces_span_command
static
Initial value:
= {
.path = "show interface span",
.short_help = "Shows SPAN mirror table",
}
static clib_error_t * show_interfaces_span_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: span.c:175

(constructor) VLIB_CLI_COMMAND (show_interfaces_span_command)

Definition at line 238 of file span.c.

◆ span_main

span_main_t span_main

Definition at line 24 of file span.c.