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)
Grouping of global data for the L2 emulation feature.
u32 l2_input_feat_next[32]
Next nodes for L2 output features.
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
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
#define VLIB_INIT_FUNCTION(x)
#define clib_error_return(e, args...)
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_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
#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 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 vlib_cli_output(vlib_main_t *vm, char *fmt,...)
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)