|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
53 return VNET_API_ERROR_NO_SUCH_FIB;
85 else if (
hi->l3_if_count)
112 else if (
unformat (input,
"disable"))
123 if (VNET_API_ERROR_NO_SUCH_FIB ==
rv)
139 .path =
"set interface mpls",
141 .short_help =
"Enable/Disable an interface for MPLS forwarding",
208 .path =
"show mpls interface",
210 .short_help =
"Show MPLS interface forwarding",
u8 mpls_sw_interface_is_enabled(u32 sw_if_index)
static vlib_cli_command_t show_mpls_interface_command
(constructor) VLIB_CLI_COMMAND (show_mpls_interface_command)
#define clib_error_return(e, args...)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static clib_error_t * show_mpls_interface(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u8 * mpls_enabled_by_sw_if_index
static vlib_cli_command_t set_interface_ip_table_command
(constructor) VLIB_CLI_COMMAND (set_interface_ip_table_command)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vnet_main_t * vnet_get_main(void)
u32 fib_node_index_t
A typedef of a node index.
static void show_mpls_one_interface(vnet_main_t *vnm, vlib_main_t *vm, u32 sw_if_index, bool verbose)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define VLIB_CLI_COMMAND(x,...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static clib_error_t * mpls_interface_enable_disable(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
void fib_table_lock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Release a reference counting lock on the table.
#define MPLS_FIB_DEFAULT_TABLE_ID
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
int mpls_sw_interface_enable_disable(mpls_main_t *mm, u32 sw_if_index, u8 is_enable, u8 is_api)
@ FIB_SOURCE_CLI
From the CLI.
@ FIB_SOURCE_API
From the control plane API.
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)
void vnet_sw_interface_walk(vnet_main_t *vnm, vnet_sw_interface_walk_t fn, void *ctx)
Walk all the SW interfaces in the system.
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
static walk_rc_t show_mpls_interface_walk(vnet_main_t *vnm, vnet_sw_interface_t *si, void *ctx)
u32 * fib_index_by_sw_if_index
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vl_api_interface_index_t sw_if_index
enum walk_rc_t_ walk_rc_t
Walk return code.