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

Go to the source code of this file.

Functions

clib_error_tl2_vtr_init (vlib_main_t *vm)
 Just a placeholder; ensures file is not eliminated by linker. More...
 
u32 l2vtr_configure (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 vtr_op, u32 push_dot1q, u32 vtr_tag1, u32 vtr_tag2)
 Configure vtag tag rewrite on the given interface. More...
 
u32 l2vtr_get (vlib_main_t *vlib_main, vnet_main_t *vnet_main, u32 sw_if_index, u32 *vtr_op, u32 *push_dot1q, u32 *vtr_tag1, u32 *vtr_tag2)
 Get vtag tag rewrite on the given interface. More...
 
static clib_error_tint_l2_vtr (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 Set subinterface vtr enable/disable. More...
 

Variables

static vlib_cli_command_t int_l2_vtr_cli
 (constructor) VLIB_CLI_COMMAND (int_l2_vtr_cli) More...
 

Function Documentation

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

Set subinterface vtr enable/disable.

The CLI format is: set interface l2 tag-rewrite <interface> [disable | pop 1 | pop 2 | push {dot1q|dot1ad} <tag> [<tag>]]

"push" can also be replaced by "translate-{1|2}-{1|2}"

Definition at line 421 of file l2_vtr.c.

+ Here is the call graph for this function:

clib_error_t* l2_vtr_init ( vlib_main_t vm)

Just a placeholder; ensures file is not eliminated by linker.

Definition at line 35 of file l2_vtr.c.

u32 l2vtr_configure ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  sw_if_index,
u32  vtr_op,
u32  push_dot1q,
u32  vtr_tag1,
u32  vtr_tag2 
)

Configure vtag tag rewrite on the given interface.

Return 1 if there is an error, 0 if ok

Definition at line 48 of file l2_vtr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 l2vtr_get ( vlib_main_t vlib_main,
vnet_main_t vnet_main,
u32  sw_if_index,
u32 vtr_op,
u32 push_dot1q,
u32 vtr_tag1,
u32 vtr_tag2 
)

Get vtag tag rewrite on the given interface.

Return 1 if there is an error, 0 if ok

Definition at line 261 of file l2_vtr.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t int_l2_vtr_cli
static
Initial value:
= {
.path = "set interface l2 tag-rewrite",
.short_help = "set interface l2 tag-rewrite <interface> [disable | pop {1|2} | push {dot1q|dot1ad} <tag> <tag>]",
.function = int_l2_vtr,
}
static clib_error_t * int_l2_vtr(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Set subinterface vtr enable/disable.
Definition: l2_vtr.c:421

(constructor) VLIB_CLI_COMMAND (int_l2_vtr_cli)

Definition at line 536 of file l2_vtr.c.