54 return VNET_API_ERROR_NO_SUCH_FIB;
82 sw_if_index, !is_enable, 0, 0);
113 else if (
unformat (input,
"disable"))
124 if (VNET_API_ERROR_NO_SUCH_FIB == rv)
140 .path =
"set interface mpls",
142 .short_help =
"Enable/Disable an interface for MPLS forwarding",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static clib_error_t * mpls_interface_enable_disable(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vnet_main_t * vnet_get_main(void)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
u32 * fib_index_by_sw_if_index
u8 mpls_sw_interface_is_enabled(u32 sw_if_index)
unformat_function_t unformat_vnet_sw_interface
u8 * mpls_enabled_by_sw_if_index
#define clib_error_return(e, args...)
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
#define MPLS_FIB_DEFAULT_TABLE_ID
int mpls_sw_interface_enable_disable(mpls_main_t *mm, u32 sw_if_index, u8 is_enable, u8 is_api)
u32 fib_node_index_t
A typedef of a node index.
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
#define VLIB_CLI_COMMAND(x,...)
From the control plane API.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#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)
vl_api_interface_index_t sw_if_index
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)