97 else if (
unformat (input,
"disable"))
103 if (~0 == sw_if_index)
125 .path =
"set interface l2 l2-emulation",
127 "set interface l2 l2-emulation <interface-name> [disable|enable]\n",
164 .path =
"show interface l2 l2-emulation",
165 .short_help =
"show interface l2 l2-emulation\n",
#define vec_foreach_index(var, v)
Iterate over vector indices.
vnet_main_t * vnet_get_main(void)
static clib_error_t * l2_emulation_interface_add_del(vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
Grouping of global data for the L2 emulation feature.
u32 l2_input_feat_next[32]
Next nodes for L2 output features.
void l2_emulation_disable(u32 sw_if_index)
unformat_function_t unformat_vnet_sw_interface
VNET_SW_INTERFACE_ADD_DEL_FUNCTION(l2_emulation_interface_add_del)
format_function_t format_vnet_sw_if_index_name
vl_api_interface_index_t sw_if_index
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
void ip4_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
l2_emulation_main_t l2_emulation_main
u32 l2_emulation_node_index
static void feat_bitmap_init_next_nodes(vlib_main_t *vm, u32 node_index, u32 num_features, char **feat_names, u32 *next_nodes)
Initialize the feature next-node indexes of a graph node.
vlib_main_t vlib_node_runtime_t * node
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * l2_emulation_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u8 enabled
Enabled or Disabled.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
void l2_emulation_enable(u32 sw_if_index)
L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and in...
Per-interface L2 configuration.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static clib_error_t * l2_emulation_init(vlib_main_t *vm)
l2_emulation_t * l2_emulations
Per-interface vector of emulation configs.
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
void ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
static clib_error_t * l2_emulation_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)